/* core_app/static/css/maps_dashboard.css */

:root {
    --map-ink: #172033;
    --map-text: #25364d;
    --map-muted: #5f6f86;
    --map-border: rgba(135, 158, 184, 0.28);
    --map-surface: rgba(255, 255, 255, 0.94);
    --map-surface-soft: #f6f9fc;
    --map-blue: #2f6f8f;
    --map-blue-soft: #e8f2f8;
    --map-teal: #2f817a;
    --map-teal-soft: #e8f6f3;
    --map-amber: #a96f1e;
    --map-amber-soft: #fff5df;
    --map-red: #b4232f;
    --map-shadow-soft: 0 16px 36px rgba(23, 32, 51, 0.11);
    --map-radius-panel: 22px;
    --map-radius-control: 14px;
    --map-focus-ring: 0 0 0 3px rgba(47, 129, 122, 0.22);
}

/* --- Harita Kapsayıcısı --- */
.map-wrapper {
    position: relative;
    /* Tam ekran: sticky navbar (min 64px) dışında kalan tüm viewport */
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    min-height: 480px;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    background:
        linear-gradient(180deg, rgba(239, 246, 255, 0.76), rgba(248, 250, 252, 0.94)),
        var(--bg-primary, #f8fafc);
}

#map {
    width: 100%;
    height: 100%;
    min-height: 0;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 1;
}

/* --- Sidebar (Sol Panel - Filtre Alanı) --- */
.map-sidebar {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    /* PERF: 320px × ~90vh blur bölgesi haritanın üstünde her pan frame'inde
       yeniden hesaplanıyordu. Arka plan zaten ~0.94 opak → opak yapıldı. */
    background:
        linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(191, 219, 254, 0.36);
    padding: 24px;
    border-radius: 28px;
    z-index: 1000;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 90%;
    overflow-y: auto;

    /* Modern Scrollbar - 2026 Trend: Minimal & Hidden until hover */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: transparent transparent; /* Firefox - varsayılan gizli */
}

.map-sidebar-tabs,
.map-sidebar-tab-item {
    min-width: 0;
}

.map-advanced-filters-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.78rem;
}

.parcel-card-modal-subtitle {
    font-size: 0.72rem;
    opacity: 0.85;
    line-height: 1.2;
}

/* Webkit (Chrome, Safari, Edge) Scrollbar Stilleri */
.map-sidebar::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.map-sidebar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: var(--radius-2026, 20px);
    margin: 8px 0;
}

.map-sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: var(--radius-2026, 20px);
    transition: background 0.3s ease;
}

/* Hover'da scrollbar görünür */
.map-sidebar:hover {
    scrollbar-color: rgba(37, 99, 235, 0.22) transparent; /* Firefox */
}

.map-sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.2);
}

/* Aktif kaydırma sırasında daha belirgin */
.map-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.3);
}

.map-sidebar::-webkit-scrollbar-thumb:active {
    background: rgba(37, 99, 235, 0.4);
}

.map-sidebar.collapsed {
    transform: translateX(-360px); /* Kapanma mesafesi genişliğe göre ayarlandı */
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
    letter-spacing: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* Form Elemanları (Dropdown & Input) */
.map-page-shell .form-select-sm,
.map-page-shell .form-control-sm {
    border-radius: var(--radius-2026, 20px);
    border: 1px solid #e2e8f0;
    background-color: rgba(255, 255, 255, 0.96);
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #334155;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.map-page-shell .form-select-sm:focus,
.map-page-shell .form-control-sm:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.32);
    background-color: #fff;
}

/* Pasif Dropdown Görünümü (İlçe/Mahalle yüklenirken) */
.map-page-shell .form-select-sm:disabled {
    background-color: #f8fafc;
    cursor: not-allowed;
    color: #667085;
    border-color: #e2e8f0;
}

.map-page-shell .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* --- SAĞ ÜST KONTROLLER (Zoom, Stil, Konum) --- */
.custom-map-controls {
    position: absolute;
    top: 76px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    padding: 8px;
    border: 1px solid var(--map-border);
    border-radius: 22px;
    /* PERF: kontrol paneli harita üstünde; arka plan zaten ~0.96 opak →
       blur neredeyse görünmezdi ama her pan frame'inde yeniden hesaplanıyordu.
       Opak yapıldı (bkz. .control-btn / .map-sidebar aynı düzeltme). */
    background:
        linear-gradient(180deg, #ffffff, #f6f9fc);
    box-shadow: var(--map-shadow-soft);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.2s ease;
}

.custom-map-controls.controls-collapsed-mobile {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.96);
}

/* JS bu yüzeyleri kapattığında yalnızca görsel olarak değil,
   erişilebilirlik ağacı ve klavye sırasından da tamamen çıkarır. */
.custom-map-controls[hidden],
.map-mobile-controls-fab[hidden],
.map-lifecycle-bar[hidden],
.map-sidebar[hidden] {
    display: none !important;
}

.map-mobile-controls-fab {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-2026, 20px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 248, 0.9)),
        #fff;
    border: 1px solid var(--map-border);
    box-shadow: var(--map-shadow-soft);
    color: var(--map-blue);
    font-size: 1.08rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.map-mobile-controls-fab:hover,
.map-mobile-controls-fab:focus-visible {
    color: #214d66;
    border-color: rgba(47, 111, 143, 0.36);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    outline: none;
}

.map-mobile-controls-fab:active {
    transform: translateY(1px);
}

.map-mobile-controls-fab[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--map-blue-soft), var(--map-teal-soft));
    color: #214d66;
    border-color: rgba(47, 111, 143, 0.42);
}

.control-divider {
    height: 1px;
    width: 20px;
    background-color: rgba(148, 163, 184, 0.24);
    margin: 4px auto;
}

.control-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(191, 219, 254, 0.44);
    /* PERF: arka plan zaten ~0.92+ opak → altındaki blur neredeyse görünmezdi
       ama her buton harita üstünde her pan frame'inde blur'u yeniden
       hesaplıyordu (6-8 kontrol = 6-8 pahalı blur bölgesi). Opak yapıldı. */
    background:
        linear-gradient(180deg, #ffffff, #eff6ff);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: var(--map-text);
    font-size: 1.2rem;
    padding: 0;
}

.control-btn:hover {
    transform: translateY(-1px);
    background-color: #eff6ff;
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--map-blue);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.control-btn.active {
    background: linear-gradient(135deg, var(--map-blue-soft), var(--map-teal-soft));
    color: #214d66;
    border-color: rgba(47, 111, 143, 0.44);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.control-btn.text-warning {
    color: var(--map-amber) !important;
}

.control-btn.text-success {
    color: var(--map-teal) !important;
}

.control-btn .text-danger {
    color: var(--map-red) !important;
}

.control-btn.active.text-warning,
.control-btn.active.text-success,
.control-btn.active .text-danger {
    color: #214d66 !important;
}

.zoom-text {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1;
    margin-top: -2px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 20px;
    left: 330px; /* Sidebar (300px) + Margin (30px) */
    z-index: 1000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(191, 219, 254, 0.46);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.82)),
        #fff;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--map-blue);
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: #eff6ff;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    transform: translateY(-1px);
}

.map-sidebar.collapsed + .sidebar-toggle {
    left: 20px; /* Sidebar kapandığında sola yasla */
}

/* Legend (Lejant) */
.map-legend {
    position: absolute;
    bottom: 30px;
    right: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
        rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(191, 219, 254, 0.36);
    padding: 16px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    z-index: 900;
    font-size: 0.85rem;
}

.legend-item { display: flex; align-items: center; margin-bottom: 8px; font-weight: 600; color: #334155; }
.legend-item:last-child { margin-bottom: 0; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 12px; box-shadow: 0 0 0 2px rgba(255,255,255,0.8); }

/* Loader (Yükleniyor Ekranı) */
#map-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88)),
        rgba(255, 255, 255, 0.94);
    padding: 24px 48px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #23313b;
    border: 1px solid rgba(191, 219, 254, 0.4);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.map-loader-fallback {
    text-align: center;
    padding: 24px;
}

.map-loader-fallback__icon {
    font-size: 2rem;
}

.map-loader-fallback__title {
    margin-top: 12px;
    font-weight: 600;
}

.map-loader-fallback__text {
    margin-top: 6px;
    color: #6c757d;
    font-size: 0.9rem;
}

.map-loader-fallback__detail {
    margin-top: 4px;
    color: #6c757d;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.map-loader-fallback__button {
    margin-top: 12px;
}

.parcel-3d-canvas {
    width: 100%;
    height: 480px;
    background: #0e1116;
    border-radius: 6px;
    position: relative;
}

/* MapLibre Popup Özelleştirmesi (Minimal) */
.maplibregl-popup {
    z-index: 1005;
}

.maplibregl-popup-content {
    border-radius: var(--radius-2026, 20px);
    padding: 0; /* İçerik padding'i HTML'den gelecek */
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

.maplibregl-popup-close-button {
    font-size: 1.2rem;
    padding: 5px 10px;
    color: #6c757d;
    z-index: 10;
    /* Klavye odağı içerik kutusunun overflow:hidden sınırında kırpılmasın. */
    outline: 2px solid transparent;
    outline-offset: -3px;
}
.maplibregl-popup-close-button:hover {
    color: #000;
    background: none;
}

.maplibregl-popup-close-button:focus-visible {
    color: #1e3a8a;
    background: #eff6ff;
    outline-color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.2);
}

.map-auth-access-notice {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 1050;
    max-width: min(92vw, 42rem);
    margin: 0;
    transform: translateX(-50%);
    font-size: 0.85rem;
    text-align: center;
}

/* Misafir bildirimi lifecycle araç çubuğundan önce render edilir. Bildirim
   varken iki yüzeyi ayrı satırlara al; oturum açmış kullanıcıda toolbar
   normal üst konumunu korur. */
.map-auth-access-notice + .map-lifecycle-bar {
    top: 52px;
}

.map-session-security-notice {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 20000;
    max-width: min(92vw, 680px);
    padding: 12px 16px;
    transform: translateX(-50%);
    border: 1px solid #ffda6a;
    border-radius: 12px;
    background: #fff3cd;
    color: #664d03;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    font: 600 14px/1.4 system-ui, sans-serif;
}

.map-session-security-notice a {
    color: #0a58ca;
    text-decoration: underline;
}

.map-session-security-notice a:focus-visible {
    outline: 3px solid #0a58ca;
    outline-offset: 3px;
}

@media (forced-colors: active) {
    .maplibregl-popup-close-button:focus-visible {
        color: ButtonText;
        background: ButtonFace;
        outline: 3px solid Highlight;
        outline-offset: -4px;
        box-shadow: none;
    }
}

/* MapLibre Default Kontrolleri Gizle (Custom kullanıyoruz).
   İSTİSNA: bottom-right'taki attribution GÖRÜNÜR kalır — OSM ODbL veri atıfı
   yasal olarak zorunlu (aşağıda kompakt/zarif stillendi). */
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-top-right,
.maplibregl-ctrl-top-left {
    display: none !important;
}
.maplibregl-ctrl-bottom-right {
    /* Yalnız attribution kalsın; olası zoom/logo gibi diğer kontroller gizli. */
    z-index: 2 !important;
}
.maplibregl-ctrl-bottom-right > *:not(.maplibregl-ctrl-attrib) {
    display: none !important;
}
/* Kompakt attribution: küçük "ⓘ" rozeti; tıklayınca kaynak atıfları açılır. */
.maplibregl-ctrl-attrib.maplibregl-compact {
    margin: 0 8px 8px 0 !important;
    background: rgba(255, 255, 255, 0.82) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12) !important;
    font-size: 10px !important;
    opacity: 0.85;
}
.maplibregl-ctrl-attrib.maplibregl-compact:hover {
    opacity: 1;
}
.maplibregl-ctrl-attrib.maplibregl-compact a {
    color: #475569 !important;
}
/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Cross-Platform Akıllı Harita Dashboard
   iOS Safari · Android Chrome · macOS · Windows · Tablet
   ═══════════════════════════════════════════════════════════════ */

