:root {
            --primary: #008298;
            --primary-dark: #006778;
            --primary-soft: rgba(0, 130, 152, 0.12);
            --surface: rgba(255, 255, 255, 0.92);
            --surface-solid: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --danger: #ef4444;
            --warning: #f59e0b;
            --success: #16a34a;
            --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
            --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.16);
            --shadow-lg: 0 22px 55px rgba(15, 23, 42, 0.24);
            --radius-sm: 10px;
            --radius-md: 14px;
            --radius-lg: 22px;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
        html, body { width: 100%; height: 100%; color: var(--text-main); }
        body { overflow: hidden; background: #eef5f7; }

        #map {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100vh;
            z-index: 1;
        }

        .app-header {
            position: fixed;
            top: 18px;
            left: 18px;
            right: 18px;
            z-index: 600;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            pointer-events: none;
        }

        .brand-card,
        .quick-search,
        .map-legend-card,
        .summary-legend-card {
            pointer-events: auto;
            background: var(--surface);
            border: 1px solid rgba(226, 232, 240, 0.86);
            box-shadow: var(--shadow-md);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        .brand-card {
            display: flex;
            align-items: center;
            gap: 12px;
            border-radius: var(--radius-lg);
            padding: 14px 18px;
            min-width: 240px;
        }

        .brand-logo {
            width: 42px;
            height: 42px;
            border-radius: 14px;
            display: grid;
            place-items: center;
            background: linear-gradient(135deg, var(--primary), #00abc2);
            color: white;
            font-weight: 800;
            letter-spacing: -0.04em;
            box-shadow: var(--shadow-sm);
        }

        .brand-card h1 { font-size: 18px; line-height: 1.1; color: var(--primary-dark); }
        .brand-card p { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

        .legend-stack {
            pointer-events: auto;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 10px;
            max-width: 620px;
        }

        .summary-stack {
            position: fixed;
            top: 102px;
            left: 18px;
            z-index: 610;
            pointer-events: none;
            width: min(360px, calc(100vw - 36px));
            max-height: calc(100dvh - 190px);
            overflow-y: auto;
            display: grid;
            gap: 10px;
        }

        .map-legend-card {
            border-radius: var(--radius-lg);
            padding: 12px 14px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            flex-wrap: wrap;
            max-width: 620px;
        }

        .summary-legend-card {
            pointer-events: auto;
            border-radius: 20px;
            padding: 13px;
            display: grid;
            grid-template-columns: 1fr;
            gap: 9px;
            width: 100%;
            max-width: 360px;
        }

        .summary-legend-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-size: 12px;
            font-weight: 900;
            color: var(--text-main);
        }

        .summary-legend-subtitle {
            font-size: 10.5px;
            font-weight: 700;
            color: var(--text-muted);
        }

        .summary-legend-block {
            display: grid;
            gap: 7px;
            padding: 9px 10px;
            border-radius: 14px;
            background: rgba(248,250,252,0.88);
            border: 1px solid rgba(226,232,240,0.92);
        }

        .summary-main-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            font-size: 11.5px;
            font-weight: 800;
            color: var(--text-main);
        }

        .summary-main-label {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
        }

        .summary-hint {
            font-size: 10.5px;
            line-height: 1.35;
            color: var(--text-muted);
            font-weight: 700;
        }

        .summary-detail-list {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }

        .summary-detail-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 6px 8px;
            border-radius: 11px;
            background: #ffffff;
            border: 1px solid rgba(226,232,240,0.9);
            font-size: 10.5px;
            color: var(--text-muted);
            font-weight: 700;
        }

        .summary-detail-row b {
            color: var(--primary-dark);
            font-size: 11px;
            font-weight: 900;
        }

        .summary-legend-card .legend-stat-icon {
            width: auto;
            min-width: 34px;
            height: 22px;
            padding: 0 8px;
            border-radius: 999px;
            font-size: 10px;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            flex: 0 0 auto;
        }

        .summary-legend-card .summary-detail-list {
            grid-template-columns: 1fr;
        }

        .summary-legend-card .summary-main-label span:last-child {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: normal;
            line-height: 1.25;
        }

        .map-legend-title {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-main);
            margin-right: 2px;
        }

        .map-legend-item {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            white-space: nowrap;
        }

        .legend-dot {
            width: 11px;
            height: 11px;
            border-radius: 999px;
            display: inline-block;
            border: 2px solid white;
            box-shadow: 0 0 0 1px rgba(15,23,42,0.12);
        }


        .legend-map-icon {
            width: 18px;
            height: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 18px;
            border-radius: 999px;
            background: rgba(255,255,255,0.84);
            box-shadow: 0 2px 6px rgba(15,23,42,0.18);
        }

        .legend-map-icon img {
            width: 16px;
            height: 16px;
            display: block;
            object-fit: contain;
        }

        .legend-map-icon-usulan img {
            width: 18px;
            height: 18px;
        }

        .legend-map-icon-kualitas-air img {
            width: 18px;
            height: 18px;
        }

        .legend-stat-icon {
            width: 18px;
            height: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 18px;
            border-radius: 6px;
            background: rgba(0,130,152,0.12);
            color: var(--primary-dark);
            font-size: 11px;
            font-weight: 900;
            box-shadow: 0 2px 6px rgba(15,23,42,0.12);
        }

        .legend-stat-value {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 24px;
            height: 18px;
            padding: 0 7px;
            border-radius: 999px;
            color: var(--primary-dark);
            background: var(--primary-soft);
            border: 1px solid rgba(0,130,152,0.16);
            font-size: 11px;
            font-weight: 900;
        }

        .map-legend-item.is-hidden,
        .map-legend-card.is-hidden,
        .summary-legend-card.is-hidden,
        .summary-legend-block.is-hidden { display: none; }

        .quick-search {
            position: fixed;
            top: 104px;
            left: 18px;
            z-index: 600;
            width: 336px;
            border-radius: var(--radius-lg);
            padding: 16px;
        }

        .quick-search h2 {
            font-size: 14px;
            font-weight: 800;
            margin-bottom: 4px;
        }

        .quick-search .hint {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 14px;
        }

        .form-group { margin-bottom: 11px; }
        label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }

        .form-control {
            width: 100%;
            min-height: 40px;
            padding: 9px 11px;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            font-size: 13px;
            font-weight: 500;
            color: var(--text-main);
            background: #fff;
            outline: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .form-control:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-soft);
        }

        .button-row { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 12px; }

        .btn-primary,
        .btn-secondary,
        .btn-ghost {
            border: none;
            border-radius: var(--radius-sm);
            min-height: 40px;
            padding: 9px 12px;
            cursor: pointer;
            font-weight: 800;
            font-size: 13px;
            transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), #00a8bd);
            color: white;
            box-shadow: 0 10px 18px rgba(0, 130, 152, 0.22);
        }

        .btn-primary:hover { transform: translateY(-1px); background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
        .btn-secondary { background: #f1f5f9; color: #334155; border: 1px solid var(--border); }
        .btn-secondary:hover { background: #e2e8f0; }
        .btn-ghost { background: #fff; color: var(--primary-dark); border: 1px solid rgba(0,130,152,0.25); }
        .btn-ghost:hover { background: var(--primary-soft); }

        .leaflet-control-zoom {
            border: none !important;
            box-shadow: var(--shadow-md) !important;
        }
        .leaflet-control-zoom a {
            border: none !important;
            color: var(--primary-dark) !important;
        }

        .station-tooltip {
            border: none !important;
            border-radius: 999px !important;
            padding: 5px 9px !important;
            box-shadow: var(--shadow-sm) !important;
            color: var(--text-main) !important;
            font-weight: 700 !important;
            font-size: 11px !important;
        }

        .professional-popup .leaflet-popup-content-wrapper {
            border-radius: 24px;
            padding: 0;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
            border: 1px solid rgba(226,232,240,0.88);
        }

        .professional-popup .leaflet-popup-content {
            width: 860px !important;
            max-width: calc(100vw - 64px) !important;
            margin: 0;
        }

        .professional-popup .leaflet-popup-tip {
            box-shadow: var(--shadow-sm);
        }

        .station-popup {
            background: #f8fafc;
        }

        .popup-hero {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
            padding: 20px 22px;
            background:
                radial-gradient(circle at top left, rgba(0, 171, 194, 0.18), transparent 32%),
                linear-gradient(135deg, #ffffff, #eef9fb);
            border-bottom: 1px solid var(--border);
        }

        .popup-badge {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 5px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 800;
            color: var(--primary-dark);
            background: var(--primary-soft);
            border: 1px solid rgba(0,130,152,0.22);
            margin-bottom: 9px;
        }

        .popup-hero h3 {
            font-size: 22px;
            line-height: 1.1;
            margin-bottom: 6px;
            color: var(--text-main);
            letter-spacing: -0.03em;
        }

        .popup-meta {
            display: flex;
            gap: 9px;
            flex-wrap: wrap;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 600;
        }

        .popup-meta span {
            background: white;
            border: 1px solid var(--border);
            border-radius: 999px;
            padding: 5px 9px;
        }

        .popup-body {
            display: grid;
            grid-template-columns: 270px 1fr;
            gap: 14px;
            padding: 16px;
        }

        .popup-panel {
            background: var(--surface-solid);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 14px;
            box-shadow: var(--shadow-sm);
        }

        .popup-panel h4 {
            font-size: 13px;
            font-weight: 800;
            margin-bottom: 4px;
        }

        .popup-panel p {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 12px;
        }

        .popup-date-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

        /* =====================================================
           PEMILIH BULAN & TAHUN PROFESIONAL UNTUK POPUP FILTER
           ===================================================== */
        .filter-title-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 14px;
        }

        .filter-title-row h4 {
            margin: 0 0 3px 0;
            font-size: 13px;
            font-weight: 900;
            color: var(--text-main);
        }

        .filter-title-row p {
            margin: 0;
            font-size: 11.5px;
            line-height: 1.45;
            color: var(--text-muted);
        }

        .filter-icon {
            width: 34px;
            height: 34px;
            flex: 0 0 34px;
            border-radius: 13px;
            display: grid;
            place-items: center;
            color: white;
            background: linear-gradient(135deg, var(--primary), #00a8bd);
            box-shadow: 0 9px 18px rgba(0,130,152,0.20);
            font-size: 16px;
        }

        .selected-range-preview {
            display: grid;
            grid-template-columns: 1fr;
            gap: 7px;
            margin-bottom: 12px;
        }

        .range-preview-chip {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 13px;
            background: linear-gradient(135deg, #f8fafc, #eef9fb);
            border: 1px solid rgba(0,130,152,0.14);
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 700;
        }

        .range-preview-chip b {
            color: var(--primary-dark);
            font-size: 11.5px;
            white-space: nowrap;
        }

        .professional-month-group {
            position: relative;
            margin-bottom: 0;
        }

        .month-picker-button {
            width: 100%;
            min-height: 58px;
            padding: 10px 11px;
            border: 1px solid rgba(203, 213, 225, 0.95);
            border-radius: 16px;
            background:
                radial-gradient(circle at top right, rgba(0, 168, 189, 0.10), transparent 38%),
                linear-gradient(180deg, #ffffff, #f8fafc);
            box-shadow: 0 8px 18px rgba(15,23,42,0.06);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            text-align: left;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
        }

        .month-picker-button:hover {
            border-color: rgba(0,130,152,0.45);
            box-shadow: 0 12px 24px rgba(15,23,42,0.10);
            transform: translateY(-1px);
        }

        .month-picker-button:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-soft), 0 12px 24px rgba(15,23,42,0.10);
        }

        .month-picker-button .picker-label {
            display: block;
            font-size: 10.5px;
            color: var(--text-muted);
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 3px;
        }

        .month-picker-button .picker-value {
            display: block;
            font-size: 13px;
            color: var(--text-main);
            font-weight: 900;
            line-height: 1.2;
        }

        .month-picker-arrow {
            width: 30px;
            height: 30px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            background: var(--primary-soft);
            color: var(--primary-dark);
            font-weight: 900;
            flex-shrink: 0;
        }

        .month-picker-popover {
            display: none;
            position: absolute;
            left: 0;
            top: calc(100% + 8px);
            width: 292px;
            max-width: min(292px, calc(100vw - 42px));
            z-index: 3500;
            padding: 12px;
            border-radius: 18px;
            background: rgba(255,255,255,0.98);
            border: 1px solid rgba(226,232,240,0.95);
            box-shadow: 0 22px 55px rgba(15,23,42,0.24);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        .month-picker-popover.open {
            display: block;
            animation: pickerFadeIn 0.16s ease both;
        }

        @keyframes pickerFadeIn {
            from { opacity: 0; transform: translateY(-6px) scale(0.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .month-picker-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 6px;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--primary), #00a8bd);
            color: white;
            box-shadow: 0 10px 20px rgba(0,130,152,0.18);
        }

        .month-picker-year {
            font-size: 15px;
            font-weight: 900;
            letter-spacing: -0.02em;
        }

        .month-nav-btn {
            width: 34px;
            height: 34px;
            border: 0;
            border-radius: 11px;
            cursor: pointer;
            color: white;
            background: rgba(255,255,255,0.16);
            font-size: 18px;
            line-height: 1;
            font-weight: 900;
            transition: background 0.18s ease, transform 0.18s ease;
        }

        .month-nav-btn:hover {
            background: rgba(255,255,255,0.26);
            transform: translateY(-1px);
        }

        .month-grid-pro {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 7px;
            margin-top: 10px;
        }

        .month-option-pro {
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            border-radius: 13px;
            min-height: 50px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 2px;
            color: var(--text-main);
            transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
        }

        .month-option-pro:hover {
            background: #eef9fb;
            border-color: rgba(0,130,152,0.32);
            transform: translateY(-1px);
        }

        .month-option-pro.selected {
            color: white;
            border-color: transparent;
            background: linear-gradient(135deg, var(--primary-dark), #00a8bd);
            box-shadow: 0 10px 20px rgba(0,130,152,0.22);
        }

        .month-option-pro .month-short {
            font-size: 13px;
            font-weight: 900;
        }

        .month-option-pro .month-full {
            font-size: 9px;
            opacity: 0.78;
            font-weight: 700;
        }

        .month-picker-note {
            margin-top: 10px;
            padding: 8px 9px;
            border-radius: 12px;
            background: #f8fafc;
            border: 1px dashed #cbd5e1;
            color: var(--text-muted);
            font-size: 10.5px;
            line-height: 1.35;
            font-weight: 600;
        }

        .popup-status {
            margin-top: 11px;
            padding: 10px 11px;
            border-radius: 12px;
            background: #f8fafc;
            border: 1px dashed #cbd5e1;
            color: var(--text-muted);
            font-size: 12px;
            line-height: 1.45;
        }

        .popup-status.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
        .popup-status.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
        .popup-status.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

        .chart-panel {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .chart-title-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .chart-title-row strong { font-size: 14px; }
        .chart-title-row span { color: var(--text-muted); font-size: 12px; font-weight: 600; }

        .chart-title-actions {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            flex-wrap: wrap;
        }

        .chart-title-actions .btn-secondary[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }

        .popup-chart-box {
            position: relative;
            height: 360px;
            min-height: 320px;
        }

        .popup-legend {
            display: none;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
            padding: 10px;
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 14px;
        }

        .rain-chip {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            position: relative;
            padding: 6px 9px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            cursor: help;
        }

        .rain-box {
            width: 13px;
            height: 13px;
            border-radius: 4px;
            display: inline-block;
            border: 1px solid rgba(15,23,42,0.08);
        }

        .rain-tooltip {
            display: none;
            position: absolute;
            left: 50%;
            bottom: calc(100% + 8px);
            transform: translateX(-50%);
            z-index: 10;
            width: max-content;
            max-width: 220px;
            background: #0f172a;
            color: white;
            border-radius: 10px;
            padding: 8px 10px;
            font-size: 11px;
            line-height: 1.35;
            box-shadow: var(--shadow-md);
        }

        .rain-chip:hover .rain-tooltip { display: block; }
        .rain-tooltip b { display: block; color: #a7f3d0; margin-bottom: 2px; }

        @media (max-width: 980px) {
            body { overflow: auto; }
            .app-header { align-items: flex-start; flex-direction: column; right: auto; max-width: calc(100vw - 36px); }
            .map-legend-card { max-width: 100%; }
            .quick-search { top: 150px; width: calc(100vw - 36px); max-width: 420px; }
            .professional-popup .leaflet-popup-content { width: calc(100vw - 44px) !important; max-width: calc(100vw - 44px) !important; }
            .popup-body { grid-template-columns: 1fr; }
            .popup-chart-box { height: 330px; }
        }

        @media (max-width: 560px) {
            .brand-card { width: 100%; }
            .map-legend-card { display: none; }
            .quick-search { top: 96px; }
            .popup-hero { flex-direction: column; padding: 16px; }
            .popup-hero h3 { font-size: 19px; }
            .popup-body { padding: 12px; }
            .popup-chart-box { height: 300px; }
        }


        /* =====================================================
           RESPONSIVE PROFESIONAL: DESKTOP, TABLET, IPAD, MOBILE
           ===================================================== */
        .mobile-search-toggle {
            display: none;
            position: fixed;
            z-index: 720;
            border: 0;
            border-radius: 999px;
            min-height: 44px;
            padding: 0 18px;
            font-size: 13px;
            font-weight: 800;
            color: #fff;
            background: linear-gradient(135deg, var(--primary), #00a8bd);
            box-shadow: var(--shadow-md);
            cursor: pointer;
        }

        .leaflet-container,
        .leaflet-popup-content-wrapper,
        .leaflet-popup-content {
            -webkit-tap-highlight-color: transparent;
        }

        .professional-popup .leaflet-popup-content-wrapper {
            max-height: min(82dvh, 760px);
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        .professional-popup .leaflet-popup-close-button {
            width: 34px !important;
            height: 34px !important;
            line-height: 32px !important;
            top: 10px !important;
            right: 10px !important;
            border-radius: 999px;
            background: rgba(255,255,255,0.92) !important;
            color: #0f172a !important;
            box-shadow: var(--shadow-sm);
            font-size: 22px !important;
            font-weight: 400 !important;
            z-index: 5;
        }

        @media (min-width: 1181px) {
            .quick-search {
                max-height: calc(100dvh - 136px);
                overflow-y: auto;
            }
        }

        /* Tablet landscape dan iPad Pro kecil */
        @media (max-width: 1180px) and (min-width: 821px) {
            body { overflow: hidden; }
            .app-header {
                top: 14px;
                left: 14px;
                right: 14px;
                gap: 12px;
            }
            .brand-card {
                min-width: 220px;
                padding: 12px 14px;
            }
            .map-legend-card {
                max-width: 520px;
                padding: 10px 12px;
            }
            .quick-search {
                top: 98px;
                left: 14px;
                width: 330px;
                max-height: calc(100dvh - 120px);
                overflow-y: auto;
                padding: 14px;
            }
            .professional-popup .leaflet-popup-content {
                width: min(820px, calc(100vw - 44px)) !important;
                max-width: calc(100vw - 44px) !important;
            }
            .popup-body {
                grid-template-columns: 245px minmax(0, 1fr);
                gap: 12px;
                padding: 14px;
            }
            .popup-hero {
                padding: 18px 20px;
            }
            .popup-hero h3 { font-size: 20px; }
            .popup-chart-box {
                height: 330px;
                min-height: 300px;
            }
            .rain-chip { font-size: 10.5px; padding: 5px 8px; }
        }

        /* iPad portrait dan tablet portrait */
        @media (max-width: 820px) and (min-width: 641px) {
            body { overflow: hidden; }
            .app-header {
                top: 12px;
                left: 12px;
                right: 12px;
                gap: 10px;
                flex-direction: row;
                align-items: flex-start;
            }
            .brand-card {
                min-width: 210px;
                max-width: 280px;
                padding: 12px 14px;
            }
            .brand-logo {
                width: 38px;
                height: 38px;
                border-radius: 12px;
            }
            .brand-card h1 { font-size: 16px; }
            .brand-card p { font-size: 11px; }
            .map-legend-card {
                max-width: 360px;
                padding: 10px;
                gap: 8px;
            }
            .map-legend-title { width: 100%; }
            .quick-search {
                top: 106px;
                left: 12px;
                width: 318px;
                max-height: calc(100dvh - 128px);
                overflow-y: auto;
                padding: 14px;
            }
            .professional-popup .leaflet-popup-content {
                width: calc(100vw - 34px) !important;
                max-width: calc(100vw - 34px) !important;
            }
            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 78dvh;
            }
            .popup-body {
                grid-template-columns: 1fr;
                padding: 14px;
            }
            .popup-date-grid {
                grid-template-columns: 1fr 1fr;
            }
            .popup-panel {
                padding: 13px;
                border-radius: 16px;
            }
            .popup-chart-box {
                height: 340px;
                min-height: 300px;
            }
        }

        /* HP besar dan tablet kecil */
        @media (max-width: 640px) {
            html, body { height: 100%; overflow: hidden; }
            #map { height: 100dvh; }

            .app-header {
                top: 10px;
                left: 10px;
                right: 10px;
                max-width: none;
                display: block;
            }
            .brand-card {
                width: max-content;
                max-width: calc(100vw - 20px);
                min-width: 0;
                padding: 10px 12px;
                border-radius: 18px;
            }
            .brand-logo {
                width: 34px;
                height: 34px;
                border-radius: 11px;
                font-size: 14px;
            }
            .brand-card h1 { font-size: 15px; }
            .brand-card p { display: none; }
            .map-legend-card { display: none; }

            .mobile-search-toggle {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                left: 12px;
                bottom: calc(14px + env(safe-area-inset-bottom));
            }

            .quick-search {
                top: auto;
                left: 10px;
                right: 10px;
                bottom: calc(70px + env(safe-area-inset-bottom));
                width: auto;
                max-width: none;
                max-height: min(56dvh, 430px);
                overflow-y: auto;
                padding: 14px;
                border-radius: 20px;
                transform: translateY(calc(100% + 92px));
                opacity: 0;
                pointer-events: none;
                transition: transform 0.24s ease, opacity 0.24s ease;
            }
            body.search-open .quick-search {
                transform: translateY(0);
                opacity: 1;
                pointer-events: auto;
            }
            body.search-open .mobile-search-toggle::after {
                content: ' ×';
                font-size: 17px;
                line-height: 1;
            }

            .quick-search h2 { font-size: 13px; }
            .quick-search .hint { font-size: 11px; margin-bottom: 10px; }
            .form-group { margin-bottom: 9px; }
            label { font-size: 11px; }
            .form-control {
                min-height: 42px;
                font-size: 13px;
                padding: 9px 10px;
            }
            .button-row { gap: 8px; }
            .btn-primary,
            .btn-secondary,
            .btn-ghost {
                min-height: 42px;
                font-size: 12px;
            }

            .professional-popup .leaflet-popup-content {
                width: calc(100vw - 18px) !important;
                max-width: calc(100vw - 18px) !important;
            }
            .professional-popup .leaflet-popup-content-wrapper {
                max-height: min(78dvh, 640px);
                border-radius: 20px;
            }
            .professional-popup .leaflet-popup-tip-container {
                display: none;
            }
            .popup-hero {
                flex-direction: column;
                gap: 10px;
                padding: 15px;
            }
            .popup-hero h3 {
                font-size: 18px;
                line-height: 1.15;
                padding-right: 28px;
            }
            .popup-meta {
                gap: 6px;
                font-size: 11px;
            }
            .popup-meta span { padding: 4px 8px; }
            .popup-badge {
                font-size: 10px;
                margin-bottom: 7px;
            }
            .popup-hero .btn-ghost {
                width: 100%;
            }
            .popup-body {
                grid-template-columns: 1fr;
                gap: 10px;
                padding: 10px;
            }
            .popup-panel {
                padding: 12px;
                border-radius: 16px;
            }
            .popup-panel h4 { font-size: 12px; }
            .popup-panel p { font-size: 11px; margin-bottom: 10px; }
            .popup-date-grid {
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }
            .popup-status {
                font-size: 11px;
                padding: 9px 10px;
            }
            .chart-title-row {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
            }
            .chart-title-row strong { font-size: 13px; }
            .chart-title-row span { font-size: 11px; }
            .popup-legend {
                max-height: 92px;
                overflow-y: auto;
                gap: 6px;
                padding: 8px;
            }
            .rain-chip {
                font-size: 10px;
                padding: 5px 7px;
            }
            .rain-tooltip {
                left: 0;
                transform: none;
                max-width: 180px;
            }
            .popup-chart-box {
                height: 280px;
                min-height: 250px;
            }
            .leaflet-control-zoom {
                margin-bottom: calc(68px + env(safe-area-inset-bottom)) !important;
            }
            .station-tooltip {
                font-size: 10px !important;
                padding: 4px 7px !important;
            }
        }

        /* HP kecil */
        @media (max-width: 430px) {
            .popup-date-grid { grid-template-columns: 1fr; }
            .popup-chart-box {
                height: 250px;
                min-height: 230px;
            }
            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 76dvh;
            }
            .popup-legend {
                max-height: 82px;
            }
            .mobile-search-toggle {
                right: auto;
                left: 12px;
            }
        }

        /* HP landscape */
        @media (max-height: 520px) and (orientation: landscape) {
            .brand-card { padding: 8px 10px; }
            .brand-logo { width: 30px; height: 30px; }
            .quick-search {
                top: 10px;
                left: auto;
                right: 10px;
                bottom: auto;
                width: 300px;
                max-height: calc(100dvh - 20px);
                transform: translateX(calc(100% + 28px));
            }
            body.search-open .quick-search { transform: translateX(0); }
            .mobile-search-toggle {
                left: auto;
                right: 12px;
                bottom: calc(14px + env(safe-area-inset-bottom));
            }
            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 86dvh;
            }
            .popup-hero { padding: 12px 14px; }
            .popup-body {
                grid-template-columns: 230px minmax(0,1fr);
                padding: 10px;
            }
            .popup-chart-box {
                height: 230px;
                min-height: 210px;
            }
            .popup-date-grid { grid-template-columns: 1fr; }
        }

    

        /* =====================================================
           CARI POS SERAGAM: PC, TABLET, IPAD, DAN MOBILE
           ===================================================== */
        .mobile-search-toggle {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            left: 18px !important;
            right: auto !important;
            bottom: calc(18px + env(safe-area-inset-bottom)) !important;
            min-height: 46px !important;
            padding: 0 20px !important;
            gap: 8px;
        }

        .mobile-search-toggle::before {
            content: '⌕';
            font-size: 15px;
            line-height: 1;
            font-weight: 900;
        }

        body.search-open .mobile-search-toggle::after {
            content: ' ×';
            font-size: 17px;
            line-height: 1;
        }

        .quick-search {
            top: auto !important;
            left: 50% !important;
            right: auto !important;
            bottom: calc(78px + env(safe-area-inset-bottom)) !important;
            width: min(420px, calc(100vw - 24px)) !important;
            max-width: calc(100vw - 24px) !important;
            max-height: min(62dvh, 520px) !important;
            overflow-y: auto !important;
            padding: 16px !important;
            border-radius: 22px !important;
            transform: translate(-50%, calc(100% + 110px)) !important;
            opacity: 0 !important;
            pointer-events: none !important;
            transition: transform 0.24s ease, opacity 0.24s ease !important;
        }

        body.search-open .quick-search {
            transform: translate(-50%, 0) !important;
            opacity: 1 !important;
            pointer-events: auto !important;
        }

        .quick-search h2 {
            font-size: 14px !important;
            margin-bottom: 4px !important;
        }

        .quick-search .hint {
            font-size: 12px !important;
            margin-bottom: 12px !important;
        }

        .quick-search .form-control,
        .quick-search .btn-primary,
        .quick-search .btn-secondary {
            min-height: 44px !important;
        }

        .button-row {
            grid-template-columns: 1fr !important;
            gap: 9px !important;
        }

        .leaflet-control-zoom {
            margin-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
        }

        @media (min-width: 821px) {
            .quick-search {
                left: 18px !important;
                transform: translateY(calc(100% + 110px)) !important;
            }

            body.search-open .quick-search {
                transform: translateY(0) !important;
            }
        }

        @media (max-width: 640px) {
            .mobile-search-toggle {
                left: 12px !important;
                bottom: calc(14px + env(safe-area-inset-bottom)) !important;
                min-height: 44px !important;
                padding: 0 18px !important;
            }

            .quick-search {
                bottom: calc(70px + env(safe-area-inset-bottom)) !important;
                width: calc(100vw - 20px) !important;
                max-width: calc(100vw - 20px) !important;
                padding: 14px !important;
            }
        }

        @media (max-width: 820px) {
            .selected-range-preview {
                grid-template-columns: 1fr 1fr;
            }

            .month-picker-popover {
                width: min(320px, calc(100vw - 34px));
            }
        }

        @media (max-width: 640px) {
            .filter-title-row {
                margin-bottom: 11px;
            }

            .filter-icon {
                width: 31px;
                height: 31px;
                flex-basis: 31px;
                font-size: 14px;
            }

            .selected-range-preview {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .month-picker-button {
                min-height: 54px;
                border-radius: 14px;
                padding: 9px 10px;
            }

            .month-picker-button .picker-value {
                font-size: 12px;
            }

            .month-picker-popover {
                position: fixed;
                left: 10px;
                right: 10px;
                top: auto;
                bottom: calc(12px + env(safe-area-inset-bottom));
                width: auto;
                max-width: none;
                border-radius: 20px;
            }

            .month-grid-pro {
                grid-template-columns: repeat(3, 1fr);
                gap: 6px;
            }

            .month-option-pro {
                min-height: 46px;
            }
        }



        /* =====================================================
           FOTO PROFIL POS DI SEBELAH KIRI NAMA POS PADA POPUP
           Struktur folder foto:
           fotopos/curahhujan, fotopos/tinggimukaair, fotopos/klimatologi
           ===================================================== */
        .popup-hero {
            align-items: center;
        }

        .popup-hero-left {
            min-width: 0;
            flex: 1 1 auto;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .popup-hero-main {
            min-width: 0;
            flex: 1 1 auto;
        }

        .popup-hero-action {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            justify-content: flex-end;
        }

        .station-photo-card {
            width: 118px;
            flex: 0 0 118px;
            border-radius: 18px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.88);
            border: 1px solid rgba(226,232,240,0.95);
            box-shadow: 0 12px 26px rgba(15,23,42,0.12);
        }

        .station-photo-frame {
            position: relative;
            width: 100%;
            height: 90px;
            overflow: hidden;
            background:
                linear-gradient(135deg, rgba(0,130,152,0.10), rgba(255,255,255,0.9)),
                repeating-linear-gradient(45deg, #f8fafc 0, #f8fafc 10px, #eef2f7 10px, #eef2f7 20px);
        }

        .station-photo-frame img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            transition: transform 0.25s ease, opacity 0.25s ease;
        }

        .station-photo-card:hover .station-photo-frame img {
            transform: scale(1.035);
        }

        .station-photo-placeholder {
            display: none;
            position: absolute;
            inset: 0;
            place-items: center;
            text-align: center;
            padding: 10px;
            color: var(--text-muted);
            font-size: 10px;
            line-height: 1.25;
            font-weight: 700;
        }

        .station-photo-frame.no-photo .station-photo-placeholder {
            display: grid;
        }

        .station-photo-placeholder strong {
            display: block;
            font-size: 21px;
            line-height: 1;
            margin-bottom: 4px;
            color: var(--primary-dark);
        }

        .station-photo-caption {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
            padding: 6px 8px;
            background: #ffffff;
            border-top: 1px solid rgba(226,232,240,0.92);
        }

        .station-photo-caption span {
            font-size: 9.5px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: var(--primary-dark);
            white-space: nowrap;
        }

        .station-photo-caption small {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: var(--text-muted);
            font-size: 9.5px;
            font-weight: 700;
        }

        @media (max-width: 820px) {
            .popup-hero-left {
                gap: 13px;
            }
            .station-photo-card {
                width: 108px;
                flex-basis: 108px;
            }
            .station-photo-frame {
                height: 82px;
            }
        }

        @media (max-width: 640px) {
            .popup-hero {
                align-items: stretch;
            }
            .popup-hero-left {
                width: 100%;
                align-items: center;
                gap: 11px;
            }
            .station-photo-card {
                width: 86px;
                flex-basis: 86px;
                border-radius: 15px;
            }
            .station-photo-frame {
                height: 76px;
            }
            .station-photo-caption {
                display: none;
            }
            .popup-hero .btn-ghost,
            .popup-hero-action {
                width: 100%;
            }
            .popup-hero-action .btn-ghost {
                width: 100%;
            }
        }

        @media (max-width: 430px) {
            .station-photo-card {
                width: 78px;
                flex-basis: 78px;
            }
            .station-photo-frame {
                height: 70px;
            }
            .popup-hero-left {
                gap: 10px;
            }
        }

        @media (max-height: 520px) and (orientation: landscape) {
            .station-photo-card {
                width: 88px;
                flex-basis: 88px;
            }
            .station-photo-frame {
                height: 64px;
            }
            .station-photo-caption {
                display: none;
            }
        }



        /* =====================================================
           POPUP DIPERKECIL + TOMBOL RENTANG DATA GLOBAL
           ===================================================== */
        .professional-popup .leaflet-popup-content {
            width: 720px !important;
            max-width: calc(100vw - 52px) !important;
        }

        .professional-popup .leaflet-popup-content-wrapper {
            max-height: min(78dvh, 660px) !important;
            border-radius: 20px !important;
        }

        .popup-hero {
            padding: 13px 16px !important;
            gap: 12px !important;
        }

        .popup-hero h3 {
            font-size: 18px !important;
            margin-bottom: 4px !important;
        }

        .popup-badge {
            padding: 4px 8px !important;
            font-size: 10px !important;
            margin-bottom: 6px !important;
        }

        .popup-meta {
            gap: 6px !important;
            font-size: 10.5px !important;
        }

        .popup-meta span {
            padding: 4px 7px !important;
        }

        .popup-body {
            grid-template-columns: 230px minmax(0, 1fr) !important;
            gap: 10px !important;
            padding: 11px !important;
        }

        .popup-panel {
            padding: 11px !important;
            border-radius: 15px !important;
        }

        .filter-title-row {
            margin-bottom: 9px !important;
        }

        .filter-icon {
            width: 28px !important;
            height: 28px !important;
            flex-basis: 28px !important;
            border-radius: 10px !important;
            font-size: 13px !important;
        }

        .selected-range-preview {
            gap: 5px !important;
            margin-bottom: 8px !important;
        }

        .range-preview-chip {
            padding: 6px 8px !important;
            border-radius: 11px !important;
            font-size: 10px !important;
        }

        .range-preview-chip b {
            font-size: 10.5px !important;
        }

        .month-picker-button {
            min-height: 46px !important;
            padding: 8px 9px !important;
            border-radius: 13px !important;
        }

        .month-picker-button .picker-label {
            font-size: 9.5px !important;
            margin-bottom: 1px !important;
        }

        .month-picker-button .picker-value {
            font-size: 11.5px !important;
        }

        .month-picker-arrow {
            width: 24px !important;
            height: 24px !important;
        }

        .button-row {
            margin-top: 8px !important;
            gap: 7px !important;
        }

        .btn-primary,
        .btn-secondary,
        .btn-ghost {
            min-height: 34px !important;
            padding: 7px 10px !important;
            font-size: 11.5px !important;
        }

        .popup-status {
            margin-top: 8px !important;
            padding: 8px 9px !important;
            font-size: 10.8px !important;
            border-radius: 11px !important;
        }

        .chart-title-row strong {
            font-size: 12.5px !important;
        }

        .chart-title-row span {
            font-size: 10.5px !important;
        }

        .popup-chart-box {
            height: 285px !important;
            min-height: 245px !important;
        }

        .station-photo-card {
            width: 92px !important;
            flex-basis: 92px !important;
            border-radius: 14px !important;
        }

        .station-photo-frame {
            height: 66px !important;
        }

        .station-photo-caption {
            padding: 5px 6px !important;
        }

        .station-photo-caption span,
        .station-photo-caption small {
            font-size: 8.5px !important;
        }

        .data-range-toggle {
            position: fixed;
            z-index: 721;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            left: 18px;
            bottom: calc(76px + env(safe-area-inset-bottom));
            min-height: 46px;
            padding: 0 20px;
            gap: 8px;
            border: 0;
            border-radius: 999px;
            font-size: 13px;
            font-weight: 800;
            color: var(--primary-dark);
            background: rgba(255,255,255,0.96);
            box-shadow: var(--shadow-md);
            border: 1px solid rgba(0,130,152,0.22);
            cursor: pointer;
        }

        .data-range-toggle::before {
            content: '↔';
            font-size: 14px;
            font-weight: 900;
        }

        body.range-open .data-range-toggle {
            background: linear-gradient(135deg, var(--primary), #00a8bd);
            color: #ffffff;
        }

        body.range-open .data-range-toggle::after {
            content: ' ×';
            font-size: 17px;
            line-height: 1;
        }

        .data-range-panel {
            position: fixed;
            z-index: 720;
            left: 18px;
            bottom: calc(132px + env(safe-area-inset-bottom));
            width: min(460px, calc(100vw - 36px));
            max-height: min(58dvh, 520px);
            overflow-y: auto;
            padding: 14px;
            border-radius: 22px;
            background: var(--surface);
            border: 1px solid rgba(226,232,240,0.9);
            box-shadow: var(--shadow-lg);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            transform: translateY(calc(100% + 160px));
            opacity: 0;
            pointer-events: none;
            transition: transform 0.24s ease, opacity 0.24s ease;
        }

        body.range-open .data-range-panel {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .data-range-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }

        .data-range-header h2 {
            font-size: 14px;
            font-weight: 900;
            color: var(--text-main);
        }

        .data-range-header button {
            width: 32px;
            height: 32px;
            border: 1px solid rgba(0,130,152,0.22);
            background: #fff;
            color: var(--primary-dark);
            border-radius: 999px;
            cursor: pointer;
            font-weight: 900;
        }

        .data-range-actions {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 7px;
            flex: 0 0 auto;
        }

        .data-range-actions button {
            flex: 0 0 auto;
        }

        .data-range-chart-restore {
            display: none;
            width: auto !important;
            min-width: 112px;
            height: 32px;
            padding: 0 12px;
            border-radius: 999px !important;
            color: #ffffff !important;
            background: linear-gradient(135deg, var(--primary), #00a8bd) !important;
            box-shadow: 0 8px 16px rgba(0,130,152,0.18);
            font-size: 11px;
            white-space: nowrap;
        }

        .data-range-panel.chart-minimized .data-range-chart-restore {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }


        .data-range-status {
            padding: 9px 10px;
            margin-bottom: 10px;
            border-radius: 12px;
            background: #f8fafc;
            border: 1px dashed #cbd5e1;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 700;
            line-height: 1.4;
        }

        .data-range-list {
            display: grid;
            gap: 7px;
        }

        .data-range-row {
            display: grid;
            grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.2fr);
            gap: 10px;
            align-items: start;
            padding: 9px 10px;
            border-radius: 13px;
            background: #ffffff;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }

        .data-range-name {
            font-size: 11.5px;
            font-weight: 900;
            color: var(--text-main);
            line-height: 1.35;
        }

        .data-range-name-wrap {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .data-range-icon {
            width: 24px;
            height: 24px;
            flex: 0 0 24px;
            border-radius: 999px;
            display: inline-grid;
            place-items: center;
            background: #ffffff;
            border: 1px solid rgba(15,23,42,0.10);
            box-shadow: 0 4px 10px rgba(15,23,42,0.10);
            overflow: hidden;
        }

        .data-range-icon img {
            width: 18px;
            height: 18px;
            display: block;
            object-fit: contain;
        }

        .data-range-icon.icon-fallback::before {
            content: '';
            width: 12px;
            height: 12px;
            border-radius: 999px;
            display: block;
            background: var(--primary);
        }

        .data-range-icon-pch.icon-fallback::before { background: #16a34a; }
        .data-range-icon-bmkg.icon-fallback::before { background: #2563eb; }
        .data-range-icon-tma.icon-fallback::before { background: #f59e0b; }
        .data-range-icon-klimat.icon-fallback::before { background: #ef4444; }
        .data-range-icon-usulan.icon-fallback::before { background: #7c3aed; }
        .data-range-icon-kualitas-air.icon-fallback::before { background: #0ea5e9; }

        .data-range-name-text {
            min-width: 0;
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: normal;
        }

        .data-range-type-chip {
            display: inline-flex;
            align-items: center;
            width: max-content;
            max-width: 100%;
            margin-top: 3px;
            padding: 2px 7px;
            border-radius: 999px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            color: var(--text-muted);
            font-size: 9px;
            font-weight: 900;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .data-range-years {
            font-size: 11px;
            font-weight: 800;
            color: var(--primary-dark);
            line-height: 1.45;
            text-align: right;
            word-break: break-word;
        }


        .data-range-years.no-data {
            color: #94a3b8;
            font-style: italic;
            font-weight: 800;
        }

        .data-range-empty {
            padding: 12px;
            border-radius: 13px;
            background: #ffffff;
            border: 1px dashed #cbd5e1;
            color: var(--text-muted);
            font-size: 11.5px;
            font-weight: 700;
            text-align: center;
        }

        .data-range-row {
            cursor: pointer;
            transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
        }

        .data-range-row:hover,
        .data-range-row.active {
            border-color: rgba(0,130,152,0.38);
            transform: translateY(-1px);
            box-shadow: 0 10px 20px rgba(15,23,42,0.10);
        }

        .data-range-chart-card {
            margin-top: 12px;
            padding: 12px;
            border-radius: 18px;
            background: #ffffff;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
            display: none;
        }

        .data-range-chart-card.is-visible {
            display: block;
        }

        .data-range-chart-title {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 8px;
        }

        .data-range-chart-title strong {
            font-size: 12.5px;
            font-weight: 900;
            color: var(--text-main);
            line-height: 1.35;
        }

        .data-range-chart-title span {
            font-size: 10.5px;
            font-weight: 800;
            color: var(--text-muted);
            text-align: right;
            line-height: 1.35;
        }

        .data-range-chart-heading {
            min-width: 0;
            display: grid;
            gap: 2px;
        }

        .data-range-chart-heading span {
            display: block;
            text-align: left;
        }

        .data-range-chart-controls {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 7px;
            flex-wrap: wrap;
        }

        .data-range-chart-show-station,
        .data-range-chart-export,
        .data-range-chart-minimize {
            flex: 0 0 auto;
            min-height: 30px;
            padding: 6px 10px;
            border: 1px solid rgba(0,130,152,0.24);
            border-radius: 999px;
            background: #ffffff;
            color: var(--primary-dark);
            font-size: 10.5px;
            font-weight: 900;
            cursor: pointer;
            box-shadow: var(--shadow-sm);
            transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
        }

        .data-range-chart-show-station {
            color: #ffffff;
            background: linear-gradient(135deg, var(--primary), #00a8bd);
            border-color: transparent;
            box-shadow: 0 8px 16px rgba(0,130,152,0.18);
        }

        .data-range-chart-export {
            background: #ffffff;
            color: var(--primary-dark);
        }

        .data-range-chart-show-station:hover {
            background: linear-gradient(135deg, var(--primary-dark), var(--primary));
            border-color: transparent;
            transform: translateY(-1px);
        }

        .data-range-chart-export:hover,
        .data-range-chart-minimize:hover {
            background: var(--primary-soft);
            border-color: rgba(0,130,152,0.42);
            transform: translateY(-1px);
        }

        .data-range-chart-show-station:focus-visible,
        .data-range-chart-export:focus-visible,
        .data-range-chart-minimize:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px var(--primary-soft);
        }

        .data-range-chart-export[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
            background: #f8fafc;
        }

        .data-range-panel.chart-minimized {
            width: min(460px, calc(100vw - 36px));
            max-height: min(58dvh, 520px);
            overflow-y: auto;
            display: block;
        }

        .data-range-panel.chart-minimized .data-range-chart-card {
            display: none !important;
        }

        .data-range-panel.chart-minimized .data-range-list {
            max-height: none;
            overflow: visible;
            padding-right: 0;
        }

        .data-range-chart-box {
            position: relative;
            width: 100%;
            height: 240px;
        }

        /* =====================================================
           KETERSEDIAAN DATA: BAR CHART DI SAMPING KANAN
           Daftar pos tetap di kiri, grafik muncul di kanan pada PC/tablet lebar.
           ===================================================== */
        .data-range-panel.has-chart {
            width: min(960px, calc(100vw - 36px));
            max-height: min(62dvh, 560px);
            overflow: hidden;
            display: grid;
            grid-template-columns: minmax(330px, 410px) minmax(360px, 1fr);
            grid-template-areas:
                "header header"
                "status status"
                "list chart";
            column-gap: 12px;
            align-items: start;
        }

        .data-range-panel.has-chart .data-range-header {
            grid-area: header;
        }

        .data-range-panel.has-chart .data-range-status {
            grid-area: status;
        }

        .data-range-panel.has-chart .data-range-list {
            grid-area: list;
            max-height: min(43dvh, 390px);
            overflow-y: auto;
            padding-right: 4px;
        }

        .data-range-panel.has-chart .data-range-chart-card {
            grid-area: chart;
            margin-top: 0;
            min-width: 0;
        }

        .data-range-panel.has-chart .data-range-chart-box {
            height: 310px;
        }

        @media (max-width: 900px) {
            .data-range-panel.has-chart {
                width: min(460px, calc(100vw - 36px));
                max-height: min(58dvh, 520px);
                overflow-y: auto;
                display: block;
            }

            .data-range-panel.has-chart .data-range-list {
                max-height: none;
                overflow: visible;
                padding-right: 0;
            }

            .data-range-panel.has-chart .data-range-chart-card {
                margin-top: 12px;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: 240px;
            }
        }

        @media (max-width: 820px) {
            .professional-popup .leaflet-popup-content {
                width: calc(100vw - 30px) !important;
                max-width: calc(100vw - 30px) !important;
            }
            .popup-body {
                grid-template-columns: 1fr !important;
            }
            .popup-chart-box {
                height: 260px !important;
                min-height: 230px !important;
            }
        }

        @media (max-width: 640px) {
            .professional-popup .leaflet-popup-content {
                width: calc(100vw - 16px) !important;
                max-width: calc(100vw - 16px) !important;
            }
            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 74dvh !important;
                border-radius: 18px !important;
            }
            .popup-hero {
                padding: 12px !important;
                gap: 8px !important;
            }
            .popup-hero h3 {
                font-size: 15.5px !important;
                padding-right: 24px !important;
            }
            .popup-body {
                gap: 8px !important;
                padding: 8px !important;
            }
            .station-photo-card {
                width: 70px !important;
                flex-basis: 70px !important;
            }
            .station-photo-frame {
                height: 58px !important;
            }
            .popup-chart-box {
                height: 220px !important;
                min-height: 210px !important;
            }
            .data-range-toggle {
                left: 12px;
                bottom: calc(68px + env(safe-area-inset-bottom));
                min-height: 44px;
                padding: 0 18px;
            }
            .data-range-panel {
                left: 10px;
                right: 10px;
                bottom: calc(122px + env(safe-area-inset-bottom));
                width: auto;
                max-height: min(58dvh, 440px);
                padding: 12px;
            }
            .data-range-row {
                grid-template-columns: 1fr;
                gap: 4px;
            }
            .data-range-years {
                text-align: left;
            }
        }


        /* =====================================================
           LAYER SPASIAL TAMBAHAN DARI PETA HKA
           ===================================================== */
        .label-das {
            background: rgba(255,255,255,0.92) !important;
            border: 1px solid rgba(15,23,42,0.18) !important;
            border-radius: 999px !important;
            padding: 4px 8px !important;
            color: var(--text-main) !important;
            font-weight: 800 !important;
            font-size: 11px !important;
            box-shadow: var(--shadow-sm) !important;
        }

        .label-kab-permanen {
            background: none !important;
            border: none !important;
            box-shadow: none !important;
            color: #0f172a !important;
            font-weight: 900 !important;
            font-size: 12px !important;
            text-shadow: 2px 2px 3px white, -2px -2px 3px white;
            pointer-events: none;
        }

        .simple-spatial-popup {
            min-width: 230px;
            font-size: 12px;
            color: var(--text-main);
        }

        .simple-spatial-popup h3 {
            font-size: 14px;
            margin: 0 0 8px 0;
            color: var(--primary-dark);
        }

        .simple-spatial-popup table {
            width: 100%;
            border-collapse: collapse;
        }

        .simple-spatial-popup td {
            padding: 4px 0;
            border-bottom: 1px solid #eef2f7;
            vertical-align: top;
        }


        /* =====================================================
           KONTROL OPACITY PER DAS
           Muncul di dalam popup ketika poligon DAS diklik.
           ===================================================== */
        .das-opacity-control {
            margin-top: 12px;
            padding: 11px;
            border-radius: 14px;
            background: linear-gradient(135deg, #f8fafc, #eef9fb);
            border: 1px solid rgba(0,130,152,0.18);
        }

        .das-opacity-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }

        .das-opacity-header strong {
            font-size: 11.5px;
            font-weight: 900;
            color: var(--text-main);
        }

        .das-opacity-value {
            min-width: 46px;
            padding: 4px 8px;
            border-radius: 999px;
            text-align: center;
            color: var(--primary-dark);
            background: #ffffff;
            border: 1px solid rgba(0,130,152,0.20);
            font-size: 11px;
            font-weight: 900;
        }

        .das-opacity-slider {
            width: 100%;
            height: 6px;
            margin: 2px 0 8px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        .das-opacity-scale {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 9px;
            color: var(--text-muted);
            font-size: 9.5px;
            font-weight: 800;
        }

        .das-opacity-actions {
            display: flex;
            justify-content: flex-end;
        }

        .das-opacity-reset {
            border: 1px solid rgba(0,130,152,0.24);
            border-radius: 999px;
            min-height: 30px;
            padding: 5px 10px;
            cursor: pointer;
            color: var(--primary-dark);
            background: #ffffff;
            font-size: 10px;
            font-weight: 900;
            transition: background 0.18s ease, transform 0.18s ease;
        }

        .das-opacity-reset:hover {
            background: var(--primary-soft);
            transform: translateY(-1px);
        }

        .leaflet-control-layers {
            border: none !important;
            border-radius: 18px !important;
            box-shadow: var(--shadow-md) !important;
            background: rgba(255,255,255,0.94) !important;
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            overflow: hidden;
        }

        .leaflet-control-layers-expanded {
            padding: 12px 14px !important;
            max-height: 56dvh;
            overflow-y: auto;
        }

        .leaflet-control-layers label {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 5px;
        }


        /* Kontrol layer selalu berada di atas panel input koordinat. */
        .leaflet-bottom.leaflet-right {
            z-index: 1400;
            pointer-events: none;
        }

        .leaflet-bottom.leaflet-right .leaflet-control {
            pointer-events: auto;
        }

        .leaflet-control-layers {
            position: relative;
            z-index: 1401;
            max-width: min(340px, calc(100vw - 24px));
        }

        /* Saat panel koordinat terbuka, kontrol layer digeser agar tidak tertutup panel. */
        body.coordinate-panel-open .leaflet-bottom.leaflet-right .leaflet-control-layers {
            margin-right: 360px;
        }

        @media (max-width: 1180px) and (min-width: 821px) {
            body.coordinate-panel-open .leaflet-bottom.leaflet-right .leaflet-control-layers {
                margin-right: 338px;
            }
        }

        @media (max-width: 820px) and (min-width: 641px) {
            body.coordinate-panel-open .leaflet-bottom.leaflet-right .leaflet-control-layers {
                margin-right: 326px;
            }
        }

        @media (max-width: 640px) {
            body.coordinate-panel-open .leaflet-bottom.leaflet-right .leaflet-control-layers {
                margin-right: 10px;
            }

            .leaflet-control-layers-expanded {
                max-width: calc(100vw - 20px);
                max-height: 48dvh;
            }
        }


        /* =====================================================
           LOGO BWS MALUKU + INPUT TITIK KOORDINAT
           ===================================================== */
        .brand-logo {
            background: #ffffff !important;
            overflow: hidden;
            border: 1px solid rgba(0, 130, 152, 0.18);
            padding: 3px;
        }

        .brand-logo-button {
            appearance: none;
            -webkit-appearance: none;
            cursor: pointer;
            flex: 0 0 42px;
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
        }

        .brand-logo-button:hover {
            transform: translateY(-1px);
            border-color: rgba(0, 130, 152, 0.42);
            box-shadow: 0 8px 18px rgba(0, 130, 152, 0.18);
        }

        .brand-logo-button:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px var(--primary-soft), 0 8px 18px rgba(0, 130, 152, 0.18);
        }

        .brand-logo-img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
            border-radius: 11px;
            pointer-events: none;
        }

        .coord-panel {
            position: fixed;
            top: 104px;
            right: 18px;
            z-index: 620;
            width: 268px;
            padding: 15px;
            border-radius: var(--radius-lg);
            background: var(--surface);
            border: 1px solid rgba(226, 232, 240, 0.86);
            box-shadow: var(--shadow-md);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            pointer-events: auto;
            display: none;
        }

        .coord-panel.is-visible {
            display: block;
        }

        .coord-panel h2 {
            font-size: 14px;
            font-weight: 900;
            color: var(--primary-dark);
            margin-bottom: 4px;
        }

        .coord-panel .hint {
            font-size: 11.5px;
            color: var(--text-muted);
            line-height: 1.4;
            margin-bottom: 12px;
        }

        .coord-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-bottom: 9px;
        }

        .coord-panel .form-control {
            min-height: 40px;
            font-size: 12px;
            padding: 8px 9px;
        }


        .coordinate-dms-display {
            display: grid;
            gap: 6px;
            margin: 0 0 10px 0;
            padding: 9px 10px;
            border-radius: 13px;
            background: linear-gradient(135deg, #f8fafc, #eef9fb);
            border: 1px solid rgba(0, 130, 152, 0.16);
        }

        .coordinate-dms-row {
            display: grid;
            grid-template-columns: 74px minmax(0, 1fr);
            align-items: start;
            gap: 8px;
            font-size: 10.5px;
            line-height: 1.35;
        }

        .coordinate-dms-row span {
            color: var(--text-muted);
            font-weight: 800;
        }

        .coordinate-dms-row b {
            color: var(--primary-dark);
            font-size: 11px;
            font-weight: 900;
            overflow-wrap: anywhere;
        }

        .manual-point-popup .coordinate-popup-dms {
            margin-top: 7px;
            padding-top: 7px;
            border-top: 1px dashed #cbd5e1;
            color: #334155;
            line-height: 1.5;
        }

        .coord-actions {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
        }

        .distance-display {
            margin: 9px 0 0 0;
            padding: 9px 10px;
            border-radius: 13px;
            background: #f8fafc;
            border: 1px dashed #cbd5e1;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 700;
            text-align: center;
        }

        .distance-display b {
            display: block;
            margin-top: 3px;
            color: var(--danger);
            font-size: 15px;
            font-weight: 900;
        }

        .manual-marker-icon {
            font-size: 26px;
            line-height: 26px;
            text-align: center;
            filter: drop-shadow(0 2px 3px rgba(15,23,42,0.32));
        }

        .manual-point-popup {
            min-width: 180px;
            font-size: 12px;
        }

        .manual-point-popup h3 {
            margin: 0 0 6px 0;
            font-size: 13px;
            color: var(--primary-dark);
        }

        .manual-point-popup button {
            margin-top: 8px;
            width: 100%;
            border: none;
            border-radius: 9px;
            padding: 7px 9px;
            background: #fee2e2;
            color: #991b1b;
            font-weight: 800;
            cursor: pointer;
        }

        @media (max-width: 1180px) and (min-width: 821px) {
            .coord-panel {
                top: 98px;
                right: 14px;
                width: 258px;
                max-height: calc(100dvh - 120px);
                overflow-y: auto;
            }
        }

        @media (max-width: 820px) and (min-width: 641px) {
            .coord-panel {
                top: 106px;
                right: 12px;
                width: 252px;
                max-height: calc(100dvh - 128px);
                overflow-y: auto;
            }
        }

        @media (max-width: 640px) {
            .coord-panel {
                top: 76px;
                right: 10px;
                left: auto;
                width: min(236px, calc(100vw - 20px));
                padding: 12px;
                border-radius: 18px;
            }
            .coord-panel h2 { font-size: 13px; }
            .coord-panel .hint { display: none; }
            .coord-grid { grid-template-columns: 1fr; gap: 7px; }
            .coord-panel .form-control,
            .coord-panel .btn-primary,
            .coord-panel .btn-secondary {
                min-height: 38px !important;
                font-size: 12px !important;
            }
            .distance-display {
                padding: 8px;
                font-size: 10.5px;
            }
            .distance-display b {
                font-size: 13px;
            }
        }

        @media (max-height: 520px) and (orientation: landscape) {
            .coord-panel {
                top: 10px;
                right: 320px;
                width: 240px;
                max-height: calc(100dvh - 20px);
                overflow-y: auto;
            }
        }



        /* =====================================================
           KOREKSI BAR CHART KETERSEDIAAN DATA:
           angka sumbu Y terlihat + responsif mobile/tablet/iPad
           ===================================================== */
        .data-range-chart-box canvas {
            width: 100% !important;
            max-width: 100% !important;
        }

        @media (min-width: 641px) and (max-width: 1180px) {
            .data-range-panel.has-chart {
                left: 12px !important;
                right: 12px !important;
                bottom: calc(118px + env(safe-area-inset-bottom)) !important;
                width: auto !important;
                max-height: min(66dvh, 620px) !important;
                overflow: hidden !important;
                display: grid !important;
                grid-template-columns: minmax(245px, 0.85fr) minmax(300px, 1.15fr) !important;
                grid-template-areas:
                    "header header"
                    "status status"
                    "list chart" !important;
                column-gap: 12px !important;
                row-gap: 0 !important;
            }

            .data-range-panel.has-chart .data-range-list {
                grid-area: list !important;
                max-height: min(48dvh, 430px) !important;
                overflow-y: auto !important;
                padding-right: 4px !important;
            }

            .data-range-panel.has-chart .data-range-chart-card {
                grid-area: chart !important;
                margin-top: 0 !important;
                min-width: 0 !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: 300px !important;
                min-height: 280px !important;
            }

            .data-range-row {
                grid-template-columns: minmax(105px, 1fr) minmax(115px, 1.1fr) !important;
                gap: 8px !important;
            }
        }

        @media (min-width: 821px) and (max-width: 1180px) {
            .data-range-panel.has-chart {
                grid-template-columns: minmax(300px, 390px) minmax(380px, 1fr) !important;
                max-height: min(64dvh, 600px) !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: 320px !important;
            }
        }

        @media (max-width: 640px) {
            .data-range-panel.has-chart {
                left: 10px !important;
                right: 10px !important;
                width: auto !important;
                max-height: min(72dvh, 560px) !important;
                overflow: hidden !important;
                display: grid !important;
                grid-template-columns: 1fr !important;
                grid-template-areas:
                    "header"
                    "status"
                    "chart"
                    "list" !important;
                gap: 0 !important;
            }

            .data-range-panel.has-chart .data-range-header {
                grid-area: header !important;
            }

            .data-range-panel.has-chart .data-range-status {
                grid-area: status !important;
                margin-bottom: 8px !important;
            }

            .data-range-panel.has-chart .data-range-chart-card {
                grid-area: chart !important;
                margin-top: 0 !important;
                margin-bottom: 10px !important;
                padding: 10px !important;
                border-radius: 16px !important;
            }

            .data-range-panel.has-chart .data-range-chart-title {
                flex-direction: row !important;
                align-items: flex-start !important;
                gap: 8px !important;
            }

            .data-range-panel.has-chart .data-range-chart-heading {
                min-width: 0 !important;
            }

            .data-range-panel.has-chart .data-range-chart-title span {
                text-align: left !important;
                font-size: 10px !important;
            }

            .data-range-panel.has-chart .data-range-chart-controls {
                gap: 5px !important;
                justify-content: flex-end !important;
            }

            .data-range-panel.has-chart .data-range-chart-show-station,
            .data-range-panel.has-chart .data-range-chart-export,
            .data-range-panel.has-chart .data-range-chart-minimize {
                min-height: 28px !important;
                padding: 5px 8px !important;
                font-size: 9.5px !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: 255px !important;
                min-height: 245px !important;
            }

            .data-range-panel.has-chart .data-range-list {
                grid-area: list !important;
                max-height: min(26dvh, 190px) !important;
                overflow-y: auto !important;
                padding-right: 2px !important;
            }

            .data-range-row {
                padding: 8px 9px !important;
            }
        }

        @media (max-width: 430px) {
            .data-range-panel.has-chart .data-range-chart-box {
                height: 235px !important;
                min-height: 225px !important;
            }
        }


        @media (max-width: 640px) {
            .data-range-actions {
                gap: 6px !important;
            }

            .data-range-chart-restore {
                min-width: 104px !important;
                height: 30px !important;
                padding: 0 10px !important;
                font-size: 10px !important;
            }

            .data-range-panel.chart-minimized {
                left: 10px !important;
                right: 10px !important;
                width: auto !important;
                max-height: min(58dvh, 440px) !important;
            }
        }



        /* =====================================================
           FINAL RESPONSIVE KETERSEDIAAN DATA
           Mobile, tablet, dan iPad dibuat lebih jelas terbaca.
           ===================================================== */
        .data-range-panel {
            scrollbar-width: thin;
            scrollbar-color: rgba(0,130,152,0.42) rgba(241,245,249,0.82);
        }

        .data-range-panel::-webkit-scrollbar,
        .data-range-list::-webkit-scrollbar {
            width: 7px;
            height: 7px;
        }

        .data-range-panel::-webkit-scrollbar-thumb,
        .data-range-list::-webkit-scrollbar-thumb {
            background: rgba(0,130,152,0.36);
            border-radius: 999px;
        }

        .data-range-panel.has-chart .data-range-chart-card {
            overflow: hidden;
        }

        .data-range-chart-title {
            align-items: center;
        }

        .data-range-chart-heading strong,
        .data-range-chart-heading span {
            overflow-wrap: anywhere;
        }

        /* Tablet dan iPad: panel dibuat lebar, dua kolom tetap jelas */
        @media (min-width: 641px) and (max-width: 1180px) {
            .data-range-toggle {
                left: 14px !important;
                bottom: calc(72px + env(safe-area-inset-bottom)) !important;
            }

            .data-range-panel {
                left: 14px !important;
                right: 14px !important;
                bottom: calc(126px + env(safe-area-inset-bottom)) !important;
                width: auto !important;
                max-height: min(70dvh, 650px) !important;
                padding: 14px !important;
                border-radius: 22px !important;
            }

            .data-range-panel.has-chart {
                left: 14px !important;
                right: 14px !important;
                width: auto !important;
                max-height: min(74dvh, 690px) !important;
                display: grid !important;
                grid-template-columns: minmax(260px, 0.9fr) minmax(330px, 1.1fr) !important;
                grid-template-areas:
                    "header header"
                    "status status"
                    "list chart" !important;
                column-gap: 14px !important;
                row-gap: 10px !important;
                overflow: hidden !important;
            }

            .data-range-panel.has-chart .data-range-header {
                margin-bottom: 0 !important;
            }

            .data-range-panel.has-chart .data-range-status {
                margin-bottom: 0 !important;
            }

            .data-range-panel.has-chart .data-range-list {
                max-height: calc(min(74dvh, 690px) - 132px) !important;
                overflow-y: auto !important;
                padding-right: 5px !important;
            }

            .data-range-panel.has-chart .data-range-chart-card {
                margin-top: 0 !important;
                padding: 13px !important;
                min-width: 0 !important;
                height: 100% !important;
                display: block !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: clamp(300px, 42dvh, 390px) !important;
                min-height: 300px !important;
            }

            .data-range-row {
                min-height: 52px !important;
                grid-template-columns: minmax(105px, 1fr) minmax(118px, 1.05fr) !important;
                align-items: center !important;
            }

            .data-range-name {
                font-size: 11.8px !important;
            }

            .data-range-years {
                font-size: 11.2px !important;
            }

            .data-range-chart-title strong {
                font-size: 12.8px !important;
            }
        }

        /* iPad portrait/tablet portrait: chart tetap kanan, namun kontrol dibuat lebih kompak */
        @media (min-width: 641px) and (max-width: 820px) {
            .data-range-panel.has-chart {
                grid-template-columns: minmax(230px, 0.85fr) minmax(300px, 1.15fr) !important;
                column-gap: 10px !important;
                padding: 12px !important;
            }

            .data-range-panel.has-chart .data-range-chart-title {
                display: grid !important;
                grid-template-columns: 1fr !important;
                gap: 8px !important;
                align-items: start !important;
            }

            .data-range-panel.has-chart .data-range-chart-controls {
                justify-content: stretch !important;
                display: grid !important;
                grid-template-columns: 1fr 1fr 1fr !important;
                gap: 7px !important;
            }

            .data-range-panel.has-chart .data-range-chart-show-station,
            .data-range-panel.has-chart .data-range-chart-export,
            .data-range-panel.has-chart .data-range-chart-minimize {
                width: 100% !important;
                min-height: 32px !important;
                padding: 6px 8px !important;
                font-size: 10px !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: clamp(290px, 38dvh, 350px) !important;
                min-height: 285px !important;
            }
        }

        /* Mobile: panel seperti bottom sheet tinggi, chart di atas daftar agar langsung terlihat */
        @media (max-width: 640px) {
            .data-range-toggle {
                left: 12px !important;
                bottom: calc(66px + env(safe-area-inset-bottom)) !important;
                min-height: 44px !important;
                padding: 0 16px !important;
                font-size: 12px !important;
            }

            .data-range-panel {
                left: 8px !important;
                right: 8px !important;
                bottom: calc(118px + env(safe-area-inset-bottom)) !important;
                width: auto !important;
                height: min(70dvh, 560px) !important;
                max-height: none !important;
                padding: 11px !important;
                border-radius: 20px !important;
                overflow-y: auto !important;
            }

            .data-range-header {
                position: sticky;
                top: -11px;
                z-index: 2;
                background: rgba(255,255,255,0.96);
                backdrop-filter: blur(12px);
                -webkit-backdrop-filter: blur(12px);
                padding: 6px 0 8px 0;
                margin-bottom: 6px !important;
            }

            .data-range-header h2 {
                font-size: 13px !important;
            }

            .data-range-status {
                font-size: 10.5px !important;
                line-height: 1.35 !important;
                padding: 8px 9px !important;
                margin-bottom: 8px !important;
            }

            .data-range-panel.has-chart {
                height: min(78dvh, 640px) !important;
                max-height: none !important;
                display: grid !important;
                grid-template-columns: 1fr !important;
                grid-template-rows: auto auto auto minmax(0, 1fr) !important;
                grid-template-areas:
                    "header"
                    "status"
                    "chart"
                    "list" !important;
                gap: 8px !important;
                overflow: hidden !important;
            }

            .data-range-panel.has-chart .data-range-header,
            .data-range-panel.has-chart .data-range-status,
            .data-range-panel.has-chart .data-range-chart-card,
            .data-range-panel.has-chart .data-range-list {
                min-width: 0 !important;
            }

            .data-range-panel.has-chart .data-range-status {
                margin-bottom: 0 !important;
            }

            .data-range-panel.has-chart .data-range-chart-card {
                margin: 0 !important;
                padding: 10px !important;
                border-radius: 16px !important;
                max-height: 360px !important;
                overflow: hidden !important;
            }

            .data-range-panel.has-chart .data-range-chart-title {
                display: grid !important;
                grid-template-columns: 1fr !important;
                gap: 7px !important;
                margin-bottom: 6px !important;
            }

            .data-range-panel.has-chart .data-range-chart-title strong {
                font-size: 11.5px !important;
                line-height: 1.25 !important;
            }

            .data-range-panel.has-chart .data-range-chart-title span {
                font-size: 9.8px !important;
                line-height: 1.25 !important;
                text-align: left !important;
            }

            .data-range-panel.has-chart .data-range-chart-controls {
                display: grid !important;
                grid-template-columns: 1fr 1fr 1fr !important;
                gap: 7px !important;
                width: 100% !important;
            }

            .data-range-panel.has-chart .data-range-chart-show-station,
            .data-range-panel.has-chart .data-range-chart-export,
            .data-range-panel.has-chart .data-range-chart-minimize {
                width: 100% !important;
                min-height: 32px !important;
                padding: 6px 6px !important;
                font-size: 9.5px !important;
                white-space: nowrap !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: clamp(230px, 36dvh, 285px) !important;
                min-height: 230px !important;
            }

            .data-range-panel.has-chart .data-range-list {
                max-height: none !important;
                overflow-y: auto !important;
                padding-right: 3px !important;
                display: grid !important;
                align-content: start !important;
                gap: 7px !important;
            }

            .data-range-row {
                min-height: 54px !important;
                padding: 9px 10px !important;
                grid-template-columns: 1fr !important;
                gap: 4px !important;
            }

            .data-range-name {
                font-size: 11.5px !important;
                line-height: 1.25 !important;
            }

            .data-range-name-wrap {
                align-items: flex-start !important;
                gap: 8px !important;
            }

            .data-range-icon {
                width: 22px !important;
                height: 22px !important;
                flex-basis: 22px !important;
                margin-top: 1px !important;
            }

            .data-range-icon img {
                width: 16px !important;
                height: 16px !important;
            }

            .data-range-type-chip {
                font-size: 8.5px !important;
                padding: 2px 6px !important;
            }

            .data-range-years {
                font-size: 10.8px !important;
                line-height: 1.35 !important;
                text-align: left !important;
            }

            .data-range-panel.chart-minimized {
                left: 8px !important;
                right: 8px !important;
                width: auto !important;
                height: min(70dvh, 560px) !important;
                max-height: none !important;
                overflow-y: auto !important;
            }
        }

        @media (max-width: 430px) {
            .data-range-panel {
                left: 6px !important;
                right: 6px !important;
                bottom: calc(114px + env(safe-area-inset-bottom)) !important;
                padding: 10px !important;
            }

            .data-range-panel.has-chart {
                height: min(80dvh, 650px) !important;
            }

            .data-range-panel.has-chart .data-range-chart-card {
                padding: 9px !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: clamp(220px, 34dvh, 260px) !important;
                min-height: 220px !important;
            }

            .data-range-panel.has-chart .data-range-chart-show-station,
            .data-range-panel.has-chart .data-range-chart-export,
            .data-range-panel.has-chart .data-range-chart-minimize {
                font-size: 9px !important;
                min-height: 31px !important;
            }
        }

        @media (max-height: 520px) and (orientation: landscape) {
            .data-range-panel,
            .data-range-panel.has-chart,
            .data-range-panel.chart-minimized {
                top: 10px !important;
                bottom: 10px !important;
                left: 10px !important;
                right: 10px !important;
                height: auto !important;
                max-height: none !important;
            }

            .data-range-panel.has-chart {
                grid-template-columns: minmax(260px, 0.85fr) minmax(330px, 1.15fr) !important;
                grid-template-areas:
                    "header header"
                    "status status"
                    "list chart" !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: 230px !important;
                min-height: 220px !important;
            }
        }

    

        /* =====================================================
           KOREKSI MOBILE SCROLL + TOMBOL FULLSCREEN
           ===================================================== */
        .data-range-panel,
        .data-range-panel.has-chart,
        .data-range-panel.chart-minimized,
        .data-range-list {
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        .fullscreen-toggle {
            position: fixed;
            right: 18px;
            bottom: calc(18px + env(safe-area-inset-bottom));
            z-index: 735;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 46px;
            padding: 0 17px;
            border: 1px solid rgba(0,130,152,0.24);
            border-radius: 999px;
            background: rgba(255,255,255,0.96);
            color: var(--primary-dark);
            box-shadow: var(--shadow-md);
            font-size: 12px;
            font-weight: 900;
            cursor: pointer;
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
        }

        .fullscreen-toggle:hover {
            transform: translateY(-1px);
            background: var(--primary-soft);
            box-shadow: var(--shadow-lg);
        }

        .fullscreen-toggle:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-md);
        }

        .fullscreen-toggle-icon {
            font-size: 17px;
            line-height: 1;
            font-weight: 900;
        }

        body.is-browser-fullscreen .fullscreen-toggle,
        body.pseudo-fullscreen-map .fullscreen-toggle {
            background: linear-gradient(135deg, var(--primary), #00a8bd);
            color: #ffffff;
            border-color: transparent;
        }

        body.pseudo-fullscreen-map .app-header,
        body.pseudo-fullscreen-map .quick-search,
        body.pseudo-fullscreen-map .data-range-panel,
        body.pseudo-fullscreen-map .coord-panel {
            max-height: calc(100dvh - 24px);
        }

        @media (min-width: 641px) and (max-width: 1180px) {
            .data-range-panel.has-chart .data-range-list {
                touch-action: pan-y;
            }

            .fullscreen-toggle {
                right: 14px;
                bottom: calc(14px + env(safe-area-inset-bottom));
                min-height: 44px;
                padding: 0 15px;
            }
        }

        @media (max-width: 640px) {
            .fullscreen-toggle {
                right: 12px;
                bottom: calc(14px + env(safe-area-inset-bottom));
                min-height: 44px;
                width: 44px;
                padding: 0;
                border-radius: 999px;
            }

            .fullscreen-toggle-label {
                display: none;
            }

            .data-range-panel,
            .data-range-panel.has-chart,
            .data-range-panel.chart-minimized {
                top: auto !important;
                left: 6px !important;
                right: 6px !important;
                bottom: calc(112px + env(safe-area-inset-bottom)) !important;
                width: auto !important;
                height: min(82dvh, calc(100dvh - 148px)) !important;
                max-height: none !important;
                overflow-y: auto !important;
                overflow-x: hidden !important;
                touch-action: pan-y !important;
                -webkit-overflow-scrolling: touch !important;
                overscroll-behavior: contain !important;
                padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
            }

            .data-range-panel.has-chart {
                display: grid !important;
                grid-template-columns: 1fr !important;
                grid-template-rows: auto auto auto auto !important;
                grid-template-areas:
                    "header"
                    "status"
                    "chart"
                    "list" !important;
                align-content: start !important;
                gap: 8px !important;
            }

            .data-range-panel.has-chart .data-range-list,
            .data-range-panel.chart-minimized .data-range-list {
                max-height: none !important;
                overflow: visible !important;
                padding-right: 0 !important;
                padding-bottom: 12px !important;
            }

            .data-range-panel.has-chart .data-range-chart-card {
                max-height: none !important;
                overflow: visible !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: clamp(225px, 34dvh, 275px) !important;
                min-height: 225px !important;
            }

            .data-range-header {
                position: sticky !important;
                top: -11px !important;
                z-index: 4 !important;
            }
        }

        @media (max-width: 430px) {
            .data-range-panel,
            .data-range-panel.has-chart,
            .data-range-panel.chart-minimized {
                height: min(84dvh, calc(100dvh - 138px)) !important;
                bottom: calc(104px + env(safe-area-inset-bottom)) !important;
            }

            .data-range-panel.has-chart .data-range-chart-box {
                height: clamp(215px, 32dvh, 255px) !important;
                min-height: 215px !important;
            }
        }

        @media (max-height: 520px) and (orientation: landscape) {
            .fullscreen-toggle {
                right: 12px;
                bottom: calc(12px + env(safe-area-inset-bottom));
            }

            .data-range-panel,
            .data-range-panel.has-chart,
            .data-range-panel.chart-minimized {
                overflow-y: auto !important;
                touch-action: pan-y !important;
            }
        }


    

        /* =====================================================
           PATCH: MOBILE KETERSEDIAAN DATA LEBIH STABIL
           ===================================================== */
        .data-range-row.is-loading {
            cursor: progress !important;
            opacity: 0.82;
            background: linear-gradient(90deg, #ffffff, #f8fafc, #ffffff);
        }

        .data-range-row.is-loading:hover {
            transform: none !important;
            box-shadow: var(--shadow-sm) !important;
            border-color: var(--border) !important;
        }

        .data-range-years.loading {
            color: var(--primary-dark) !important;
            font-style: normal !important;
            font-weight: 900 !important;
        }

        @media (max-width: 640px) {
            body.range-open .data-range-panel,
            body.range-open .data-range-panel.has-chart,
            body.range-open .data-range-panel.chart-minimized {
                transform: translateY(0) !important;
                opacity: 1 !important;
                pointer-events: auto !important;
            }

            .data-range-panel {
                will-change: transform, opacity;
            }
        }


        @media (max-width: 900px) {
            .summary-stack {
                top: 94px;
                left: 14px;
                width: min(340px, calc(100vw - 28px));
                max-height: calc(100dvh - 170px);
            }
        }

        @media (max-width: 640px) {
            .legend-stack { display: none; }

            .summary-stack {
                top: 62px;
                left: 10px;
                width: calc(100vw - 20px);
                max-height: min(34dvh, 260px);
            }

            .summary-legend-card {
                max-width: none;
                border-radius: 18px;
                padding: 11px;
                gap: 7px;
            }

            .summary-detail-list {
                grid-template-columns: 1fr !important;
            }
        }


        /* =====================================================
           PATCH: LEBAR KOTAK INFO DIPERKECIL + RESPONSIVE
           Mobile, iPad, Tablet dibuat lebih ramping dan tidak memenuhi layar
           ===================================================== */

        /* Kotak info popup utama pada marker */
        .professional-popup .leaflet-popup-content {
            width: min(620px, calc(100vw - 64px)) !important;
            max-width: calc(100vw - 64px) !important;
            margin: 0 !important;
        }

        .professional-popup .leaflet-popup-content-wrapper {
            max-height: min(74dvh, 620px) !important;
            overflow-y: auto !important;
            border-radius: 18px !important;
        }

        .popup-hero {
            padding: 11px 14px !important;
            gap: 10px !important;
        }

        .popup-hero h3 {
            font-size: 16.5px !important;
            line-height: 1.15 !important;
        }

        .popup-body {
            grid-template-columns: 200px minmax(0, 1fr) !important;
            gap: 8px !important;
            padding: 9px !important;
        }

        .popup-panel {
            padding: 10px !important;
            border-radius: 14px !important;
        }

        .popup-chart-box {
            height: 255px !important;
            min-height: 220px !important;
        }

        .station-photo-card {
            width: 82px !important;
            flex-basis: 82px !important;
            border-radius: 13px !important;
        }

        .station-photo-frame {
            height: 60px !important;
        }

        .station-photo-caption {
            display: none !important;
        }

        /* Kotak info rekap di kiri atas */
        .summary-stack {
            width: min(300px, calc(100vw - 36px)) !important;
            max-width: 300px !important;
        }

        .summary-legend-card {
            max-width: 300px !important;
            padding: 10px !important;
            border-radius: 16px !important;
            gap: 7px !important;
        }

        .summary-legend-block {
            padding: 8px 9px !important;
            border-radius: 12px !important;
        }

        .summary-main-row {
            font-size: 10.8px !important;
            gap: 8px !important;
        }

        .summary-hint,
        .summary-detail-row {
            font-size: 10px !important;
        }

        /* Popup sederhana layer spasial */
        .simple-spatial-popup {
            min-width: 180px !important;
            max-width: 260px !important;
        }

        /* Tablet landscape dan iPad besar */
        @media (max-width: 1180px) and (min-width: 821px) {
            .professional-popup .leaflet-popup-content {
                width: min(560px, calc(100vw - 54px)) !important;
                max-width: calc(100vw - 54px) !important;
            }

            .popup-body {
                grid-template-columns: 185px minmax(0, 1fr) !important;
                gap: 8px !important;
            }

            .popup-chart-box {
                height: 240px !important;
                min-height: 210px !important;
            }

            .station-photo-card {
                width: 76px !important;
                flex-basis: 76px !important;
            }

            .station-photo-frame {
                height: 56px !important;
            }

            .summary-stack {
                width: min(280px, calc(100vw - 28px)) !important;
                max-width: 280px !important;
            }

            .summary-legend-card {
                max-width: 280px !important;
            }
        }

        /* iPad portrait dan tablet portrait */
        @media (max-width: 820px) and (min-width: 641px) {
            .professional-popup .leaflet-popup-content {
                width: min(520px, calc(100vw - 44px)) !important;
                max-width: calc(100vw - 44px) !important;
            }

            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 72dvh !important;
            }

            .popup-body {
                grid-template-columns: 1fr !important;
                gap: 8px !important;
            }

            .popup-date-grid {
                grid-template-columns: 1fr 1fr !important;
            }

            .popup-chart-box {
                height: 235px !important;
                min-height: 205px !important;
            }

            .summary-stack {
                width: min(260px, calc(100vw - 32px)) !important;
                max-width: 260px !important;
            }

            .summary-legend-card {
                max-width: 260px !important;
                padding: 9px !important;
            }
        }

        /* Mobile */
        @media (max-width: 640px) {
            .professional-popup .leaflet-popup-content {
                width: min(340px, calc(100vw - 28px)) !important;
                max-width: calc(100vw - 28px) !important;
            }

            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 70dvh !important;
                border-radius: 16px !important;
            }

            .popup-hero {
                padding: 10px !important;
                gap: 7px !important;
            }

            .popup-hero-left {
                gap: 8px !important;
                align-items: center !important;
            }

            .popup-hero h3 {
                font-size: 14.5px !important;
                padding-right: 22px !important;
            }

            .popup-meta {
                font-size: 9.8px !important;
                gap: 5px !important;
            }

            .popup-meta span {
                padding: 3px 6px !important;
            }

            .popup-body {
                grid-template-columns: 1fr !important;
                gap: 7px !important;
                padding: 7px !important;
            }

            .popup-panel {
                padding: 9px !important;
                border-radius: 13px !important;
            }

            .popup-date-grid {
                grid-template-columns: 1fr !important;
            }

            .popup-chart-box {
                height: 200px !important;
                min-height: 185px !important;
            }

            .station-photo-card {
                width: 58px !important;
                flex-basis: 58px !important;
            }

            .station-photo-frame {
                height: 50px !important;
            }

            .summary-stack {
                top: 58px !important;
                left: 10px !important;
                width: min(260px, calc(100vw - 92px)) !important;
                max-width: 260px !important;
                max-height: min(32dvh, 230px) !important;
            }

            .summary-legend-card {
                max-width: 260px !important;
                padding: 8px !important;
                border-radius: 15px !important;
            }

            .summary-detail-list {
                grid-template-columns: 1fr !important;
            }

            .simple-spatial-popup {
                min-width: 160px !important;
                max-width: min(240px, calc(100vw - 48px)) !important;
            }
        }

        /* Mobile kecil */
        @media (max-width: 430px) {
            .professional-popup .leaflet-popup-content {
                width: min(310px, calc(100vw - 24px)) !important;
                max-width: calc(100vw - 24px) !important;
            }

            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 68dvh !important;
            }

            .popup-hero h3 {
                font-size: 13.8px !important;
            }

            .popup-chart-box {
                height: 185px !important;
                min-height: 175px !important;
            }

            .station-photo-card {
                width: 52px !important;
                flex-basis: 52px !important;
            }

            .station-photo-frame {
                height: 46px !important;
            }

            .summary-stack {
                width: min(235px, calc(100vw - 100px)) !important;
                max-width: 235px !important;
            }
        }

        /* Mobile landscape */
        @media (max-height: 520px) and (orientation: landscape) {
            .professional-popup .leaflet-popup-content {
                width: min(520px, calc(100vw - 42px)) !important;
                max-width: calc(100vw - 42px) !important;
            }

            .professional-popup .leaflet-popup-content-wrapper {
                max-height: 84dvh !important;
            }

            .popup-body {
                grid-template-columns: 170px minmax(0, 1fr) !important;
            }

            .popup-chart-box {
                height: 190px !important;
                min-height: 175px !important;
            }
        }



        /* =====================================================
           UPLOAD DATA SPASIAL: SHP ZIP/RAR, EXCEL, DAN CSV
           ===================================================== */
        .coord-panel {
            width: 330px;
            max-height: calc(100dvh - 126px);
            overflow-y: auto;
            scrollbar-width: thin;
        }

        .upload-divider {
            height: 1px;
            margin: 14px 0;
            background: linear-gradient(90deg, transparent, rgba(0,130,152,0.28), transparent);
        }

        .upload-section {
            display: grid;
            gap: 9px;
        }

        .upload-title-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
        }

        .upload-title-row h3 {
            margin: 0;
            font-size: 13px;
            font-weight: 900;
            color: var(--primary-dark);
        }

        .upload-title-row span {
            flex: 0 0 auto;
            padding: 3px 7px;
            border-radius: 999px;
            background: var(--primary-soft);
            color: var(--primary-dark);
            font-size: 9px;
            font-weight: 900;
            letter-spacing: 0.02em;
        }

        .upload-hint {
            margin: 0;
            color: var(--text-muted);
            font-size: 10.5px;
            line-height: 1.45;
            font-weight: 600;
        }

        .spatial-file-input {
            position: absolute;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
        }

        .spatial-file-label {
            min-height: 74px;
            padding: 11px;
            border: 1.5px dashed rgba(0,130,152,0.42);
            border-radius: 15px;
            background: linear-gradient(135deg, #ffffff, #eef9fb);
            cursor: pointer;
            display: grid;
            place-items: center;
            text-align: center;
            transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
        }

        .spatial-file-label:hover,
        .spatial-file-label:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-soft);
            transform: translateY(-1px);
        }

        .spatial-file-label strong {
            display: block;
            color: var(--primary-dark);
            font-size: 12px;
            font-weight: 900;
            margin-bottom: 3px;
        }

        .spatial-file-label small {
            display: block;
            color: var(--text-muted);
            font-size: 9.5px;
            line-height: 1.35;
            font-weight: 700;
        }

        .upload-status {
            min-height: 36px;
            padding: 8px 9px;
            border-radius: 12px;
            border: 1px dashed #cbd5e1;
            background: #f8fafc;
            color: var(--text-muted);
            font-size: 10.5px;
            line-height: 1.4;
            font-weight: 700;
            overflow-wrap: anywhere;
        }

        .upload-status.loading {
            border-color: #bae6fd;
            background: #f0f9ff;
            color: #075985;
        }

        .upload-status.success {
            border-color: #bbf7d0;
            background: #f0fdf4;
            color: #166534;
        }

        .upload-status.warning {
            border-color: #fde68a;
            background: #fffbeb;
            color: #92400e;
        }

        .upload-status.error {
            border-color: #fecaca;
            background: #fef2f2;
            color: #991b1b;
        }

        .uploaded-layer-list {
            display: grid;
            gap: 6px;
            max-height: 156px;
            overflow-y: auto;
        }

        .uploaded-layer-empty {
            padding: 8px 9px;
            border-radius: 11px;
            background: rgba(248,250,252,0.92);
            border: 1px solid var(--border);
            color: var(--text-muted);
            font-size: 10px;
            font-weight: 700;
            text-align: center;
        }

        .uploaded-layer-row {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            gap: 7px;
            padding: 7px 8px;
            border-radius: 11px;
            border: 1px solid var(--border);
            background: #ffffff;
        }

        .uploaded-layer-dot {
            width: 11px;
            height: 11px;
            border-radius: 999px;
            box-shadow: 0 0 0 2px rgba(15,23,42,0.08);
        }

        .uploaded-layer-info {
            min-width: 0;
        }

        .uploaded-layer-info b,
        .uploaded-layer-info small {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .uploaded-layer-info b {
            color: var(--text-main);
            font-size: 10.5px;
            font-weight: 900;
        }

        .uploaded-layer-info small {
            margin-top: 2px;
            color: var(--text-muted);
            font-size: 9px;
            font-weight: 700;
        }

        .uploaded-layer-actions {
            display: flex;
            gap: 4px;
        }

        .uploaded-layer-actions button {
            width: 27px;
            height: 27px;
            border: 0;
            border-radius: 8px;
            cursor: pointer;
            background: #f1f5f9;
            color: #334155;
            font-size: 12px;
            font-weight: 900;
        }

        .uploaded-layer-actions button:hover {
            background: #e2e8f0;
        }

        .uploaded-layer-actions button.is-hidden-layer {
            opacity: 0.48;
        }

        .uploaded-layer-actions button.delete-uploaded-layer {
            color: #991b1b;
            background: #fee2e2;
        }

        .upload-clear-button {
            width: 100%;
            min-height: 36px;
            border: 1px solid #fecaca;
            border-radius: 11px;
            background: #fff7f7;
            color: #991b1b;
            cursor: pointer;
            font-size: 10.5px;
            font-weight: 900;
        }

        .upload-clear-button:hover {
            background: #fee2e2;
        }

        .uploaded-data-popup {
            min-width: 210px;
            max-width: 310px;
            font-size: 11px;
        }

        .uploaded-data-popup h3 {
            margin: 0 0 7px 0;
            color: var(--primary-dark);
            font-size: 13px;
        }

        .uploaded-data-popup-table {
            display: grid;
            grid-template-columns: minmax(70px, 0.8fr) minmax(100px, 1.2fr);
            gap: 4px 8px;
            max-height: 220px;
            overflow-y: auto;
        }

        .uploaded-data-popup-table b {
            color: #334155;
            overflow-wrap: anywhere;
        }

        .uploaded-data-popup-table span {
            color: var(--text-muted);
            overflow-wrap: anywhere;
        }

        @media (max-width: 1180px) and (min-width: 821px) {
            .coord-panel { width: 315px; }
        }

        @media (max-width: 820px) and (min-width: 641px) {
            .coord-panel { width: 305px; }
        }

        @media (max-width: 640px) {
            .coord-panel {
                width: min(292px, calc(100vw - 20px));
                max-height: calc(100dvh - 90px);
                overflow-y: auto;
            }
            .spatial-file-label { min-height: 66px; }
            .uploaded-layer-list { max-height: 126px; }
        }




        /* =====================================================
           MENU EXPORT DATA
           ===================================================== */
        .export-data-toggle {
            position: fixed;
            z-index: 727;
            left: 18px;
            bottom: calc(192px + env(safe-area-inset-bottom));
            min-height: 46px;
            padding: 0 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border-radius: 999px;
            border: 1px solid rgba(0,130,152,0.25);
            background: rgba(255,255,255,0.97);
            color: var(--primary-dark);
            box-shadow: var(--shadow-md);
            font-size: 13px;
            font-weight: 900;
            cursor: pointer;
            transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
        }

        .export-data-toggle::before {
            content: '⇩';
            width: 22px;
            height: 22px;
            display: inline-grid;
            place-items: center;
            border-radius: 999px;
            background: var(--primary-soft);
            font-size: 14px;
            font-weight: 900;
        }

        body.export-data-open .export-data-toggle {
            color: #ffffff;
            border-color: transparent;
            background: linear-gradient(135deg, var(--primary), #00a8bd);
        }

        body.export-data-open .export-data-toggle::before { background: rgba(255,255,255,0.18); }
        body.export-data-open .export-data-toggle::after { content: ' ×'; font-size: 17px; line-height: 1; }
        body.spi-open .export-data-toggle,
        body.export-data-open .spi-toggle { opacity: 0; pointer-events: none; transform: translateY(8px); }

        .export-data-panel {
            position: fixed;
            z-index: 726;
            left: 18px;
            bottom: calc(248px + env(safe-area-inset-bottom));
            width: min(620px, calc(100vw - 36px));
            max-height: min(70dvh, 650px);
            overflow-y: auto;
            padding: 15px;
            border-radius: 24px;
            background: rgba(255,255,255,0.97);
            border: 1px solid rgba(226,232,240,0.94);
            box-shadow: var(--shadow-lg);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            transform: translateY(calc(100% + 280px));
            opacity: 0;
            pointer-events: none;
            transition: transform 0.24s ease, opacity 0.24s ease;
        }

        body.export-data-open .export-data-panel {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .export-data-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        .export-data-header h2 { margin: 0; font-size: 16px; font-weight: 900; color: var(--text-main); }
        .export-data-section {
            margin-top: 9px;
            padding: 10px;
            border-radius: 17px;
            background: linear-gradient(135deg, #f8fafc, #eef9fb);
            border: 1px solid rgba(0,130,152,0.12);
        }
        .export-data-section-title {
            margin-bottom: 7px;
            color: var(--text-main);
            font-size: 11px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.035em;
        }

        .panel-layer-controls {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 7px;
        }

        .panel-layer-toggle {
            min-width: 0;
            min-height: 42px;
            padding: 8px 9px;
            display: flex;
            align-items: center;
            gap: 8px;
            border-radius: 12px;
            border: 1px solid #dbe5ea;
            background: #ffffff;
            color: #334155;
            font-size: 10.5px;
            font-weight: 850;
            cursor: pointer;
        }

        .panel-layer-toggle input {
            width: 17px;
            height: 17px;
            margin: 0;
            accent-color: var(--primary);
            flex: 0 0 17px;
        }
        .panel-layer-toggle span { min-width: 0; line-height: 1.25; }
        .panel-layer-toggle:has(input:checked) {
            color: var(--primary-dark);
            border-color: rgba(0,130,152,0.35);
            background: rgba(0,130,152,0.07);
        }

        .export-grid-filter {
            display: grid;
            grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.35fr) repeat(2, minmax(90px, 0.7fr));
            gap: 8px;
        }
        .export-grid-filter label { margin-bottom: 4px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.035em; }
        .export-grid-filter .form-control { min-height: 38px; padding: 7px 9px; font-size: 11.5px; font-weight: 800; }

        .export-data-actions {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 7px;
            margin-top: 9px;
        }
        .export-data-actions button {
            min-height: 40px;
            padding: 8px 10px;
            border-radius: 11px;
            border: 1px solid rgba(0,130,152,0.22);
            background: #ffffff;
            color: var(--primary-dark);
            font-size: 10.5px;
            font-weight: 900;
            cursor: pointer;
        }
        .export-data-actions button.primary {
            color: #ffffff;
            border-color: transparent;
            background: linear-gradient(135deg, var(--primary-dark), #00a8bd);
        }
        .export-data-actions button:disabled { opacity: 0.52; cursor: not-allowed; }

        .export-data-status {
            display: none;
            margin-top: 9px;
            padding: 9px 10px;
            border-radius: 12px;
            border: 1px dashed #cbd5e1;
            background: #f8fafc;
            color: #64748b;
            font-size: 10.8px;
            line-height: 1.4;
            font-weight: 750;
        }
        .export-data-status.show { display: block; }
        .export-data-status.loading { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
        .export-data-status.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
        .export-data-status.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
        .export-data-status.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

        .spi-layer-controls { margin-top: 9px; }
        .spi-layer-controls .panel-layer-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }

        #coordinateInputSection[hidden],
        #spatialUploadSection[hidden],
        #coordUploadDivider[hidden] { display: none !important; }

        @media (max-width: 640px) {
            .export-data-toggle {
                left: 12px;
                bottom: calc(174px + env(safe-area-inset-bottom));
                min-height: 44px;
                padding: 0 16px;
                font-size: 12px;
            }
            .export-data-panel {
                left: 8px;
                right: 8px;
                bottom: calc(228px + env(safe-area-inset-bottom));
                width: auto;
                max-height: min(72dvh, 610px);
                padding: 12px;
                border-radius: 20px;
            }
            .export-data-header h2 { font-size: 14px; }
            .panel-layer-controls { grid-template-columns: 1fr; }
            .export-grid-filter { grid-template-columns: 1fr 1fr; }
            .export-grid-filter > div:first-child { grid-column: 1 / -1; }
            .export-data-actions { grid-template-columns: 1fr; }
            .spi-layer-controls .panel-layer-controls { grid-template-columns: 1fr; }
        }


        /* =====================================================
           ANALISIS SPI-12 TAHUNAN DAN OVERLAY WARNA DAS
           ===================================================== */
        .spi-toggle {
            position: fixed;
            z-index: 725;
            left: 18px;
            bottom: calc(134px + env(safe-area-inset-bottom));
            min-height: 46px;
            padding: 0 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border-radius: 999px;
            border: 1px solid rgba(0,130,152,0.25);
            background: rgba(255,255,255,0.97);
            color: var(--primary-dark);
            box-shadow: var(--shadow-md);
            font-size: 13px;
            font-weight: 900;
            cursor: pointer;
        }

        .spi-toggle::before {
            content: 'Σ';
            width: 22px;
            height: 22px;
            display: inline-grid;
            place-items: center;
            border-radius: 999px;
            background: var(--primary-soft);
            font-size: 13px;
            font-weight: 900;
        }

        body.spi-open .spi-toggle {
            color: #ffffff;
            border-color: transparent;
            background: linear-gradient(135deg, var(--primary), #00a8bd);
        }

        body.spi-open .spi-toggle::before {
            background: rgba(255,255,255,0.18);
        }

        body.spi-open .spi-toggle::after {
            content: ' ×';
            font-size: 17px;
            line-height: 1;
        }

        .spi-panel {
            position: fixed;
            z-index: 724;
            left: 18px;
            bottom: calc(190px + env(safe-area-inset-bottom));
            width: min(760px, calc(100vw - 36px));
            max-height: min(72dvh, 680px);
            overflow-y: auto;
            padding: 15px;
            border-radius: 24px;
            background: rgba(255,255,255,0.96);
            border: 1px solid rgba(226,232,240,0.94);
            box-shadow: var(--shadow-lg);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            transform: translateY(calc(100% + 220px));
            opacity: 0;
            pointer-events: none;
            transition: transform 0.24s ease, opacity 0.24s ease;
        }

        body.spi-open .spi-panel {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .spi-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        .spi-header h2 {
            margin: 0;
            font-size: 16px;
            font-weight: 900;
            color: var(--text-main);
        }

        .spi-header p {
            margin: 4px 0 0;
            max-width: 580px;
            font-size: 10.8px;
            line-height: 1.45;
            color: var(--text-muted);
            font-weight: 650;
        }

        .spi-close-button {
            width: 34px;
            height: 34px;
            flex: 0 0 34px;
            border: 0;
            border-radius: 999px;
            background: #f1f5f9;
            color: #334155;
            font-size: 20px;
            cursor: pointer;
        }

        .spi-controls {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 8px;
            padding: 10px;
            border-radius: 17px;
            background: linear-gradient(135deg, #f8fafc, #eef9fb);
            border: 1px solid rgba(0,130,152,0.12);
        }

        .spi-control-group {
            min-width: 0;
        }

        .spi-control-group label {
            margin-bottom: 5px;
            font-size: 9.5px;
            text-transform: uppercase;
            letter-spacing: 0.035em;
            color: #64748b;
        }

        .spi-control-group .form-control {
            min-height: 38px;
            padding: 7px 9px;
            font-size: 11.5px;
            font-weight: 800;
        }

        .spi-action-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 9px;
        }

        .spi-action-row button {
            min-height: 38px;
            padding: 8px 12px;
            border-radius: 11px;
            border: 0;
            font-size: 11px;
            font-weight: 900;
            cursor: pointer;
        }

        .spi-run-button {
            color: #ffffff;
            background: linear-gradient(135deg, var(--primary-dark), #00a8bd);
            box-shadow: 0 8px 16px rgba(0,130,152,0.18);
        }

        .spi-run-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            box-shadow: none;
        }

        .spi-export-button {
            color: #166534;
            background: #dcfce7;
            border: 1px solid #bbf7d0 !important;
        }

        .spi-export-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .spi-reset-button {
            color: #991b1b;
            background: #fee2e2;
            border: 1px solid #fecaca !important;
        }

        .spi-status {
            margin-top: 9px;
            padding: 9px 10px;
            border-radius: 12px;
            border: 1px dashed #cbd5e1;
            background: #f8fafc;
            color: #64748b;
            font-size: 10.8px;
            line-height: 1.45;
            font-weight: 750;
        }

        .spi-status.loading { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
        .spi-status.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
        .spi-status.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
        .spi-status.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

        .spi-progress-track {
            height: 7px;
            margin-top: 7px;
            border-radius: 999px;
            overflow: hidden;
            background: #e2e8f0;
        }

        .spi-progress-bar {
            width: 0%;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, var(--primary), #00b7c9);
            transition: width 0.2s ease;
        }

        .spi-summary-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 7px;
            margin-top: 9px;
        }

        .spi-summary-card {
            padding: 8px 9px;
            border-radius: 13px;
            background: #ffffff;
            border: 1px solid #e2e8f0;
            box-shadow: var(--shadow-sm);
        }

        .spi-summary-card span {
            display: block;
            color: #64748b;
            font-size: 9.5px;
            font-weight: 800;
        }

        .spi-summary-card b {
            display: block;
            margin-top: 3px;
            color: var(--primary-dark);
            font-size: 15px;
            font-weight: 900;
        }

        .spi-legend {
            margin-top: 9px;
            padding: 10px 11px 11px;
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            background: linear-gradient(180deg, #ffffff, #f8fafc);
        }

        .spi-legend-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }

        .spi-legend-title {
            color: #0f172a;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.01em;
        }

        .spi-legend-note {
            color: #64748b;
            font-size: 9px;
            font-weight: 700;
            text-align: right;
        }

        .spi-legend-bar-wrap {
            position: relative;
        }

        .spi-legend-bar {
            position: relative;
            height: 20px;
            border-radius: 999px;
            border: 1px solid rgba(15,23,42,0.12);
            background: linear-gradient(90deg,
                #0b4f75 0%,
                #2d8eb4 14.285%,
                #d6bd76 28.57%,
                #e5e7eb 42.855%,
                #e99a38 57.14%,
                #d75a27 71.425%,
                #b51d23 100%);
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.55),
                0 2px 6px rgba(15,23,42,0.08);
            overflow: hidden;
        }

        .spi-legend-bar::after {
            content: '';
            position: absolute;
            inset: 0;
            background:
                linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0) 52%),
                repeating-linear-gradient(
                    90deg,
                    transparent 0,
                    transparent calc(14.285% - 1px),
                    rgba(255,255,255,0.55) calc(14.285% - 1px),
                    rgba(255,255,255,0.55) 14.285%
                );
            pointer-events: none;
        }

        .spi-legend-scale {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 6px;
            margin-top: 8px;
        }

        .spi-legend-scale-item {
            position: relative;
            text-align: center;
        }

        .spi-legend-scale-item::before {
            content: '';
            position: absolute;
            top: -12px;
            left: 50%;
            width: 1.5px;
            height: 8px;
            border-radius: 999px;
            transform: translateX(-50%);
            background: rgba(15,23,42,0.45);
        }

        .spi-legend-scale-item b {
            display: block;
            color: #0f172a;
            font-size: 9.2px;
            line-height: 1.1;
            font-weight: 900;
        }

        .spi-legend-scale-item span {
            display: block;
            margin-top: 2px;
            color: #475569;
            font-size: 8.4px;
            line-height: 1.15;
            font-weight: 750;
        }

        .spi-result-wrap {
            margin-top: 9px;
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            overflow: hidden;
            background: #ffffff;
        }

        .spi-result-scroll {
            max-height: 300px;
            overflow: auto;
        }

        .spi-result-table {
            width: 100%;
            min-width: 760px;
            border-collapse: collapse;
            font-size: 10.3px;
        }

        .spi-result-table th {
            position: sticky;
            top: 0;
            z-index: 1;
            padding: 8px 7px;
            text-align: left;
            background: #0f6170;
            color: #ffffff;
            font-size: 9.5px;
            text-transform: uppercase;
            letter-spacing: 0.025em;
            white-space: nowrap;
        }

        .spi-result-table td {
            padding: 7px;
            border-bottom: 1px solid #edf2f7;
            color: #334155;
            vertical-align: middle;
        }

        .spi-result-table tbody tr {
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .spi-result-table tbody tr:hover { background: #f8fafc; }
        .spi-result-table td:first-child { font-weight: 900; color: #0f172a; }

        .spi-value-chip {
            min-width: 55px;
            padding: 4px 7px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            color: #ffffff;
            font-weight: 900;
            box-shadow: 0 3px 8px rgba(15,23,42,0.12);
        }

        .spi-value-chip.light { color: #0f172a; }

        .spi-class-chip {
            display: inline-block;
            max-width: 180px;
            padding: 3px 7px;
            border-radius: 999px;
            font-size: 9px;
            line-height: 1.2;
            font-weight: 850;
            border: 1px solid rgba(15,23,42,0.08);
        }

        .spi-empty {
            padding: 18px;
            text-align: center;
            color: #64748b;
            font-size: 11px;
            font-weight: 750;
        }

        .spi-station-div-icon {
            background: transparent !important;
            border: 0 !important;
        }

        .spi-station-badge {
            min-width: 42px;
            height: 28px;
            padding: 0 7px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            border: 2px solid #ffffff;
            color: #ffffff;
            font-size: 10px;
            font-weight: 900;
            box-shadow: 0 5px 12px rgba(15,23,42,0.3);
            white-space: nowrap;
        }

        .spi-station-badge.light { color: #0f172a; }

        .das-spi-summary {
            margin: 9px 0;
            padding: 9px;
            border-radius: 12px;
            border: 1px solid rgba(15,23,42,0.10);
        }

        .das-spi-summary-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 5px;
        }

        .das-spi-summary-header b { font-size: 11px; }
        .das-spi-summary-header span {
            padding: 3px 8px;
            border-radius: 999px;
            color: #ffffff;
            font-size: 10px;
            font-weight: 900;
        }

        .das-spi-summary-header span.light { color: #0f172a; }
        .das-spi-summary p { margin: 0; font-size: 10px; line-height: 1.4; color: #334155; }
        .das-spi-stations { margin-top: 5px; font-size: 9.5px; line-height: 1.45; color: #475569; }

        @media (max-width: 980px) {
            .spi-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .spi-legend-scale { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        }

        @media (max-width: 640px) {
            .spi-toggle {
                left: 12px;
                bottom: calc(120px + env(safe-area-inset-bottom));
                min-height: 44px;
                padding: 0 16px;
                font-size: 12px;
            }
            .spi-panel {
                left: 8px;
                right: 8px;
                bottom: calc(174px + env(safe-area-inset-bottom));
                width: auto;
                max-height: min(70dvh, 590px);
                padding: 12px;
                border-radius: 20px;
            }
            .spi-header h2 { font-size: 14px; }
            .spi-header p { font-size: 10px; }
            .spi-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .spi-control-group:last-child { grid-column: 1 / -1; }
            .spi-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .spi-legend { padding: 9px 9px 10px; }
            .spi-legend-header { flex-direction: column; align-items: flex-start; }
            .spi-legend-note { text-align: left; }
            .spi-legend-scale { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 6px; }
            .spi-legend-bar { height: 18px; }
            .spi-result-scroll { max-height: 260px; }
        }

        @media (max-width: 430px) {
            .spi-panel {
                left: 6px;
                right: 6px;
                bottom: calc(170px + env(safe-area-inset-bottom));
                max-height: min(72dvh, 610px);
                padding: 10px;
            }
            .spi-controls { grid-template-columns: 1fr 1fr; gap: 7px; padding: 8px; }
            .spi-action-row { display: grid; grid-template-columns: 1fr 1fr; }
            .spi-run-button { grid-column: 1 / -1; }
        }


        /* Permukaan SPI Grid GPM kontinu: tanpa garis kotak antarsel. */
        .spi-smooth-grid-surface {
            pointer-events: none !important;
            image-rendering: auto;
            mix-blend-mode: normal;
            border: 0 !important;
            outline: 0 !important;
            box-shadow: none !important;
            filter: none !important;
            background: transparent !important;
        }

        .spi-grid-hit-marker {
            width: 22px !important;
            height: 22px !important;
            margin-left: -11px !important;
            margin-top: -11px !important;
            border: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .spi-smooth-gradient-wrap {
            margin: 0 10px 9px;
            padding: 8px 9px 7px;
            border: 1px solid #dbe4ee;
            border-radius: 10px;
            background: #ffffff;
        }

        .spi-smooth-gradient-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 5px;
            color: #334155;
            font-size: 9.5px;
            font-weight: 850;
        }

        .spi-smooth-gradient-bar {
            height: 12px;
            border: 1px solid rgba(15, 23, 42, 0.18);
            border-radius: 999px;
            background: linear-gradient(90deg,
                #7f0b16 0%,
                #b51d23 10%,
                #d75a27 22%,
                #e99a38 34%,
                #e5e7eb 50%,
                #d6bd76 66%,
                #66a9c2 78%,
                #2d8eb4 90%,
                #0b4f75 100%);
        }

        .spi-smooth-gradient-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 3px;
            color: #64748b;
            font-size: 8px;
            font-weight: 750;
        }

        /* =====================================================
           LAYOUT EKSPOR PETA SPI
           ===================================================== */
        .spi-map-export-button {
            color: #1d4ed8;
            background: #dbeafe;
            border: 1px solid #bfdbfe !important;
        }

        .spi-map-export-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .spi-shp-select-button {
            color: #5b21b6;
            background: #f5f3ff;
            border: 1px solid #ddd6fe !important;
        }

        .spi-shp-select-button.active {
            color: #ffffff;
            background: #7c3aed;
            border-color: #6d28d9 !important;
        }

        .spi-shp-select-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .spi-shp-export-button {
            color: #6d28d9;
            background: #ede9fe;
            border: 1px solid #ddd6fe !important;
        }

        .spi-shp-export-button:hover:not(:disabled) {
            background: #ddd6fe;
        }

        .spi-shp-export-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .spi-export-stage {
            position: absolute;
            left: -100000px;
            top: 0;
            width: 1800px;
            height: 1200px;
            display: grid;
            grid-template-rows: 92px 1fr 42px;
            overflow: hidden;
            background: #f8fafc;
            color: #0f172a;
            font-family: 'Inter', Arial, sans-serif;
        }

        .spi-export-header {
            display: grid;
            grid-template-columns: 88px 1fr auto;
            align-items: center;
            gap: 18px;
            padding: 13px 24px;
            background: linear-gradient(135deg, #005f70, #008da3);
            color: #ffffff;
            border-bottom: 5px solid #f0b429;
        }

        .spi-export-logo-wrap {
            width: 68px;
            height: 68px;
            display: grid;
            place-items: center;
            border-radius: 15px;
            background: rgba(255,255,255,0.96);
            box-shadow: 0 5px 15px rgba(15,23,42,0.2);
        }

        .spi-export-logo-wrap img {
            max-width: 58px;
            max-height: 58px;
            object-fit: contain;
        }

        .spi-export-title h1 {
            margin: 0;
            font-size: 31px;
            line-height: 1.08;
            letter-spacing: 0.01em;
            font-weight: 900;
        }

        .spi-export-title p {
            margin: 6px 0 0;
            font-size: 15px;
            line-height: 1.3;
            font-weight: 650;
            opacity: 0.94;
        }

        .spi-export-year-badge {
            min-width: 160px;
            padding: 11px 15px;
            border: 2px solid rgba(255,255,255,0.55);
            border-radius: 14px;
            background: rgba(0,0,0,0.12);
            text-align: center;
        }

        .spi-export-year-badge span {
            display: block;
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.12em;
        }

        .spi-export-year-badge b {
            display: block;
            margin-top: 3px;
            font-size: 29px;
            line-height: 1;
        }

        .spi-export-content {
            min-height: 0;
            display: grid;
            grid-template-columns: minmax(0, 1fr) 525px;
            gap: 14px;
            padding: 14px;
        }

        .spi-export-map-frame {
            position: relative;
            min-width: 0;
            min-height: 0;
            overflow: hidden;
            border: 2px solid #334155;
            background: #e8f0f2;
        }

        .spi-export-map {
            width: 100%;
            height: 100%;
            background: #e8f0f2;
        }

        .spi-export-north-arrow {
            position: absolute;
            top: 18px;
            right: 18px;
            z-index: 900;
            width: 72px;
            height: 108px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding: 8px 7px;
            border: 2px solid #0f172a;
            border-radius: 10px;
            background: rgba(255,255,255,0.94);
            box-shadow: 0 4px 14px rgba(15,23,42,0.22);
        }

        .spi-export-north-arrow b {
            font-size: 23px;
            line-height: 1;
        }

        .spi-export-arrow-shaft {
            position: relative;
            width: 9px;
            height: 53px;
            margin-top: 8px;
            background: #111827;
        }

        .spi-export-arrow-shaft::before {
            content: '';
            position: absolute;
            top: -13px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 15px solid transparent;
            border-right: 15px solid transparent;
            border-bottom: 24px solid #111827;
        }

        .spi-export-sidebar {
            min-height: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 13px;
            overflow: hidden;
            border: 1px solid #cbd5e1;
            background: #ffffff;
            box-shadow: 0 4px 14px rgba(15,23,42,0.10);
        }

        .spi-export-section {
            border: 1px solid #d7e0e7;
            border-radius: 9px;
            overflow: hidden;
            background: #ffffff;
        }

        .spi-export-section-title {
            padding: 8px 10px;
            background: #e6f5f7;
            border-bottom: 1px solid #c5e5e9;
            color: #005f70;
            font-size: 14px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .spi-export-meta-grid {
            display: grid;
            grid-template-columns: 116px 1fr;
            gap: 3px 7px;
            padding: 8px 9px;
            font-size: 11.3px;
            line-height: 1.18;
        }

        .spi-export-meta-grid b { color: #334155; }
        .spi-export-meta-grid span { font-weight: 700; }

        .spi-export-color-list {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 5px 8px;
            padding: 8px;
        }

        .spi-export-color-item {
            display: grid;
            grid-template-columns: 25px 72px 1fr;
            align-items: center;
            gap: 5px;
            min-height: 25px;
            font-size: 9.6px;
            line-height: 1.1;
            font-weight: 750;
        }

        .spi-export-color-swatch {
            width: 25px;
            height: 19px;
            border: 1px solid rgba(15,23,42,0.45);
        }

        .spi-export-color-range { font-weight: 900; }

        .spi-export-das-section {
            min-height: 0;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .spi-export-das-table-wrap {
            min-height: 0;
            flex: 1;
            overflow: hidden;
        }

        .spi-export-das-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
            font-size: 10.8px;
            line-height: 1.1;
        }

        .spi-export-das-table th,
        .spi-export-das-table td {
            padding: 4px 5px;
            border-right: 1px solid #e2e8f0;
            border-bottom: 1px solid #e2e8f0;
            vertical-align: middle;
        }

        .spi-export-das-table th {
            background: #f1f5f9;
            color: #334155;
            text-align: left;
            font-size: 10px;
            font-weight: 900;
        }

        .spi-export-das-table th:nth-child(1) { width: 38%; }
        .spi-export-das-table th:nth-child(2) { width: 19%; text-align: right; }
        .spi-export-das-table th:nth-child(3) { width: 16%; text-align: center; }
        .spi-export-das-table th:nth-child(4) { width: 27%; }
        .spi-export-das-table td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
        .spi-export-das-table td:nth-child(3) { text-align: center; font-weight: 900; font-variant-numeric: tabular-nums; }
        .spi-export-das-table tr:last-child td { border-bottom: 0; }
        .spi-export-das-table th:last-child,
        .spi-export-das-table td:last-child { border-right: 0; }

        .spi-export-class-cell {
            display: flex;
            align-items: center;
            gap: 5px;
            font-weight: 800;
        }

        .spi-export-class-dot {
            width: 10px;
            height: 10px;
            flex: 0 0 auto;
            border-radius: 50%;
            border: 1px solid rgba(15,23,42,0.45);
        }

        .spi-export-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            padding: 0 18px;
            background: #0f3440;
            color: #ffffff;
            font-size: 10.5px;
            line-height: 1.2;
            font-weight: 650;
        }

        .spi-export-das-label {
            padding: 2px 4px !important;
            border: 1px solid rgba(15,23,42,0.5) !important;
            border-radius: 3px !important;
            background: rgba(255,255,255,0.88) !important;
            box-shadow: none !important;
            color: #0f172a !important;
            font-size: 8px !important;
            line-height: 1.05 !important;
            font-weight: 900 !important;
            text-align: center !important;
            white-space: nowrap !important;
        }

        .spi-export-das-label::before { display: none !important; }

        .spi-export-grid-id-icon {
            border: 0 !important;
            background: transparent !important;
        }

        .spi-export-grid-outline {
            mix-blend-mode: multiply;
        }

        .spi-export-grid-id-label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            min-height: 13px;
            padding: 1px 3px;
            border: 1px solid rgba(15,23,42,0.72);
            border-radius: 2px;
            background: rgba(255,255,255,0.84);
            box-shadow: 0 1px 2px rgba(15,23,42,0.18);
            color: #111827;
            font-family: Arial, Helvetica, sans-serif;
            font-weight: 900;
            line-height: 1;
            text-align: center;
            white-space: nowrap;
        }

        .spi-export-selected-note {
            padding: 7px 9px !important;
            border: 2px solid #0f172a !important;
            border-radius: 7px !important;
            background: rgba(255,255,255,0.96) !important;
            box-shadow: 0 4px 12px rgba(15,23,42,0.22) !important;
            color: #0f172a !important;
            font-size: 10px !important;
            line-height: 1.25 !important;
            font-weight: 750 !important;
            text-align: left !important;
            white-space: nowrap !important;
        }

        .spi-export-selected-note::before { display: none !important; }

        .spi-export-station-list {
            display: grid;
            gap: 5px;
            padding: 8px 10px;
            font-size: 10.8px;
            line-height: 1.2;
        }

        .spi-export-station-item {
            display: grid;
            grid-template-columns: 13px minmax(0, 1fr) auto;
            align-items: center;
            gap: 7px;
            padding-bottom: 4px;
            border-bottom: 1px dashed #dbe4ea;
        }

        .spi-export-station-item:last-child {
            padding-bottom: 0;
            border-bottom: 0;
        }

        .spi-export-station-dot {
            width: 11px;
            height: 11px;
            border: 1.5px solid #ffffff;
            border-radius: 50%;
            background: #16a34a;
            box-shadow: 0 0 0 1px rgba(15,23,42,0.55);
        }

        .spi-export-station-name {
            min-width: 0;
            overflow: hidden;
            color: #1e293b;
            font-weight: 850;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .spi-export-station-value {
            color: #475569;
            font-size: 10px;
            font-weight: 850;
            white-space: nowrap;
        }

        .spi-export-station-more {
            padding: 1px 0 0 20px;
            color: #64748b;
            font-size: 10px;
            font-style: italic;
            font-weight: 750;
        }

        .spi-export-station-div-icon {
            border: 0 !important;
            background: transparent !important;
        }

        .spi-export-station-badge {
            width: 28px;
            height: 28px;
            display: grid;
            place-items: center;
            border: 2px solid #ffffff;
            border-radius: 50%;
            background: #16a34a;
            box-shadow: 0 2px 7px rgba(15,23,42,0.5);
            color: #ffffff;
            font-size: 8px;
            line-height: 1;
            font-weight: 950;
            text-align: center;
        }

        .spi-export-station-badge.light { color: #0f172a; }

        .spi-export-station-label {
            padding: 2px 4px !important;
            border: 1px solid rgba(15,23,42,0.55) !important;
            border-radius: 3px !important;
            background: rgba(255,255,255,0.92) !important;
            box-shadow: none !important;
            color: #0f172a !important;
            font-size: 8px !important;
            line-height: 1.05 !important;
            font-weight: 900 !important;
            text-align: center !important;
            white-space: nowrap !important;
        }

        .spi-export-station-label::before { display: none !important; }

        .spi-export-map-frame .leaflet-control-attribution {
            padding: 2px 5px;
            background: rgba(255,255,255,0.88);
            color: #334155;
            font-size: 8px;
            font-weight: 700;
        }

        .spi-export-map-frame .leaflet-control-scale-line {
            border: 2px solid #111827;
            border-top: 0;
            background: rgba(255,255,255,0.92);
            color: #111827;
            font-size: 11px;
            font-weight: 900;
        }

    

        /* =====================================================
           EXPORT DAS TERPILIH: SHP ZIP, KMZ, DAN PAKET ZIP
           ===================================================== */
        .das-export-control {
            margin-top: 10px;
            padding: 11px;
            border-radius: 14px;
            background: linear-gradient(135deg, #ffffff, #f0f9ff);
            border: 1px solid rgba(2,132,199,0.20);
        }

        .das-export-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 8px;
        }

        .das-export-header strong {
            display: block;
            color: var(--text-main);
            font-size: 11.5px;
            font-weight: 900;
        }

        .das-export-header small {
            display: block;
            margin-top: 2px;
            color: var(--text-muted);
            font-size: 9.5px;
            line-height: 1.35;
            font-weight: 700;
        }

        .das-export-badge {
            flex: 0 0 auto;
            padding: 3px 7px;
            border-radius: 999px;
            background: rgba(2,132,199,0.11);
            color: #075985;
            border: 1px solid rgba(2,132,199,0.18);
            font-size: 9px;
            font-weight: 900;
        }

        .das-export-buttons {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
        }

        .das-export-button {
            min-height: 34px;
            padding: 7px 8px;
            border-radius: 10px;
            border: 1px solid rgba(0,130,152,0.22);
            background: #ffffff;
            color: var(--primary-dark);
            cursor: pointer;
            font-size: 9.5px;
            line-height: 1.15;
            font-weight: 900;
            transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
        }

        .das-export-button:hover {
            transform: translateY(-1px);
            background: var(--primary-soft);
            box-shadow: 0 7px 14px rgba(15,23,42,0.08);
        }

        .das-export-button.primary {
            grid-column: 1 / -1;
            color: #ffffff;
            border-color: transparent;
            background: linear-gradient(135deg, var(--primary-dark), #00a8bd);
            box-shadow: 0 8px 16px rgba(0,130,152,0.18);
        }

        .das-export-button:disabled {
            opacity: 0.55;
            cursor: wait;
            transform: none;
        }

        .das-export-status {
            display: none;
            margin-top: 8px;
            padding: 7px 8px;
            border-radius: 10px;
            border: 1px dashed #cbd5e1;
            background: #f8fafc;
            color: var(--text-muted);
            font-size: 9.5px;
            line-height: 1.35;
            font-weight: 700;
            overflow-wrap: anywhere;
        }

        .das-export-status.show { display: block; }
        .das-export-status.loading { border-color: #bae6fd; background: #f0f9ff; color: #075985; }
        .das-export-status.success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
        .das-export-status.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

        @media (max-width: 430px) {
            .das-export-buttons { grid-template-columns: 1fr; }
            .das-export-button.primary { grid-column: auto; }
        }

        /* =====================================================
           MULTI SELECT DAS: SATU SHP DAN SATU KMZ GABUNGAN
           ===================================================== */
        .das-selection-toggle {
            width: 100%;
            min-height: 36px;
            margin-bottom: 8px;
            padding: 8px 10px;
            border: 1px solid rgba(245,158,11,0.35);
            border-radius: 10px;
            background: #fffbeb;
            color: #92400e;
            cursor: pointer;
            font-size: 10px;
            line-height: 1.2;
            font-weight: 900;
            transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
        }

        .das-selection-toggle:hover {
            transform: translateY(-1px);
            background: #fef3c7;
            box-shadow: 0 7px 14px rgba(15,23,42,0.08);
        }

        .das-selection-toggle.selected {
            border-color: rgba(220,38,38,0.28);
            background: #fef2f2;
            color: #991b1b;
        }

        .das-selection-summary {
            margin-bottom: 8px;
            padding: 7px 8px;
            border-radius: 10px;
            background: rgba(255,255,255,0.82);
            border: 1px dashed rgba(2,132,199,0.24);
            color: #075985;
            font-size: 9.5px;
            line-height: 1.35;
            font-weight: 800;
        }

        .das-multi-export-panel {
            position: fixed;
            right: 18px;
            bottom: 18px;
            z-index: 980;
            width: min(370px, calc(100vw - 36px));
            max-height: min(62dvh, 520px);
            display: none;
            overflow: hidden;
            border: 1px solid rgba(226,232,240,0.94);
            border-radius: 20px;
            background: rgba(255,255,255,0.96);
            box-shadow: 0 22px 55px rgba(15,23,42,0.24);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            pointer-events: auto;
        }

        .das-multi-export-panel.show {
            display: block;
            animation: dasMultiPanelIn 0.18s ease both;
        }

        @keyframes dasMultiPanelIn {
            from { opacity: 0; transform: translateY(10px) scale(0.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .das-multi-export-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
            padding: 13px 14px 10px;
            border-bottom: 1px solid rgba(226,232,240,0.92);
            background: linear-gradient(135deg, #ffffff, #eef9fb);
        }

        .das-multi-export-head h3 {
            margin: 0;
            color: var(--text-main);
            font-size: 13px;
            font-weight: 950;
        }

        .das-multi-export-head p {
            margin: 3px 0 0;
            color: var(--text-muted);
            font-size: 10px;
            line-height: 1.35;
            font-weight: 700;
        }

        .das-multi-count {
            flex: 0 0 auto;
            min-width: 38px;
            height: 28px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 9px;
            border-radius: 999px;
            background: #f59e0b;
            color: #ffffff;
            font-size: 11px;
            font-weight: 950;
            box-shadow: 0 7px 14px rgba(245,158,11,0.24);
        }

        .das-multi-selected-list {
            max-height: 180px;
            overflow-y: auto;
            display: grid;
            gap: 6px;
            padding: 10px 12px;
            background: #f8fafc;
        }

        .das-multi-selected-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            min-width: 0;
            padding: 7px 8px;
            border: 1px solid rgba(226,232,240,0.94);
            border-radius: 11px;
            background: #ffffff;
            color: #334155;
            font-size: 10px;
            font-weight: 800;
        }

        .das-multi-selected-item span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .das-multi-selected-item button {
            flex: 0 0 auto;
            width: 24px;
            height: 24px;
            border: 0;
            border-radius: 999px;
            background: #fef2f2;
            color: #b91c1c;
            cursor: pointer;
            font-size: 14px;
            line-height: 1;
            font-weight: 950;
        }

        .das-multi-export-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
            padding: 11px 12px 8px;
        }

        .das-multi-export-actions .primary { grid-column: 1 / -1; }

        .das-multi-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 0 12px 12px;
        }

        .das-multi-clear {
            min-height: 30px;
            padding: 6px 10px;
            border: 1px solid #e2e8f0;
            border-radius: 9px;
            background: #ffffff;
            color: #475569;
            cursor: pointer;
            font-size: 9.5px;
            font-weight: 900;
        }

        .das-multi-export-status {
            display: none;
            flex: 1 1 auto;
            padding: 7px 8px;
            border-radius: 9px;
            background: #f8fafc;
            border: 1px dashed #cbd5e1;
            color: #64748b;
            font-size: 9.5px;
            line-height: 1.3;
            font-weight: 750;
            overflow-wrap: anywhere;
        }

        .das-multi-export-status.show { display: block; }
        .das-multi-export-status.loading { border-color: #bae6fd; background: #f0f9ff; color: #075985; }
        .das-multi-export-status.success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
        .das-multi-export-status.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

        #map.das-export-mode,
        #map.das-export-mode .leaflet-interactive {
            cursor: crosshair !important;
        }

        /* Kontrol layer tetap berada di atas area seleksi dan checkbox tetap bisa
           diklik ketika mode Export DAS aktif. */
        body.das-export-mode-active .leaflet-control-layers {
            z-index: 1600 !important;
            pointer-events: auto !important;
        }

        body.das-export-mode-active .leaflet-control-layers,
        body.das-export-mode-active .leaflet-control-layers * {
            cursor: auto !important;
            pointer-events: auto !important;
        }

        body.das-export-mode-active .leaflet-control-layers input[type="checkbox"],
        body.das-export-mode-active .leaflet-control-layers input[type="radio"] {
            cursor: pointer !important;
        }

        .das-drag-selection-box {
            position: absolute;
            z-index: 1200;
            display: none;
            pointer-events: none;
            border: 2px solid #0e7490;
            border-radius: 4px;
            background: rgba(6, 182, 212, 0.16);
            box-shadow: 0 0 0 1px rgba(255,255,255,0.9), 0 8px 22px rgba(14,116,144,0.22);
        }

        #map.das-drag-selecting {
            user-select: none;
            -webkit-user-select: none;
        }

        .das-multi-export-status.warning {
            border-color: #fde68a;
            background: #fffbeb;
            color: #92400e;
        }

        body.das-export-mode-active .das-multi-export-panel {
            border-color: rgba(14,116,144,0.34);
            box-shadow: 0 22px 55px rgba(14,116,144,0.24);
        }

        .das-multi-empty {
            padding: 13px 12px;
            border: 1px dashed #94a3b8;
            border-radius: 12px;
            background: #ffffff;
            color: #475569;
            font-size: 10.5px;
            line-height: 1.45;
            font-weight: 750;
            text-align: center;
        }

        .das-multi-empty strong {
            display: block;
            margin-bottom: 3px;
            color: #0f766e;
            font-size: 11px;
            font-weight: 950;
        }

        .das-multi-export-actions .das-export-button:disabled {
            cursor: not-allowed;
            opacity: 0.48;
            transform: none;
            box-shadow: none;
        }

        @media (max-width: 640px) {
            .das-multi-export-panel {
                left: 10px;
                right: 10px;
                bottom: calc(68px + env(safe-area-inset-bottom));
                width: auto;
                max-height: min(58dvh, 470px);
            }
            .das-multi-selected-list { max-height: 125px; }
        }

        @media (max-width: 430px) {
            .das-multi-export-actions { grid-template-columns: 1fr; }
            .das-multi-export-actions .primary { grid-column: auto; }
        }



        /* =====================================================
           PENATAAN SEARCH DAN PANEL EXPORT DAS
           ===================================================== */
        body.search-open .quick-search {
            z-index: 1901 !important;
        }

        body.search-open .mobile-search-toggle {
            z-index: 1902 !important;
        }

        body.search-open .data-range-toggle,
        body.search-open .spi-toggle,
        body.search-open .export-data-toggle {
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
            transform: translateY(10px) !important;
        }

        body.search-open .data-range-panel,
        body.search-open .spi-panel,
        body.search-open .export-data-panel {
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        body.search-open .das-multi-export-panel.show {
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        .das-multi-export-panel {
            bottom: 96px;
            transition: bottom 0.18s ease, max-height 0.18s ease, opacity 0.18s ease;
        }

        .das-opacity-popup .leaflet-popup-content-wrapper {
            max-width: min(390px, calc(100vw - 32px));
        }

        @media (max-width: 640px) {
            body.search-open .quick-search {
                z-index: 1901 !important;
            }

            .das-multi-export-panel {
                bottom: 90px;
            }
        }

    

        /* =====================================================
           EXPORT GRID MANUAL + TABEL GRID PADA POPUP DAS
           ===================================================== */
        .grid-multi-export-panel {
            border-color: rgba(234,88,12,0.28);
        }

        .grid-multi-export-panel .das-multi-count {
            background: #ea580c;
            box-shadow: 0 7px 14px rgba(234,88,12,0.24);
        }

        body.grid-export-mode-active .leaflet-control-layers {
            z-index: 1600 !important;
            pointer-events: auto !important;
        }

        body.grid-export-mode-active .leaflet-control-layers,
        body.grid-export-mode-active .leaflet-control-layers * {
            cursor: auto !important;
            pointer-events: auto !important;
        }

        #map.grid-export-mode,
        #map.grid-export-mode .leaflet-interactive {
            cursor: crosshair !important;
        }

        .grid-drag-selection-box {
            position: absolute;
            z-index: 1210;
            display: none;
            pointer-events: none;
            border: 2px solid #ea580c;
            border-radius: 4px;
            background: rgba(249,115,22,0.15);
            box-shadow: 0 0 0 1px rgba(255,255,255,0.92), 0 8px 22px rgba(194,65,12,0.24);
        }

        #map.grid-drag-selecting {
            user-select: none;
            -webkit-user-select: none;
        }

        .grid-selection-das {
            display: block;
            margin-top: 2px;
            color: #64748b;
            font-size: 8.5px;
            font-weight: 700;
        }

        .das-grid-spi-table-wrap {
            max-height: 210px;
            overflow: auto;
            margin-top: 8px;
            border: 1px solid rgba(148,163,184,0.32);
            border-radius: 10px;
            background: rgba(255,255,255,0.84);
        }

        .das-grid-spi-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 9.5px;
            line-height: 1.25;
        }

        .das-grid-spi-table th,
        .das-grid-spi-table td {
            padding: 5px 6px;
            border-bottom: 1px solid rgba(226,232,240,0.9);
            text-align: left;
            vertical-align: top;
            white-space: nowrap;
        }

        .das-grid-spi-table th {
            position: sticky;
            top: 0;
            z-index: 1;
            background: #f8fafc;
            color: #475569;
            font-size: 9px;
            font-weight: 900;
        }

        .das-grid-spi-table tr:last-child td { border-bottom: 0; }
        .das-grid-spi-table .grid-spi-value { font-weight: 950; }
        .das-grid-spi-more {
            padding: 6px 8px;
            color: #64748b;
            font-size: 9px;
            font-weight: 800;
        }

        @media (max-width: 640px) {
            .grid-multi-export-panel { bottom: 90px; }
            .das-grid-spi-table-wrap { max-height: 175px; }
        }



        /* =====================================================
           EXPORT PETA SPI - LAYOUT KARTOGRAFI SESUAI AREA ZOOM
           ===================================================== */
        .spi-cartographic-stage {
            position: absolute;
            left: -100000px;
            top: 0;
            width: 1754px;
            height: 1240px;
            aspect-ratio: 297 / 210;
            display: grid;
            grid-template-columns: minmax(0, 1fr) 420px;
            gap: 18px;
            padding: 18px 20px;
            overflow: hidden;
            border: 2px solid #7c7c7c;
            background: #efefef;
            color: #111827;
            font-family: Arial, Helvetica, sans-serif;
            box-sizing: border-box;
        }

        .spi-cartographic-map-column {
            min-width: 0;
            min-height: 0;
            display: grid;
            grid-template-rows: minmax(0, 1fr);
            padding: 12px 0 0 0;
            border-right: none;
        }

        .spi-cartographic-map-shell {
            position: relative;
            min-width: 0;
            min-height: 0;
            overflow: visible;
            border: 2px solid #2a45d8;
            background: #efefef;
        }

        .spi-cartographic-map {
            width: 100%;
            height: 100%;
            background: #efefef;
        }

        .spi-cartographic-map-footer { display: none; }

        .spi-cartographic-coordinate-frame {
            position: absolute;
            inset: -28px -18px -28px -18px;
            pointer-events: none;
            z-index: 900;
            font-family: Arial, Helvetica, sans-serif;
        }

        .spi-cartographic-coordinate-axis {
            position: absolute;
            color: #4b5563;
            font-size: 9px;
            font-weight: 700;
            line-height: 1;
            letter-spacing: 0.02em;
        }

        .spi-cartographic-coordinate-axis.top,
        .spi-cartographic-coordinate-axis.bottom {
            left: 16px;
            right: 16px;
            display: flex;
            justify-content: space-between;
        }
        .spi-cartographic-coordinate-axis.top { top: 4px; }
        .spi-cartographic-coordinate-axis.bottom { bottom: 4px; }

        .spi-cartographic-coordinate-axis.left,
        .spi-cartographic-coordinate-axis.right {
            top: 18px;
            bottom: 18px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .spi-cartographic-coordinate-axis.left { left: 4px; align-items: center; }
        .spi-cartographic-coordinate-axis.right { right: 4px; align-items: center; }
        .spi-cartographic-coordinate-axis.left span,
        .spi-cartographic-coordinate-axis.right span { writing-mode: vertical-rl; transform: rotate(180deg); }

        .spi-cartographic-index-box { display: none !important; }

        .spi-cartographic-sidebar {
            min-width: 0;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: #f5f5f5;
            border: 1.6px solid #666666;
        }

        .spi-cartographic-side-section {
            padding: 10px 12px;
            border-bottom: 1.6px solid #666666;
            background: transparent;
        }
        .spi-cartographic-side-section:last-child { border-bottom: none; }

        .spi-cartographic-logo-top {
            min-height: 136px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px;
            background: #f7f7f7;
        }
        .spi-cartographic-logo-solo {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
        }
        .spi-cartographic-logo-solo .spi-cartographic-logo-image {
            max-width: 120px;
            max-height: 96px;
            object-fit: contain;
            filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12));
        }

        .spi-cartographic-title-section {
            padding: 18px 14px 16px;
            text-align: center;
            background: #f8f8f8;
        }
        .spi-cartographic-title-section h1 {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 20px;
            line-height: 1.18;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.01em;
        }
        .spi-cartographic-title-sub {
            margin-top: 8px;
            font-size: 10px;
            line-height: 1.3;
            font-weight: 700;
            color: #4b5563;
        }

        .spi-cartographic-scale-section {
            padding: 10px 12px 12px;
            text-align: center;
            background: #f7f7f7;
        }
        .spi-cartographic-compass {
            position: relative;
            width: 56px;
            height: 98px;
            margin: 0 auto 8px;
        }
        .spi-cartographic-compass .n,
        .spi-cartographic-compass .e,
        .spi-cartographic-compass .s,
        .spi-cartographic-compass .w {
            position: absolute;
            font-size: 10px;
            font-weight: 800;
            line-height: 1;
            color: #111827;
        }
        .spi-cartographic-compass .n {
            top: -4px;
            left: 50%;
            transform: translateX(-50%);
            width: 16px;
            text-align: center;
        }
        .spi-cartographic-compass .e { right: -2px; top: 33px; }
        .spi-cartographic-compass .s { bottom: -2px; left: 50%; transform: translateX(-50%); }
        .spi-cartographic-compass .w { left: -2px; top: 33px; }
        .spi-cartographic-compass-rose {
            position: absolute;
            top: 12px;
            left: 50%;
            width: 40px;
            height: 74px;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .spi-cartographic-compass-svg { width: 40px; height: 74px; }
        .spi-cartographic-scale-label {
            margin-top: 4px;
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 0.01em;
            color: #111827;
        }
        .spi-cartographic-scale-bar { margin-top: 8px; }
        .spi-cartographic-scale-bar-labels {
            display: flex;
            justify-content: space-between;
            gap: 4px;
            font-size: 8px;
            font-weight: 700;
            color: #111827;
            padding: 0 4px;
        }
        .spi-cartographic-scale-bar-strip {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            margin-top: 2px;
            border: 1.4px solid #111827;
            height: 10px;
            overflow: hidden;
        }
        .spi-cartographic-scale-bar-strip span:nth-child(odd) { background: #111827; }
        .spi-cartographic-scale-bar-strip span:nth-child(even) { background: #ffffff; }
        .spi-cartographic-scale-bar-unit {
            display: flex;
            justify-content: flex-end;
            margin-top: 2px;
            font-size: 8px;
            font-weight: 700;
            color: #111827;
        }

        .spi-cartographic-section-title {
            margin-bottom: 8px;
            font-size: 10px;
            line-height: 1.1;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #374151;
        }
        .spi-cartographic-sublegend-title {
            margin-top: 10px;
            margin-bottom: 6px;
            font-size: 9px;
            line-height: 1.1;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #4b5563;
        }
        .spi-cartographic-boundary-item,
        .spi-cartographic-point-legend-item {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            gap: 7px;
            margin-bottom: 5px;
            font-size: 9px;
            line-height: 1.2;
            font-weight: 700;
        }
        .spi-cartographic-boundary-swatch,
        .spi-cartographic-selected-das-swatch {
            width: 18px;
            height: 10px;
            border: 1.4px solid #111827;
            background: #ffffff;
            border-radius: 0;
        }
        .spi-cartographic-selected-das-swatch { border-width: 2px; }
        .spi-cartographic-selected-das-list { margin-bottom: 8px; }
        .spi-cartographic-selected-das-name {
            margin-bottom: 3px;
            padding-left: 24px;
            font-size: 9px;
            line-height: 1.2;
            font-weight: 700;
            color: #111827;
        }
        .spi-cartographic-spi-list {
            display: block;
            margin-top: 8px;
        }
        .spi-cartographic-spi-horizontal {
            display: block;
        }
        .spi-cartographic-spi-pill {
            position: relative;
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            height: 18px;
            border-radius: 999px;
            border: 1px solid rgba(15,23,42,0.22);
            overflow: hidden;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.58),
                0 1px 4px rgba(15,23,42,0.08);
            background: #ffffff;
        }
        .spi-cartographic-spi-pill::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 54%);
            pointer-events: none;
        }
        .spi-cartographic-spi-segment {
            position: relative;
            display: block;
            height: 100%;
        }
        .spi-cartographic-spi-segment:not(:last-child)::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 1px;
            height: 100%;
            background: rgba(255,255,255,0.48);
        }
        .spi-cartographic-spi-scale {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 2px;
            margin-top: 8px;
        }
        .spi-cartographic-spi-scale-item {
            position: relative;
            text-align: center;
            padding-top: 8px;
        }
        .spi-cartographic-spi-scale-item::before {
            content: '';
            position: absolute;
            top: -8px;
            left: 50%;
            width: 1.5px;
            height: 7px;
            border-radius: 999px;
            transform: translateX(-50%);
            background: rgba(15,23,42,0.45);
        }
        .spi-cartographic-spi-scale-item b {
            display: block;
            color: #0f172a;
            font-size: 6.9px;
            line-height: 1.08;
            font-weight: 900;
            letter-spacing: 0;
        }
        .spi-cartographic-spi-scale-item span {
            display: block;
            margin-top: 1px;
            color: #475569;
            font-size: 6.7px;
            line-height: 1.08;
            font-weight: 800;
        }

        .spi-cartographic-point-legend { display: grid; gap: 4px; }
        .spi-cartographic-point-symbol {
            width: 12px;
            height: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--point-color, #111827);
            border: 1px solid rgba(17,24,39,0.28);
        }
        .spi-cartographic-point-symbol.circle { border-radius: 999px; }
        .spi-cartographic-point-symbol.square { border-radius: 1px; }
        .spi-cartographic-point-symbol.triangle {
            width: 0;
            height: 0;
            background: transparent;
            border-left: 7px solid transparent;
            border-right: 7px solid transparent;
            border-bottom: 12px solid var(--point-color, #111827);
            border-top: 0;
            border-radius: 0;
        }
        .spi-cartographic-point-count { font-size: 8.5px; font-weight: 800; color: #374151; }

        .spi-cartographic-inset-section {
            min-height: 0;
            flex: 0 0 198px;
            display: flex;
            flex-direction: column;
            background: #f7f7f7;
        }
        .spi-cartographic-inset-map {
            min-height: 138px;
            flex: 1;
            border: 1.5px solid #666666;
            background: #d9eef5;
        }
        .spi-cartographic-inset-map .leaflet-control-attribution { display: none !important; }
        .spi-cartographic-map-shell .leaflet-control-attribution,
        .spi-cartographic-map-shell .leaflet-control-scale { display: none !important; }

        .spi-cartographic-source-section {
            margin-top: auto;
            min-height: 92px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            background: #f8f8f8;
        }
        .spi-cartographic-source-simple { font-size: 10px; font-weight: 700; color: #111827; }
        .spi-cartographic-source-main { margin-top: 16px; font-size: 10px; font-weight: 700; color: #111827; }
        .spi-cartographic-source-meta {
            margin-top: 4px;
            font-size: 7.8px;
            line-height: 1.25;
            font-weight: 700;
            color: #6b7280;
        }

        .spi-cartographic-logo-row,
        .spi-cartographic-logo-box { display: none !important; }

        .spi-cartographic-map-point-icon,
        .spi-export-grid-id-icon { background: transparent; border: none; }

        .spi-cartographic-point-label {
            padding: 1px 4px !important;
            border: 1px solid rgba(17,24,39,0.18) !important;
            border-radius: 3px !important;
            background: rgba(255,255,255,0.9) !important;
            color: #0f172a !important;
            font-size: 7px !important;
            font-weight: 700 !important;
            box-shadow: none !important;
            white-space: nowrap !important;
        }
        .spi-cartographic-point-label::before { display: none !important; }
        .spi-export-grid-outline { shape-rendering: geometricPrecision; }
        .spi-export-grid-id-label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 18px;
            height: 12px;
            padding: 0 2px;
            border-radius: 2px;
            background: rgba(255,255,255,0.68);
            color: #111827;
            font-weight: 800;
            line-height: 1;
            text-shadow: 0 1px 0 rgba(255,255,255,0.65);
        }

        /* =====================================================
           KOREKSI EXPORT PETA SPI A4:
           - seluruh isi tetap berada di bidang A4
           - koordinat bingkai tidak terpotong
           - sidebar dipadatkan secara aman
           - batas DAS terpilih menggunakan garis hitam
           ===================================================== */
        .spi-cartographic-stage {
            position: fixed !important;
            left: 0 !important;
            top: 0 !important;
            z-index: -1000 !important;
            pointer-events: none !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
        }

        .spi-cartographic-map-column {
            padding: 30px 30px 0 30px !important;
            min-height: 0 !important;
            overflow: hidden !important;
        }

        .spi-cartographic-map-shell {
            min-height: 0 !important;
            overflow: visible !important;
        }

        .spi-cartographic-map-footer {
            min-width: 0 !important;
            gap: 8px !important;
            font-size: 7.5px !important;
            white-space: normal !important;
        }

        .spi-cartographic-map-footer span {
            min-width: 0 !important;
            overflow-wrap: anywhere !important;
        }

        .spi-cartographic-sidebar {
            transform-origin: top left !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
        }

        .spi-cartographic-side-section {
            padding: 8px 10px !important;
        }

        .spi-cartographic-title-section {
            padding: 10px 9px 8px !important;
        }

        .spi-cartographic-title-section h1 {
            font-size: 20px !important;
        }

        .spi-cartographic-title-section p {
            margin-top: 4px !important;
            font-size: 9.5px !important;
        }

        .spi-cartographic-year {
            margin-top: 5px !important;
            padding: 3px 7px !important;
            font-size: 9px !important;
        }

        .spi-cartographic-orientation {
            grid-template-columns: 104px minmax(0, 1fr) !important;
            gap: 8px !important;
        }

        .spi-cartographic-compass {
            width: 92px !important;
            height: 92px !important;
        }

        .spi-cartographic-compass::before { height: 60px !important; }
        .spi-cartographic-compass::after { width: 60px !important; }

        .spi-cartographic-section-title {
            margin-bottom: 5px !important;
            font-size: 12px !important;
        }

        .spi-cartographic-selected-das-swatch {
            border-color: #000000 !important;
            outline-color: #ffffff !important;
        }

        .spi-cartographic-selected-das-name {
            border-left-color: #000000 !important;
            background: #f8fafc !important;
        }

        .spi-cartographic-inset-map {
            min-height: 130px !important;
        }

        .spi-cartographic-index-box {
            max-width: calc(100% - 24px) !important;
            max-height: 190px !important;
        }

        .spi-export-raster-snapshot {
            image-rendering: auto !important;
        }


        /* =====================================================
           FONT EXPORT PETA SPI DIPERBESAR
           ===================================================== */
        .spi-cartographic-stage {
            grid-template-columns: minmax(0, 1fr) 475px !important;
        }

        .spi-cartographic-map-footer {
            font-size: 9.5px !important;
            line-height: 1.25 !important;
        }

        .spi-coordinate-band {
            font-size: 10.5px !important;
            font-weight: 900 !important;
        }

        .spi-cartographic-title-section h1 {
            font-size: 23px !important;
            line-height: 1.1 !important;
        }

        .spi-cartographic-title-section p {
            font-size: 11.5px !important;
            line-height: 1.3 !important;
        }

        .spi-cartographic-year {
            font-size: 10.5px !important;
        }

        .spi-cartographic-view-info {
            gap: 6px !important;
            font-size: 11.2px !important;
            line-height: 1.28 !important;
        }

        .spi-cartographic-view-info div {
            grid-template-columns: 94px minmax(0, 1fr) !important;
        }

        .spi-cartographic-section-title {
            margin-bottom: 6px !important;
            font-size: 14.5px !important;
            line-height: 1.12 !important;
        }

        .spi-cartographic-boundary-item,
        .spi-cartographic-point-legend-item {
            min-height: 26px !important;
            font-size: 11px !important;
            line-height: 1.22 !important;
        }

        .spi-cartographic-spi-list {
            gap: 4px !important;
        }

        .spi-cartographic-spi-item {
            grid-template-columns: 29px 84px minmax(0, 1fr) !important;
            min-height: 23px !important;
            font-size: 10.5px !important;
            line-height: 1.2 !important;
        }

        .spi-cartographic-selected-das-list {
            font-size: 9.8px !important;
            line-height: 1.25 !important;
        }

        .spi-cartographic-point-count {
            font-size: 9.5px !important;
        }

        .spi-cartographic-source-list {
            padding-left: 19px !important;
            font-size: 10.5px !important;
            line-height: 1.38 !important;
        }

        .spi-cartographic-source-list li {
            margin-bottom: 4px !important;
        }

        .spi-cartographic-index-title {
            font-size: 10.5px !important;
            line-height: 1.2 !important;
        }

        .spi-cartographic-index-grid {
            font-size: 9px !important;
            line-height: 1.2 !important;
        }

        .spi-cartographic-index-item {
            grid-template-columns: 38px minmax(0, 1fr) !important;
            padding: 2px 3px !important;
        }

        .spi-cartographic-point-label {
            padding: 3px 5px !important;
            font-size: 8.8px !important;
            line-height: 1.05 !important;
        }

        .spi-export-grid-id-label {
            min-height: 15px !important;
            padding: 2px 4px !important;
            font-size: 7.8px !important;
        }

        .spi-export-das-label {
            font-size: 9.5px !important;
            line-height: 1.18 !important;
        }


        /* =====================================================
           PENYESUAIAN LAYOUT EXPORT SPI:
           - Sumber diringkas
           - Kompas diganti north arrow gaya layout peta
           - Ditambah kolom logo PU
           - Inset dirapikan agar garis bawah sejajar dengan bingkai peta
           ===================================================== */
        .spi-cartographic-orientation {
            grid-template-columns: 118px minmax(0, 1fr) !important;
            gap: 10px !important;
        }

        .spi-cartographic-compass {
            position: relative !important;
            width: 92px !important;
            height: 120px !important;
            margin: 0 auto !important;
        }

        .spi-cartographic-compass::before,
        .spi-cartographic-compass::after,
        .spi-cartographic-compass-rose::before,
        .spi-cartographic-compass-rose::after {
            display: none !important;
        }

        .spi-cartographic-compass .e,
        .spi-cartographic-compass .s,
        .spi-cartographic-compass .w {
            display: none !important;
        }

        .spi-cartographic-compass .n {
            top: 0 !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            font-size: 20px !important;
            line-height: 1 !important;
            font-weight: 900 !important;
            letter-spacing: 1px !important;
        }

        .spi-cartographic-compass-rose {
            position: absolute !important;
            left: 50% !important;
            top: 28px !important;
            width: 34px !important;
            height: 76px !important;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            transform: translateX(-50%) !important;
            overflow: visible !important;
        }

        .spi-cartographic-compass-svg {
            display: block;
            width: 34px;
            height: 76px;
        }

        .spi-cartographic-source-list {
            padding-left: 18px !important;
        }

        .spi-cartographic-source-list li {
            margin-bottom: 5px !important;
        }

        .spi-cartographic-logo-section {
            display: flex;
            flex-direction: column;
            gap: 6px;
            align-items: stretch;
            justify-content: center;
        }

        .spi-cartographic-logo-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            align-items: center;
        }

        .spi-cartographic-logo-box {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 116px;
            padding: 8px;
            border: 1.6px solid #111827;
            background: #fff;
        }

        .spi-cartographic-logo-image {
            display: block;
            max-width: 100%;
            height: auto;
            object-fit: contain;
        }

        .spi-cartographic-logo-image.bws {
            width: 118px;
        }

        .spi-cartographic-logo-image.pu {
            width: 82px;
        }

        .spi-cartographic-inset-section {
            flex: 1 !important;
            padding-top: 8px !important;
            padding-bottom: 0 !important;
            border-bottom: 0 !important;
        }

        .spi-cartographic-inset-map {
            min-height: 0 !important;
            height: 100% !important;
            flex: 1 !important;
            margin-bottom: 0 !important;
            border-bottom-width: 2px !important;
        }

        /* Tampilan ringkas: sembunyikan catatan/petunjuk tambahan. */
        .spi-legend-note,
        .upload-title-row > span {
            display: none !important;
        }

        .popup-status:empty,
        .upload-status:empty,
        .uploaded-layer-empty:empty,
        .spi-empty:empty,
        .data-range-status:empty,
        .export-data-status:empty,
        .das-multi-export-status:empty {
            display: none !important;
        }

    
        /* =====================================================
           EXPORT PETA SPI PROFESIONAL + INDEKS GRID PADA PETA
           ===================================================== */
        .spi-cartographic-stage {
            grid-template-columns: minmax(0, 1fr) 430px !important;
            gap: 20px !important;
            padding: 24px !important;
            border: 0 !important;
            background:
                linear-gradient(145deg, #e8eef3 0%, #f7f9fb 46%, #e2e9ef 100%) !important;
            box-shadow: inset 0 0 0 2px #cbd5df !important;
        }

        .spi-cartographic-map-column {
            padding: 24px !important;
            overflow: hidden !important;
            border: 0 !important;
            border-radius: 20px !important;
            background: #ffffff !important;
            box-shadow:
                0 18px 40px rgba(15, 23, 42, 0.14),
                0 2px 8px rgba(15, 23, 42, 0.08) !important;
        }

        .spi-cartographic-map-shell {
            overflow: visible !important;
            border: 2px solid #0f6170 !important;
            border-radius: 12px !important;
            background: #dbe8ee !important;
            box-shadow:
                0 0 0 6px #f8fafc,
                0 0 0 7px #cbd5e1 !important;
        }

        .spi-cartographic-map {
            border-radius: 10px !important;
            overflow: hidden !important;
        }

        .spi-cartographic-sidebar {
            border: 0 !important;
            border-radius: 20px !important;
            background: #ffffff !important;
            box-shadow:
                0 18px 40px rgba(15, 23, 42, 0.14),
                0 2px 8px rgba(15, 23, 42, 0.08) !important;
        }

        .spi-cartographic-side-section {
            padding: 12px 16px !important;
            border-bottom: 1px solid #dbe3ea !important;
            background: #ffffff !important;
        }

        .spi-cartographic-logo-top {
            min-height: 118px !important;
            background:
                linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%) !important;
        }

        .spi-cartographic-logo-solo .spi-cartographic-logo-image {
            max-width: 100px !important;
            max-height: 82px !important;
        }

        .spi-cartographic-title-section {
            padding: 17px 16px 15px !important;
            color: #ffffff !important;
            background:
                linear-gradient(135deg, #0b4f5d 0%, #0f7888 100%) !important;
        }

        .spi-cartographic-title-section h1 {
            margin: 0 !important;
            color: #ffffff !important;
            font-size: 18px !important;
            line-height: 1.18 !important;
            letter-spacing: 0.015em !important;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) !important;
        }

        .spi-cartographic-title-region {
            margin-top: 9px !important;
            color: rgba(255, 255, 255, 0.90) !important;
            font-size: 9px !important;
            line-height: 1.24 !important;
            font-weight: 700 !important;
        }

        .spi-cartographic-title-sub {
            display: inline-flex !important;
            margin-top: 8px !important;
            padding: 4px 10px !important;
            border: 1px solid rgba(255, 255, 255, 0.45) !important;
            border-radius: 999px !important;
            color: #ffffff !important;
            background: rgba(255, 255, 255, 0.12) !important;
            font-size: 9px !important;
            font-weight: 800 !important;
        }

        .spi-cartographic-scale-section,
        .spi-cartographic-inset-section,
        .spi-cartographic-source-section {
            background: #fbfcfd !important;
        }

        .spi-cartographic-inset-map {
            border: 1px solid #94a3b8 !important;
            border-radius: 9px !important;
            overflow: hidden !important;
            box-shadow: inset 0 0 0 2px #ffffff !important;
        }

        .spi-cartographic-section-title {
            color: #0f4f5d !important;
            font-size: 11px !important;
            letter-spacing: 0.06em !important;
        }

        .spi-cartographic-source-section {
            border-bottom: 0 !important;
        }

        .spi-cartographic-index-box {
            position: absolute !important;
            left: 18px !important;
            bottom: 18px !important;
            z-index: 1400 !important;
            display: block !important;
            width: min(76%, 920px) !important;
            max-width: calc(100% - 36px) !important;
            max-height: none !important;
            overflow: hidden !important;
            border: 1px solid rgba(15, 79, 93, 0.55) !important;
            border-radius: 14px !important;
            background: rgba(255, 255, 255, 0.94) !important;
            box-shadow:
                0 12px 28px rgba(15, 23, 42, 0.20),
                0 2px 6px rgba(15, 23, 42, 0.12) !important;
            backdrop-filter: blur(8px) !important;
        }

        .spi-cartographic-index-header {
            display: grid !important;
            grid-template-columns: minmax(210px, 0.9fr) minmax(0, 1.8fr) !important;
            align-items: center !important;
            gap: 12px !important;
            padding: 9px 12px 8px !important;
            color: #ffffff !important;
            background:
                linear-gradient(135deg, rgba(11, 79, 93, 0.98), rgba(15, 120, 136, 0.96)) !important;
        }

        .spi-cartographic-index-header > div:first-child {
            min-width: 0 !important;
        }

        .spi-cartographic-index-header strong {
            display: block !important;
            font-size: 10px !important;
            line-height: 1.15 !important;
            letter-spacing: 0.04em !important;
            font-weight: 900 !important;
        }

        .spi-cartographic-index-header span {
            display: block !important;
            margin-top: 2px !important;
            color: rgba(255, 255, 255, 0.82) !important;
            font-size: 7.5px !important;
            line-height: 1.15 !important;
            font-weight: 700 !important;
        }

        .spi-cartographic-index-columns {
            display: grid !important;
            grid-template-columns: 58px minmax(0, 1fr) 42px !important;
            align-items: center !important;
            gap: 6px !important;
            font-size: 7.5px !important;
            line-height: 1 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.04em !important;
            opacity: 0.90 !important;
        }

        .spi-cartographic-index-grid {
            display: grid !important;
            grid-template-columns: repeat(var(--spi-index-columns, 3), minmax(0, 1fr)) !important;
            gap: 1px !important;
            padding: 7px !important;
            background: #d8e1e7 !important;
            font-size: 7.6px !important;
            line-height: 1.12 !important;
        }

        .spi-cartographic-index-item {
            display: grid !important;
            grid-template-columns: 54px minmax(0, 1fr) 38px !important;
            align-items: center !important;
            gap: 5px !important;
            min-height: 24px !important;
            padding: 4px 6px !important;
            border: 0 !important;
            border-radius: 5px !important;
            background: #ffffff !important;
        }

        .spi-cartographic-index-grid-id {
            overflow: hidden !important;
            color: #0f4f5d !important;
            font-size: 7.8px !important;
            font-weight: 900 !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
        }

        .spi-cartographic-index-das {
            min-width: 0 !important;
            overflow: hidden !important;
            color: #334155 !important;
            font-size: 7.2px !important;
            font-weight: 700 !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
        }

        .spi-cartographic-index-spi {
            justify-self: end !important;
            padding: 2px 4px !important;
            border-radius: 999px !important;
            color: #0f172a !important;
            background: #e7eef2 !important;
            font-size: 7.2px !important;
            font-weight: 900 !important;
            white-space: nowrap !important;
        }

        .spi-cartographic-index-more {
            display: block !important;
            padding: 5px 10px 6px !important;
            border-top: 1px solid #dbe3e9 !important;
            color: #64748b !important;
            background: #f8fafc !important;
            font-size: 7.5px !important;
            line-height: 1.15 !important;
            font-weight: 800 !important;
            text-align: right !important;
        }

        .spi-export-grid-id-label {
            border: 1px solid rgba(15, 79, 93, 0.35) !important;
            border-radius: 4px !important;
            color: #0f4f5d !important;
            background: rgba(255, 255, 255, 0.88) !important;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12) !important;
        }

    
        .spi-professional-control {
            position: relative;
            padding: 8px;
            border: 1px solid rgba(15, 97, 112, 0.20);
            border-radius: 10px;
            background: linear-gradient(180deg, rgba(240, 253, 250, 0.85), rgba(248, 250, 252, 0.94));
        }

        .spi-professional-control::after {
            content: 'PRO';
            position: absolute;
            top: 5px;
            right: 7px;
            padding: 2px 5px;
            border-radius: 999px;
            color: #ffffff;
            background: #0f6170;
            font-size: 7px;
            line-height: 1;
            font-weight: 900;
            letter-spacing: 0.06em;
        }

        .spi-professional-control label {
            padding-right: 30px;
            color: #0f4f5d;
            font-weight: 850;
        }

        .spi-quality-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 54px;
            padding: 4px 7px;
            border-radius: 999px;
            font-size: 10px;
            line-height: 1;
            font-weight: 850;
            background: #e2e8f0;
            color: #334155;
        }

        .spi-quality-chip.high {
            background: #dcfce7;
            color: #166534;
        }

        .spi-quality-chip.medium {
            background: #fef3c7;
            color: #92400e;
        }

        .spi-quality-chip.low {
            background: #fee2e2;
            color: #991b1b;
        }

        .spi-weight-mini {
            white-space: nowrap;
            font-size: 9px;
            font-weight: 750;
            color: #475569;
        }

    
        .spi-summary-grid:has(.spi-summary-card:nth-child(5)) {
            grid-template-columns: repeat(5, minmax(0, 1fr));
        }

        @media (max-width: 900px) {
            .spi-summary-grid:has(.spi-summary-card:nth-child(5)) {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

    
        .spi-smooth-grid-surface {
            mix-blend-mode: normal;
            image-rendering: auto;
            pointer-events: none;
        }



        /* =====================================================
           UI ANALISIS SPI COMPACT DAN RESPONSIF
           ===================================================== */
        .spi-panel {
            width: min(690px, calc(100vw - 32px));
            max-height: min(78dvh, 650px);
            padding: 12px;
            border-radius: 18px;
            scrollbar-width: thin;
            scrollbar-color: #94a3b8 transparent;
        }

        .spi-panel::-webkit-scrollbar { width: 7px; height: 7px; }
        .spi-panel::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }
        .spi-panel::-webkit-scrollbar-track { background: transparent; }

        .spi-header {
            align-items: center;
            margin-bottom: 7px;
            padding: 0 1px;
        }

        .spi-header h2 {
            font-size: 15px;
            line-height: 1.2;
            letter-spacing: -0.015em;
        }

        .spi-close-button {
            width: 30px;
            height: 30px;
            flex-basis: 30px;
            font-size: 18px;
        }

        .spi-controls {
            grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
            gap: 6px;
            padding: 8px;
            border-radius: 14px;
        }

        .spi-control-group {
            display: flex;
            min-width: 0;
            flex-direction: column;
        }

        .spi-control-group label {
            min-height: 17px;
            margin-bottom: 3px;
            overflow: hidden;
            color: #526173;
            font-size: 9px;
            line-height: 1.15;
            font-weight: 800;
            letter-spacing: 0;
            text-overflow: ellipsis;
            text-transform: none;
            white-space: nowrap;
        }

        .spi-control-group .form-control {
            min-width: 0;
            min-height: 34px;
            height: 34px;
            padding: 5px 8px;
            border-radius: 9px;
            overflow: hidden;
            font-size: 10.5px;
            line-height: 1.2;
            font-weight: 750;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .spi-layer-controls { margin-top: 6px; }
        .spi-layer-controls .panel-layer-controls {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
            padding: 6px;
        }

        .spi-layer-controls .panel-layer-toggle {
            min-height: 32px;
            padding: 6px 8px;
            border-radius: 9px;
            font-size: 9.5px;
            line-height: 1.15;
            white-space: nowrap;
        }

        .spi-action-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px;
            margin-top: 7px;
        }

        .spi-action-row button {
            width: 100%;
            min-width: 0;
            min-height: 34px;
            padding: 6px 8px;
            border-radius: 9px;
            font-size: 10px;
            line-height: 1.15;
            white-space: normal;
        }

        .spi-status {
            margin-top: 7px;
            padding: 7px 9px;
            border-radius: 9px;
            font-size: 10px;
            line-height: 1.35;
        }

        .spi-progress-track {
            height: 5px;
            margin-top: 5px;
        }

        .spi-summary-grid {
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 5px;
            margin-top: 7px;
        }

        .spi-summary-card {
            min-width: 0;
            padding: 6px 7px;
            border-radius: 10px;
        }

        .spi-summary-card span {
            overflow: hidden;
            font-size: 8.5px;
            line-height: 1.15;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .spi-summary-card b {
            margin-top: 2px;
            overflow: hidden;
            font-size: 13px;
            line-height: 1.2;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .spi-legend {
            margin-top: 7px;
            padding: 8px;
            border-radius: 12px;
        }

        .spi-legend-header { margin-bottom: 6px; }
        .spi-legend-title { font-size: 10px; }

        .spi-legend-bar-wrap {
            overflow-x: auto;
            padding-bottom: 2px;
            scrollbar-width: thin;
        }

        .spi-legend-bar,
        .spi-legend-scale { min-width: 560px; }

        .spi-legend-bar { height: 15px; }

        .spi-legend-scale {
            grid-template-columns: repeat(7, minmax(74px, 1fr));
            gap: 3px;
            margin-top: 6px;
        }

        .spi-legend-scale-item::before {
            top: -9px;
            height: 5px;
        }

        .spi-legend-scale-item b {
            font-size: 8px;
            line-height: 1.05;
            white-space: nowrap;
        }

        .spi-legend-scale-item span {
            margin-top: 1px;
            font-size: 7.5px;
            line-height: 1.1;
            white-space: nowrap;
        }

        .spi-result-wrap {
            margin-top: 7px;
            border-radius: 12px;
        }

        .spi-result-scroll { max-height: 245px; }

        .spi-result-table {
            min-width: 680px;
            font-size: 9.5px;
        }

        .spi-result-table th {
            padding: 7px 6px;
            font-size: 8.5px;
        }

        .spi-result-table td { padding: 6px; }

        .spi-value-chip {
            min-width: 48px;
            padding: 3px 6px;
        }

        .spi-class-chip {
            max-width: 150px;
            padding: 3px 6px;
            font-size: 8.5px;
        }

        .spi-empty {
            padding: 13px;
            font-size: 10px;
        }

        @media (max-width: 760px) {
            .spi-panel {
                left: 10px;
                right: 10px;
                width: auto;
                max-height: min(76dvh, 620px);
                padding: 10px;
            }

            .spi-controls {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

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

        @media (max-width: 560px) {
            .spi-panel {
                left: 6px;
                right: 6px;
                bottom: calc(168px + env(safe-area-inset-bottom));
                max-height: min(74dvh, 600px);
                padding: 9px;
                border-radius: 16px;
            }

            .spi-header { margin-bottom: 6px; }
            .spi-header h2 { font-size: 13px; }

            .spi-controls {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 5px;
                padding: 6px;
            }

            .spi-control-group label {
                min-height: 15px;
                font-size: 8.5px;
            }

            .spi-control-group .form-control {
                min-height: 32px;
                height: 32px;
                padding: 4px 7px;
                font-size: 9.5px;
            }

            .spi-layer-controls .panel-layer-controls {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 4px;
                padding: 5px;
            }

            .spi-layer-controls .panel-layer-toggle {
                justify-content: center;
                min-height: 30px;
                padding: 5px 4px;
                font-size: 8.5px;
            }

            .spi-action-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 5px;
            }

            .spi-action-row button {
                min-height: 32px;
                padding: 5px 6px;
                font-size: 9px;
            }

            .spi-run-button { grid-column: 1 / -1; }
            .spi-legend { padding: 7px; }
            .spi-legend-bar, .spi-legend-scale { min-width: 540px; }
            .spi-result-scroll { max-height: 210px; }
        }

        @media (max-width: 360px) {
            .spi-controls { grid-template-columns: 1fr; }
            .spi-layer-controls .panel-layer-controls { grid-template-columns: 1fr; }
            .spi-layer-controls .panel-layer-toggle { justify-content: flex-start; }
            .spi-action-row { grid-template-columns: 1fr; }
            .spi-run-button { grid-column: auto; }
        }

    

        /* =====================================================
           PENYEMPURNAAN EXPORT PETA SPI
           - tabel grid berada di bawah peta, bukan menutupi peta
           - garis batas DAS lebih tipis
           - simbol utara menggunakan compass medallion
           ===================================================== */
        .spi-cartographic-stage.has-grid-index .spi-cartographic-map-column {
            grid-template-rows: minmax(0, 1fr) auto !important;
            gap: 34px !important;
        }

        .spi-cartographic-stage.has-grid-index .spi-cartographic-map-shell {
            min-height: 0 !important;
        }

        .spi-cartographic-grid-table-box {
            position: relative !important;
            inset: auto !important;
            left: auto !important;
            right: auto !important;
            bottom: auto !important;
            z-index: 2 !important;
            display: block !important;
            width: 100% !important;
            max-width: none !important;
            max-height: 226px !important;
            overflow: hidden !important;
            flex: 0 0 auto !important;
            border: 1px solid #9fb3bd !important;
            border-radius: 11px !important;
            background: #ffffff !important;
            box-shadow: 0 5px 14px rgba(15, 23, 42, 0.12) !important;
            backdrop-filter: none !important;
        }

        .spi-cartographic-grid-table-box .spi-cartographic-index-header {
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 14px !important;
            padding: 7px 11px !important;
            background: linear-gradient(135deg, #0b4f5d, #0f7888) !important;
        }

        .spi-cartographic-grid-table-box .spi-cartographic-index-header strong {
            font-size: 9.5px !important;
            letter-spacing: 0.055em !important;
        }

        .spi-cartographic-grid-table-box .spi-cartographic-index-header span {
            margin-top: 1px !important;
            font-size: 7.2px !important;
        }

        .spi-cartographic-index-total {
            flex: 0 0 auto;
            padding: 4px 8px;
            border: 1px solid rgba(255,255,255,0.45);
            border-radius: 999px;
            color: #ffffff;
            background: rgba(255,255,255,0.12);
            font-size: 7.2px;
            line-height: 1;
            letter-spacing: 0.04em;
            white-space: nowrap;
        }

        .spi-cartographic-grid-table-columns {
            display: grid;
            grid-template-columns: repeat(var(--spi-grid-table-count, 1), minmax(0, 1fr));
            gap: 8px;
            padding: 7px 8px 8px;
            background: #eef3f5;
        }

        .spi-cartographic-grid-table {
            width: 100%;
            table-layout: fixed;
            border-collapse: collapse;
            overflow: hidden;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            background: #ffffff;
            color: #1e293b;
            font-size: 6.7px;
            line-height: 1.08;
        }

        .spi-cartographic-grid-table th,
        .spi-cartographic-grid-table td {
            height: 15px;
            padding: 2px 4px;
            border-right: 1px solid #e2e8f0;
            border-bottom: 1px solid #e2e8f0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .spi-cartographic-grid-table th:last-child,
        .spi-cartographic-grid-table td:last-child { border-right: 0; }
        .spi-cartographic-grid-table tbody tr:last-child td { border-bottom: 0; }

        .spi-cartographic-grid-table th {
            color: #0f4f5d;
            background: #dfeaec;
            font-size: 6.4px;
            font-weight: 900;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 0.025em;
        }

        .spi-cartographic-grid-table th:nth-child(1),
        .spi-cartographic-grid-table td:nth-child(1) { width: 7%; text-align: center; }
        .spi-cartographic-grid-table th:nth-child(2),
        .spi-cartographic-grid-table td:nth-child(2) { width: 16%; }
        .spi-cartographic-grid-table th:nth-child(3),
        .spi-cartographic-grid-table td:nth-child(3) { width: 39%; }
        .spi-cartographic-grid-table th:nth-child(4),
        .spi-cartographic-grid-table td:nth-child(4) { width: 15%; text-align: center; }
        .spi-cartographic-grid-table th:nth-child(5),
        .spi-cartographic-grid-table td:nth-child(5) { width: 23%; }

        .spi-grid-table-no { color: #64748b; font-weight: 800; }
        .spi-grid-table-id { color: #0f4f5d; font-weight: 900; }
        .spi-grid-table-das { color: #334155; font-weight: 700; }
        .spi-grid-table-spi { color: #0f172a; font-weight: 900; }
        .spi-grid-table-class { color: #475569; font-weight: 800; }

        .spi-cartographic-grid-table-box .spi-cartographic-index-more {
            padding: 4px 9px 5px !important;
            font-size: 6.8px !important;
        }

        .spi-cartographic-compass {
            width: 108px !important;
            height: 126px !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: flex-start !important;
            margin: 0 auto 5px !important;
        }

        .spi-cartographic-compass .n {
            position: static !important;
            transform: none !important;
            width: auto !important;
            margin-bottom: 0 !important;
            color: #0f4f5d !important;
            font-size: 19px !important;
            line-height: 1 !important;
            font-weight: 950 !important;
            letter-spacing: 0.08em !important;
        }

        .spi-cartographic-compass-rose {
            position: static !important;
            width: 78px !important;
            height: 91px !important;
            transform: none !important;
            display: block !important;
            margin-top: -1px !important;
        }

        .spi-cartographic-compass-svg {
            width: 78px !important;
            height: 91px !important;
            filter: drop-shadow(0 2px 2px rgba(15, 23, 42, 0.14));
        }

        .spi-cartographic-compass small {
            display: block;
            margin-top: -5px;
            color: #64748b;
            font-size: 6.8px;
            line-height: 1;
            font-weight: 900;
            letter-spacing: 0.16em;
        }

        .spi-cartographic-boundary-swatch { border-width: 0.8px !important; }
        .spi-cartographic-selected-das-swatch { border-width: 1.4px !important; }

/* Petunjuk multi-select DAS dan raster SPI optimal */
.das-multi-selection-hint {
    margin: 2px 0 8px;
    font-size: 11px;
    line-height: 1.35;
    color: #64748b;
}
.spi-precomputed-surface {
    image-rendering: auto;
    will-change: transform;
    pointer-events: none !important;
}


        /* Tabel data analisis pada export peta: layout peta tetap, hanya isi tabel disesuaikan. */
        .spi-cartographic-analysis-data-table th:nth-child(1),
        .spi-cartographic-analysis-data-table td:nth-child(1) { width: 7%; text-align: center; }
        .spi-cartographic-analysis-data-table th:nth-child(2),
        .spi-cartographic-analysis-data-table td:nth-child(2) { width: 14%; text-align: center; }
        .spi-cartographic-analysis-data-table th:nth-child(3),
        .spi-cartographic-analysis-data-table td:nth-child(3) { width: 34%; }
        .spi-cartographic-analysis-data-table th:nth-child(4),
        .spi-cartographic-analysis-data-table td:nth-child(4) { width: 45%; }
        .spi-cartographic-analysis-data-table td:nth-child(3),
        .spi-cartographic-analysis-data-table td:nth-child(4) {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

/* =====================================================
   PROFESSIONAL UI REFINEMENT - KETERSEDIAAN DATA,
   EXPORT DATA, DAN ANALISIS SPI (TAMPILAN SAJA)
   ===================================================== */

.data-range-panel,
.export-data-panel,
.spi-panel {
    position: fixed;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.985) 0%, rgba(248,250,252,0.975) 100%);
    border: 1px solid rgba(148,163,184,0.24);
    box-shadow:
        0 28px 72px rgba(15,23,42,0.18),
        0 12px 28px rgba(15,23,42,0.08),
        inset 0 1px 0 rgba(255,255,255,0.72);
}

.data-range-panel::before,
.export-data-panel::before,
.spi-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    border-radius: inherit;
    pointer-events: none;
}

.data-range-panel::before {
    background: linear-gradient(90deg, #0284c7, #0ea5e9, #38bdf8);
}

.export-data-panel::before {
    background: linear-gradient(90deg, #0f766e, #14b8a6, #2dd4bf);
}

.spi-panel::before {
    background: linear-gradient(90deg, #0f766e, #0891b2, #2563eb);
}

.data-range-toggle,
.export-data-toggle,
.spi-toggle {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.26);
    box-shadow:
        0 14px 28px rgba(15,23,42,0.12),
        0 6px 16px rgba(15,23,42,0.08),
        inset 0 1px 0 rgba(255,255,255,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease;
}

.data-range-toggle:hover,
.export-data-toggle:hover,
.spi-toggle:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 36px rgba(15,23,42,0.16),
        0 8px 18px rgba(15,23,42,0.10),
        inset 0 1px 0 rgba(255,255,255,0.75);
}

.data-range-toggle:focus-visible,
.export-data-toggle:focus-visible,
.spi-toggle:focus-visible {
    outline: 3px solid rgba(14,165,233,0.22);
    outline-offset: 2px;
}

.data-range-toggle::before,
.export-data-toggle::before,
.spi-toggle::before {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}

.data-range-toggle {
    color: #0f4c81;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,246,255,0.96));
}

.data-range-toggle::before {
    background: linear-gradient(135deg, rgba(2,132,199,0.12), rgba(56,189,248,0.26));
    color: #0369a1;
}

body.range-open .data-range-toggle {
    border-color: transparent;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
}

body.range-open .data-range-toggle::before {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}

.export-data-toggle {
    color: #0f5d56;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,253,250,0.96));
}

.export-data-toggle::before {
    background: linear-gradient(135deg, rgba(13,148,136,0.13), rgba(45,212,191,0.24));
    color: #0f766e;
}

body.export-data-open .export-data-toggle {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.spi-toggle {
    color: #0f4d73;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,249,255,0.96));
}

.spi-toggle::before {
    background: linear-gradient(135deg, rgba(8,145,178,0.12), rgba(96,165,250,0.24));
    color: #0f766e;
}

body.spi-open .spi-toggle {
    background: linear-gradient(135deg, #0f766e, #0891b2);
}

.data-range-header,
.export-data-header,
.spi-header {
    position: sticky;
    top: -15px;
    z-index: 2;
    margin: -15px -15px 12px;
    padding: 16px 15px 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226,232,240,0.92);
    border-radius: 24px 24px 0 0;
}

.data-range-header h2,
.export-data-header h2,
.spi-header h2 {
    letter-spacing: -0.02em;
}

.data-range-header h2 {
    position: relative;
    padding-left: 14px;
}

.data-range-header h2::before,
.export-data-header h2::before,
.spi-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 22px;
    border-radius: 999px;
    transform: translateY(-50%);
}

.data-range-header h2::before { background: linear-gradient(180deg, #0284c7, #38bdf8); }
.export-data-header h2,
.spi-header h2 { position: relative; padding-left: 14px; }
.export-data-header h2::before { background: linear-gradient(180deg, #0f766e, #2dd4bf); }
.spi-header h2::before { background: linear-gradient(180deg, #0f766e, #2563eb); }

.data-range-actions button,
.spi-close-button,
.export-data-header .spi-close-button {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.data-range-actions button:hover,
.spi-close-button:hover,
.export-data-header .spi-close-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15,23,42,0.12);
}

.data-range-status,
.export-data-status,
.spi-status {
    border-style: solid;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.data-range-list {
    gap: 9px;
}

.data-range-row {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 11px 12px;
    border: 1px solid rgba(226,232,240,0.9);
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow:
        0 7px 16px rgba(15,23,42,0.05),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

.data-range-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #0ea5e9, #38bdf8);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.data-range-row:hover::before,
.data-range-row.active::before {
    opacity: 1;
}

.data-range-row:hover,
.data-range-row.active {
    border-color: rgba(14,165,233,0.28);
    background: linear-gradient(180deg, #ffffff, #f0f9ff);
    box-shadow: 0 14px 28px rgba(15,23,42,0.09);
}

.data-range-type-chip {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-color: rgba(203,213,225,0.95);
    color: #475569;
}

.data-range-chart-card {
    border-radius: 20px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow:
        0 10px 24px rgba(15,23,42,0.07),
        inset 0 1px 0 rgba(255,255,255,0.72);
}

.data-range-chart-title {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(226,232,240,0.85);
}

.data-range-chart-show-station,
.data-range-chart-export,
.data-range-chart-minimize {
    min-height: 32px;
    border-radius: 10px;
    font-size: 10.6px;
    box-shadow: 0 4px 10px rgba(15,23,42,0.05);
}

.data-range-chart-show-station {
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    border-color: rgba(96,165,250,0.38);
}

.data-range-chart-export {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.data-range-chart-minimize {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.export-data-panel {
    padding-top: 16px;
}

.export-data-section {
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbfc);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow:
        0 8px 20px rgba(15,23,42,0.05),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

.export-data-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: #0f172a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.export-data-section-title::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
    box-shadow: 0 0 0 4px rgba(20,184,166,0.12);
}

.panel-layer-controls {
    gap: 9px;
}

.panel-layer-toggle {
    position: relative;
    min-height: 46px;
    padding: 10px 11px;
    border-radius: 14px;
    border: 1px solid rgba(203,213,225,0.95);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease,
        color 0.16s ease;
}

.panel-layer-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(45,212,191,0.46);
    box-shadow: 0 10px 22px rgba(15,23,42,0.08);
}

.panel-layer-toggle:has(input:checked) {
    color: #0f766e;
    border-color: rgba(20,184,166,0.45);
    background: linear-gradient(180deg, rgba(240,253,250,1), rgba(204,251,241,0.9));
    box-shadow:
        0 10px 22px rgba(20,184,166,0.12),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.panel-layer-toggle input {
    width: 18px;
    height: 18px;
}

.panel-layer-toggle span {
    font-size: 10.8px;
    font-weight: 850;
}

.export-grid-filter {
    gap: 10px;
}

.export-grid-filter > div,
.spi-control-group {
    padding: 8px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248,250,252,0.72), rgba(255,255,255,0.96));
    border: 1px solid rgba(226,232,240,0.9);
}

.export-grid-filter label,
.spi-control-group label {
    display: block;
    color: #64748b;
    font-weight: 900;
}

.form-control,
.export-grid-filter .form-control,
.spi-control-group .form-control {
    border-radius: 11px;
    border: 1px solid rgba(203,213,225,0.95);
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.03);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.form-control:focus,
.export-grid-filter .form-control:focus,
.spi-control-group .form-control:focus {
    border-color: rgba(14,165,233,0.55);
    box-shadow:
        0 0 0 4px rgba(14,165,233,0.12),
        inset 0 1px 1px rgba(15,23,42,0.03);
    outline: none;
}

.export-data-actions,
.spi-action-row {
    gap: 9px;
}

.export-data-actions button,
.spi-action-row button {
    position: relative;
    min-height: 42px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(15,23,42,0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.export-data-actions button:hover,
.spi-action-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(15,23,42,0.09);
}

.export-data-actions button:not(.primary) {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.export-data-actions button.primary {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.spi-controls {
    gap: 10px;
    padding: 12px;
    border-radius: 19px;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow:
        0 10px 24px rgba(15,23,42,0.05),
        inset 0 1px 0 rgba(255,255,255,0.72);
}

.spi-action-row {
    margin-top: 11px;
}

.spi-run-button {
    background: linear-gradient(135deg, #0f766e, #0891b2);
    box-shadow: 0 10px 20px rgba(8,145,178,0.18);
}

.spi-export-button {
    color: #075985;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe !important;
}

.spi-reset-button {
    color: #991b1b;
    background: linear-gradient(180deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca !important;
}

.spi-summary-grid {
    gap: 9px;
}

.spi-summary-card {
    position: relative;
    padding: 10px 11px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226,232,240,0.94);
    box-shadow: 0 8px 18px rgba(15,23,42,0.05);
    overflow: hidden;
}

.spi-summary-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #0f766e, #38bdf8);
}

.spi-summary-card span {
    color: #64748b;
    letter-spacing: 0.02em;
}

.spi-summary-card b {
    margin-top: 5px;
    font-size: 16px;
    color: #0f172a;
}

.spi-legend,
.spi-result-wrap {
    border-radius: 18px;
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow:
        0 8px 18px rgba(15,23,42,0.05),
        inset 0 1px 0 rgba(255,255,255,0.75);
}

.spi-legend {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.spi-result-wrap {
    background: linear-gradient(180deg, #ffffff, #fcfdff);
}

.spi-result-table th {
    background: linear-gradient(135deg, #0f766e, #0f6170);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.16);
}

.spi-result-table td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.spi-result-table tbody tr:nth-child(even) {
    background: rgba(248,250,252,0.55);
}

.spi-result-table tbody tr:hover {
    background: rgba(236,253,245,0.72);
}

.spi-layer-controls {
    margin-top: 11px;
}

@media (max-width: 640px) {
    .data-range-toggle,
    .export-data-toggle,
    .spi-toggle {
        min-height: 44px;
        border-radius: 14px;
    }

    .data-range-header,
    .export-data-header,
    .spi-header {
        top: -12px;
        margin: -12px -12px 10px;
        padding: 13px 12px 10px;
        border-radius: 20px 20px 0 0;
    }

    .export-data-section,
    .spi-controls,
    .data-range-chart-card {
        border-radius: 16px;
    }

    .panel-layer-toggle,
    .export-grid-filter > div,
    .spi-control-group,
    .spi-summary-card,
    .data-range-row {
        border-radius: 14px;
    }
}

/* =====================================================
   INPUT KOORDINAT PROFESIONAL: DESIMAL, DMS, MARKER,
   DAN PENGUKURAN JARAK
   ===================================================== */

.coord-panel {
    width: 410px;
    padding: 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(248,250,252,0.98));
    border: 1px solid rgba(148,163,184,0.25);
    box-shadow:
        0 28px 70px rgba(15,23,42,0.18),
        0 10px 24px rgba(15,23,42,0.08),
        inset 0 1px 0 rgba(255,255,255,0.75);
}

#coordinateInputSection {
    display: grid;
    gap: 11px;
}

#coordinateInputSection[hidden] {
    display: none !important;
}

.coord-tool-header {
    position: relative;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 2px 2px 11px;
    border-bottom: 1px solid rgba(226,232,240,0.95);
}

.coord-tool-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 112px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f766e, #38bdf8, transparent);
}

.coord-tool-logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(145deg, #0f766e, #0891b2);
    box-shadow:
        0 12px 22px rgba(8,145,178,0.22),
        inset 0 1px 0 rgba(255,255,255,0.24);
}

.coord-tool-logo svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.coord-tool-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.coord-tool-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.4;
    font-weight: 650;
}

.coord-step-card {
    padding: 11px;
    border-radius: 17px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow:
        0 7px 18px rgba(15,23,42,0.045),
        inset 0 1px 0 rgba(255,255,255,0.75);
}

.coord-step-heading {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.coord-step-number {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #ffffff;
    background: linear-gradient(145deg, #0f766e, #0891b2);
    box-shadow: 0 6px 12px rgba(8,145,178,0.18);
    font-size: 11px;
    font-weight: 900;
}

.coord-step-heading b,
.coord-step-heading small {
    display: block;
}

.coord-step-heading b {
    color: #0f172a;
    font-size: 11.5px;
    font-weight: 900;
}

.coord-step-heading small {
    margin-top: 2px;
    color: #64748b;
    font-size: 9.5px;
    line-height: 1.35;
    font-weight: 650;
}

.coord-format-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 13px;
    border: 1px solid rgba(203,213,225,0.9);
    background: #eef2f6;
}

.coord-format-button {
    min-height: 34px;
    padding: 7px 9px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 850;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.coord-format-button:hover {
    color: #0f766e;
}

.coord-format-button.active {
    color: #0f766e;
    background: #ffffff;
    box-shadow: 0 5px 12px rgba(15,23,42,0.09);
}

.coord-mode-fields[hidden] {
    display: none !important;
}

.coord-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 0;
}

.coord-field,
.coord-dms-grid label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.coord-field > span,
.coord-dms-grid label > span {
    color: #64748b;
    font-size: 8.8px;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.coord-panel .form-control {
    min-height: 39px;
    border-radius: 11px;
    border: 1px solid rgba(203,213,225,0.95);
    background: #ffffff;
    color: #0f172a;
    font-size: 11.5px;
    font-weight: 800;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.03);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.coord-panel .form-control:focus {
    border-color: rgba(8,145,178,0.56);
    box-shadow: 0 0 0 4px rgba(8,145,178,0.12);
    outline: none;
}

.coord-dms-axis-card + .coord-dms-axis-card {
    margin-top: 9px;
}

.coord-dms-axis-card {
    padding: 9px;
    border-radius: 14px;
    border: 1px solid rgba(226,232,240,0.92);
    background: rgba(248,250,252,0.78);
}

.coord-axis-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
}

.coord-axis-title span {
    min-width: 31px;
    padding: 3px 6px;
    border-radius: 7px;
    color: #ffffff;
    background: #0f766e;
    font-size: 8.5px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.05em;
}

.coord-axis-title b {
    color: #334155;
    font-size: 10.5px;
    font-weight: 900;
}

.coord-dms-grid {
    display: grid;
    grid-template-columns: 0.9fr 0.85fr 1.15fr 0.72fr;
    gap: 6px;
}

.coordinate-dms-display {
    position: relative;
    gap: 5px;
    margin: 10px 0 0;
    padding: 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(240,253,250,0.96), rgba(239,246,255,0.94));
    border: 1px solid rgba(8,145,178,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
}

.coordinate-preview-title {
    margin-bottom: 2px;
    color: #0f766e;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.coordinate-dms-row {
    grid-template-columns: 70px minmax(0, 1fr);
}

.coordinate-decimal-preview {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    padding-top: 6px;
    margin-top: 2px;
    border-top: 1px dashed rgba(148,163,184,0.58);
    font-size: 10.5px;
}

.coordinate-decimal-preview span {
    color: #64748b;
    font-weight: 800;
}

.coordinate-decimal-preview b {
    color: #0f172a;
    font-size: 10.5px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.coord-actions {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    gap: 8px;
}

.coord-actions .btn-primary,
.coord-actions .btn-secondary {
    min-height: 41px !important;
    border-radius: 12px !important;
    font-size: 10.8px !important;
    font-weight: 900 !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

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

.coord-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(135deg, #0f766e, #0891b2) !important;
    box-shadow: 0 9px 18px rgba(8,145,178,0.18);
}

.coord-button-icon {
    width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(255,255,255,0.18);
    font-size: 15px;
    line-height: 1;
}

.coord-clear-button {
    border-color: #fecaca !important;
    color: #991b1b !important;
    background: linear-gradient(180deg, #fffafa, #fef2f2) !important;
}

.coordinate-input-status {
    margin-top: 8px;
    padding: 8px 9px;
    border-radius: 11px;
    border: 1px solid rgba(203,213,225,0.9);
    background: #f8fafc;
    color: #64748b;
    font-size: 9.8px;
    line-height: 1.4;
    font-weight: 700;
}

.coordinate-input-status.success {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.coordinate-input-status.warning {
    color: #92400e;
    border-color: #fde68a;
    background: #fffbeb;
}

.coordinate-input-status.error {
    color: #991b1b;
    border-color: #fecaca;
    background: #fef2f2;
}

.distance-display {
    margin: 0;
    padding: 11px;
    border-radius: 18px;
    border: 1px solid rgba(8,145,178,0.2);
    background:
        radial-gradient(circle at 100% 0, rgba(56,189,248,0.13), transparent 38%),
        linear-gradient(145deg, #f0fdfa, #eff6ff);
    text-align: left;
    box-shadow:
        0 8px 20px rgba(15,23,42,0.05),
        inset 0 1px 0 rgba(255,255,255,0.74);
}

.distance-heading {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding-bottom: 9px;
    margin-bottom: 9px;
    border-bottom: 1px solid rgba(148,163,184,0.25);
}

.distance-logo {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    background: linear-gradient(145deg, #0f766e, #0284c7);
    box-shadow: 0 7px 14px rgba(2,132,199,0.18);
}

.distance-logo svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.distance-heading b,
.distance-heading small {
    display: block;
}

.distance-heading b {
    color: #0f172a;
    font-size: 11.5px;
    font-weight: 900;
}

.distance-heading small {
    margin-top: 2px;
    color: #64748b;
    font-size: 9px;
    line-height: 1.35;
    font-weight: 650;
}

.distance-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.distance-metrics > div {
    min-width: 0;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(203,213,225,0.75);
    background: rgba(255,255,255,0.82);
}

.distance-metrics span,
.distance-metrics b {
    display: block;
}

.distance-metrics span {
    color: #64748b;
    font-size: 8.2px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.distance-metrics b,
.distance-display .distance-metrics b {
    margin-top: 4px;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
}

.distance-metrics .distance-total {
    border-color: rgba(8,145,178,0.28);
    background: linear-gradient(145deg, rgba(204,251,241,0.76), rgba(224,242,254,0.9));
}

.distance-metrics .distance-total b,
.distance-display .distance-metrics .distance-total b {
    color: #0f766e;
    font-size: 13px;
}

.distance-display p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 9px;
    line-height: 1.4;
    font-weight: 700;
}

.manual-marker-icon {
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    filter: none;
}

.manual-marker-pin {
    position: relative;
    width: 32px;
    height: 42px;
    display: block;
    filter: drop-shadow(0 7px 7px rgba(15,23,42,0.28));
    transform-origin: 50% 100%;
    transition: transform 0.16s ease, filter 0.16s ease;
}

.manual-marker-pin:hover {
    transform: translateY(-2px) scale(1.04);
    filter: drop-shadow(0 10px 9px rgba(15,23,42,0.32));
}

.manual-marker-pin svg {
    width: 32px;
    height: 42px;
    display: block;
}

.manual-marker-pin svg path {
    fill: #0f766e;
    stroke: #ffffff;
    stroke-width: 1.6;
}

.manual-marker-pin svg circle {
    fill: #ffffff;
    stroke: rgba(15,118,110,0.2);
    stroke-width: 1;
}

.manual-marker-pin b {
    position: absolute;
    left: 50%;
    top: 15px;
    transform: translate(-50%, -50%);
    color: #0f766e;
    font-size: 10px;
    line-height: 1;
    font-weight: 950;
}

.manual-point-popup {
    min-width: 230px;
    font-size: 11px;
}

.manual-point-popup-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.manual-point-popup-title > span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #ffffff;
    background: linear-gradient(145deg, #0f766e, #0891b2);
    font-size: 10px;
    font-weight: 900;
}

.manual-point-popup-title h3,
.manual-point-popup h3 {
    margin: 0;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
}

.manual-popup-coordinate {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #edf2f7;
}

.manual-popup-coordinate span {
    color: #64748b;
    font-weight: 750;
}

.manual-popup-coordinate b {
    color: #0f172a;
    text-align: right;
    font-weight: 900;
}

.manual-popup-distance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding: 8px;
    border-radius: 10px;
    color: #475569;
    background: linear-gradient(135deg, #f0fdfa, #eff6ff);
    border: 1px solid rgba(8,145,178,0.16);
}

.manual-popup-distance span {
    font-size: 9px;
    font-weight: 750;
}

.manual-popup-distance b {
    color: #0f766e;
    font-size: 10.5px;
    white-space: nowrap;
}

/* Logo khusus pada pilihan layer Input Titik Koordinat. */
.panel-layer-toggle:has(#exportLayerCoordinateToggle) > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.panel-layer-toggle:has(#exportLayerCoordinateToggle) > span::before {
    content: '⌖';
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #0f766e;
    background: rgba(20,184,166,0.12);
    font-size: 15px;
    font-weight: 900;
}

.panel-layer-toggle:has(#exportLayerCoordinateToggle):has(input:checked) > span::before {
    color: #ffffff;
    background: linear-gradient(145deg, #0f766e, #14b8a6);
}

@media (max-width: 1180px) and (min-width: 821px) {
    .coord-panel { width: 390px; }
}

@media (max-width: 820px) and (min-width: 641px) {
    .coord-panel { width: 370px; }
}

@media (max-width: 640px) {
    .coord-panel {
        width: min(350px, calc(100vw - 20px));
        padding: 12px;
        border-radius: 20px;
    }

    .coord-tool-header {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .coord-tool-logo {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .coord-tool-logo svg {
        width: 23px;
        height: 23px;
    }

    .coord-step-card {
        padding: 9px;
        border-radius: 15px;
    }

    .coord-dms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .coord-actions {
        grid-template-columns: 1fr;
    }

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

    .distance-metrics .distance-total {
        grid-column: 1 / -1;
    }
}

@media (max-width: 390px) {
    .coord-grid,
    .coord-format-switch {
        grid-template-columns: 1fr;
    }

    .distance-metrics {
        grid-template-columns: 1fr;
    }

    .distance-metrics .distance-total {
        grid-column: auto;
    }
}
.distance-heading b { margin: 0; }

/* =====================================================
   PILIHAN TITIK KOORDINAT POS UNTUK EXPORT SHP
   ===================================================== */
.station-export-section {
    overflow: visible;
}

.station-export-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.station-export-search-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.station-export-search-wrap .form-control {
    width: 100%;
    min-height: 42px;
    padding-left: 36px;
}

.station-export-search-icon {
    position: absolute;
    z-index: 1;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #0f766e;
    font-size: 18px;
    font-weight: 900;
    pointer-events: none;
}

.station-export-count {
    flex: 0 0 auto;
    min-width: 78px;
    min-height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(20,184,166,0.26);
    background: linear-gradient(180deg, #f0fdfa, #ccfbf1);
    color: #0f766e;
    font-size: 10.5px;
    font-weight: 900;
    white-space: nowrap;
}

.station-export-selection-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 9px;
}

.station-export-selection-actions button {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid rgba(148,163,184,0.34);
    border-radius: 11px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: #334155;
    font-size: 10.5px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(15,23,42,0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.station-export-selection-actions button:hover {
    transform: translateY(-1px);
    border-color: rgba(20,184,166,0.42);
    box-shadow: 0 9px 18px rgba(15,23,42,0.08);
}

.station-export-selection-actions button.manual {
    color: #075985;
    border-color: rgba(14,165,233,0.30);
    background: linear-gradient(180deg, #f0f9ff, #e0f2fe);
}

.station-export-selection-actions button.manual.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #0f766e, #0891b2);
    box-shadow: 0 10px 20px rgba(8,145,178,0.20);
}

.station-export-hint {
    margin-top: 9px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(203,213,225,0.92);
    background: #f8fafc;
    color: #64748b;
    font-size: 10.3px;
    font-weight: 750;
    line-height: 1.45;
}

.station-export-hint.active {
    border-color: rgba(14,165,233,0.36);
    background: linear-gradient(180deg, #eff6ff, #e0f2fe);
    color: #075985;
}

.station-export-list {
    display: grid;
    gap: 7px;
    max-height: 238px;
    margin-top: 9px;
    padding: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 14px;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

.station-export-list::-webkit-scrollbar {
    width: 7px;
}

.station-export-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #94a3b8;
}

.station-export-item {
    position: relative;
    min-width: 0;
    min-height: 48px;
    padding: 8px 8px 8px 10px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(226,232,240,0.95);
    border-radius: 13px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    color: #334155;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(15,23,42,0.04);
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.station-export-item:hover {
    transform: translateY(-1px);
    border-color: rgba(45,212,191,0.42);
    box-shadow: 0 9px 18px rgba(15,23,42,0.07);
}

.station-export-item.selected {
    border-color: rgba(20,184,166,0.48);
    background: linear-gradient(180deg, #f0fdfa, #e6fffb);
    box-shadow: 0 8px 18px rgba(20,184,166,0.10);
}

.station-export-item input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0f766e;
}

.station-export-item-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.station-export-item-main b {
    overflow: hidden;
    color: #0f172a;
    font-size: 10.8px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-export-item-main small {
    overflow: hidden;
    color: #64748b;
    font-size: 9.3px;
    font-weight: 750;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-export-locate {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(14,165,233,0.26);
    border-radius: 10px;
    background: linear-gradient(180deg, #f0f9ff, #e0f2fe);
    color: #0369a1;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.station-export-locate:hover {
    border-color: rgba(2,132,199,0.5);
    background: #dbeafe;
}

.station-export-empty {
    padding: 16px 12px;
    border: 1px dashed rgba(148,163,184,0.56);
    border-radius: 13px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 750;
    text-align: center;
}

.station-export-main-action {
    grid-template-columns: 1fr;
}

.station-export-main-action button {
    min-height: 44px;
}

body.station-export-manual-mode #map {
    cursor: crosshair;
}

.leaflet-marker-icon.station-export-selectable {
    cursor: crosshair !important;
    filter: drop-shadow(0 0 5px rgba(14,165,233,0.85)) drop-shadow(0 4px 6px rgba(15,23,42,0.32));
}

.leaflet-marker-icon.station-export-selected {
    outline: 4px solid rgba(20,184,166,0.88);
    outline-offset: 4px;
    border-radius: 999px;
    filter: drop-shadow(0 0 7px rgba(20,184,166,0.95)) drop-shadow(0 5px 8px rgba(15,23,42,0.34));
}

body.station-export-manual-mode .leaflet-marker-icon.station-export-selected {
    animation: stationExportSelectedPulse 1.35s ease-in-out infinite;
}

@keyframes stationExportSelectedPulse {
    0%, 100% { outline-color: rgba(20,184,166,0.88); }
    50% { outline-color: rgba(14,165,233,0.90); }
}

@media (max-width: 640px) {
    .station-export-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
    }

    .station-export-count {
        align-self: flex-start;
    }

    .station-export-selection-actions {
        grid-template-columns: 1fr 1fr;
    }

    .station-export-selection-actions button.manual {
        grid-column: 1 / -1;
    }

    .station-export-list {
        max-height: 210px;
    }
}

/* Detail grid dan DAS yang mengikuti viewport/zoom peta */
.spi-zoom-grid-label-icon {
    border: 0 !important;
    background: transparent !important;
    pointer-events: none !important;
}

.spi-zoom-grid-label-icon > span {
    display: inline-flex;
    min-width: 28px;
    min-height: 17px;
    padding: 2px 4px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15,23,42,0.66);
    border-radius: 4px;
    background: rgba(255,255,255,0.90);
    box-shadow: 0 2px 6px rgba(15,23,42,0.18);
    color: #111827;
    font-family: Inter, Arial, sans-serif;
    font-size: 8.5px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.spi-zoom-grid-label-icon small {
    display: block;
    margin-top: 2px;
    color: #0f6170;
    font-size: 6.5px;
    line-height: 1;
    font-weight: 850;
}

.spi-zoom-das-label {
    padding: 3px 6px !important;
    border: 1px solid rgba(15,23,42,0.44) !important;
    border-radius: 5px !important;
    background: rgba(255,255,255,0.91) !important;
    box-shadow: 0 2px 7px rgba(15,23,42,0.16) !important;
    color: #0f172a !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 9px !important;
    line-height: 1.12 !important;
    font-weight: 900 !important;
    text-align: center !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

.spi-zoom-das-label span {
    display: block;
    margin-top: 2px;
    color: #0f6170;
    font-size: 7.5px;
    font-weight: 850;
}

.spi-zoom-das-label::before {
    display: none !important;
}

/* Keterangan hasil DAS terpilih pada legenda export peta */
.spi-cartographic-selected-das-list {
    display: grid;
    gap: 6px;
}

.spi-cartographic-selected-das-result {
    padding: 7px 8px;
    border: 1px solid rgba(148,163,184,0.34);
    border-radius: 9px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 3px 8px rgba(15,23,42,0.05);
}

.spi-cartographic-selected-das-result-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(226,232,240,0.95);
}

.spi-cartographic-selected-das-result-head b {
    min-width: 0;
    color: #0f172a;
    font-size: 9.4px;
    line-height: 1.2;
    font-weight: 900;
}

.spi-cartographic-selected-das-result-color {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 3px;
    border: 1px solid rgba(15,23,42,0.18);
}

.spi-cartographic-selected-das-result-grid {
    display: grid;
    grid-template-columns: minmax(54px, 0.7fr) minmax(0, 1.3fr);
    gap: 3px 7px;
    align-items: start;
    font-size: 8px;
    line-height: 1.2;
}

.spi-cartographic-selected-das-result-grid span {
    color: #64748b;
    font-weight: 750;
}

.spi-cartographic-selected-das-result-grid strong {
    min-width: 0;
    color: #1e293b;
    font-weight: 900;
    overflow-wrap: anywhere;
}

/* =====================================================
   EXPORT PETA SPI - PENATAAN GRID & LABEL DAS AGAR LEBIH
   TERBACA DAN TIDAK TUMPAH-TINDIH
   ===================================================== */
.spi-export-das-label {
    padding: 4px 7px !important;
    border: 1px solid rgba(15, 23, 42, 0.24) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.spi-export-das-label strong {
    display: block;
    font-size: 9px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.spi-export-das-label small {
    display: block;
    margin-top: 2px;
    font-size: 8px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f766e;
}

.spi-export-grid-outline {
    shape-rendering: geometricPrecision;
}

.spi-export-grid-id-label {
    border-radius: 5px !important;
    border: 1px solid rgba(15, 79, 93, 0.22) !important;
    background: rgba(255, 255, 255, 0.82) !important;
    color: #0f4f5d !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10) !important;
    letter-spacing: 0.01em;
}

.spi-export-grid-id-label.soft {
    background: rgba(255, 255, 255, 0.68) !important;
    color: #475569 !important;
    border-color: rgba(71, 85, 105, 0.16) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

/* Outline khusus DAS terpilih pada export peta */
.spi-cartographic-selected-das-swatch {
    position: relative !important;
    width: 22px !important;
    height: 12px !important;
    border: 3px solid #00a6c7 !important;
    border-radius: 3px !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 1.5px #ffffff, 0 0 0 2.5px rgba(15, 23, 42, 0.22) !important;
}

.spi-cartographic-selected-das-swatch::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 1px dashed #0f172a;
    border-radius: 1px;
    pointer-events: none;
}

/* =====================================================
   OPT19 - PERAPIHAN EXPORT PETA: LABEL KOORDINAT DI LUAR
   KOTAK PETA PADA EMPAT SISI, HORIZONTAL, LEBIH TERBACA
   ===================================================== */
.spi-cartographic-map-column {
    overflow: visible !important;
    padding: 34px 36px 8px 56px !important;
}

.spi-cartographic-map-shell {
    overflow: visible !important;
}

.spi-cartographic-coordinate-frame {
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 950 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

.spi-coordinate-band {
    position: absolute !important;
    color: #334155 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0.01em !important;
}

.spi-coordinate-band.top,
.spi-coordinate-band.bottom {
    left: 16px !important;
    right: 16px !important;
    height: 20px !important;
}
.spi-coordinate-band.top { top: -24px !important; }
.spi-coordinate-band.bottom { bottom: -24px !important; }

.spi-coordinate-band.left,
.spi-coordinate-band.right {
    top: 14px !important;
    bottom: 14px !important;
    width: 54px !important;
}
.spi-coordinate-band.left { left: -58px !important; }
.spi-coordinate-band.right { right: -58px !important; }

.spi-coordinate-label-horizontal,
.spi-coordinate-label-vertical {
    position: absolute !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 52px !important;
    padding: 1px 4px !important;
    color: #334155 !important;
    background: rgba(255, 255, 255, 0.86) !important;
    border: 1px solid rgba(148, 163, 184, 0.42) !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08) !important;
    transform: translateX(-50%) !important;
    white-space: nowrap !important;
}

.spi-coordinate-band.top .spi-coordinate-label-horizontal { top: 0 !important; }
.spi-coordinate-band.bottom .spi-coordinate-label-horizontal { bottom: 0 !important; }
.spi-coordinate-band.left .spi-coordinate-label-vertical,
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    writing-mode: horizontal-tb !important;
    rotate: 0deg !important;
}

.spi-coordinate-tick-x,
.spi-coordinate-tick-y {
    position: absolute !important;
    background: #475569 !important;
    border-radius: 999px !important;
}

.spi-coordinate-tick-x {
    width: 1.6px !important;
    height: 8px !important;
    transform: translateX(-50%) !important;
}
.spi-coordinate-tick-x.top { top: -3px !important; }
.spi-coordinate-tick-x.bottom { bottom: -3px !important; }

.spi-coordinate-tick-y {
    width: 8px !important;
    height: 1.6px !important;
    transform: translateY(-50%) !important;
}
.spi-coordinate-tick-y.left { right: 2px !important; }
.spi-coordinate-tick-y.right { left: 2px !important; }

/* =====================================================
   OPT20 - KOORDINAT KIRI/KANAN HORIZONTAL + GARIS GRID TIPIS
   ===================================================== */
.spi-coordinate-band.left .spi-coordinate-label-vertical,
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 52px !important;
    text-align: center !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    transform: translate(-50%, -50%) rotate(-90deg) !important;
}

.spi-coordinate-gridlines {
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.spi-coordinate-gridline {
    position: absolute !important;
    background: rgba(71, 85, 105, 0.18) !important;
    pointer-events: none !important;
}

.spi-coordinate-gridline.vertical {
    top: 0 !important;
    bottom: 0 !important;
    width: 1px !important;
    transform: translateX(-0.5px) !important;
}

.spi-coordinate-gridline.horizontal {
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    transform: translateY(-0.5px) !important;
}

.spi-coordinate-band,
.spi-coordinate-tick-x,
.spi-coordinate-tick-y,
.spi-coordinate-label-horizontal,
.spi-coordinate-label-vertical {
    z-index: 2 !important;
}

/* OPT23 - kotak grid export berupa dotted outline tipis */
.spi-export-grid-dotted {
    shape-rendering: geometricPrecision;
}

.spi-export-grid-dotted path {
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* =====================================================
   OPT24 - PERBAIKAN LABEL KOORDINAT KIRI/KANAN AGAR RAPI
   ROTATE TEXT UP
   ===================================================== */
.spi-coordinate-band.left,
.spi-coordinate-band.right {
    width: 76px !important;
}

.spi-coordinate-band.left { left: -82px !important; }
.spi-coordinate-band.right { right: -82px !important; }

.spi-coordinate-band.left .spi-coordinate-label-vertical,
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    left: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 64px !important;
    padding: 2px 6px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    transform: translate(-50%, -50%) rotate(-90deg) !important;
    transform-origin: center center !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y.left,
.spi-coordinate-band.right .spi-coordinate-tick-y.right {
    width: 10px !important;
}

/* =====================================================
   OPT25 - PERJELAS GRID DOTTED FILL + RAPKAN KOORDINAT
   KIRI DAN KANAN PADA EXPORT PETA
   ===================================================== */
.spi-export-grid-dotted path {
    stroke: rgba(71, 85, 105, 0.58) !important;
    stroke-width: 0.78px !important;
    stroke-dasharray: 1.4 2.8 !important;
    stroke-linecap: round !important;
    fill: rgba(255, 255, 255, 0.065) !important;
}

.spi-cartographic-map-column {
    padding: 36px 40px 10px 72px !important;
}

.spi-coordinate-band.left,
.spi-coordinate-band.right {
    top: 20px !important;
    bottom: 20px !important;
    width: 94px !important;
}

.spi-coordinate-band.left { left: -104px !important; }
.spi-coordinate-band.right { right: -104px !important; }

.spi-coordinate-band.left .spi-coordinate-label-vertical,
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    position: absolute !important;
    left: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 82px !important;
    min-width: 82px !important;
    height: 18px !important;
    padding: 1px 4px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
    writing-mode: horizontal-tb !important;
    transform: translate(-50%, -50%) rotate(-90deg) !important;
    transform-origin: center center !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y,
.spi-coordinate-band.right .spi-coordinate-tick-y {
    width: 12px !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y.left { right: 6px !important; }
.spi-coordinate-band.right .spi-coordinate-tick-y.right { left: 6px !important; }

/* =====================================================
   OPT26 - EXPORT SUNGAI MULTI SELECT (SHP + KMZ)
   ===================================================== */
.river-multi-export-panel {
    border-color: rgba(2, 132, 199, 0.30) !important;
}

.river-multi-export-panel .das-multi-export-head {
    background: linear-gradient(135deg, #ffffff, #effaff) !important;
}

.river-multi-export-panel .das-multi-count {
    background: #0284c7 !important;
    box-shadow: 0 7px 14px rgba(2, 132, 199, 0.24) !important;
}

.river-selected-item {
    border-left: 4px solid #0284c7 !important;
}

body.river-export-mode-active .leaflet-control-layers {
    z-index: 1600 !important;
    pointer-events: auto !important;
}

body.river-export-mode-active .leaflet-control-layers,
body.river-export-mode-active .leaflet-control-layers * {
    cursor: auto !important;
    pointer-events: auto !important;
}

#map.river-export-mode,
#map.river-export-mode .leaflet-interactive {
    cursor: crosshair !important;
}

#map.river-drag-selecting {
    user-select: none !important;
    -webkit-user-select: none !important;
}

.river-drag-selection-box {
    border-color: #0284c7 !important;
    background: rgba(56, 189, 248, 0.17) !important;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.92), 0 8px 22px rgba(2,132,199,0.24) !important;
}

/* =====================================================
   OPT27 - OVERLAY SPI TERLIHAT, DOT FILL GRID, DAN LABEL
   KOORDINAT SISI KIRI/KANAN MEMANJANG VERTIKAL
   ===================================================== */
.spi-export-overlay-visible,
.spi-export-raster-snapshot,
.spi-smooth-grid-surface.spi-precomputed-surface {
    opacity: 1 !important;
    visibility: visible !important;
    mix-blend-mode: normal !important;
    filter: saturate(1.12) contrast(1.04) !important;
}

.spi-export-grid-dotted path {
    stroke: rgba(51, 65, 85, 0.68) !important;
    stroke-width: 0.86px !important;
    stroke-dasharray: 1.6 2.4 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    fill: rgba(15, 97, 112, 0.045) !important;
}

.spi-cartographic-map-column {
    padding: 38px 88px 12px 88px !important;
    overflow: visible !important;
}

.spi-cartographic-map-shell {
    overflow: visible !important;
}

.spi-coordinate-band.left,
.spi-coordinate-band.right {
    top: 22px !important;
    bottom: 22px !important;
    width: 34px !important;
}

.spi-coordinate-band.left { left: -56px !important; }
.spi-coordinate-band.right { right: -56px !important; }

.spi-coordinate-band.left .spi-coordinate-label-vertical,
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    position: absolute !important;
    left: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 88px !important;
    min-width: 88px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 2px 7px !important;
    border-radius: 11px !important;
    font-size: 9.2px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0.01em !important;
    text-align: center !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    rotate: none !important;
    transform-origin: center center !important;
    overflow: visible !important;
}

/* Sisi kiri dibaca dari bawah ke atas. */
.spi-coordinate-band.left .spi-coordinate-label-vertical {
    transform: translate(-50%, -50%) rotate(-90deg) !important;
}

/* Sisi kanan dibaca dari atas ke bawah ketika dilihat dari samping kanan. */
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    transform: translate(-50%, -50%) rotate(90deg) !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y,
.spi-coordinate-band.right .spi-coordinate-tick-y {
    width: 10px !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y.left { right: -2px !important; }
.spi-coordinate-band.right .spi-coordinate-tick-y.right { left: -2px !important; }

/* =====================================================
   OPT28 - OVERLAY EXPORT SPI TAMPIL, DOT FILL GRID LEBIH
   JELAS, KOORDINAT KIRI/KANAN SEPERTI SISI ATAS/BAWAH
   ===================================================== */
.spi-export-grid-dotted path {
    stroke: rgba(51, 65, 85, 0.74) !important;
    stroke-width: 0.94px !important;
    stroke-dasharray: 1.8 2.4 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    fill: rgba(15, 97, 112, 0.095) !important;
}

.spi-cartographic-map-column {
    padding: 38px 84px 12px 84px !important;
    overflow: visible !important;
}

.spi-coordinate-band.left,
.spi-coordinate-band.right {
    top: 18px !important;
    bottom: 18px !important;
    width: 72px !important;
}

.spi-coordinate-band.left { left: -78px !important; }
.spi-coordinate-band.right { right: -78px !important; }

/* Sisi kiri dan kanan dibuat seperti sisi atas/bawah: horizontal,
   mudah dibaca langsung, dan tersusun lurus pada sisi peta. */
.spi-coordinate-band.left .spi-coordinate-label-vertical,
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    position: absolute !important;
    left: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 62px !important;
    min-width: 62px !important;
    height: 18px !important;
    min-height: 18px !important;
    padding: 1px 5px !important;
    border-radius: 6px !important;
    font-size: 8.8px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    transform: translate(-50%, -50%) rotate(0deg) !important;
    transform-origin: center center !important;
    overflow: visible !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y,
.spi-coordinate-band.right .spi-coordinate-tick-y {
    width: 10px !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y.left { right: 4px !important; }
.spi-coordinate-band.right .spi-coordinate-tick-y.right { left: 4px !important; }

/* =====================================================
   OPT28 - OVERLAY EXPORT SPI TAMPIL, GRID DOT FILL LEBIH
   JELAS, DAN KOORDINAT KIRI/KANAN SEPERTI ATAS/BAWAH
   ===================================================== */
.spi-export-raster-snapshot,
.spi-export-overlay-visible {
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    filter: saturate(1.08) contrast(1.04) !important;
}

.spi-export-grid-dotted path {
    stroke: rgba(71, 85, 105, 0.62) !important;
    stroke-width: 0.8px !important;
    stroke-dasharray: 1.4 2.8 !important;
    fill: rgba(255, 255, 255, 0.11) !important;
}

.spi-cartographic-map-column {
    padding: 34px 44px 12px 44px !important;
}

.spi-coordinate-band.left,
.spi-coordinate-band.right {
    top: 14px !important;
    bottom: 14px !important;
    width: 86px !important;
}

.spi-coordinate-band.left { left: -88px !important; }
.spi-coordinate-band.right { right: -88px !important; }

.spi-coordinate-band.left .spi-coordinate-label-vertical,
.spi-coordinate-band.right .spi-coordinate-label-vertical {
    left: 50% !important;
    width: 68px !important;
    min-width: 68px !important;
    height: 18px !important;
    padding: 1px 4px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    text-align: center !important;
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
    rotate: 0deg !important;
}

.spi-coordinate-band.left .spi-coordinate-tick-y.left,
.spi-coordinate-band.right .spi-coordinate-tick-y.right {
    width: 10px !important;
}


/* =====================================================
   OPT29 - FIX CLASSIFY, LEGENDA DINAMIS, KOORDINAT EXPORT
   HANYA PADA SISI ATAS DAN KANAN
   ===================================================== */
.spi-coordinate-band.left,
.spi-coordinate-band.bottom {
    display: none !important;
}

.spi-cartographic-map-column {
    padding: 34px 82px 10px 14px !important;
    overflow: visible !important;
}

.spi-coordinate-band.top {
    top: -24px !important;
    left: 16px !important;
    right: 16px !important;
}

.spi-coordinate-band.right {
    display: block !important;
    top: 14px !important;
    bottom: 14px !important;
    right: -78px !important;
    width: 74px !important;
}

.spi-coordinate-band.right .spi-coordinate-label-vertical {
    left: 50% !important;
    width: 64px !important;
    min-width: 64px !important;
    height: 18px !important;
    padding: 1px 4px !important;
    font-size: 9px !important;
    transform: translate(-50%, -50%) rotate(0deg) !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
}

.spi-coordinate-band.right .spi-coordinate-tick-y.right {
    left: 2px !important;
    width: 9px !important;
}

/* Jumlah segmen legenda menyesuaikan kelas SPI yang tampil. */
.spi-cartographic-spi-pill,
.spi-cartographic-spi-scale {
    grid-template-columns: repeat(var(--spi-visible-class-count, 1), minmax(0, 1fr));
}

/* =====================================================
   PILIH MANUAL SHP HASIL ANALISIS SPI
   ===================================================== */
.spi-shp-manual-panel {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    background: #faf5ff;
}
.spi-shp-manual-panel[hidden] { display: none !important; }
.spi-shp-manual-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.spi-shp-manual-header b {
    display: block;
    color: #5b21b6;
    font-size: 11px;
}
.spi-shp-manual-header small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 9px;
    line-height: 1.35;
}
.spi-shp-selected-count {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}
.spi-shp-selected-list {
    display: grid;
    gap: 5px;
    max-height: 132px;
    margin-top: 8px;
    overflow: auto;
}
.spi-shp-selected-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 7px;
    padding: 6px 7px;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    background: #fff;
}
.spi-shp-selected-swatch {
    width: 10px;
    height: 10px;
    border: 1px solid rgba(15,23,42,.25);
    border-radius: 3px;
}
.spi-shp-selected-name { min-width: 0; }
.spi-shp-selected-name b,
.spi-shp-selected-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.spi-shp-selected-name b { color: #334155; font-size: 9px; }
.spi-shp-selected-name small { margin-top: 1px; color: #64748b; font-size: 8px; }
.spi-shp-selected-item button {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 900;
    cursor: pointer;
}
.spi-shp-selected-empty {
    padding: 8px;
    border: 1px dashed #c4b5fd;
    border-radius: 8px;
    color: #64748b;
    background: rgba(255,255,255,.7);
    font-size: 8.5px;
    line-height: 1.4;
}
.spi-shp-manual-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
}
.spi-shp-manual-actions button {
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 8.5px;
    font-weight: 800;
    cursor: pointer;
}
.spi-shp-manual-actions button:disabled { opacity: .45; cursor: not-allowed; }

/* =====================================================
   EXPORT HUJAN POS & DRAG SELECT TITIK POS
   ===================================================== */
.station-export-drag-selection-box {
    position: absolute;
    z-index: 1220;
    display: none;
    pointer-events: none;
    border: 2px solid #0f766e;
    border-radius: 5px;
    background: rgba(20,184,166,0.16);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.94), 0 8px 22px rgba(15,118,110,0.25);
}

#map.station-export-drag-selecting {
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair !important;
}

.station-rainfall-export-card {
    margin-top: 11px;
    padding: 11px;
    border: 1px solid rgba(14,165,233,0.24);
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fcff, #eff8ff);
    box-shadow: 0 7px 16px rgba(15,23,42,0.05);
}

.station-rainfall-export-title {
    display: grid;
    gap: 3px;
    margin-bottom: 9px;
}

.station-rainfall-export-title b {
    color: #0f172a;
    font-size: 11px;
    font-weight: 900;
}

.station-rainfall-export-title small {
    color: #64748b;
    font-size: 9.5px;
    font-weight: 700;
}

.station-rainfall-year-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.station-rainfall-year-grid label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 9.5px;
    font-weight: 850;
}

.station-rainfall-year-grid .form-control {
    min-height: 38px;
}

.station-rainfall-export-card .station-export-main-action {
    margin-top: 9px;
}

@media (max-width: 640px) {
    .station-rainfall-year-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   INPUT KOORDINAT: TOGGLE JARAK & FORMAT UPLOAD TAMBAHAN
   ===================================================== */
.distance-heading {
    grid-template-columns: 35px minmax(0, 1fr) auto;
}

.distance-enable-button {
    min-width: 62px;
    padding: 7px 10px;
    border: 1px solid #0f766e;
    border-radius: 999px;
    background: #ffffff;
    color: #0f766e;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.distance-enable-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15,118,110,0.18);
}

.distance-enable-button.is-enabled {
    border-color: #b91c1c;
    background: #b91c1c;
    color: #ffffff;
}

.distance-display.is-disabled {
    border-color: rgba(148,163,184,0.34);
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
}

.distance-display.is-disabled .distance-logo {
    background: linear-gradient(145deg, #64748b, #94a3b8);
    box-shadow: none;
}

.distance-display.is-disabled .distance-metrics > div {
    opacity: 0.72;
}

.upload-format-hint {
    margin: -2px 2px 0;
    padding: 7px 8px;
    border-left: 3px solid rgba(0,130,152,0.55);
    border-radius: 0 8px 8px 0;
    background: rgba(238,249,251,0.72);
    color: #475569;
    font-size: 9.5px;
    line-height: 1.45;
    font-weight: 650;
}

@media (max-width: 640px) {
    .distance-heading {
        grid-template-columns: 35px minmax(0, 1fr);
    }
    .distance-enable-button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* =====================================================
   EXPORT DATA POS: HUJAN, TMA, DAN KLIMATOLOGI
   ===================================================== */
.station-export-type-filter {
    flex: 0 0 148px;
    min-width: 132px;
    min-height: 42px;
    font-size: 10px;
    font-weight: 850;
}

.station-data-export-card.tma {
    border-color: rgba(245,158,11,0.30);
    background: linear-gradient(180deg, #fffbeb, #fff7df);
}

.station-data-export-card.climate {
    border-color: rgba(239,68,68,0.24);
    background: linear-gradient(180deg, #fff8f8, #fff1f2);
}

.station-data-export-card.tma .station-export-main-action button {
    border-color: rgba(217,119,6,0.34);
}

.station-data-export-card.climate .station-export-main-action button {
    border-color: rgba(220,38,38,0.28);
}

@media (max-width: 760px) {
    .station-export-type-filter {
        width: 100%;
        flex-basis: auto;
    }
}

/* ==========================================================
   EXPORT CENTER — MODE ENABLE + PRODUCT PICKER (OPT47)
   ========================================================== */
.export-workspace {
    width: min(470px, calc(100vw - 24px));
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.export-data-header > div:first-child {
    min-width: 0;
}

.export-header-subtitle {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.export-mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px 12px 2px;
}

.export-mode-card {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 66px;
    padding: 10px;
    border: 1px solid #dbe4ef;
    border-radius: 13px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.055);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.export-mode-card:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
}

.export-mode-card.is-enabled {
    border-color: #38bdf8;
    background: linear-gradient(145deg, #f0f9ff, #ffffff);
    box-shadow: 0 7px 20px rgba(2, 132, 199, 0.12);
}

.export-mode-card > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.export-mode-switch {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .18s ease;
}

.export-mode-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
    transition: transform .18s ease;
}

.export-mode-card.is-enabled .export-mode-switch {
    background: #0284c7;
}

.export-mode-card.is-enabled .export-mode-switch::after {
    transform: translateX(14px);
}

.export-mode-copy {
    min-width: 0;
}

.export-mode-copy b,
.export-mode-copy small {
    display: block;
}

.export-mode-copy b {
    color: #0f172a;
    font-size: 12px;
}

.export-mode-copy small {
    margin-top: 2px;
    color: #64748b;
    font-size: 9.5px;
    line-height: 1.25;
}

.export-workspace-panel {
    padding-top: 6px;
}

.export-product-tabs {
    position: sticky;
    top: -1px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 8px 12px 4px;
    padding: 4px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: rgba(248, 250, 252, .96);
    backdrop-filter: blur(10px);
}

.export-product-tab {
    min-height: 34px;
    padding: 7px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.export-product-tab.active {
    background: #0f5f8f;
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 95, 143, .2);
}

.export-product-panel[hidden],
.export-workspace-panel[hidden],
[data-station-export-card][hidden] {
    display: none !important;
}

.export-file-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 9px;
}

.export-file-field {
    display: grid;
    gap: 4px;
}

.export-file-field > span {
    color: #475569;
    font-size: 10px;
    font-weight: 750;
}

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

.export-download-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.export-center-status {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 7px 12px 12px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(9px);
}

.station-coordinate-export-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f9ff, #ffffff);
}

.station-coordinate-export-card b,
.station-coordinate-export-card small {
    display: block;
}

.station-coordinate-export-card b {
    color: #0c4a6e;
    font-size: 12px;
}

.station-coordinate-export-card small {
    margin-top: 2px;
    color: #64748b;
    font-size: 10px;
}

.station-coordinate-export-card button {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 9px;
}

.station-export-list {
    max-height: 210px;
}

.station-data-export-card {
    margin-top: 10px;
}

.export-data-panel button:disabled,
.export-data-panel input:disabled,
.export-data-panel select:disabled {
    cursor: progress;
}

@media (max-width: 620px) {
    .export-workspace {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 74px);
    }

    .export-mode-selector,
    .export-file-picker-grid,
    .professional-layer-controls,
    .export-download-actions {
        grid-template-columns: 1fr;
    }

    .export-mode-card {
        min-height: 56px;
    }

    .export-product-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .export-product-tab {
        font-size: 10px;
    }
}

/* Export SHP manual dengan lasso */
.export-product-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lasso-export-picker-grid {
    grid-template-columns: minmax(0, 1fr);
}

.lasso-export-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
}

.lasso-export-actions button {
    min-height: 36px;
    padding: 8px 9px;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 800;
}

.lasso-export-actions .manual.active,
#lassoPolygonDrawButton.active,
#lassoLineDrawButton.active {
    border-color: #0891b2;
    background: #ecfeff;
    color: #0e7490;
    box-shadow: 0 0 0 2px rgba(8, 145, 178, .12);
}

.lasso-export-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    margin-top: 8px;
    padding: 7px 9px;
    border: 1px solid #dbeafe;
    border-radius: 9px;
    background: #f8fbff;
    color: #334155;
    font-size: 10.5px;
    font-weight: 800;
}

#map.lasso-export-drawing,
.leaflet-container.lasso-export-drawing {
    cursor: crosshair !important;
    user-select: none;
    touch-action: none;
}

@media (max-width: 620px) {
    .export-product-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lasso-export-actions {
        grid-template-columns: 1fr;
    }
}


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

.manual-shape-actions #lassoExportButton {
    grid-column: 1 / -1;
}

.manual-shape-list {
    display: grid;
    gap: 5px;
    max-height: 180px;
    margin-top: 7px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.manual-shape-list[hidden] {
    display: none !important;
}

.manual-shape-list-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 25px;
    align-items: center;
    gap: 6px;
    min-height: 31px;
    padding: 5px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.manual-shape-type {
    min-width: 48px;
    padding: 3px 5px;
    border-radius: 999px;
    text-align: center;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.manual-shape-type.polygon {
    color: #0e7490;
    background: #cffafe;
}

.manual-shape-type.line {
    color: #6d28d9;
    background: #ede9fe;
}

.manual-shape-name {
    overflow: hidden;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manual-shape-metric {
    color: #64748b;
    font-size: 9.5px;
    font-weight: 700;
    white-space: nowrap;
}

.manual-shape-remove {
    width: 25px;
    min-width: 25px;
    height: 25px;
    min-height: 25px !important;
    padding: 0 !important;
    border: 1px solid #fecaca !important;
    border-radius: 7px !important;
    background: #fff7f7 !important;
    color: #dc2626 !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

@media (max-width: 620px) {
    .manual-shape-actions {
        grid-template-columns: 1fr;
    }

    .manual-shape-actions #lassoExportButton {
        grid-column: auto;
    }

    .manual-shape-list-item {
        grid-template-columns: auto minmax(0, 1fr) 25px;
    }

    .manual-shape-metric {
        display: none;
    }
}