/* ── Mobil ≤768px ────────────────────────────────────────────── */
/* .map-wrapper mobil boyutları aşağıdaki tam-ekran bloğunda (radius 0). */
@media (max-width: 767.98px) {
    .map-sidebar {
        width: 260px;
        top: 10px;
        left: 10px;
        bottom: 10px;
        max-height: none;
        padding: 16px;
    }

    .map-sidebar.collapsed {
        transform: translateX(-300px);
    }

    .sidebar-toggle {
        left: 280px;
        top: 10px;
        width: 44px;
        height: 44px;
    }

    .custom-map-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }

    .map-legend {
        bottom: 20px;
        right: 10px;
        padding: 12px 16px;
    }

    /* Popup: mobilde daha kompakt */
    .maplibregl-popup-content {
        max-width: 85vw !important;
    }

    /* Kontrol butonları mobilde korunur */
    .control-btn {
        width: 44px;
        height: 44px;
    }

    /* Sidebar title: kompakt */
    .sidebar-title {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    /* Layer grid: 2 sütun */
    .layer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* ── Mobil / kısa viewport: Sidebar → erişilebilir modal + Search FAB ─── */
@media (max-width: 767.98px), (max-height: 500px) {
    /* JS init bitene kadar sidebar gizli — başlangıç flash'ini engeller */
    .map-sidebar.map-sidebar-init {
        visibility: hidden;
    }

    /* Top-left arama FAB butonu — sidebar'ı aç */
    .map-mobile-search-fab {
        position: absolute;
        top: 16px;
        left: 12px;
        z-index: 1002;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 248, 0.9)),
            #fff;
        border: 1px solid var(--map-border);
        box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
        color: var(--map-blue);
        font-size: 1.05rem;
        display: flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.18s ease, box-shadow 0.18s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .map-mobile-search-fab:active {
        transform: scale(0.94);
        box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    }

    /* Backdrop: sidebar açıkken karartma; varsayılan kapalı */
    .map-sidebar-backdrop {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1055;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    /* Sidebar AÇIKKEN (.collapsed yokken) backdrop görünür */
    body:not(.map-sidebar-collapsed) .map-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* Sidebar mobil kapat butonu — sağ üstte */
    .map-sidebar-mobile-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.06);
        border: 0;
        color: #1e293b;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        cursor: pointer;
        z-index: 2;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .map-sidebar-mobile-close:active {
        background: rgba(0, 0, 0, 0.12);
    }

    /* Eski bottom-right sidebar-toggle butonunu mobilde gizle */
    .sidebar-toggle {
        display: none !important;
    }

    .map-wrapper {
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        min-height: 300px;
        border-radius: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Sidebar: soldan kayan ortalanmış modal — bottom-nav'ı kapsamaz, viewport ortasında.
       !important: dashboard_perf.css'teki `.map-sidebar { transform: translateZ(0) }` ve
       block (576-1024)'teki `.map-sidebar.collapsed { transform: translateX(...) }` kurallarını ez. */
    .map-sidebar {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        width: min(92vw, 420px) !important;
        max-width: 92vw !important;
        /* SIRA ÖNEMLİ: dvh SONRA gelmeli (aynı specificity → son kazanır).
           Ters sırada dvh ölü kalıyordu; vh iOS'ta BÜYÜK viewport'a göre
           hesaplandığından panel Safari araç çubuğunun altında kırpılıyordu. */
        max-height: 85vh !important;
        max-height: 85dvh !important;
        border-radius: 20px !important;
        padding: 22px 18px 18px !important;
        background: #fff !important;
        box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03)) !important;
        transform: translate(-50%, -50%) !important;
        transition: left 0.38s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease !important;
        z-index: 1060 !important; /* bottom-nav (1045) üzerinde */
        overflow-y: auto !important;
    }

    /* EMNİYET: bir modal açıkken (parsel kartı z:1055) opak filtre paneli
       (z:1060) sonucun ÜSTÜNDE kalıyordu → mobilde arama sonucu hiç
       görünmüyordu. JS paneli kapatıyor; bu da CSS tarafında yedek. */
    body.modal-open .map-sidebar {
        z-index: 1040 !important;
    }

    /* Üst handle (drag indicator) — ortalanmış modalda gereksiz, gizle */
    .map-sidebar::before {
        content: none !important;
    }

    /* Kapalı: soldan dışarı kayar — transform aynı kalsın, sadece left değişsin */
    .map-sidebar.collapsed {
        left: -50% !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translate(-50%, -50%) !important; /* block 637'nin translateX'ini ez */
    }

    /* Legend: sol alt, kompakt */
    .map-legend {
        bottom: 10px;
        left: 10px;
        right: auto;
        max-width: calc(100% - 70px);
        font-size: 0.75rem;
        padding: 10px 14px;
        border-radius: var(--radius-2026, 20px);
    }

    /* Kontroller: sağ üst, daha kompakt */
    .custom-map-controls {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    /* Popup: neredeyse tam genişlik */
    .maplibregl-popup-content {
        max-width: 92vw !important;
        border-radius: 8px;
    }

    .maplibregl-popup-close-button {
        font-size: 1.4rem;
        padding: 8px 12px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Layer grid: bottom sheet'te 3 sütun sığar */
    .layer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .layer-content {
        padding: 8px 2px;
    }

    .layer-content i {
        font-size: 1rem;
    }

    .layer-content span {
        font-size: 0.6rem;
    }

    /* Loader: mobilde kompakt */
    #map-loader {
        padding: 16px 24px;
        font-size: 0.85rem;
    }

    /* Verified switch: kompakt */
    .verified-switch {
        padding: 8px 12px;
    }

    /* Form elemanları: iOS zoom engelleme */
    .form-select-sm,
    .form-control-sm {
        font-size: 16px !important;
        padding: 12px;
    }
}

/* ── iPhone SE / Çok Küçük ≤390px ────────────────────────────── */
@media (max-width: 390px) {
    .map-sidebar {
        max-height: 60vh;
        padding: 12px;
    }

    .sidebar-title {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }

    .layer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .layer-content {
        padding: 6px 2px;
    }

    .layer-content span {
        font-size: 0.55rem;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .map-legend {
        font-size: 0.7rem;
        padding: 8px 10px;
    }

    .legend-dot {
        width: 10px;
        height: 10px;
    }
}

/* ── Tablet 768px – 1024px ───────────────────────────────────── */
@media (min-width: 576px) and (max-width: 1024px) {
    .map-sidebar {
        width: min(300px, 40vw);
    }

    .map-sidebar.collapsed {
        transform: translateX(calc(-1 * min(300px, 40vw) - 60px));
    }

    .sidebar-toggle {
        left: calc(min(300px, 40vw) + 30px);
    }

    .map-sidebar.collapsed + .sidebar-toggle {
        left: 20px;
    }
}

/* ── Landscape Modu (Telefon Yatay) ──────────────────────────── */
@media (max-width: 900px) and (orientation: landscape) {
    .map-wrapper {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        border-radius: 0;
    }

    .map-sidebar {
        width: min(240px, 35vw);
        top: 10px;
        left: 10px;
        bottom: 10px;
        max-height: none;
        border-radius: var(--radius-2026, 20px);
        padding: 12px;
    }

    .map-sidebar.collapsed {
        transform: translateX(calc(-1 * min(240px, 35vw) - 60px));
    }

    .sidebar-toggle {
        left: calc(min(240px, 35vw) + 20px);
        top: 10px;
    }

    .custom-map-controls {
        gap: 6px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

    .map-legend {
        font-size: 0.75rem;
        padding: 10px 14px;
    }
}

/* 768–900px yatay görünümde navbar ve sabit alt menü birlikte görünür.
   Shell artık margin'siz (tam ekran); yalnız navbar + alt menü düşülür ki
   harita alt menünün arkasında kalmasın. */
@media (min-width: 768px) and (max-width: 900px) and (orientation: landscape) {
    .map-page-shell {
        height: calc(100vh
            - 128px
            - env(safe-area-inset-top, 0px)
            - env(safe-area-inset-bottom, 0px));
        height: calc(100dvh
            - 128px
            - env(safe-area-inset-top, 0px)
            - env(safe-area-inset-bottom, 0px));
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .map-page-shell .map-wrapper {
        flex: 1 1 auto;
        height: 100%;
        min-height: 0;
    }
}

/* ── iOS Safe Area ───────────────────────────────────────────── */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 575.98px) {
        .map-wrapper {
            /* Notch / Dynamic Island koruması */
            padding-top: env(safe-area-inset-top, 0px);
        }

        .map-sidebar {
            padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        }

        /* iOS form zoom engelleme */
        .map-sidebar input[type="text"],
        .map-sidebar input[type="search"],
        .map-sidebar select {
            font-size: 16px !important;
        }
    }
}

/* ── Dinamik Viewport (Android Chrome, iOS 15+) ──────────────── */
@supports (height: 100dvh) {
    @media (max-width: 575.98px) {
        .map-wrapper {
            height: calc(100dvh - 60px);
        }
    }
}

/* ── Touch Cihazlar ──────────────────────────────────────────── */
@media (pointer: coarse) {
    .control-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .sidebar-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .maplibregl-popup-close-button {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hover efektlerini devre dışı bırak */
    .control-btn:hover {
        transform: none;
    }

    .layer-card:hover .layer-content {
        transform: none;
    }

    .vision-video-card:hover,
    .vision-live-card:hover {
        transform: none;
    }

    .imar-hero-card:hover,
    .imar-hero-card-v2:hover {
        transform: none;
    }

    /* Scrollbar gizle */
    .map-sidebar {
        scrollbar-width: none;
    }

    .map-sidebar::-webkit-scrollbar {
        display: none;
    }

    /* scroll touch optimizasyonu */
    .map-sidebar {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* ── Reduced Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .map-sidebar {
        transition: none !important;
    }

    .sidebar-toggle {
        transition: none !important;
    }

    .control-btn,
    .layer-content,
    .vision-video-card,
    .vision-live-card,
    .imar-hero-card,
    .imar-hero-card-v2 {
        transition: none !important;
    }

    #selectionActionBar {
        animation: none !important;
    }

    #globalDeltaBadge {
        animation: none !important;
    }
}

/* ── Retina / HiDPI ──────────────────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .map-sidebar {
        border-width: 0.5px;
    }
}

/* ── backdrop-filter fallback (Samsung Internet vb.) ─────────────
   -webkit- de sorgulanmalı: Safari unprefixed backdrop-filter'ı ancak 18'de
   gönderdi. Yalnız unprefixed sorgulanınca Safari/iOS 15-17'de bu blok TRUE
   olup opak fallback'i basıyordu → o cihazlarda buzlu-cam görünüm düzleşiyordu
   (oysa -webkit-backdrop-filter ile gayet çalışıyor). */
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
    .map-sidebar {
        background: rgba(255, 255, 255, 0.98);
    }

    .map-legend {
        background: rgba(255, 255, 255, 0.98);
    }

    #map-loader {
        background: rgba(255, 255, 255, 0.98);
    }
}

/* core_app/static/css/maps_dashboard.css dosyasına ekleyin */

/* Harita Popup İyileştirmeleri */
.maplibregl-popup-content {
    border-radius: var(--radius-2026, 20px);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    padding: 0;
    overflow: hidden;
}

.maplibregl-popup-close-button {
    font-size: 1.2rem;
    color: #666;
    padding: 4px 8px;
    z-index: 10;
}

/* Seçim Modu Butonu (Aktif Hal) */
#btnSelectMode.active {
    background: linear-gradient(135deg, var(--map-blue-soft), var(--map-teal-soft)) !important;
    color: #214d66 !important;
    border-color: rgba(47, 111, 143, 0.36) !important;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

/* Action Bar Animasyonu */
#selectionActionBar {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Delta Badge (Bildirim Rozeti) */
#globalDeltaBadge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Bulanıklaştırma Efekti (Teaser) */
.blur-text {
    color: transparent;
    text-shadow: 0 0 8px rgba(0,0,0,0.5);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 2026 Modern Harita Marker Stilleri */
.maplibregl-marker,
.mapboxgl-marker {
    max-width: 36px !important;
    max-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
    overflow: visible !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    /* PERF: root elemanın transform'unu MapLibre her frame'de translate ile
       yazar; buraya transition/scale koymak pan sırasında marker'ı "yüzdürür"
       (her ara pozisyon 150ms tween olur) → en büyük pan-jank kaynağı.
       Hover animasyonu iç <img>'e taşındı. */
    z-index: 5;
}

.maplibregl-marker:hover,
.mapboxgl-marker:hover {
    z-index: 10 !important;
}

/* Marker içindeki resimleri kapsayıcıya sığdır + hover-scale burada
   (MapLibre'ın sahip olduğu root transform'una dokunmadan). */
.maplibregl-marker img,
.mapboxgl-marker img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    max-width: 36px !important;
    max-height: 36px !important;
    transition: transform 0.15s ease;
}

.maplibregl-marker:hover img,
.mapboxgl-marker:hover img {
    transform: scale(1.1);
}

/* ============================================
   360VISION GALLERY MODAL - Harita Entegrasyonu
   ============================================ */

/* Modal Overlay */
.vision-modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vision-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.vision-modal-container {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.vision-modal-overlay.active .vision-modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.vision-modal-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vision-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Body */
.vision-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Stats Bar */
.vision-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: #f8fafc;
    border-radius: var(--radius-2026, 20px);
    padding: 16px;
}

.vision-stat {
    text-align: center;
}

.vision-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0ea5e9;
}

.vision-stat-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Live Section */
.vision-live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.vision-live-card {
    position: relative;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-radius: var(--radius-2026, 20px);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.vision-live-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.vision-live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
}

.vision-live-play {
    font-size: 2.5rem;
    color: white;
    opacity: 0.9;
}

.vision-live-title {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Video Grid */
.vision-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.vision-video-card {
    background: #fff;
    border-radius: var(--radius-2026, 20px);
    overflow: hidden;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
}

.vision-video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.vision-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #1e293b;
    overflow: hidden;
}

.vision-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vision-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 2rem;
}

.vision-verified-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #22c55e;
    background: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.vision-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.vision-video-info {
    padding: 12px;
}

.vision-video-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vision-video-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
}

/* Video Player */
.vision-player-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--radius-2026, 20px);
    overflow: hidden;
}

.vision-video-player {
    width: 100%;
    max-height: 60vh;
    display: block;
}

/* Vision Stats Card (Popup içinde) */
.vision-stats-card {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.vision-stats-card:hover {
    background: var(--bg-primary, #f8fafc) !important;
}

/* Loading */
.vision-loading {
    color: #64748b;
}

/* Responsive */
@media (max-width: 767.98px) {
    .vision-modal-container {
        width: 95%;
        max-height: 90vh;
        border-radius: var(--radius-2026, 20px);
    }

    .vision-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .vision-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .vision-live-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .vision-video-grid {
        grid-template-columns: 1fr;
    }

    .vision-modal-header {
        padding: 12px 16px;
    }

    .vision-modal-body {
        padding: 12px;
    }
}

/* ============================================
   İMAR DURUMU MODAL - 2026 PropTech Tasarım
   Bento Grid · Progressive Disclosure · Glassmorphism
   ============================================ */

/* --- Fade-in Giriş Animasyonu --- */
.imar-fade-in {
    animation: imarFadeIn 0.35s ease-out both;
}
@keyframes imarFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Hero Designation Kartı (Tam genişlik) --- */
.imar-designation {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.imar-designation-icon {
    font-size: 1.6rem;
    opacity: 0.85;
    flex-shrink: 0;
    margin-top: 2px;
}
.imar-designation-body { flex: 1; min-width: 0; }
.imar-designation-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2px;
    word-break: break-word;
}
.imar-designation-sub {
    font-size: 0.78rem;
    opacity: 0.8;
    line-height: 1.3;
}

/* Google Maps'te İzle butonu */
.imar-google-maps-row .btn {
    font-size: 0.85rem;
    padding: 6px 14px;
}
.imar-google-maps-row .btn:hover {
    transform: translateY(-1px);
}

/* --- Durum Badge --- */
.imar-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}
.imar-status-badge--success { background: rgba(255,255,255,0.22); color: #fff; }
.imar-status-badge--warning { background: #fbbf24; color: #78350f; }
.imar-status-badge--danger  { background: #b42318; color: #fff; }
.imar-status-badge--neutral { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }

/* --- Bento Grid: Metrik Kartları --- */
.imar-hero {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.imar-hero-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-2026, 20px);
    padding: 14px 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.imar-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}
.imar-hero-card-icon {
    font-size: 1.1rem;
    color: #6366f1;
    margin-bottom: 4px;
}
.imar-hero-card-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}
.imar-hero-card-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* --- 5'li Hero Grid (İmar Durumu Tab) --- */
.imar-hero-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.imar-hero-card-v2 {
    background: linear-gradient(135deg, #f8fafc 0%, var(--bg-primary, #f8fafc) 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 8px 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 110px;
}
.imar-hero-card-v2::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 14px 14px 0 0;
}
.imar-hero-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}
.imar-hero-card-icon-v2 {
    font-size: 1.2rem;
    color: #6366f1;
    margin-bottom: 6px;
}
.imar-hero-card-value-v2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
    word-break: break-word;
}
.imar-hero-card-value-v2.imar-hero-card-value-sm {
    font-size: 0.95rem;
    font-weight: 700;
}
.imar-hero-card-label-v2 {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}
.imar-hero-card-sub {
    font-size: 0.7rem;
    color: #6366f1;
    font-weight: 600;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #e2e8f0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 3.9em;
}
/* Primary vurgulu kart (fonksiyon) */
.imar-hero-card-v2--primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #4f46e5;
    color: #fff;
}
.imar-hero-card-v2--primary::before {
    background: linear-gradient(90deg, #a5b4fc, #c7d2fe);
}
.imar-hero-card-v2--primary .imar-hero-card-icon-v2 { color: rgba(255,255,255,0.85); }
.imar-hero-card-v2--primary .imar-hero-card-value-v2 { color: #fff; }
.imar-hero-card-v2--primary .imar-hero-card-label-v2 { color: rgba(255,255,255,0.75); }
.imar-hero-card-v2--primary .imar-hero-card-sub {
    color: rgba(255,255,255,0.85);
    border-top-color: rgba(255,255,255,0.25);
    font-size: 0.65rem;
    font-weight: 500;
}
.imar-hero-card-v2--primary:hover {
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}
/* Pastel mavi kart (Kat Adedi) */
.imar-hero-card-v2--blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}
.imar-hero-card-v2--blue::before { background: linear-gradient(90deg, #60a5fa, #93c5fd); }
.imar-hero-card-v2--blue .imar-hero-card-icon-v2 { color: #285d77; }
.imar-hero-card-v2--blue .imar-hero-card-value-v2 { color: #1e40af; }
.imar-hero-card-v2--blue .imar-hero-card-sub { color: #285d77; border-top-color: #bfdbfe; }
.imar-hero-card-v2--blue:hover { box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03)); }
/* Pastel yeşil kart (TAKS) */
.imar-hero-card-v2--green {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}
.imar-hero-card-v2--green::before { background: linear-gradient(90deg, #4ade80, #86efac); }
.imar-hero-card-v2--green .imar-hero-card-icon-v2 { color: #16a34a; }
.imar-hero-card-v2--green .imar-hero-card-value-v2 { color: #166534; }
.imar-hero-card-v2--green .imar-hero-card-sub { color: #16a34a; border-top-color: #bbf7d0; }
.imar-hero-card-v2--green:hover { box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03)); }
/* Pastel amber kart (KAKS) */
.imar-hero-card-v2--amber {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}
.imar-hero-card-v2--amber::before { background: linear-gradient(90deg, #fbbf24, #fcd34d); }
.imar-hero-card-v2--amber .imar-hero-card-icon-v2 { color: #d97706; }
.imar-hero-card-v2--amber .imar-hero-card-value-v2 { color: #92400e; }
.imar-hero-card-v2--amber .imar-hero-card-sub { color: #d97706; border-top-color: #fde68a; }
.imar-hero-card-v2--amber:hover { box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03)); }
/* Pastel pembe kart (İmar Şekli) */
.imar-hero-card-v2--rose {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: #fecdd3;
}
.imar-hero-card-v2--rose::before { background: linear-gradient(90deg, #fb7185, #fda4af); }
.imar-hero-card-v2--rose .imar-hero-card-icon-v2 { color: #e11d48; }
.imar-hero-card-v2--rose .imar-hero-card-value-v2 { color: #9f1239; }
.imar-hero-card-v2--rose .imar-hero-card-sub { color: #e11d48; border-top-color: #fecdd3; }
.imar-hero-card-v2--rose:hover { box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03)); }
/* Fetch status badge küçük köşe */
.imar-hero-card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
}
.imar-hero-card-badge .imar-status-badge {
    font-size: 0.58rem;
    padding: 2px 6px;
}

/* Sağ kenar çubuğu: imar kartları üst, lejant alt (modal içinde) */
.schema-right-sidebar {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    justify-content: flex-end;
    padding-bottom: 20px;
    gap: 0;
}

/* --- Görsel Bölümü --- */
.imar-visual {
    position: relative;
    border-radius: var(--radius-2026, 20px);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
    background: var(--bg-primary, #f8fafc);
    min-height: 120px;
}
.imar-visual img {
    width: 100%;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}
/* İmar Çizimi Viewer: zoom + pan */
.imar-drawing-viewer { overflow: visible; }
.imar-drawing-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 3px;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}
.imar-drawing-zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #475569;
    transition: background 0.15s ease, color 0.15s ease;
}
.imar-drawing-zoom-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.imar-drawing-scroll-area {
    overflow: hidden;
    max-height: 420px;
    border-radius: var(--radius-2026, 20px);
    transition: max-height 0.3s ease;
}
.imar-drawing-scroll-area.is-zoomed {
    overflow: auto;
    cursor: grab;
    max-height: 480px;
}
.imar-drawing-scroll-area.is-zoomed:active { cursor: grabbing; }
.imar-drawing-img {
    width: 100%;
    max-width: 100%;
    display: block;
    transition: width 0.25s ease;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.imar-visual-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15,23,42,0.75);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}
.imar-visual-html {
    font-size: 12px;
    padding: 14px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}
.imar-visual--ready {
    border-color: #c7d2fe;
    background: #fafbff;
}
.imar-visual-note {
    margin-bottom: 12px;
}

/* --- Skeleton / Shimmer Loading --- */
.imar-skeleton {
    height: 180px;
    border-radius: var(--radius-2026, 20px);
    margin-bottom: 14px;
    background: linear-gradient(90deg, #e2e8f0 25%, var(--bg-primary, #f8fafc) 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: imarShimmer 1.8s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
}
@keyframes imarShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Accordion Bölümleri --- */
.imar-section {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-2026, 20px);
    margin-bottom: 8px;
    overflow: hidden;
    background: #fff;
}
.imar-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    text-align: left;
    transition: background 0.15s ease;
}
.imar-section-toggle:hover { background: #f8fafc; }
.imar-section-toggle i:first-child { color: #6366f1; font-size: 0.95rem; }
.imar-section-chevron {
    margin-left: auto;
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.25s ease;
}
.imar-section.is-open .imar-section-chevron { transform: rotate(180deg); }
.imar-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.imar-section.is-open .imar-section-body { max-height: 800px; }
.imar-section-inner { padding: 0 14px 14px; }
.imar-section-alert-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    margin-left: 4px;
    flex-shrink: 0;
}

/* --- Key-Value Satırları --- */
.imar-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-primary, #f8fafc);
    font-size: 0.85rem;
    line-height: 1.5;
}
.imar-row:last-child { border-bottom: none; }
.imar-row-label {
    color: #1746a2;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 16px;
    min-width: 120px;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}
.imar-row-value {
    color: #334155;
    font-weight: 400;
    text-align: right;
    word-break: break-word;
    font-size: 0.85rem;
}

/* --- Kısıtlama Alert Kutusu --- */
.imar-restriction {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: #991b1b;
    line-height: 1.4;
}
.imar-restriction i { color: #ef4444; flex-shrink: 0; margin-top: 2px; }

/* --- Mavi Bullet'lı Not Listesi --- */
.imar-notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.imar-notes-list li {
    position: relative;
    padding: 4px 0 4px 16px;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.4;
}
.imar-notes-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
}

/* --- Boş / Hata Durumu --- */
.imar-empty-state {
    text-align: center;
    padding: 32px 20px;
}
.imar-empty-state-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
    opacity: 0.7;
}
.imar-empty-state-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}
.imar-empty-state-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.4;
}

/* --- Parsel Paywall Banner --- */
.parcel-paywall-banner {
    text-align: center;
    padding: 28px 20px;
    margin: 12px 0;
    border-radius: var(--radius-2026, 20px);
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf8 100%);
    border: 1px solid #c7d2fe;
}
.parcel-paywall-icon {
    font-size: 2.2rem;
    color: #6366f1;
    margin-bottom: 10px;
    opacity: 0.85;
}
.parcel-paywall-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #312e81;
    margin-bottom: 6px;
}
.parcel-paywall-desc {
    font-size: 0.82rem;
    color: #4b5563;
    max-width: 340px;
    margin: 0 auto 8px;
    line-height: 1.45;
}

/* --- Parsel Erişim Uyarı Banner --- */
.parcel-access-alert {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-left: 4px solid #d97706;
    border-radius: var(--radius-2026, 20px);
    padding: 16px 18px;
}
.parcel-access-alert-icon {
    font-size: 1.8rem;
    color: #b45309;
    flex-shrink: 0;
    margin-top: 2px;
}
.parcel-access-alert-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #78350f;
    margin-bottom: 6px;
}
.parcel-access-alert-desc {
    font-size: 0.82rem;
    color: #92400e;
    line-height: 1.5;
}

/* --- Tam Ekran Zoom Overlay --- */
.imar-zoom-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 10100;
    background: rgba(0,0,0,0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: imarFadeIn 0.25s ease-out;
}
.imar-zoom-overlay img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    object-fit: contain;
}

/* --- Responsive: Tablet --- */
@media (max-width: 992px) {
    .imar-hero-grid { grid-template-columns: repeat(3, 1fr); }
}
/* --- Responsive: Mobil --- */
@media (max-width: 576px) {
    .imar-hero { grid-template-columns: repeat(2, 1fr); }
    .imar-hero-card:last-child:nth-child(odd) { grid-column: span 2; }
    .imar-hero-grid { grid-template-columns: repeat(2, 1fr); }
    .imar-hero-card-value { font-size: 1.15rem; }
    .imar-hero-card-value-v2 { font-size: 1.1rem; }
    .imar-hero-card-value-v2.imar-hero-card-value-sm { font-size: 0.85rem; }
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .imar-fade-in { animation: none; }
    .imar-skeleton { animation: none; background: #e2e8f0; }
    .imar-section-body { transition: none; }
    .imar-hero-card { transition: none; }
    .imar-section-chevron { transition: none; }
}

.maps-boundary-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* =========================================================
   Map workspace polish
   ========================================================= */

.map-page-shell .map-wrapper {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0)),
        var(--bg-primary, #f8fafc);
}

.map-sidebar-intro {
    margin-bottom: 1rem;
}

.map-sidebar-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    margin-bottom: 0.7rem;
    border-radius: var(--radius-2026-btn, 14px);
    background: rgba(37, 99, 235, 0.08);
    color: #285d77;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.map-sidebar-title {
    margin: 0 0 0.45rem;
    color: #23313b;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

.map-sidebar-title-row {
    display: flex !important;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.6rem;
    width: 100%;
}

.map-sidebar-title-row .map-sidebar-title {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.map-sidebar-saved-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-2026, 20px);
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.map-sidebar-saved-btn i,
.map-sidebar-saved-btn .bi {
    color: #d97706;
    line-height: 1;
}

.map-sidebar-saved-btn:hover,
.map-sidebar-saved-btn:focus-visible {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    outline: none;
}

.map-sidebar-saved-btn:hover i,
.map-sidebar-saved-btn:hover .bi,
.map-sidebar-saved-btn:focus-visible i,
.map-sidebar-saved-btn:focus-visible .bi {
    color: #b45309;
}

.map-sidebar-saved-btn:active {
    transform: translateY(1px);
}

.map-sidebar-saved-btn .badge {
    font-size: 0.62rem;
}

/* Parseli Bul yanındaki minimal "Sonuçları Güncelle" ikon butonu */
.map-sidebar-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    padding: 0;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--radius-2026-btn, 14px);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.62));
    color: #285d77;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.map-sidebar-refresh-btn:hover,
.map-sidebar-refresh-btn:focus-visible {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(191, 219, 254, 0.72));
    border-color: rgba(37, 99, 235, 0.34);
    color: #1e40af;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    outline: none;
}

.map-sidebar-refresh-btn:active {
    transform: translateY(1px);
}

.map-sidebar-refresh-btn[disabled],
.map-sidebar-refresh-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Parsel sorgu geçmişi (Parseli Bul altında) */
.parcel-history-section {
    margin-top: 0.9rem;
    padding: 0;
    border: 1px solid rgba(135, 158, 184, 0.22);
    border-radius: var(--radius-2026, 20px);
    background:
        linear-gradient(135deg, rgba(232, 242, 248, 0.74), rgba(232, 246, 243, 0.62)),
        rgba(255, 255, 255, 0.92);
    overflow: hidden;
}

.parcel-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 46px;
    padding: 0.72rem 0.86rem;
    cursor: pointer;
    list-style: none;
}

.parcel-history-summary::-webkit-details-marker {
    display: none;
}

.parcel-history-summary .map-sidebar-label {
    margin: 0;
    color: #214d66;
}

.parcel-history-summary-icon {
    flex: 0 0 auto;
    color: #5f6f86;
    font-size: 0.85rem;
    transition: transform 0.18s ease;
}

.parcel-history-section[open] .parcel-history-summary {
    border-bottom: 1px solid rgba(135, 158, 184, 0.18);
}

.parcel-history-section[open] .parcel-history-summary-icon {
    transform: rotate(180deg);
}

.parcel-history-body {
    padding: 0.72rem 0.78rem 0.82rem;
}

.parcel-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.parcel-history-helper {
    min-width: 0;
    color: var(--map-muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.parcel-history-refresh {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.parcel-history-refresh:hover,
.parcel-history-refresh:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    color: #285d77;
    outline: none;
}

.parcel-history-refresh.is-spinning i {
    animation: parcelHistorySpin 0.8s linear infinite;
}

@keyframes parcelHistorySpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.parcel-history-list {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.parcel-history-items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.parcel-history-list::-webkit-scrollbar {
    width: 6px;
}

.parcel-history-list::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.45);
    border-radius: 3px;
}

.parcel-history-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-2026, 20px);
    background: #fff;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.parcel-history-item:hover,
.parcel-history-item:focus-within {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.04);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    outline: none;
}

.parcel-history-item__select {
    all: unset;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
    border-radius: 10px;
}

.parcel-history-item__select:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

.parcel-history-item__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: #285d77;
    font-size: 0.85rem;
}

.parcel-history-item__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.parcel-history-item__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #23313b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.parcel-history-item__meta {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.parcel-history-item__count {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-2026-btn, 14px);
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
}

.parcel-history-item__remove {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.parcel-history-item__remove:hover,
.parcel-history-item__remove:focus-visible {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    outline: none;
}

.parcel-history-empty {
    padding: 0.8rem 0.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
}

.parcel-history-sentinel {
    height: 1px;
    width: 100%;
}

.parcel-history-status {
    margin-top: 0.4rem;
    min-height: 1em;
}

.parcel-search-help-panel {
    margin-top: 0.65rem;
    padding: 0.76rem 0.82rem;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: var(--radius-2026, 20px);
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(236, 253, 245, 0.72)),
        #fff;
    color: #334155;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.parcel-search-help-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 800;
    color: #0f766e;
    margin-bottom: 0.38rem;
}

.parcel-search-help-list {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.32rem;
    font-size: 0.72rem;
    line-height: 1.35;
}

.parcel-location-fieldset {
    min-inline-size: 0;
    padding: 0;
    border: 0;
}

.parcel-location-fieldset > .map-sidebar-label {
    float: none;
    width: auto;
}

.parcel-field-label {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    margin: 0 0 0.34rem 0.15rem;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.2;
}

.parcel-field-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--map-blue-soft), var(--map-teal-soft));
    color: #214d66;
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
}

.parcel-field-optional {
    margin-left: auto;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 650;
}

.parcel-field-required {
    margin-left: auto;
    padding: 0.12rem 0.38rem;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.92);
    color: #1e40af;
    font-size: 0.64rem;
    font-weight: 750;
    line-height: 1.2;
}

.map-sidebar-label.parcel-building-name-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parcel-search-field {
    min-width: 0;
}

.parcel-location-status,
.parcel-search-status {
    min-height: 1.2rem;
    margin: 0.48rem 0 0;
    color: #5f6f86;
    font-size: 0.72rem;
    line-height: 1.35;
}

.parcel-search-status[data-state="ready"],
.parcel-search-status[data-state="success"],
.parcel-location-status[data-state="ready"] {
    color: #0f766e;
}

.parcel-search-status[data-state="loading"],
.parcel-location-status[data-state="loading"] {
    color: #285d77;
    font-weight: 700;
}

.parcel-search-status[data-state="warning"],
.parcel-location-status[data-state="warning"] {
    color: #8a5a12;
    font-weight: 700;
}

.parcel-search-status[data-state="error"],
.parcel-location-status[data-state="error"] {
    color: #b4232f;
    font-weight: 700;
}

#buildingSearchStatus {
    min-height: 1.2rem;
    line-height: 1.35;
}

#buildingSearchStatus[data-state="ready"] {
    color: #0f766e !important;
}

#buildingSearchStatus[data-state="error"] {
    color: #b4232f !important;
    font-weight: 700;
}

#btnBinaAdiIleBul[aria-busy="true"] {
    cursor: progress;
}

#btnBinaAdiIleBul[aria-busy="true"] + #buildingSearchStatus {
    color: #285d77 !important;
    font-weight: 700;
}

.map-sidebar-section:has(
    #buildingSearchStatus[data-state="error"]
) #filterBinaAdi {
    border-color: rgba(180, 35, 47, 0.58) !important;
    box-shadow: 0 0 0 4px rgba(180, 35, 47, 0.09) !important;
}

.parcel-search-cancel {
    flex: 0 0 auto;
    min-width: 6.25rem;
    border: 1px solid rgba(180, 35, 47, 0.28);
    background: rgba(255, 255, 255, 0.94);
    color: #9f2430;
    font-weight: 750;
    box-shadow: 0 6px 18px rgba(100, 30, 38, 0.08);
}

.parcel-search-cancel:hover {
    border-color: rgba(180, 35, 47, 0.48);
    background: #fff5f5;
    color: #861c27;
}

.parcel-search-cancel:focus-visible {
    outline: 3px solid #b4232f;
    outline-offset: 2px;
}

@media (max-width: 380px) {
    .parcel-search-cancel {
        min-width: auto;
        padding-inline: 0.8rem;
    }
}

.parcel-location-status[data-state="empty"] {
    color: #8a5a12;
}

.map-sidebar-input[aria-invalid="true"] {
    border-color: rgba(180, 35, 47, 0.58) !important;
    box-shadow: 0 0 0 4px rgba(180, 35, 47, 0.09) !important;
}

.map-sidebar-tab:focus-visible,
.parcel-inner-tabs .nav-link:focus-visible,
.parcel-history-summary:focus-visible,
.map-sidebar-link:focus-visible {
    outline: 2px solid #2f6f8f;
    outline-offset: 2px;
}

.parcel-search-fields,
.parcel-search-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 0.5rem;
    align-items: stretch;
}

.map-page-shell .parcel-search-actions {
    /* Durdur düğmesi yalnız aktif sorguda görünür. Üçüncü açık sütun yardım
       düğmesini yeni satıra düşürmeden iki durumda da aynı ritmi korur. */
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.parcel-search-fields .map-sidebar-input {
    width: 100%;
}

#mapFilterForm[aria-busy="true"] .parcel-search-field,
#mapFilterForm[aria-busy="true"] .parcel-location-fieldset {
    cursor: progress;
}

.parcel-candidate-context-note {
    border-radius: 8px;
    line-height: 1.45;
}

.map-sidebar-refresh-btn.is-active {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.98), rgba(204, 251, 241, 0.72));
    color: #0f766e;
    border-color: rgba(20, 184, 166, 0.35);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.parcel-map-verification-toast {
    position: fixed;
    right: 88px;
    bottom: 250px;
    z-index: 1033;
    width: min(360px, calc(100vw - 40px));
    display: grid;
    grid-template-columns: 32px 1fr 24px;
    align-items: start;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(239, 246, 255, 0.88)),
        rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(34, 197, 94, 0.22);
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.parcel-map-verification-toast__icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-2026-btn, 14px);
    background: rgba(34, 197, 94, 0.11);
    color: #16a34a;
}

.parcel-map-verification-toast.is-approximate {
    background:
        linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(239, 246, 255, 0.86)),
        rgba(255, 255, 255, 0.96);
    border-color: rgba(245, 158, 11, 0.26);
}

.parcel-map-verification-toast.is-approximate .parcel-map-verification-toast__icon {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.parcel-map-verification-toast__title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #23313b;
    line-height: 1.22;
}

.parcel-map-verification-toast__text {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.parcel-map-verification-toast__close {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #94a3b8;
    line-height: 1;
}

.parcel-map-verification-toast__close:hover,
.parcel-map-verification-toast__close:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    outline: none;
}

/* Parsel sorgusundaki kompakt ikon düğmeleri tarayıcının varsayılan odağını
   sıfırlıyor; görünür, yüksek-kontrast halka klavye konumunu geri kazandırır. */
.map-sidebar-refresh-btn:focus-visible,
.parcel-history-refresh:focus-visible,
.parcel-history-item__remove:focus-visible,
.parcel-map-verification-toast__close:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}

.map-sidebar-refresh-btn,
.parcel-history-refresh,
.parcel-history-item__remove,
.parcel-map-verification-toast__close,
.parcel-search-cancel {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 575.98px) {
    .parcel-map-verification-toast {
        left: 12px;
        right: 12px;
        bottom: 210px;
        width: auto;
    }
}

@media (max-width: 767.98px) {
    .map-sidebar-input,
    .map-sidebar-select {
        font-size: 16px !important;
    }

    .parcel-search-fields {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .parcel-location-status,
    .parcel-search-status {
        font-size: 0.78rem;
    }
}

@media (max-width: 359.98px) {
    .parcel-search-fields {
        grid-template-columns: 1fr;
    }

    .map-page-shell .parcel-search-actions:has(
        .parcel-search-cancel:not([hidden])
    ) {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .map-page-shell .parcel-search-actions:has(
        .parcel-search-cancel:not([hidden])
    ) #btnParseliBul {
        grid-column: 1 / -1;
    }

    .map-page-shell .parcel-search-actions:has(
        .parcel-search-cancel:not([hidden])
    ) .parcel-search-cancel {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }

    .map-page-shell .parcel-search-actions:has(
        .parcel-search-cancel:not([hidden])
    ) .map-sidebar-refresh-btn {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (pointer: coarse) {
    .map-sidebar-tab,
    .parcel-inner-tabs .nav-link,
    .map-sidebar-refresh-btn,
    .parcel-history-summary {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .parcel-history-refresh.is-spinning i {
        animation: none !important;
    }

    .map-sidebar-refresh-btn,
    .parcel-search-cancel,
    .parcel-history-summary-icon,
    .parcel-history-item,
    .parcel-history-refresh,
    .parcel-history-item__remove,
    .parcel-map-verification-toast__close {
        transition: none !important;
    }
}

.map-sidebar-summary {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.55;
}

.map-sidebar-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.map-sidebar-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.65rem;
    border-radius: var(--radius-2026-btn, 14px);
    background: rgba(15, 23, 42, 0.05);
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
}

.map-sidebar-tabs {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 0.12rem !important;
    border: 1px solid rgba(148, 163, 184, 0.16);
    /* Near-opaque (0.86) already; drop backdrop-filter so sticky-scroll doesn't
       force a blur raster layer for an effect that's barely visible under it. */
    background: rgba(248, 250, 252, 0.97) !important;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.map-sidebar-tab {
    min-height: 24px;
    padding-top: 0.1rem !important;
    padding-bottom: 0.1rem !important;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    border: 1px solid transparent;
    line-height: 1.15;
}

.map-sidebar-tab.active {
    background: linear-gradient(135deg, var(--map-blue-soft), var(--map-teal-soft)) !important;
    color: #214d66 !important;
    border-color: rgba(47, 111, 143, 0.24) !important;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.layer-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.layer-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-2026, 20px);
    background: #f8fafc;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        opacity 0.15s ease;
    opacity: 0.82;
}

.layer-chip:hover {
    border-color: rgba(47, 111, 143, 0.35);
    background: #fff;
}

.layer-chip.is-active {
    background: linear-gradient(135deg, var(--map-blue-soft), var(--map-teal-soft));
    border-color: rgba(47, 111, 143, 0.42);
    color: #214d66;
    opacity: 1;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.layer-chip-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: grayscale(1);
    transition: filter 0.15s ease;
}

.layer-chip.is-active .layer-chip-icon {
    filter: none;
}

.layer-chip-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.map-sidebar-input,
.map-sidebar-select {
    min-height: 46px;
    border-radius: var(--radius-2026, 20px);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: none;
}

.map-sidebar-input:focus,
.map-sidebar-select:focus {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.map-sidebar-btn {
    min-height: 46px;
    font-weight: 700;
}

.map-sidebar-label {
    display: block;
    margin-top: 0;
    margin-bottom: 0.55rem;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.map-sidebar-hint {
    margin-bottom: 0.6rem;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
}

.map-inline-switch {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    color: #334155;
    font-size: 0.88rem;
}

.map-inline-switch .form-check-input {
    flex: 0 0 auto;
    margin-left: 0;
}

.verified-switch {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.7);
}

@media (max-width: 767.98px) {
    .map-page-shell {
        margin: 0 !important;
        padding: 0 !important;
        /* Eski değer (100dvh - 65px) SABİT alt-nav'ı (64px + safe-area) hesaba
           katmıyordu → haritanın alt 64-98px'i opak nav'ın ARKASINDA kalıyordu:
           oradaki pinler tıklanamıyor, ısı-haritası lejandı hiç görünmüyordu.
           Ayrıca çentikli cihazlarda safe-area-top taşma/rubber-band yapıyordu. */
        height: calc(100vh
            - 64px - env(safe-area-inset-top, 0px)
            - 64px - env(safe-area-inset-bottom, 0px));
        height: calc(100dvh
            - 64px - env(safe-area-inset-top, 0px)
            - 64px - env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
    }

    .map-page-shell .map-wrapper {
        height: 100% !important;
        min-height: 0;
        width: 100%;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    /* [REMOVED] Eski .map-page-shell .map-sidebar bottom-drawer + hover-to-open kuralları —
       artık centered modal (yukarıdaki @media block 405) kullanılıyor.
       Sadece toggle butonunu ve tab/typography'yi tutuyoruz. */

    .map-page-shell .sidebar-toggle {
        display: none !important;
    }

    /* Mobile top-right toggle FAB — search FAB ile aynı hizada */
    .map-mobile-controls-fab {
        position: absolute;
        top: 16px;
        right: 12px;
        z-index: 1002;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 242, 248, 0.9)),
            #fff;
        border: 1px solid var(--map-border);
        box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
        color: var(--map-blue);
        font-size: 1.05rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .map-mobile-controls-fab:active {
        transform: scale(0.94);
    }
    .map-mobile-controls-fab[aria-expanded="true"] {
        background: linear-gradient(135deg, var(--map-blue-soft), var(--map-teal-soft));
        color: #214d66;
    }

    /* Kontrol butonları — FAB'ın altında dikey kolon, varsayılan kapalı */
    .map-page-shell .custom-map-controls {
        top: 70px !important; /* FAB'ın (48px + 12px top + 10px gap) altında */
        right: 12px !important;
        bottom: auto !important;
        left: auto !important;
        /* 8 buton × 44px (coarse tap-target) + ayraçlar ≈ 470px. Kısa
           telefonlarda (SE/667px) son butonlar ("Yakınımdakileri Ara" dahil)
           alt-nav'ın arkasına düşüyor ve .map-wrapper overflow:hidden olduğu
           için ERİŞİLEMEZ oluyordu. Panel kendi içinde kaydırılabilir olsun. */
        max-height: calc(100% - 90px) !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        gap: 0.45rem !important;
        padding: 0.35rem !important;
        border-radius: 18px !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.9)),
            var(--map-surface) !important;
        border: 1px solid var(--map-border) !important;
        box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03)) !important;
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1) !important;
    }
    /* Mobilde varsayılan kapalı durum */
    .map-page-shell .custom-map-controls.controls-collapsed-mobile {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(120%) !important;
    }

    .map-page-shell .map-sidebar-tabs {
        margin-bottom: 1rem !important;
    }

    .map-page-shell .map-sidebar-title {
        font-size: 1rem;
    }

    .map-page-shell .map-sidebar-summary {
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    /* [REMOVED] Eski .map-page-shell .map-sidebar bottom-drawer override.
       Centered modal kullanıldığı için artık gereksiz. */

    .map-page-shell .map-sidebar-chip-row {
        gap: 0.35rem;
    }

    .map-page-shell .map-sidebar-chip {
        font-size: 0.68rem;
    }

    .map-page-shell .map-sidebar-tabs {
        gap: 0.35rem !important;
    }
}

/* --- Heatmap Legend --- */
.map-heatmap-legend {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    z-index: 10;
    font-size: 12px;
    pointer-events: none;
}
.map-heatmap-legend .legend-title {
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
}
.map-heatmap-legend .legend-bar {
    width: 200px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(255, 200, 100, 0.5) 0%,
        rgba(255, 130, 50, 0.7) 50%,
        #E65100 100%);
}
.map-heatmap-legend .legend-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
}

.lifecycle-completed-ico {
    color: #8E24AA;
}

/* Floating lifecycle filter bar — harita üstünde ortalı pill grubu.
   z<15.5'te polygon görünmediği için bar da JS tarafından gizlenir
   (.lifecycle-bar-hidden). */
.map-lifecycle-bar {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 1;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.map-lifecycle-bar.lifecycle-bar-hidden,
.map-lifecycle-bar.lifecycle-bar-tab-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-6px);
}

.lifecycle-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: var(--radius-2026-btn, 14px);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.1;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s, background-color 0.15s;
}

.lifecycle-pill:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-soft, 0 12px 36px rgba(15, 23, 42, 0.03));
}

.lifecycle-pill:not(.active) {
    /* De-emphasise the "off" state via the pale fill + dimmed icon, not a low
       label opacity — #94a3b8 dimmed failed WCAG AA (4.5:1). #64748b at full
       opacity stays clearly "off" against active colored pills while readable. */
    opacity: 1;
    background: #f8fafc;
    color: #64748b;
}

.lifecycle-pill:not(.active) .lifecycle-pill-icon {
    opacity: 0.45;
}

.lifecycle-pill-icon {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
}

.lifecycle-pill-1 .lifecycle-pill-icon { color: #EF9A9A; }
.lifecycle-pill-2 .lifecycle-pill-icon { color: #81C784; }
.lifecycle-pill-3 .lifecycle-pill-icon { color: #FB8C00; }
.lifecycle-pill-4 .lifecycle-pill-icon { color: #64B5F6; }
.lifecycle-pill-5 .lifecycle-pill-icon { color: #BDBDBD; }
.lifecycle-pill-6 .lifecycle-pill-icon { color: #8D6E63; }


/* ── Lifecycle bar — Mobil/Tablet (≤767px): FAB'ların altında, yatay scroll ── */
@media (max-width: 767.98px) {
    .map-lifecycle-bar {
        /* Yükseklik 50px, dikey merkezi FAB'larla aynı (36px) → top = 36 - 25 = 11px */
        top: 11px !important;
        left: 50%;
        transform: translateX(-50%);
        height: 50px;
        align-items: center;
        gap: 4px;
        padding: 0 6px;
        max-width: calc(100vw - 120px); /* sol/sağ 40px FAB (12+40) + boşluk için 60px */
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .map-auth-access-notice + .map-lifecycle-bar {
        /* Mobil bildirim iki satıra sarılabildiği için sabit 50px toolbar'ı
           bildirimin altına güvenli bir boşlukla yerleştir. */
        top: 68px !important;
    }
    .map-lifecycle-bar::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .lifecycle-pill {
        padding: 4px 9px;
        font-size: 0.72rem;
        gap: 4px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .lifecycle-pill-icon {
        font-size: 0.9rem;
    }
}

/* ── Lifecycle bar — Küçük mobil (≤480px): icon-only ── */
@media (max-width: 480px) {
    .map-lifecycle-bar {
        max-width: calc(100vw - 120px);
        padding: 0 5px;
        gap: 3px;
    }
    .lifecycle-pill {
        padding: 6px 9px;
        gap: 0;
        min-width: 36px;
        justify-content: center;
    }
    /* Etiketleri gizle, sadece icon kalsın */
    .lifecycle-pill .lifecycle-pill-label {
        display: none;
    }
    .lifecycle-pill-icon {
        font-size: 1.1rem;
    }
}

/* ── Yıllık Uydu Zaman Tüneli (geçmiş sekmesi slider) ── */
.parcel-yearlapse {
    container-type: inline-size;
    min-width: 0;
}
.yearlapse-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: #5b6772;
}
.yearlapse-summary span {
    border-radius: 999px;
    background: #f1f4f6;
    padding: 4px 9px;
}
.yearlapse-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #dfe4e8;
    border: 1px solid #d3dae0;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.yearlapse-frame:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: -3px;
    box-shadow: none;
}
.yearlapse-frame img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    background: #dfe4e8;
    -webkit-user-drag: none;
}
.yearlapse-frame img.yearlapse-swap { animation: yearlapse-fade .16s ease; }
@keyframes yearlapse-fade { from { opacity: .5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .yearlapse-frame img.yearlapse-swap { animation: none; }
}
.yearlapse-img-b { position: absolute; inset: 0; }
/* Oynatıcı geçişi: önceki kare üstte 300 ms'de söner (yıl etiketi z-index 4). */
.yearlapse-frame img.yearlapse-img-prev {
    position: absolute; inset: 0;
    z-index: 1;
    opacity: 1;
    transition: opacity .3s ease;
    pointer-events: none;
}
.yearlapse-frame img.yearlapse-img-prev.is-fading { opacity: 0; }
.yearlapse-frame img.yearlapse-img-prev[hidden] { display: none; }
.yearlapse-frame.is-compare img.yearlapse-img-prev { display: none; }
@media (prefers-reduced-motion: reduce) {
    .yearlapse-frame img.yearlapse-img-prev { transition: none; }
}
.yearlapse-divider {
    position: absolute; top: 0; bottom: 0; left: 62%; width: 0;
    border-left: 2px solid rgba(255, 255, 255, .92);
    box-shadow: 0 0 6px rgba(0, 0, 0, .4);
    cursor: ew-resize;
    touch-action: none;
    z-index: 5;
}
.yearlapse-divider-grip {
    position: absolute; top: 50%; left: 0;
    transform: translate(-50%, -50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255, 255, 255, .94); color: #14181d;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.yearlapse-divider:focus-visible .yearlapse-divider-grip {
    outline: 3px solid #9a3e00;
    outline-offset: 2px;
}
.yearlapse-year {
    position: absolute; top: 10px; right: 12px;
    font-weight: 700; font-size: 1.6rem; line-height: 1;
    color: #fff;
    background: rgba(15, 23, 42, .82);
    border-radius: 6px;
    padding: 4px 6px;
    font-variant-numeric: tabular-nums;
    z-index: 4;
    pointer-events: none;
}
.yearlapse-frame.is-compare .yearlapse-year { left: 12px; right: auto; }
.yearlapse-frame.is-compare .yearlapse-year--b { left: auto; right: 12px; }
.yearlapse-frame.is-compare .yearlapse-stage { display: none; }
.yearlapse-stage {
    position: absolute; top: 10px; left: 12px;
    z-index: 4;
    pointer-events: none;
}
.yearlapse-stage .badge { font-size: .72rem; padding: .35em .6em; }
.yearlapse-meta {
    position: absolute; left: 12px; bottom: 10px;
    background: rgba(255,255,255,.88); color: #14181d;
    font-size: .74rem; padding: .28em .6em; border-radius: 7px;
    backdrop-filter: blur(3px);
    z-index: 4;
    pointer-events: none;
}
.yearlapse-qual {
    position: absolute; right: 12px; bottom: 10px;
    background: rgba(15, 23, 42, .86); color: #fff;
    font-size: .72rem; padding: .28em .6em; border-radius: 7px;
    max-width: 46%; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 4;
    pointer-events: none;
}
.yearlapse-frame.is-compare .yearlapse-qual { display: none; }
.yearlapse-spin {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #5b6772;
    background: rgba(223, 228, 232, .35);
    z-index: 3;
    pointer-events: none;
}
.yearlapse-spin[hidden] {
    display: none !important;
}
.yearlapse-image-error {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #3c454d;
    background: rgba(241, 244, 246, .96);
}
.yearlapse-image-error[hidden] {
    display: none !important;
}
.yearlapse-range {
    width: 100%; margin-top: 8px; accent-color: #c75b00; min-height: 44px;
    cursor: pointer;
    touch-action: pan-x;
}
.yearlapse-band {
    display: flex;
    gap: 4px;
    min-height: 34px;
    margin-top: 2px;
    padding: 4px 2px 6px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.yearlapse-band-cell {
    flex: 1 0 24px; min-width: 24px; min-height: 24px; border-radius: 4px;
    cursor: pointer; position: relative; border: 0; padding: 0;
}
.yearlapse-band-cell:hover { filter: brightness(.9); }
.yearlapse-band-cell:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}
.yearlapse-band-cell.active {
    box-shadow: 0 0 0 2px rgba(20, 24, 29, .28),
        inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.yearlapse-band-cell--chg::after {
    content: ""; position: absolute; top: -5px; left: 50%;
    transform: translateX(-50%);
    width: 7px; height: 7px; border-radius: 50%;
    background: #14181d; border: 1px solid #fff;
}
.yearlapse-ticks {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 2px;
    padding: 2px 0 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    font-size: .72rem;
    color: #5b6772;
    font-variant-numeric: tabular-nums;
}
.yearlapse-ticks button {
    appearance: none; border: 0; background: transparent; color: inherit;
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 32px;
    cursor: pointer; padding: 5px 6px; border-radius: 5px; font: inherit;
}
.yearlapse-ticks button:hover,
.yearlapse-ticks button:focus-visible { color: #1d4ed8; }
.yearlapse-ticks button:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: -2px;
}
.yearlapse-ticks button.active { color: #9a4200; font-weight: 700; }
.yearlapse-ticks button.yearlapse-tick-err {
    color: #b42318; text-decoration: line-through; opacity: 1;
}
.yearlapse-story {
    display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px;
    color: #5b6772;
}
.yearlapse-story-item {
    display: inline-flex; align-items: center; gap: 5px;
    min-height: 36px;
    font-weight: 600; color: #3c454d; white-space: normal;
    text-align: start;
    appearance: none; border: 0; background: transparent; border-radius: 6px;
    padding: 6px 8px; font-size: inherit;
}
.yearlapse-story-item:hover,
.yearlapse-story-item:focus-visible {
    color: #E8730C;
    background: rgba(232, 115, 12, .08);
}
.yearlapse-story-item:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 1px;
}
.yearlapse-dot {
    width: 9px; height: 9px; border-radius: 50%; display: inline-block;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
    flex-shrink: 0;
}
.yearlapse-frame.yearlapse-noimg {
    display: flex; align-items: center; justify-content: center;
}
.yearlapse-frame.yearlapse-noimg img[data-yl-img] { display: none; }
.yearlapse-frame.yearlapse-noimg::after {
    content: "";
    font-size: .8rem; color: #8b96a0;
}
.yearlapse-gap-note {
    margin-top: 8px;
    padding: 7px 9px;
    color: #5b6772;
    background: #f7f8f9;
    border-radius: 8px;
}
.yearlapse-collecting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 0;
}
@container (max-width: 420px) {
    .yearlapse-controls {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: 6px;
    }
    .yearlapse-controls .btn {
        min-width: 0;
        margin: 0 !important;
        border-radius: 7px !important;
    }
    .yearlapse-summary span {
        flex: 1 1 auto;
        text-align: center;
    }
    .yearlapse-band,
    .yearlapse-ticks { justify-content: flex-start; }
    .yearlapse-collecting {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Alt navigasyon yalnız oturum açmış kullanıcıda render edilir ve Bootstrap
   `d-lg-none` nedeniyle 992px'e kadar görünür. Shell yüksekliği aynı gerçek
   DOM sözleşmesini izler; misafirden hayali 64px düşmez, tablet haritası da
   auth alt-menüsünün arkasında kalmaz. Dosyanın sonunda yer alan bu blok
   önceki telefon/landscape kurallarının tek otoriter override'ıdır. */
@media (max-width: 991.98px) {
    body.map-dashboard-page {
        padding-bottom: 0 !important;
    }

    .map-page-shell {
        height: calc(100vh
            - 64px - env(safe-area-inset-top, 0px));
        height: calc(100dvh
            - 64px - env(safe-area-inset-top, 0px));
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .map-page-shell.map-page-shell--authenticated {
        height: calc(100vh
            - 64px - env(safe-area-inset-top, 0px)
            - 64px - env(safe-area-inset-bottom, 0px));
        height: calc(100dvh
            - 64px - env(safe-area-inset-top, 0px)
            - 64px - env(safe-area-inset-bottom, 0px));
    }

    .map-page-shell .map-wrapper {
        flex: 1 1 auto;
        height: 100% !important;
        min-height: 0;
    }
}

@media (max-width: 767.98px) {
    .map-auth-access-notice {
        top: 64px;
        right: 12px;
        left: 12px;
        max-width: none;
        transform: none;
    }

    .map-auth-access-notice + .map-lifecycle-bar {
        top: 116px !important;
    }

    .map-page-shell--guest .custom-map-controls {
        top: 176px !important;
        max-height: calc(100% - 196px) !important;
    }
}

/* Final visual authority: intentionally after all legacy responsive rules. */
.map-dashboard-page { background: var(--bg-primary, #f8fafc); }
.map-sidebar {
    top: 16px; left: 16px; width: 356px; max-height: calc(100% - 32px);
    padding: 22px; border: 1px solid rgba(100, 116, 139, .22);
    border-radius: var(--map-radius-panel); background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 48px rgba(15, 23, 42, .13);
}
.map-sidebar-kicker {
    gap: 7px; padding: 0; margin-bottom: 8px; border-radius: 0;
    background: transparent; color: var(--map-teal); font-size: .7rem;
    letter-spacing: .09em;
}
.map-sidebar-kicker::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%;
    background: var(--map-teal); box-shadow: 0 0 0 4px var(--map-teal-soft);
}
.map-sidebar-title {
    color: var(--map-ink); font-size: 1.18rem; line-height: 1.28;
    letter-spacing: -.018em;
}
.map-sidebar-saved-btn,
.map-advanced-filters-btn {
    width: 40px; height: 40px; border-radius: 12px !important;
    box-shadow: none !important;
}
.map-sidebar-tabs,
.parcel-inner-tabs {
    min-height: 44px; padding: 3px !important;
    border: 1px solid rgba(100, 116, 139, .18);
    border-radius: 14px !important; background: #f1f5f9 !important;
    box-shadow: none;
}
.map-sidebar-tab { min-height: 36px; border-radius: 11px !important; color: #526177; }
.map-sidebar-tab.active,
.parcel-inner-tabs .nav-link.active {
    border-color: rgba(47, 111, 143, .18) !important;
    background: #fff !important; color: #214d66 !important;
    box-shadow: 0 1px 5px rgba(15, 23, 42, .09) !important;
}
.parcel-location-fieldset {
    padding: 14px; border: 1px solid rgba(100, 116, 139, .16);
    border-radius: 16px; background: #f8fafc;
}
.map-sidebar-input,
.map-sidebar-select {
    min-height: 44px; border-color: rgba(100, 116, 139, .28);
    border-radius: 12px; background-color: #fff; color: var(--map-ink);
}
.map-sidebar-input:focus,
.map-sidebar-select:focus { border-color: var(--map-teal); box-shadow: var(--map-focus-ring); }
.map-sidebar-btn { min-height: 44px; border-radius: 12px !important; }
.map-sidebar-btn-primary {
    border-color: #214d66 !important; background: #285d77 !important;
    box-shadow: 0 8px 18px rgba(40, 93, 119, .22);
}
.map-sidebar-btn-primary:hover {
    border-color: #193e52 !important; background: #214d66 !important;
    box-shadow: 0 10px 22px rgba(40, 93, 119, .28);
}
.custom-map-controls {
    top: 72px; right: 16px; gap: 5px; padding: 6px;
    border: 1px solid rgba(100, 116, 139, .24); border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 30px rgba(15, 23, 42, .12);
}
.control-btn {
    width: 44px; height: 44px; border-color: transparent;
    border-radius: var(--map-radius-control); background: transparent;
    box-shadow: none; color: #42526a; font-size: 1.08rem;
}
.control-btn:hover {
    transform: none; border-color: rgba(47, 111, 143, .16);
    background: var(--map-blue-soft); box-shadow: none;
}
.control-btn.active {
    border-color: rgba(47, 129, 122, .22); background: var(--map-teal-soft);
    color: #205e59; box-shadow: none;
}
.control-btn:focus-visible,
.map-mobile-controls-fab:focus-visible,
.map-mobile-search-fab:focus-visible,
.lifecycle-pill:focus-visible,
.map-sidebar-saved-btn:focus-visible,
.map-advanced-filters-btn:focus-visible {
    outline: 2px solid var(--map-teal); outline-offset: 2px;
    box-shadow: var(--map-focus-ring) !important;
}
.map-mobile-controls-fab,
.map-mobile-search-fab {
    border-color: rgba(100, 116, 139, .24); border-radius: var(--map-radius-control);
    background: #fff; color: #285d77; box-shadow: 0 8px 22px rgba(15, 23, 42, .13);
}
#map-loader {
    gap: 8px; padding: 11px 16px; border: 1px solid rgba(100, 116, 139, .2);
    border-radius: 14px; background: #fff; color: var(--map-text);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .14); font-weight: 650;
}
.map-lifecycle-bar {
    gap: 4px; padding: 5px; border: 1px solid rgba(100, 116, 139, .22);
    border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
    backdrop-filter: none; -webkit-backdrop-filter: none;
}
.lifecycle-pill {
    min-height: 36px; gap: 6px; padding: 7px 12px; border-color: transparent;
    border-radius: 11px; background: transparent; color: #42526a;
    font-size: .76rem; font-weight: 650;
}
.lifecycle-pill:hover { background: #f8fafc; box-shadow: none; }
.lifecycle-pill.active.lifecycle-pill-1 { background: #fff1f2; color: #9f1239; }
.lifecycle-pill.active.lifecycle-pill-2 { background: #ecfdf5; color: #166534; }
.lifecycle-pill.active.lifecycle-pill-3 { background: #fff7ed; color: #9a3412; }
.lifecycle-pill.active.lifecycle-pill-4 { background: #eff6ff; color: #1d4ed8; }
.lifecycle-pill.active.lifecycle-pill-5 { background: #f1f5f9; color: #475569; }
.lifecycle-pill-1 .lifecycle-pill-icon { color: #e11d48; }
.lifecycle-pill-2 .lifecycle-pill-icon { color: #16a34a; }
.lifecycle-pill-3 .lifecycle-pill-icon { color: #ea580c; }
.lifecycle-pill-4 .lifecycle-pill-icon { color: #2563eb; }
.lifecycle-pill-5 .lifecycle-pill-icon { color: #64748b; }
.maplibregl-popup-content {
    border: 1px solid rgba(100, 116, 139, .2);
    border-radius: 16px !important; box-shadow: 0 18px 44px rgba(15, 23, 42, .18) !important;
}
@media (max-width: 767.98px), (max-height: 500px) {
    .map-sidebar {
        padding: 24px 18px 18px !important; border: 1px solid rgba(100, 116, 139, .2) !important;
        border-radius: 22px !important; background: #fff !important;
        box-shadow: 0 24px 64px rgba(15, 23, 42, .24) !important;
    }
    .map-sidebar-mobile-close {
        width: 40px; height: 40px; border: 1px solid rgba(100, 116, 139, .18);
        border-radius: 12px; background: #f1f5f9; color: #334155;
    }
    .map-sidebar-backdrop { background: rgba(15, 23, 42, .52); }
}
html[data-theme="dark"] .map-sidebar,
html[data-theme="dark"] .custom-map-controls,
html[data-theme="dark"] .map-lifecycle-bar,
html[data-theme="dark"] #map-loader,
html[data-theme="dark"] .maplibregl-popup-content {
    border-color: rgba(148, 163, 184, .25); background: #111827; color: #e5e7eb;
}
html[data-theme="dark"] .map-sidebar-title,
html[data-theme="dark"] .map-sidebar-input,
html[data-theme="dark"] .map-sidebar-select { color: #f1f5f9; }
html[data-theme="dark"] .map-sidebar-tabs,
html[data-theme="dark"] .parcel-inner-tabs,
html[data-theme="dark"] .parcel-location-fieldset {
    border-color: rgba(148, 163, 184, .2); background: #1f2937 !important;
}
html[data-theme="dark"] .map-sidebar-tab.active,
html[data-theme="dark"] .parcel-inner-tabs .nav-link.active,
html[data-theme="dark"] .map-sidebar-input,
html[data-theme="dark"] .map-sidebar-select {
    border-color: rgba(148, 163, 184, .28) !important;
    background-color: #273449 !important; color: #f1f5f9 !important;
}
@media (prefers-reduced-motion: reduce) {
    .map-sidebar, .custom-map-controls, .control-btn,
    .map-mobile-controls-fab, .map-mobile-search-fab, .lifecycle-pill {
        transition: none !important;
    }
}

/* Compact-view dark authority. The mobile modal rule above intentionally uses
   `background: #fff !important`; these later, more-specific declarations must
   also be important or the theme switch leaves a white sidebar on dark pages. */
@media (max-width: 767.98px), (max-height: 500px) {
    html[data-theme="dark"] .map-sidebar,
    html[data-theme="dark"] .custom-map-controls,
    html[data-theme="dark"] .map-lifecycle-bar,
    html[data-theme="dark"] #map-loader,
    html[data-theme="dark"] .map-mobile-controls-fab,
    html[data-theme="dark"] .map-mobile-search-fab,
    html[data-theme="dark"] .maplibregl-popup-content,
    html[data-theme="dark"] .map-popup-card--module,
    html[data-theme="dark"] body.map-dashboard-page .modal-content,
    html[data-theme="dark"] .vision-modal-container,
    html[data-theme="dark"] .maps-devtools-guard-panel {
        background: #111827 !important;
        border-color: rgba(148, 163, 184, 0.34) !important;
        color: #e5e7eb !important;
    }

    html[data-theme="dark"] .map-sidebar-tabs,
    html[data-theme="dark"] .parcel-inner-tabs,
    html[data-theme="dark"] .parcel-location-fieldset,
    html[data-theme="dark"] .map-popup-content,
    html[data-theme="dark"] .map-popup-footer,
    html[data-theme="dark"] .vision-stats-bar,
    html[data-theme="dark"] .vision-video-card,
    html[data-theme="dark"] .imar-section,
    html[data-theme="dark"] body.map-dashboard-page .modal-content .nav-tabs,
    html[data-theme="dark"] body.map-dashboard-page .modal-body,
    html[data-theme="dark"] body.map-dashboard-page .modal-footer,
    html[data-theme="dark"] body.map-dashboard-page .dp-content {
        background: #1f2937 !important;
        border-color: rgba(148, 163, 184, 0.3) !important;
        color: #e5e7eb !important;
    }

    html[data-theme="dark"] body.map-dashboard-page .modal-header.dp-hero {
        background: #203743 !important;
        border-color: rgba(148, 163, 184, 0.3) !important;
        color: #f8fafc !important;
    }

    html[data-theme="dark"] body.map-dashboard-page .modal-header.dp-hero--navy {
        background: #1b2a45 !important;
    }

    html[data-theme="dark"] body.map-dashboard-page .modal-header.dp-hero--teal {
        background: #173b39 !important;
    }

    html[data-theme="dark"] body.map-dashboard-page .modal-header.dp-hero--orange {
        background: #49321d !important;
    }

    html[data-theme="dark"] body.map-dashboard-page .modal-header :is(
        .dp-hero__title,
        .dp-hero__subtitle,
        .modal-title
    ) {
        color: #f8fafc !important;
    }

    html[data-theme="dark"] .map-sidebar .map-sidebar-input,
    html[data-theme="dark"] .map-sidebar .map-sidebar-select,
    html[data-theme="dark"] .map-sidebar .form-control,
    html[data-theme="dark"] .map-sidebar .form-select,
    html[data-theme="dark"] .map-sidebar .input-group-text,
    html[data-theme="dark"] body.map-dashboard-page .modal-content .form-control,
    html[data-theme="dark"] body.map-dashboard-page .modal-content .form-select,
    html[data-theme="dark"] body.map-dashboard-page .modal-content .input-group-text {
        background-color: #273449 !important;
        border-color: rgba(148, 163, 184, 0.38) !important;
        color: #f1f5f9 !important;
    }

    html[data-theme="dark"] .map-sidebar :is(.form-control, .map-sidebar-input)::placeholder,
    html[data-theme="dark"] body.map-dashboard-page .modal-content .form-control::placeholder {
        color: #aeb9c8 !important;
        opacity: 1 !important;
    }

    html[data-theme="dark"] .map-sidebar :is(.form-control, .form-select, .map-sidebar-input, .map-sidebar-select):disabled,
    html[data-theme="dark"] body.map-dashboard-page .modal-content :is(.form-control, .form-select):disabled {
        color: #aeb9c8 !important;
        -webkit-text-fill-color: #aeb9c8 !important;
        opacity: 1 !important;
    }

    html[data-theme="dark"] .map-sidebar-tab,
    html[data-theme="dark"] .parcel-inner-tabs .nav-link,
    html[data-theme="dark"] body.map-dashboard-page .modal-content .nav-tabs .nav-link {
        border-color: transparent !important;
        color: #cbd5e1 !important;
    }

    html[data-theme="dark"] .map-sidebar-tab.active,
    html[data-theme="dark"] .parcel-inner-tabs .nav-link.active,
    html[data-theme="dark"] body.map-dashboard-page .modal-content .nav-tabs .nav-link.active {
        background: #334155 !important;
        border-color: rgba(148, 163, 184, 0.42) !important;
        color: #f8fafc !important;
    }

    html[data-theme="dark"] :is(
        .map-sidebar-mobile-close,
        .maplibregl-popup-close-button,
        .map-sidebar .btn-close,
        body.map-dashboard-page .modal-content .btn-close,
        body.map-dashboard-page .modal-content .dp-sheet-close
    ) {
        background-color: #273449 !important;
        border-color: rgba(148, 163, 184, 0.4) !important;
        color: #f8fafc !important;
    }

    html[data-theme="dark"] :is(
        .map-sidebar .btn-close,
        body.map-dashboard-page .modal-content .btn-close
    ) {
        background-color: transparent !important;
        filter: invert(1) grayscale(1) brightness(1.8) !important;
        opacity: 0.9 !important;
    }

    html[data-theme="dark"] :is(
        .map-sidebar-title,
        .map-sidebar-label,
        .map-sidebar-hint,
        .map-sidebar-summary,
        .map-popup-content,
        .map-popup-footer,
        body.map-dashboard-page .modal-body,
        body.map-dashboard-page .modal-footer
    ) {
        color: #e5e7eb !important;
    }

    html[data-theme="dark"] :is(.control-btn, .lifecycle-pill:not(.active)) {
        background: transparent !important;
        border-color: transparent !important;
        color: #cbd5e1 !important;
    }

    html[data-theme="dark"] .control-btn.active {
        background: #23403e !important;
        border-color: rgba(94, 234, 212, 0.3) !important;
        color: #b7e4dc !important;
    }

    html[data-theme="dark"] .maplibregl-popup-anchor-top .maplibregl-popup-tip,
    html[data-theme="dark"] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
    html[data-theme="dark"] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
        border-bottom-color: #111827 !important;
    }

    html[data-theme="dark"] .maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
    html[data-theme="dark"] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
    html[data-theme="dark"] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
        border-top-color: #111827 !important;
    }

    html[data-theme="dark"] .maplibregl-popup-anchor-left .maplibregl-popup-tip {
        border-right-color: #111827 !important;
    }

    html[data-theme="dark"] .maplibregl-popup-anchor-right .maplibregl-popup-tip {
        border-left-color: #111827 !important;
    }
}
