/* (Existing CSS is mostly appended, so I will rewrite the whole file via write_to_file with Overwrite true) */
/* ── Drag & Drop görsel geri bildirim ──
   makeDropZone() ile bağlanan elementlerde otomatik aktif olur. */
.dnd-zone {
    position: relative;
    transition: outline 0.15s, background 0.15s;
    outline: 2px dashed transparent;
    outline-offset: -4px;
}
.dnd-zone.dnd-over {
    outline-color: var(--primary, #4f46e5) !important;
    background: rgba(99, 102, 241, 0.10) !important;
}
.dnd-zone.dnd-over::after {
    content: '📥 Bırakın → yüklenecek';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    color: var(--primary, #4f46e5);
    font-weight: 700; font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    z-index: 100;
}
.dnd-hint {
    font-size: 0.72rem; color: var(--text-secondary, #94a3b8);
    margin-top: 4px; padding: 2px 6px;
    background: rgba(255,255,255,0.04); border-radius: 4px;
    display: inline-block;
}

:root {
    --primary: #4f46e5;
    /* Indigo 600 */
    --primary-light: #6366f1;
    /* Indigo 500 */
    --primary-dark: #4338ca;
    /* Indigo 700 */
    --bg: #0f172a;
    /* Slate 900 */
    --bg-panel: rgba(15, 23, 42, 0.7);
    /* Glassy panel background */
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #94a3b8;
    /* Slate 400 */

    /* Stages colors */
    --color-proje: #eab308;
    --color-proje-rgb: 234, 179, 8;
    --color-ruhsat: #3b82f6;
    --color-ruhsat-rgb: 59, 130, 246;
    --color-insaat: #f97316;
    --color-insaat-rgb: 249, 115, 22;
    --color-tamamlandi: #10b981;
    --color-tamamlandi-rgb: 16, 185, 129;
    --color-yazi: #ffff00;
    --color-yazi-rgb: 255, 255, 0;

    --border: rgba(255, 255, 255, 0.1);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    overflow: hidden;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

h2 {
    font-size: 1.25rem;
    font-weight: 500;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

h5 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

p {
    line-height: 1.5;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), transparent 40%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.2), transparent 40%);
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Sidebar */
.sidebar {
    width: 360px;
    min-width: 360px;
    height: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-light);
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-box svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
}

/* Yapı denetim firması süzgeci — filtre çipleriyle aynı görsel dil.
   KOYU TEMA: <select> kendi `color`unu ve `background`unu AÇIKÇA vermeli,
   yoksa bazı tarayıcılarda beyaz zemin + beyaz yazı çıkar (bkz. CLAUDE.md). */
.yd-firma-filtre {
    margin-top: 0.5rem;
}

.yd-firma-filtre select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
}

.yd-firma-filtre select option {
    background: #1e293b;
    color: #e2e8f0;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary-light);
}

/* User Panel */
.user-panel {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn {
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary-light);
    color: white;
}

.w-100 {
    width: 100%;
}

/* Map Area */
.map-area {
    flex-grow: 1;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* ── Yan paneli tamamen gizle / göster ───────────────────────────────────
   Haritada rahat çalışmak için panel komple kaldırılabilir. Sekme haritanın
   SOL KENARINA yapışıktır ve GİZLİYKEN DE görünür: paneli geri getirmenin
   yolu her zaman ekranda durur, ayrı bir "göster" düğmesi aramak gerekmez.

   Panel `display:none` ile çıkar; `.app-container` flex olduğu için harita
   boşluğu kendiliğinden doldurur. Genişlik animasyonu denenmedi — Leaflet
   ölçüsünü her karede tazelemek gerekirdi ve karolar geçiş boyunca yanlış
   yere düşerdi (bkz. `invalidateSize` notu). */
body.sidebar-gizli .sidebar { display: none; }

.sidebar-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    /* .map-area kendi yığın bağlamını kuruyor (z-index:1); buradaki değer
       yalnız onun içindeki öğelerle yarışır — sonuç paneli 402, imleç kutusu
       405. Sekme hepsinin üstünde kalsın. */
    z-index: 410;
    width: 22px;
    height: 64px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    /* Koyu tema TUZAĞI: JS ile değil ama yine de rengi AÇIKÇA ver — body'den
       miras alınan renk beyaz zeminli bir temada okunmaz olurdu. */
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.35);
    transition: background 0.15s, color 0.15s;
}
.sidebar-toggle:hover { background: rgba(30, 41, 59, 0.98); color: #fff; }
.sidebar-toggle:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
/* Ok yönü panelin durumunu gösterir: ‹ gizler, › geri getirir. */
body.sidebar-gizli .sidebar-toggle-ok { transform: scaleX(-1); }
.sidebar-toggle-ok { display: inline-block; }

/* Detail Panel */
.detail-panel {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 380px;
    height: calc(100vh - 40px);
    border-radius: var(--radius-lg);
    z-index: 1000;
    transform: translateX(110%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent edge leakage */
}

.detail-panel.open {
    transform: translateX(0);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    /* Ensure it stays above content */
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

#detailContent {
    padding: 2.5rem 1.5rem 1.5rem;
    /* Increased top padding for close btn */
    overflow-y: auto;
    overflow-x: hidden;
    /* No horizontal scroll */
    flex-grow: 1;
}

/* Detail Content Scrollbar */
#detailContent::-webkit-scrollbar {
    width: 4px;
}

#detailContent::-webkit-scrollbar-track {
    background: transparent;
}

#detailContent::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

#detailContent::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Admin panel in Detail View */
.admin-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.hidden {
    display: none !important;
}

.input-modern {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.1);
}

select.input-modern {
    background-color: rgba(15, 23, 42, 0.9);
    /* Opaque dark for dropdown rendering */
}

select.input-modern option {
    background-color: var(--bg);
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons .input-modern {
    margin-bottom: 0;
}

/* Stages */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.proje {
    background-color: var(--color-proje);
    box-shadow: 0 0 8px var(--color-proje);
}

.ruhsat {
    background-color: var(--color-ruhsat);
    box-shadow: 0 0 8px var(--color-ruhsat);
}

.insaat {
    background-color: var(--color-insaat);
    box-shadow: 0 0 8px var(--color-insaat);
}

.tamamlandi {
    background-color: var(--color-tamamlandi);
    box-shadow: 0 0 8px var(--color-tamamlandi);
}

.building-header {
    margin-bottom: 2rem;
}

.building-header .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.badge.proje {
    background: rgba(234, 179, 8, 0.2);
    color: var(--color-proje);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge.ruhsat {
    background: rgba(59, 130, 246, 0.2);
    color: var(--color-ruhsat);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge.insaat {
    background: rgba(249, 115, 22, 0.2);
    color: var(--color-insaat);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge.tamamlandi {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-tamamlandi);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Durum belirtilmemiş — kırmızı (dikkat çekici, tamamlanmamış kayıt sinyali) */
.badge.belirsiz {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.45);
    text-transform: none;
    letter-spacing: 0;
}
.dot.belirsiz {
    background-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
.status-badge-belirsiz {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Planlanan — soft gri (durumu var ama henüz başlanmamış) */
.dot.planlanan {
    background-color: #94a3b8;
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.45);
}
.badge.planlanan {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.40);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
    margin-top: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--primary);
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-item.completed .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.timeline-item.pending .timeline-dot {
    border-color: var(--text-secondary);
}

.timeline-item.pending .timeline-content {
    opacity: 0.5;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: var(--transition);
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.timeline-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Documents */
.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.document-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
}

.document-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
}

.document-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Marker */
.custom-leaflet-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--primary);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid white;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.marker-pin::after {
    content: '';
    width: 14px;
    height: 14px;
    margin: 6px 0 0 6px;
    background: white;
    position: absolute;
    border-radius: 50%;
}

.custom-leaflet-marker:hover .marker-pin,
.custom-leaflet-marker.selected .marker-pin {
    transform: rotate(-45deg) scale(1.2);
    z-index: 1000;
}

.marker-proje .marker-pin {
    background: var(--color-proje);
    box-shadow: 0 0 15px var(--color-proje);
}

.marker-ruhsat .marker-pin {
    background: var(--color-ruhsat);
    box-shadow: 0 0 15px var(--color-ruhsat);
}

.marker-insaat .marker-pin {
    background: var(--color-insaat);
    box-shadow: 0 0 15px var(--color-insaat);
}

.marker-tamamlandi .marker-pin {
    background: var(--color-tamamlandi);
    box-shadow: 0 0 15px var(--color-tamamlandi);
}

.marker-belirsiz .marker-pin {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}
.marker-planlanan .marker-pin {
    background: #94a3b8;
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.45);
}

/* Popup */
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 2px;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--text-secondary);
}

.leaflet-popup-content h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* DİKKAT: buraya bir dönem `.timeline::before`in dikey çizgi stili
   (position:absolute; left:4px; top:0; bottom:0; width:2px; background:…)
   yanlışlıkla yapışmıştı — seçici kaybolmuş. Sonucu: popup içindeki HER <p>
   2 px genişliğinde mutlak konumlu bir çubuğa dönüşüyor, yazılar üst üste
   yığılıyordu. Aşağıdaki `.timeline::before` asıl sahibidir; bu kurala
   konumlandırma özelliği EKLENMEZ. */
.leaflet-popup-content p {
    margin: 0;
    color: var(--text-secondary);
}

/* ── Nokta bilgi kutusu (sondaj vb. 'nokta' katmanı popup'ı) ───────────── */
/* min-width koordinat satırına göre: "40.990000, 29.110000" + "kopyalandı"
   tek satıra sığmalı; dar kalınca koordinat ikiye bölünüp buton kırpılıyordu. */
.nokta-popup { min-width: 248px; max-width: 300px; }
.nokta-popup .np-baslik {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    word-break: break-word;
}
.nokta-popup .np-satir {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
    padding: 2px 0;
}
.nokta-popup .np-satir span { color: var(--text-secondary); flex: 0 0 auto; }
.nokta-popup .np-satir b {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}
.nokta-popup .np-koord {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.74rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.nokta-popup .np-kopyala {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 2px 4px;
    white-space: nowrap;
    /* Metin "kopyala" → "✓ kopyalandı" olunca kutu zıplamasın */
    min-width: 74px;
    text-align: right;
}
.nokta-popup .np-kopyala:hover { text-decoration: underline; }
.nokta-popup .np-butonlar { display: flex; gap: 6px; margin-top: 10px; }
.nokta-popup .np-butonlar .btn {
    flex: 1;
    font-size: 0.74rem;
    padding: 5px 8px;
    white-space: nowrap;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--primary);
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-item.completed .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.timeline-item.pending .timeline-dot {
    border-color: var(--text-secondary);
}

.timeline-item.pending .timeline-content {
    opacity: 0.5;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: var(--transition);
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.timeline-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Documents */
.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.document-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
}

.document-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
}

.document-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Marker */
.custom-leaflet-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--primary);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid white;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.marker-pin::after {
    content: '';
    width: 14px;
    height: 14px;
    margin: 6px 0 0 6px;
    background: white;
    position: absolute;
    border-radius: 50%;
}

.custom-leaflet-marker:hover .marker-pin,
.custom-leaflet-marker.selected .marker-pin {
    transform: rotate(-45deg) scale(1.2);
    z-index: 1000;
}

.marker-proje .marker-pin {
    background: var(--color-proje);
    box-shadow: 0 0 15px var(--color-proje);
}

.marker-ruhsat .marker-pin {
    background: var(--color-ruhsat);
    box-shadow: 0 0 15px var(--color-ruhsat);
}

.marker-insaat .marker-pin {
    background: var(--color-insaat);
    box-shadow: 0 0 15px var(--color-insaat);
}

.marker-tamamlandi .marker-pin {
    background: var(--color-tamamlandi);
    box-shadow: 0 0 15px var(--color-tamamlandi);
}

.marker-belirsiz .marker-pin {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}
.marker-planlanan .marker-pin {
    background: #94a3b8;
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.45);
}

/* Popup */
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 2px;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--text-secondary);
}

.leaflet-popup-content h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.leaflet-popup-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* (Removed the global invert filter so Google Satellite isn't inverted) */

/* --- 3D Model Katman Kontrolü (Leaflet Stili) --- */
#cesiumLayerPanel {
    position: absolute !important;
    bottom: 30px !important;
    left: 20px !important;
    z-index: 1000 !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.2s ease-in-out !important;
}

.layer-panel-content.leaflet-style {
    background: var(--bg-panel) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
}

/* Mouse ile üzerine gelindiğinde açılma */
#cesiumLayerPanel:hover .layer-panel-content.leaflet-style {
    width: 320px !important;
    height: auto !important;
    max-height: 500px !important;
    cursor: default !important;
}

/* Kapalıyken ortalı ikon */
.cesium-layer-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-primary) !important;
}

/* Liste içeriği kapalıyken gizli */
.cesium-layer-list-wrapper,
.panel-header {
    display: none !important;
}

/* Açıldığında içeriği göster (hover = masaüstü, .open = mobil dokunma) */
#cesiumLayerPanel:hover .cesium-layer-list-wrapper,
#cesiumLayerPanel:hover .panel-header,
#cesiumLayerPanel.open .cesium-layer-list-wrapper,
#cesiumLayerPanel.open .panel-header {
    display: block !important;
}

#cesiumLayerPanel:hover .panel-header,
#cesiumLayerPanel.open .panel-header {
    display: flex !important;
}

.panel-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    align-items: center;
    justify-content: space-between;
}

.panel-header h4 {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.cesium-layer-list-wrapper {
    padding: 0 12px 12px 12px;
    overflow-y: auto;
    max-height: 400px;
}

/* ── 3D Katman Paneli içindeki yazıları KOYU PANELDE GÖRÜNÜR yap ── */
/* Panel arka planı koyu (var(--bg-panel)) olduğu için inline color:#333 vb.
 * tonlar görünmüyordu. Buradaki override ile hep açık ton kullanılır. */
.cesium-layer-list-wrapper .layer-name,
.cesium-layer-list-wrapper label,
.cesium-layer-list-wrapper span {
    color: var(--text-primary, #f1f5f9) !important;
}
.cesium-layer-list-wrapper .offset-control span:first-child {
    /* Z-Ofset etiketi biraz daha mat */
    color: var(--text-secondary, #94a3b8) !important;
}
.cesium-layer-list-wrapper .offset-control span:last-child {
    /* Z-Ofset değeri yeşil — vurgulansın */
    color: #34d399 !important;
}
/* Yazı toggle satırlarındaki butonlar — kontrastlı */
.cesium-layer-list-wrapper [id^="cesium3DLabelBtn_"] {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.18) !important;
    color: #e2e8f0 !important;
}
.cesium-layer-list-wrapper [id^="cesium3DLabelBtn_"][data-on="1"] {
    background: rgba(56,189,248,0.18) !important;
    border-color: rgba(56,189,248,0.6) !important;
    color: #7dd3fc !important;
}
/* Layer item başlık satırı */
.cesium-layer-list-wrapper .layer-item {
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
/* Model adı için title attribute hover'da gözüksün */
.cesium-layer-list-wrapper .layer-name {
    font-weight: 500;
}
/* Git/Sil butonları — kontrastlı */
.cesium-layer-list-wrapper .layer-controls .btn {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #e2e8f0 !important;
}
.cesium-layer-list-wrapper .layer-controls .btn[onclick*="delete3DModel"] {
    background: rgba(244,63,94,0.18) !important;
    border-color: rgba(244,63,94,0.5) !important;
    color: #fca5a5 !important;
}
/* Ayırıcı çizgi koyu temada görünür */
.cesium-layer-list-wrapper hr {
    border-top-color: rgba(255,255,255,0.12) !important;
}

/* Model öğesi stili */
.layer-item {
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.layer-item:last-child {
    border-bottom: none;
}

.layer-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.layer-name {
    font-size: 13px !important;
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

.offset-control {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 22px;
}

.offset-control input[type='range'] {
    flex-grow: 1;
    height: 4px;
    cursor: pointer;
}

/* Leaflet Side-by-Side: divider çizgisi JS ile sürüklenebilir yapıldı,
   range input kütüphane varsayılanında (pointer-events:none) kalıyor */

/* Restoring Missing Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    width: 500px;
    max-width: 90%;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transform: scale(1);
    transition: transform 0.3s;
    position: relative;
    margin: auto;
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.modal-overlay.hidden .modal {
    transform: scale(0.9) !important;
}

.modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 10px !important;
}

.modal-body {
    max-height: 80vh !important;
    overflow-y: auto !important;
}

.modal-body {
    overflow-x: hidden !important;
    /* İçerik ile kaydırma çubuğu arasına nefes payı (çubuk kontrollerin üstüne binmesin) */
    padding-right: 6px !important;
    /* Firefox: ince + koyu tema uyumlu */
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

/* Modal içi tüm kaydırma alanları (gövde + iç listeler): ince, yuvarlak, şeffaf ray */
.modal ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.modal ::-webkit-scrollbar-track {
    background: transparent;
}

.modal ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 10px;
}

.modal ::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Management Section Collapsible */
.management-section,
.tools-section {
    margin: 5px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.management-toggle,
.tools-toggle {
    width: 100%;
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.management-toggle:hover,
.tools-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.management-content,
.tools-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.management-toggle .chevron-icon,
.tools-toggle .chevron-icon {
    transition: transform 0.3s ease;
}

.management-toggle.active .chevron-icon,
.tools-toggle.active .chevron-icon {
    transform: rotate(180deg);
}

/* Detay panelindeki katlanabilir bölüm başlıkları (Yapı Denetimi, Parsel
   Evrakları). "Yönetici İşlemleri" başlığıyla AYNI görünüm — kullanıcı aynı
   davranışı aynı kılıkta görsün. */
.katlanir-baslik {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin: 0;
    transition: background 0.2s;
    user-select: none;
}

.katlanir-baslik:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Bina Listesi Optimization */
.building-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Başlık alanı da kaydırılabilir olduğu için ikisi alanı paylaşıyor;
       liste sıfıra ezilirse bina adları tamamen kaybolurdu. */
    min-height: 120px;
}

.list-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.list-item.selected {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary);
    box-shadow: inset 4px 0 0 var(--primary);
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.list-item-title {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-subtitle {
    font-size: 0.72rem !important;
    color: var(--text-secondary) !important;
    margin-top: 2px !important;
}

.status-badge {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Scrollbar styling for sidebar/list */
.building-list::-webkit-scrollbar,
.sidebar-header::-webkit-scrollbar {
    width: 4px;
}

.building-list::-webkit-scrollbar-track,
.sidebar-header::-webkit-scrollbar-track {
    background: transparent;
}

.building-list::-webkit-scrollbar-thumb,
.sidebar-header::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Sidebar structure refinement */
.sidebar-header {
    padding: 1.25rem 1.5rem;
    /* Araç bölümleri (🔎 Analiz / ✏️ Harita Düzenleme) açılınca başlık alanı
       ekranı taşıyordu: kaydırma yoktu, alttaki düğmelere ULAŞILAMIYORDU.
       Artık bina listesiyle AYNI davranış — kendi ince çubuğuyla kayar.
       `min-height: 0` ŞART: flex çocuğu varsayılan olarak içeriğinden
       küçülmez, o olmadan `overflow-y` hiç devreye girmez (izin pop-up'ında
       birebir aynı tuzak yaşandı). */
    /* KENDİ İÇERİĞİ KADAR yer alır (flex-shrink: 0), ama sidebar'ın yarısından
       fazlasını yemez. Yalnız `overflow-y` yetmiyordu: bina listesi
       `flex-grow:1` olduğu ve içeriği yüzlerce piksel sürdüğü için başlık
       105 px'e eziliyor, kapalı bölümlerde bile kaydırma gerekiyordu (ölçüldü).
       Tavana dayanınca kendi ince çubuğuyla kayar; kalan yeri liste alır. */
    flex: 0 0 auto;
    max-height: 55%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.user-panel {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
}

.stats-overview {
    padding: 10px 1.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================
   Pusula (Compass)
   ========================================== */
.map-compass {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    z-index: 1001;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s linear, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.map-compass:hover {
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.5);
}

.compass-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-arrow-north {
    position: absolute;
    top: 6px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 16px solid #ef4444;
    /* North - Red */
}

.compass-arrow-south {
    position: absolute;
    bottom: 6px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 16px solid #f8fafc;
    /* South - White */
}

.compass-center {
    width: 4px;
    height: 4px;
    background: #475569;
    border-radius: 50%;
    z-index: 2;
}

.compass-n {
    position: absolute;
    top: -2px;
    font-size: 8px;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 4px black;
    z-index: 3;
    pointer-events: none;
}

/* Detail panel açıkken pusulayı sola kaydır (Opsiyonel ama daha iyi kullanıcı deneyimi) */
.detail-panel.open~.map-area .map-compass {
    right: 410px;
}

/* Not: CSS selectorden dolayı bu çalışmayabilir çünkü .map-area .detail-panel'in kardeşi veya çocuğu olabilir. 
   Bakalım index.html'e. 
   .sidebar, .map-area ve .detail-panel kardeş. 
   Sıralama: .sidebar, .map-area, .detail-panel
*/
.map-area:has(~ .detail-panel.open) .map-compass {
    right: 410px;
}

/* older browsers support fallback */
@supports not selector(:has(*)) {
    .map-compass-shift {
        right: 410px !important;
    }
}
/* 2D Bina isim etiketi */
.building-label-2d {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #facc15;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 3px black, -1px -1px 3px black, 0 0 4px black;
    white-space: nowrap;
    pointer-events: none;
    padding: 0 !important;
}
.building-label-2d::before {
    display: none !important;
}
/* Etiketin ikinci satırı: bina tipi (app.js → binaEtiketHTML). */
.building-label-2d {
    text-align: center;
    line-height: 1.2;
}
.building-label-tip {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: #fde68a;
}
/* Uzak yakınlaştırmada bina adları gizli (app.js → BINA_ETIKET_MIN_ZOOM). */
.bina-etiket-uzak .building-label-2d {
    display: none !important;
}

/* Bina Tipi Renk Açıklaması (legend) — "Bina Tipi Renkleri" katmanı açıkken görünür.
   KOYU TEMA TUZAĞI: beyaz zeminli kontrol kendi `color`unu vermeli, yoksa body'den
   beyaz yazı miras alınır ve beyaz üstüne beyaz çıkar (bkz. CLAUDE.md). */
.bina-tipi-legend {
    display: none;
    background: #fff;
    color: #1f2937;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    max-height: 40vh;
    overflow-y: auto;
}
.bina-tipi-legend-baslik {
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
}
.bina-tipi-legend-satir {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.bina-tipi-legend-kutu {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid #1f2937;
    flex: 0 0 auto;
}

/* Vektör katman yazı etiketi (toggle ile açılır) */
.vector-label-2d {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #facc15;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 3px black, -1px -1px 3px black, 0 0 4px black;
    white-space: nowrap;
    pointer-events: none;
    padding: 0 !important;
}
.vector-label-2d::before {
    display: none !important;
}

/* İmleç ipucu — imlecin altındaki yol/parsel/bina adı. Leaflet tooltip'i DEĞİL:
   harita başına tek kutu, konumu JS ile verilir (bkz. app.js → hoverAdBagla).
   `pointer-events:none` şart — kutu imlecin hemen yanında duruyor, tıklamayı
   yakalarsa altındaki poligon seçilemez hale gelir. */
.harita-imlec-adi {
    display: none;
    position: absolute;
    z-index: 700;              /* tooltipPane (650) üstü */
    pointer-events: none;
    max-width: 260px;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(11, 18, 32, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #facc15;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* ==========================================
   BOTTOM SHEET HANDLE (her zaman tanımlı, mobilde görünür)
   ========================================== */
.sheet-handle-bar {
    display: none; /* masaüstünde gizli */
    justify-content: center;
    align-items: center;
    padding: 10px 0 6px;
    flex-shrink: 0;
    cursor: grab;
    touch-action: none;
}
.sheet-handle-bar:active { cursor: grabbing; }
.sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
}


/* ==========================================
   MOBİL UYUMLULUK (max-width: 768px)
   ========================================== */
@media (max-width: 768px) {
    /* Mobilde panel bir bottom sheet; sekme yine sol kenarda ama sheet'in
       mini yüksekliğinin (90px) üstünde kalsın. */
    .sidebar-toggle { top: auto; bottom: 140px; transform: none; }


    /* ── Genel layout: harita tam ekran ── */
    .app-container {
        flex-direction: row;
        position: relative;
    }

    /* Harita tam ekranı kaplar */
    .map-area {
        position: fixed !important;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 1;
    }

    #map, #cesiumContainer {
        width: 100% !important;
        height: 100% !important;
    }

    /* ── Bottom Sheet (sidebar) ── */
    .sidebar {
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        min-width: unset !important;
        border-right: none;
        border-top: 1px solid var(--border);
        border-radius: 20px 20px 0 0;
        z-index: 200;
        /* Başlangıç: mini snap (sadece handle+arama görünür ~90px) */
        transform: translateY(calc(100% - 90px));
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        /* İçerik kaydırma */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 100svh;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
    }

    /* Sürüklenirken animasyonu kapat */
    .sidebar.dragging {
        transition: none !important;
    }

    /* Snap pozisyonları (JS tarafından class ile atanır) */
    .sidebar.snap-mini {
        transform: translateY(calc(100% - 90px));
    }
    .sidebar.snap-half {
        transform: translateY(40%);
    }
    .sidebar.snap-full {
        transform: translateY(0);
    }

    /* Handle bar mobilde görünür */
    .sheet-handle-bar {
        display: flex;
    }

    /* Sidebar scroll'u: snap-full'da içerik kaydırılabilir,
       diğerlerinde handle drag'i öncelikli olsun */
    .sidebar:not(.snap-full) {
        overflow-y: hidden;
    }

    /* ── İçerik düzenlemeleri ── */
    .building-list {
        flex-grow: 0;
        overflow-y: visible;
        max-height: none;
    }

    .stats-overview {
        flex-shrink: 0;
    }

    .sidebar-header {
        padding: 0.5rem 1rem 0.75rem;
        /* Mobilde başlık KAYDIRILMAZ: sidebar bir bottom sheet ve dokunma
           sürüklemesi (snap-mini/half/full) sidebar'ın kendisine bağlı —
           içeride ikinci bir kaydırma alanı jesti çalardı. Kaydırma zaten
           sayfanın kendisinde: panel yukarı çekilince hepsi görünür. */
        overflow-y: visible;
        /* `max-height` DE SIFIRLANMALI (TUZAK — yaşandı). Masaüstündeki
           `max-height: 55%` burada da geçerli kalıyordu; `overflow-y: visible`
           ile birleşince içerik kutuyu AŞIP alttakilerin ÜSTÜNE basıyordu:
           araç düğmeleri "Hoşgeldiniz, admin" satırına, bina listesi filtre
           kutucuklarına giriyordu. Ölçüldü (393×852, iki araç bölümü açık):
           içerik 630 px, kutu 467 px → 163 px taşma.
           `.building-list` mobilde zaten aynı şekilde serbest bırakılıyor
           (`flex-grow: 0; overflow-y: visible; max-height: none`) — desen aynı:
           mobilde iç kaydırma alanları kapatılır, sheet'in kendisi kayar. */
        max-height: none;
        flex: 0 0 auto;
    }

    .sidebar-header h1 {
        font-size: 1.05rem;
    }

    .subtitle {
        display: none;
    }

    .search-box {
        margin-bottom: 0.5rem;
    }

    /* Filtre + karşılaştırma butonlarını yatay kaydırır yap */
    .filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filters::-webkit-scrollbar { display: none; }

    .filter-btn {
        flex-shrink: 0;
        padding: 0.45rem 0.75rem;
        font-size: 0.82rem;
    }

    /* Bina liste öğesi — daha büyük dokunma alanı */
    .list-item {
        padding: 0.9rem 1rem;
    }

    /* Kullanıcı paneli */
    .user-panel {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Detail panel: alttan kayar */
    .detail-panel {
        position: fixed !important;
        width: 100%;
        height: 78svh;
        right: 0;
        top: auto;
        bottom: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(110%);
        transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
        z-index: 300;
    }
    .detail-panel.open {
        transform: translateY(0);
    }

    /* Admin işlem butonlarını mobilde gizle */
    #adminDetailActions,
    #btnToggleTextEdit,
    #btnToggleAddText,
    .management-section,
    .admin-only-desktop {
        display: none !important;
    }

    /* 3D mod butonu kompakt */
    #btnToggle3D {
        font-size: 0.78rem;
        padding: 0.5rem 0.75rem;
    }

    /* Karşılaştır + Sorgula butonları kompakt */
    #btnOpenCompare,
    #btnOpenQuery {
        font-size: 0.78rem;
        padding: 0.45rem 0.6rem;
    }

    /* Modal tam genişlikte, tab bar üzerinde */
    .modal-overlay {
        padding-bottom: 60px;
    }
    .modal {
        width: 95%;
        max-width: 95%;
        margin: 10px auto;
        max-height: 85svh;
        overflow-y: auto;
    }

    /* 3D katman paneli — mobilde map-area stacking context'inden çıkar,
       sidebar (z-index:200) üzerinde görünsün */
    #cesiumLayerPanel {
        position: fixed !important;
        bottom: 100px !important;  /* mini sheet'in üzerinde */
        left: 12px !important;
        z-index: 300 !important;
    }

    #cesiumLayerPanel:hover .layer-panel-content.leaflet-style,
    #cesiumLayerPanel.open .layer-panel-content.leaflet-style {
        width: 280px !important;
    }

    /* Koordinat çubuğu küçük */
    #cesium-coords {
        font-size: 10px !important;
        padding: 4px 10px !important;
    }

    /* Leaflet sağ alt kontroller (zoom, attribution) panelin üzerinde kalsın.
       Mini snap = 90px görünür → kontroller onun üzerinde */
    .leaflet-bottom {
        bottom: 96px !important;
    }

    /* Leaflet katman kontrol paneli sağ üstte kalıyor, sorun yok.
       Ama sol üstteki kontroller de haritayla çakışmasın */
    .leaflet-top {
        top: 8px !important;
    }

    /* Katman kontrol açıldığında panel yüksekliğini sınırla */
    .leaflet-control-layers-expanded {
        max-height: calc(100svh - 180px);
        overflow-y: auto;
    }
}

/* Katman paneli GRUPLARI (app.js → katmanKontrolunuGrupla).
   Panel Leaflet'in beyaz zeminli kontrolü: renkler AÇIKÇA verilir — body'nin
   açık yazı rengi miras kalırsa beyaz üstüne beyaz olurdu (koyu tema tuzağı). */
.katman-grup { margin: 3px 0; }
.katman-grup + .katman-grup { border-top: 1px solid #e2e8f0; padding-top: 3px; }
.katman-grup-baslik {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 6px; border-radius: 4px; cursor: pointer; user-select: none;
    font-size: 12px; font-weight: 600; color: #1f2937; background: #f1f5f9;
}
.katman-grup-baslik:hover { background: #e2e8f0; }
.katman-grup-ok {
    display: inline-block; width: 10px; font-size: 10px; color: #64748b;
    transition: transform .15s ease;
}
.katman-grup.kapali .katman-grup-ok { transform: rotate(-90deg); }
.katman-grup-sec { margin: 0; cursor: pointer; }
.katman-grup-ad { white-space: nowrap; }
.katman-grup-say {
    margin-left: auto; padding: 0 6px; border-radius: 8px;
    font-size: 10px; font-weight: 600; color: #475569; background: #e2e8f0;
}
.katman-grup-icerik { padding: 2px 0 2px 14px; }
.katman-grup.kapali .katman-grup-icerik { display: none; }

/* Ortofoto beyaz kenar gizleme — sadece beyaza yakın pikselleri saydam yapar,
   diğer renkleri hiç değiştirmez (multiply'dan farklı olarak görüntüyü karartmaz). */
.ortofoto-blend {
    filter: url(#ortofoto-white-to-alpha);
}

/* İmar planı PNG'sinin dış beyaz kısımlarını saydam yap — aynı SVG filter ile
   beyaz/açık piksel → alpha 0, parlak çizgiler ve dolgu renkleri korunur. */
.imar-overlay-blend {
    filter: url(#ortofoto-white-to-alpha);
}

/* ============================================================================
   Ölçüm & Çizim Araçları (measure-tools.js)
   ============================================================================ */

/* Bir ölçüm/çizim/sorgu aracı aktifken alttaki 2D katmanların (parsel, bina,
   vektör, imar, nokta, marker) tıklama/hover veri gösterimini (popup/tooltip/
   seçim) bastır. Leaflet etkileşimli öğeleri kendi `pointer-events:auto`unu
   ayarladığından pane değil doğrudan `.leaflet-interactive` hedeflenir. Tıklama
   harita konteynerine geçer, böylece araç normal çalışır; kendi çizim/ölçüm
   katmanlarımız zaten `interactive:false` olduğundan bu kuraldan etkilenmez. */
.mt-tool-active .leaflet-interactive,
.kj-map-locked .leaflet-interactive {
    pointer-events: none !important;
}

/* Biten ölçümün / çizim taslağının KÖŞE tutamakları (measure-tools.js →
   tutamaklariCiz2D). Yukarıdaki kilit .leaflet-interactive'i kapatıyor; tutamak
   araç etkinken de sürüklenebilmeli — daha özgül seçiciyle geri açılır. */
.mt-tool-active .leaflet-marker-icon.mt-tutamak { pointer-events: auto !important; }
.mt-tutamak { background: transparent; border: 0; cursor: move; }
.mt-tutamak .mt-kose {
    width: 12px; height: 12px; margin: 3px; box-sizing: border-box; border-radius: 50%;
    background: #f59e0b; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45);
}
.mt-tutamak .mt-kose.mt-kose-cizim { background: #22d3ee; border-radius: 2px; }
.mt-tutamak:hover .mt-kose { transform: scale(1.25); }
.mt-tutamak.mt-tutamak-snap .mt-kose { background: #22c55e; }
.mt-tutamak .mt-orta {
    width: 9px; height: 9px; margin: 4.5px; box-sizing: border-box; border-radius: 50%;
    background: rgba(255,255,255,.85); border: 1.5px solid #f59e0b; cursor: copy;
}
.mt-tutamak:hover .mt-orta { background: #f59e0b; }

/* Tıklanan şeklin etrafındaki DİKDÖRTGEN ÇERÇEVE — tarayıcının odak halkası.
   Haritada çizdiğimiz bir şey DEĞİL: tarayıcı odak halkasını SVG'de şeklin
   konturuna değil SINIR KUTUSUNA çizer, bu yüzden diyagonal bir yol poligonuna
   tıklayınca ekranla hizalı kocaman bir dikdörtgen belirir ve popup'ın arkasında
   kalır. Çerçeve tıklanan şekle göre yer değiştirdiği için "yolun genişliği
   kadar" görünür.

   Neden yalnız bazı makinelerde: fare tıklamasında şekle odak verilmesi
   platform/erişilebilirlik ayarına bağlıdır (macOS'ta Tam Klavye Erişimi açıkken
   her tıklanan öğe odak halkası gösterir). Bizde hiç görünmesin diye kural
   koşulsuz.

   Kapsam DAR tutuldu: yalnız harita şekilleri, işaretçiler ve konteynerin
   kendisi. Popup içindeki input/buton odak halkalarına DOKUNULMAZ — yol adı
   yazarken imlecin nerede olduğu görünmeli. */
.leaflet-container:focus,
.leaflet-container:focus-visible,
.leaflet-container .leaflet-interactive:focus,
.leaflet-container .leaflet-interactive:focus-visible,
.leaflet-container svg path:focus,
.leaflet-container svg path:focus-visible,
.leaflet-container svg g:focus,
.leaflet-container .leaflet-marker-icon:focus,
.leaflet-container .leaflet-marker-icon:focus-visible {
    outline: none !important;
    box-shadow: none;
}

/* Dokunmatik cihazlarda tıklanan şeklin üstünde kalan gri/mavi vurgu */
.leaflet-container {
    -webkit-tap-highlight-color: transparent;
}

.mt-toolbar {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 401;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
.mt-palette {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
    background: rgba(15, 23, 42, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.mt-toolbar.collapsed .mt-palette { display: none; }

.mt-tool-btn {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.9);
    color: #e2e8f0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.mt-tool-btn:hover { background: var(--primary); color: #fff; }
.mt-tool-btn:active { transform: scale(0.94); }
.mt-tool-btn svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.mt-tool-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}
.mt-main-btn {
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.mt-main-btn:hover { background: linear-gradient(135deg, #4338ca, #db2777); }
.mt-snap-btn.active { background: #16a34a; color: #fff; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5); }
.mt-clear-btn:hover { background: #dc2626; }
.mt-sep { height: 1px; background: var(--border); margin: 2px 0; }

/* araç isim etiketi (hover) */
.mt-tt {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
}
.mt-tool-btn:hover .mt-tt { opacity: 1; }

/* HUD bilgi paneli */
.mt-hud {
    position: absolute;
    top: 12px;
    left: 62px;
    z-index: 401;
    width: 250px;
    max-width: calc(100vw - 90px);
    background: rgba(15, 23, 42, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}
.mt-hud.hidden { display: none; }
.mt-hud-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(79, 70, 229, 0.25);
    font-weight: 600;
    font-size: 13px;
}
.mt-hud-head button {
    background: none; border: none; color: #cbd5e1;
    cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 4px;
}
.mt-hud-head button:hover { color: #fff; }
.mt-hud-body { padding: 10px 12px; font-size: 12.5px; }
.mt-metric {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.mt-metric span { color: var(--text-secondary); font-size: 11.5px; }
.mt-metric b { color: #fbbf24; font-variant-numeric: tabular-nums; font-size: 13px; }
.mt-hint { color: var(--text-secondary); font-size: 12px; line-height: 1.45; }
.mt-hint b { color: #e2e8f0; }
.mt-count { margin-top: 6px; color: var(--text-secondary); font-size: 11px; }
.mt-done { color: #34d399; font-weight: 600; margin-bottom: 4px; }
.mt-qsec { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); line-height: 1.5; }
.mt-qsec b { color: #93c5fd; }
.mt-qsec small { color: var(--text-secondary); }
.mt-snap-note { color: #34d399; font-size: 11px; margin-top: 4px; }
.mt-hud.mt-hud-genis { width: 320px; }
.mt-egim { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.mt-egim-baslik { color: #93c5fd; font-weight: 600; margin-bottom: 4px; }
.mt-egim-tablo { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mt-egim-tablo th { color: var(--text-secondary); font-weight: 500; text-align: right; padding: 2px 3px; }
.mt-egim-tablo td { text-align: right; padding: 2px 3px; border-top: 1px dashed rgba(255, 255, 255, 0.08); }
.mt-egim-tablo th:first-child, .mt-egim-tablo td:first-child { text-align: left; }
.mt-egim-tablo tr.mt-egim-top td { font-weight: 600; color: #fbbf24; border-top: 1px solid var(--border); }
.mt-egim-dz { margin-top: 4px; font-size: 11.5px; color: #e2e8f0; }
.mt-egim-kaynak { margin-top: 4px; font-size: 11px; line-height: 1.4; color: #cbd5e1; }
.mt-hud-actions {
    display: flex; gap: 6px; padding: 8px 12px;
    border-top: 1px solid var(--border); background: rgba(0, 0, 0, 0.2);
}
.mt-hud-btn {
    flex: 1; padding: 6px 4px; font-size: 12px; font-weight: 500;
    background: rgba(51, 65, 85, 0.8); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
    transition: background 0.15s;
}
.mt-hud-btn:hover { background: rgba(71, 85, 105, 0.9); }
.mt-hud-finish { background: var(--primary); border-color: var(--primary); }
.mt-hud-finish:hover { background: var(--primary-dark); }

/* Leaflet ölçüm etiketleri (divIcon) */
.mt-label, .mt-seg-label, .mt-total-label { background: none; border: none; }
.mt-label-inner {
    transform: translate(-50%, -50%);
    display: inline-block;
    white-space: nowrap;
    font-family: 'Consolas', 'Menlo', monospace;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    pointer-events: none;
}
.mt-seg-label .mt-label-inner {
    font-size: 11px; color: #fff;
    background: rgba(245, 158, 11, 0.9);
    padding: 1px 5px; border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.mt-total-label.mt-total-uc .mt-label-inner { transform: translate(12px, -130%); }
.mt-total-label .mt-label-inner {
    font-size: 12px; color: #fff;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.8);
    padding: 3px 8px; border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Mobil düzenlemeler */
@media (max-width: 768px) {
    .mt-toolbar { top: 10px; left: 10px; }
    .mt-tool-btn { width: 42px; height: 42px; }
    .mt-tt { display: none; }
    .mt-hud {
        left: 10px; right: 10px; top: auto; bottom: 96px;
        width: auto; max-width: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Kazı / Dolgu Analizi & Kübaj (kubaj-tools.js)
   ═══════════════════════════════════════════════════════════════ */
.kj-surface-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; margin-bottom: 4px;
    background: rgba(51, 65, 85, 0.35);
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.82rem;
}
.kj-empty { color: var(--text-secondary); font-size: 0.8rem; padding: 6px 2px; }
.kj-badge {
    flex: 0 0 auto; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em;
    padding: 1px 6px; border-radius: 999px;
}
.kj-badge-ilk { background: rgba(34, 197, 94, 0.18); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }
.kj-kat { font-size: 0.68rem; padding: 0 6px; border-radius: 8px; background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc; border: 1px solid rgba(129, 140, 248, 0.4); white-space: nowrap; flex-shrink: 0; }
.kj-badge-son { background: rgba(249, 115, 22, 0.18); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.4); }
.kj-icon-btn {
    background: none; border: none; cursor: pointer; font-size: 14px;
    color: #cbd5e1; padding: 4px; flex: 0 0 auto;
}
.kj-icon-btn:hover { color: #f87171; }
.kj-metric {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
}
.kj-metric span { color: var(--text-secondary); font-size: 11.5px; }
.kj-metric b { color: #e2e8f0; font-variant-numeric: tabular-nums; font-size: 13px; }

/* Kübaj sonuç paneli — harita üstünde yüzen (mt-hud ile aynı dil) */
/* SAĞ ALT kontrol sütunundan (zoom +/− ve Sığdır düğmesi, `bottomright`)
   KAÇINILIR: panel `right:12px` iken kontroller panelin sağ kenarını örtüyor
   ve sayılar okunmuyordu (yaşandı — Δz ve ort. kazı derinliği kırpılmıştı).
   z-index'i yükseltmek çözüm DEĞİL: o zaman da düğmeler panelin altında kalır,
   yani zoom yapılamaz. Sütun ~34 px + 10 px kenar boşluğu; 56 px net bırakır. */
.kj-result-panel {
    position: absolute;
    bottom: 24px; right: 56px;   /* bkz. yukarıdaki not */
    z-index: 402;
    width: 265px;
    max-width: calc(100vw - 68px);
    background: rgba(15, 23, 42, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}
.kj-result-panel.hidden { display: none; }
.kj-result-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    background: rgba(168, 85, 247, 0.25);
    font-weight: 600; font-size: 13px;
}
.kj-result-head button {
    background: none; border: none; color: #cbd5e1;
    cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 4px;
}
.kj-result-head button:hover { color: #fff; }
.kj-result-body { padding: 10px 12px; }
.kj-btn {
    flex: 1; padding: 6px 8px; font-size: 12px; font-weight: 500;
    background: rgba(51, 65, 85, 0.8); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
}
.kj-btn:hover { background: rgba(71, 85, 105, 0.9); }
.kj-btn-primary { background: var(--primary); border-color: var(--primary); }
/* Sonuç panelindeki eylem satırı: panel 265 px, dört düğme yan yana okunmaz
   olurdu. SARILIR ve ikişerli dizilir. `.kj-btn`in genel `flex:1` tanımına
   dokunulmaz — o düğme sınıfı 'bu noktada ayrıca' listesinde de kullanılıyor. */
.kj-eylemler { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kj-eylemler .kj-btn { flex: 1 1 calc(50% - 3px); min-width: 0; }

/* Kübaj harita etiketi (Leaflet divIcon) */
.kj-map-label { background: none; border: none; }
.kj-map-label-inner {
    transform: translate(-50%, -50%);
    display: inline-block; white-space: nowrap;
    font-family: 'Consolas', 'Menlo', monospace;
    font-weight: 600; font-size: 12px; color: #fff;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(168, 85, 247, 0.8);
    padding: 3px 8px; border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    text-align: center;
}

@media (max-width: 768px) {
    .kj-result-panel {
        /* Kontroller mobilde de sağda (`.leaflet-bottom { bottom:96px }`);
           panel tam genişlik olsaydı zoom düğmelerini örterdi. */
        left: 10px; right: 56px; bottom: 96px;
        width: auto; max-width: none;
    }
}

/* İmleç kot okuması — analiz üzerinde gezinirken kazı/dolgu değeri.
   KOYU zemin + AÇIK yazı: renk açıkça verilir (bkz. CLAUDE.md — koyu tema tuzağı). */
.kj-hover-box {
    position: absolute;
    z-index: 405;
    pointer-events: none;
    min-width: 132px;
    padding: 7px 10px;
    background: rgba(15, 23, 42, 0.94);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    line-height: 1.35;
}
.kj-hover-box.hidden { display: none; }
.kj-hover-dz {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
    margin-bottom: 3px;
}
.kj-hover-dz span {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    margin-left: 4px;
    opacity: 0.9;
}
.kj-hover-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
}
.kj-hover-row span { color: var(--text-secondary); }
.kj-hover-row b { color: #e2e8f0; font-variant-numeric: tabular-nums; }
.kj-hover-coord {
    margin-top: 4px;
    padding-top: 3px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    font-family: 'Consolas', 'Menlo', monospace;
    font-size: 9.5px;
    color: var(--text-secondary);
}
.kj-hover-none { color: var(--text-secondary); font-size: 11px; }

/* Bina silme / pasife alma modalı — etki raporu kutuları */
.bs-box {
    margin-top: 10px;
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.bs-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
.bs-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 0.82rem;
}
.bs-row span { color: var(--text-secondary); }
.bs-row b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.bs-none { color: var(--text-secondary); font-size: 0.8rem; }
.bs-note {
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* ── Toplu yazı seçimi ve taşıma ──────────────────────────────────────────────
   "Yazı Konumlarını Düzenle" açıkken görünen panel + seçili yazı vurgusu.
   Panel harita konteynerinin İÇİNDE (position:absolute) duruyor; üst-orta,
   çünkü sol alt köşede katman kontrolü/renk açıklaması, sağ altta bina detay
   paneli var. */
.toplu-yazi-panel {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 8px 12px;
    /* Koyu tema TUZAĞI: JS ile kurulan kutularda color AÇIKÇA verilmeli,
       yoksa body'den miras kalır (bkz. CLAUDE.md → raster opaklık paneli). */
    color: #e2e8f0;
    font-size: 0.78rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    max-width: min(94vw, 560px);
}
.toplu-yazi-panel.hidden { display: none; }
.tyz-satir {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}
.tyz-satir:last-of-type { margin-bottom: 0; }
.tyz-durum { color: #94a3b8; font-size: 0.72rem; margin-left: auto; }
.tyz-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.72rem;
    cursor: pointer;
    white-space: nowrap;
}
.tyz-btn:hover:not(:disabled) { background: rgba(56, 189, 248, 0.18); }
.tyz-btn:disabled { opacity: 0.4; cursor: default; }
.tyz-btn.tyz-aktif {
    background: rgba(56, 189, 248, 0.28);
    border-color: #38bdf8;
    color: #e0f2fe;
}
.tyz-ipucu {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 0.68rem;
    line-height: 1.45;
}
/* Seçili yazı: vurgu dıştaki divIcon kabına değil, İÇ kutuya uygulanır —
   kabın boyutu 0×0 (iconSize:[0,0]), üzerine çerçeve çizilmez. */
.kml-text-label.yazi-secili > div {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
    background: rgba(56, 189, 248, 0.25);
    border-radius: 3px;
}
/* Alan seçme armlanmışken imleç artı olsun — sürüklemenin haritayı değil
   seçim kutusunu çizeceği belli olsun. */
.tyz-secim-imleci { cursor: crosshair !important; }

@media (max-width: 768px) {
    .toplu-yazi-panel { top: 8px; padding: 7px 9px; font-size: 0.74rem; }
    .tyz-ipucu { display: none; }   /* dokunmatikte ok tuşu/Shift yok */
}

/* ── Haritadan nokta konumu seçme şeridi ──────────────────────────────────────
   "Koordinatla Nokta Ekle" kutusundaki 🗺️ Haritadan Seç ile açılır. Kutu geçici
   gizlendiği için kullanıcı ne beklendiğini bilmeli — şerit hem bunu söyler
   hem vazgeçme yolu verir. Toplu yazı paneliyle aynı köşe (üst-orta) ve aynı
   görünüm; ikisi aynı anda açılamaz. */
.nokta-secim-serit {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 8px 12px;
    /* Koyu tema TUZAĞI: JS ile kurulan kutuda color AÇIKÇA verilmeli. */
    color: #e2e8f0;
    font-size: 0.8rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    max-width: min(94vw, 460px);
}
.nokta-secim-serit button {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.72rem;
    cursor: pointer;
    white-space: nowrap;
}
.nokta-secim-serit button:hover { background: rgba(56, 189, 248, 0.18); }

@media (max-width: 768px) {
    .nokta-secim-serit { top: 8px; padding: 7px 9px; font-size: 0.74rem; }
}

/* ── Arazi Profili / Boykesit paneli (profil-tools.js) ───────────────────────
   Kübaj sonuç paneliyle aynı görsel dil. Koyu tema tuzağı: panel kendi
   `color`unu AÇIKÇA verir — body'den miras alınan renk neredeyse beyazdır. */
.profil-panel {
    position: fixed;
    /* SAĞ ORTADA — sol altta değil: sidebar (z 200, ~380 px) panelin üstüne
       biniyor ve grafik ile CSV düğmesi görünmüyordu (yaşandı). Sağ kenarda
       sidebar'ın kapsamı dışında kalır. Eğim paneli sağ ALTTA duruyor. */
    top: 50%; right: 12px;
    transform: translateY(-50%);
    z-index: 403;
    width: 560px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    /* `overflow: hidden` YAZILMAZ: yukarıdaki `overflow-y: auto`yu ezerdi
       (sonra gelen kural kazanır) ve uzun panel viewport'u taşardı. */
    overflow-x: hidden;
}
.profil-panel.hidden { display: none; }
/* Eğim paneli de açıkken (o sağ ALTTA duruyor) profil paneli sağ ÜSTE geçer —
   ikisi aynı anda açılabiliyor ve dikey ortada dururken alt kenarları
   çakışıyordu. Sınıf egim-tools.js tarafından body'ye eklenir/kaldırılır. */
body.egim-acik .profil-panel { top: 16px; transform: none; max-height: 58vh; }
.pf-baslik {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.22);
    font-weight: 600; font-size: 13px;
}
.pf-kapat {
    background: none; border: none; color: #cbd5e1;
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px;
}
.pf-kapat:hover { color: #fff; }
.pf-govde { padding: 10px 12px 12px; }
.pf-durum { font-size: 12px; margin-bottom: 8px; }
.pf-bos { font-size: 12px; color: #f59e0b; padding: 12px 2px; }
.pf-svg {
    width: 100%; height: 190px; display: block;
    background: rgba(2, 6, 23, 0.5); border-radius: 6px;
}
.pf-cerceve { fill: none; stroke: rgba(148, 163, 184, 0.35); stroke-width: 1; }
.pf-izgara { stroke: rgba(148, 163, 184, 0.16); stroke-width: 1; }
.pf-eksen { fill: #94a3b8; font-size: 9px; font-family: 'Outfit', sans-serif; }
.pf-eksen-y { text-anchor: end; }
.pf-eksen-x { text-anchor: middle; }
.pf-imlec-cizgi { stroke: #e2e8f0; stroke-width: 1; stroke-dasharray: 3,3; }
.pf-okuma {
    min-height: 18px; font-size: 11.5px; margin-top: 6px;
    font-variant-numeric: tabular-nums;
}
.pf-satir {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 3px 0; font-size: 12px;
}
.pf-satir span { color: var(--text-secondary); }
.pf-satir b { font-variant-numeric: tabular-nums; }
.pf-kaynak { font-size: 10.5px; color: var(--text-secondary); margin-top: 6px; }
.pf-butonlar { display: flex; gap: 8px; margin-top: 10px; }
.pf-butonlar .btn { flex: 1; font-size: 12px; padding: 6px 8px; }

@media (max-width: 768px) {
    /* Mobilde alta yapışır: dikey ortalama küçük ekranda haritanın tamamını
       kapatırdı. `top`/`transform` masaüstü kuralından SIFIRLANMALI. */
    .profil-panel {
        left: 6px; right: 6px; width: auto; bottom: 8px;
        top: auto; transform: none;
        max-height: 62vh;
    }
    .pf-svg { height: 150px; }
}

/* ── Eğim Analizi paneli (egim-tools.js) ────────────────────────────────────
   Profil paneliyle aynı görsel dil; sağ altta (profil solda) — ikisi aynı anda
   açık olabildiği için üst üste binmesinler. Renkleri AÇIKÇA verir (koyu tema). */
/* SAĞ ALT kontrol sütunundan (zoom +/− ve Sığdır düğmesi, `bottomright`)
   KAÇINILIR: panel `right:12px` iken kontroller panelin sağ kenarını örtüyor
   ve sayılar okunmuyordu (yaşandı — Δz ve ort. kazı derinliği kırpılmıştı).
   z-index'i yükseltmek çözüm DEĞİL: o zaman da düğmeler panelin altında kalır,
   yani zoom yapılamaz. Sütun ~34 px + 10 px kenar boşluğu; 56 px net bırakır. */
.egim-panel {
    position: fixed;
    bottom: 24px; right: 56px;   /* bkz. yukarıdaki not */
    z-index: 403;
    width: 290px;
    max-width: calc(100vw - 68px);
    background: rgba(15, 23, 42, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}
.egim-panel.hidden { display: none; }
.eg-baslik {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    background: rgba(34, 211, 238, 0.22);
    font-weight: 600; font-size: 13px;
}
.eg-kapat {
    background: none; border: none; color: #cbd5e1;
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px;
}
.eg-kapat:hover { color: #fff; }
.eg-govde { padding: 10px 12px 12px; }
.eg-durum { font-size: 12px; margin-bottom: 8px; }
.eg-lejant { margin-bottom: 8px; }
.eg-lej-satir {
    display: flex; align-items: center; gap: 7px;
    font-size: 11.5px; padding: 2px 0;
    font-variant-numeric: tabular-nums;
}
.eg-kutu {
    width: 13px; height: 13px; border-radius: 3px; flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.5);
}
.eg-lej-ad { flex: 0 0 62px; color: var(--text-secondary); }
.eg-lej-satir b { flex: 1; text-align: right; }
.eg-lej-oran { flex: 0 0 42px; text-align: right; color: var(--text-secondary); }
.eg-alt-baslik {
    font-size: 11px; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.04em;
    margin: 8px 0 4px; padding-top: 6px;
    border-top: 1px solid var(--border);
}
.eg-satir {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 3px 0; font-size: 12px;
}
.eg-satir span { color: var(--text-secondary); }
.eg-satir b { font-variant-numeric: tabular-nums; }
.eg-kaynak { font-size: 10.5px; color: var(--text-secondary); margin-top: 6px; }
.eg-opak {
    display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; color: var(--text-secondary); margin-top: 10px;
}
.eg-opak input { flex: 1; }
.eg-butonlar { display: flex; gap: 8px; margin-top: 10px; }
.eg-butonlar .btn { flex: 1; font-size: 12px; padding: 6px 8px; }

@media (max-width: 768px) {
    .egim-panel { left: 6px; right: 6px; width: auto; bottom: 8px; }
}

/* ── Ruhsat Aşaması Analizi paneli (ruhsat-tools.js) ────────────────────────
   Eğim paneliyle AYNI köşe (sağ alt) ve aynı ölçüler; ikisi aynı anda açıksa
   `body.egim-acik` kuralı bunu yukarı taşır (profil panelindeki desen).
   `right: 56px` ZORUNLU: Leaflet'in bottomright kontrol sütununu (zoom +/-,
   Sığdır) örtmesin — kübaj/eğim panellerinde ölçülmüş kural. */
.ruhsat-panel {
    position: fixed;
    bottom: 24px; right: 56px;
    z-index: 403;
    width: 300px;
    max-width: calc(100vw - 68px);
    background: rgba(15, 23, 42, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    /* Panel koyu zeminli ama body'den miras almaya BEL BAĞLANMAZ (koyu tema
       tuzağı): yazı rengi açıkça verilir. */
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}
.ruhsat-panel.hidden { display: none; }
/* Eğim paneli de sağ altta; ikisi açıkken ruhsat paneli yukarı çıkar. */
body.egim-acik .ruhsat-panel { bottom: auto; top: 90px; }
.rh-baslik {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    background: rgba(167, 139, 250, 0.22);
    font-weight: 600; font-size: 13px;
}
.rh-kapat {
    background: none; border: none; color: #cbd5e1;
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px;
}
.rh-kapat:hover { color: #fff; }
.rh-govde { padding: 10px 12px 12px; }
.rh-durum { font-size: 12px; margin-bottom: 8px; }
.rh-kipler { display: flex; flex-direction: column; gap: 3px; }
.rh-kip {
    display: flex; align-items: center; gap: 7px;
    width: 100%; padding: 5px 7px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid transparent; border-radius: 5px;
    color: #e2e8f0; font-family: inherit; font-size: 11.5px;
    cursor: pointer; text-align: left;
    font-variant-numeric: tabular-nums;
}
.rh-kip:hover { background: rgba(51, 65, 85, 0.9); }
.rh-kip.secili { border-color: #a78bfa; background: rgba(167, 139, 250, 0.18); }
.rh-kip-ad { flex: 1; }
.rh-kip b { flex: 0 0 auto; }
.rh-kip-oran { flex: 0 0 42px; text-align: right; color: var(--text-secondary); }
.rh-kutu {
    width: 13px; height: 13px; border-radius: 3px; flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.5);
}
.rh-lejant { margin-top: 9px; }
.rh-lej-satir {
    display: flex; align-items: center; gap: 7px;
    font-size: 11.5px; padding: 2px 0; color: var(--text-secondary);
}
.rh-lej-bos { font-size: 11.5px; color: #fbbf24; padding: 2px 0; }
/* Sayfa yönü seçicisi. TUZAK — `<select>` koyu temada kendi `color`unu ve
   `background`unu AÇIKÇA vermeli, yoksa beyaz üstüne beyaz çıkar; genişlik de
   sınırlanır (genel kurallarda `width:100%` var, satırı kaplardı). */
.rh-sayfa { display: flex; align-items: center; gap: 8px; margin-top: 10px;
            font-size: 11px; color: var(--text-secondary); }
.rh-sayfa select {
  width: auto; flex: 1; padding: 4px 6px; font-size: 11px;
  background: rgba(15, 23, 42, 0.9); color: var(--text-primary);
  border: 1px solid rgba(148, 163, 184, 0.35); border-radius: 6px;
}
.rh-sayfa select option { background: #0f172a; color: #e2e8f0; }
.rh-butonlar { display: flex; gap: 8px; margin-top: 10px; }
.rh-butonlar .btn { flex: 1; font-size: 12px; padding: 6px 8px; }

@media (max-width: 768px) {
    .ruhsat-panel { left: 6px; right: 6px; width: auto; bottom: 8px; }
    body.egim-acik .ruhsat-panel { top: 70px; bottom: auto; }
}

/* ── Enkesit paneli (enkesit-tools.js) ──────────────────────────────────────
   SAĞ ÜSTTE: profil paneli sağ ORTADA, eğim paneli sağ ALTTA duruyor; üçü aynı
   anda açık olabiliyor. Sol taraf masaüstünde sidebar (z 200, ~380 px) ile tam
   boy kaplı — oraya panel konmaz (profil panelinde yaşandı). Koyu temada
   `color` AÇIKÇA verilir, yoksa body'den neredeyse beyaz miras kalır. */
.enkesit-panel {
    position: fixed;
    top: 12px; right: 12px;
    z-index: 403;
    width: 330px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    /* `overflow: hidden` YAZILMAZ — yukarıdaki `overflow-y: auto`yu ezerdi. */
    overflow-x: hidden;
    background: rgba(15, 23, 42, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
}
.enkesit-panel.hidden { display: none; }
/* Enkesit paneli sağ ÜSTTE olduğu için profil panelinin `body.egim-acik`
   halindeki sağ-üst konumuyla çakışır: o zaman profil dikey ortada kalsın. */
body.enkesit-acik.egim-acik .profil-panel { top: 50%; transform: translateY(-50%); max-height: calc(100vh - 32px); }
.ek-baslik {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    background: rgba(34, 211, 238, 0.22);
    font-weight: 600; font-size: 13px;
}
.ek-kapat {
    background: none; border: none; color: #cbd5e1;
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px;
}
.ek-kapat:hover { color: #fff; }
.ek-govde { padding: 10px 12px 12px; }
/* Enkesit ve boykesit panelleri AYNI kuralı paylaşır — ikisinde de aynı form
   satırları var (yüzey seçimi gibi) ve ayrı yazıldıklarında ayrıştılar:
   18 Eylül 2026'da boykesite eklenen yüzey seçicileri, '.pf-form' hiç
   tanımlanmadığı için tarayıcı varsayılanıyla çıktı — koyu panelde beyaz
   zeminli kontroller. Tek kural, sessiz ayrışmayı imkânsız kılar. */
.ek-form, .pf-form { display: flex; gap: 6px; margin-bottom: 8px; }
.ek-form label, .pf-form label {
    flex: 1; display: flex; flex-direction: column; gap: 3px;
    font-size: 10.5px; color: var(--text-secondary);
    /* Uzun yüzey adları seçiciyi panelden taşırmasın. */
    min-width: 0;
}
.ek-form input, .pf-form input {
    width: 100%; padding: 5px 6px; font-size: 12px;
    background: rgba(2, 6, 23, 0.6); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 5px;
    font-variant-numeric: tabular-nums;
}
.ek-govde .ek-ciz { margin-bottom: 8px; font-size: 12px; padding: 7px 8px; width: 100%; }
/* Kırpma ve yüzey seçimi: <select> panelin koyu zeminine uydurulur — beyaz
   zeminli varsayılan kontrolde beyaz yazı okunmazdı (koyu tema tuzağı). */
.ek-form select, .pf-form select {
    width: 100%; padding: 5px 6px; font-size: 12px;
    background: rgba(2, 6, 23, 0.6); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 5px;
    /* Seçenek metni uzun; kutu sabit kalsın, metin kırpılsın. */
    max-width: 100%; text-overflow: ellipsis;
}
/* Açılır listenin KENDİ seçenekleri de koyu olmalı: kutuyu boyamak yetmiyor,
   açılan liste işletim sisteminden geliyor ve varsayılanı beyaz zemin. */
.ek-form select option, .pf-form select option {
    background: #0f172a; color: #e2e8f0;
}
/* Yol + km ile güzergâh (guzergah-sec.js) — enkesit ve boykesit panelinde ORTAK. */
.guz-kutu {
    margin: 0 0 8px; padding: 7px 8px 8px;
    background: rgba(34, 211, 238, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 6px;
}
.guz-baslik { font-size: 11px; font-weight: 600; color: #67e8f9; margin-bottom: 6px; }
.guz-kutu .guz-form { margin-bottom: 6px; }
.guz-kutu .guz-form label:first-child { flex: 1.5; }
.guz-kutu .guz-kullan { font-size: 12px; padding: 7px 8px; width: 100%; }
.guz-kmyol-sat { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px;
    padding-top: 7px; border-top: 1px dashed rgba(148,163,184,.25);
    font-size: 11px; line-height: 1.35; cursor: pointer; color: #e2e8f0; }
.guz-kmyol-sat input { width: auto; margin: 2px 0 0; flex: 0 0 auto; }
.guz-kmyol-sat small { display: block; font-size: 10px; color: var(--text-secondary); }
.ek-km-kaynak { font-size: 10.5px; line-height: 1.4; color: #cbd5e1; margin: 2px 0 5px; }
.guz-not { font-size: 10.5px; color: var(--text-secondary); margin-top: 5px; line-height: 1.35; }
.guz-not:empty { display: none; }
.ek-kirp-not { font-size: 10.5px; margin: -4px 0 8px; display: none; }
.ek-kirp-katman {
    margin: -2px 0 10px; padding: 6px 8px; font-size: 11px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid var(--border); border-radius: 6px;
    /* Katman sayısı çok olabilir; panel boyunca uzamasın. */
    max-height: 128px; overflow-y: auto;
}
.ek-kirp-katman.hidden { display: none; }
.ek-kirp-bas { font-size: 10.5px; color: var(--text-secondary); margin-bottom: 4px; }
.ek-kirp-sat { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 1px 0; }
.ek-kirp-sat span { color: var(--text-secondary); font-size: 10px; }
.ek-kirp-rozet {
    font-size: 10.5px; color: #fbbf24; margin: 2px 0 4px;
}
.ek-durum { font-size: 12px; margin-bottom: 8px; }
.ek-satir {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 3px 0; font-size: 12px;
}
.ek-satir span { color: var(--text-secondary); }
.ek-satir b { font-variant-numeric: tabular-nums; }
.ek-kaynak { font-size: 10.5px; color: var(--text-secondary); margin-top: 6px; }
.ek-gezinme {
    display: flex; align-items: center; gap: 6px; margin: 9px 0 6px;
    padding-top: 8px; border-top: 1px solid var(--border);
}
.ek-gezinme.hidden { display: none; }
.ek-gezinme select {
    flex: 1; min-width: 0; padding: 5px 6px; font-size: 11.5px;
    background: rgba(2, 6, 23, 0.6); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 5px;
}
.ek-onceki, .ek-sonraki {
    background: rgba(148, 163, 184, 0.16); border: 1px solid var(--border);
    color: #e2e8f0; border-radius: 5px; cursor: pointer;
    padding: 4px 8px; font-size: 12px; line-height: 1.2;
}
.ek-onceki:hover, .ek-sonraki:hover { background: rgba(148, 163, 184, 0.3); }
.ek-kesit-ust {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 11.5px; margin-bottom: 3px;
    font-variant-numeric: tabular-nums;
}
.ek-svg {
    width: 100%; height: 175px; display: block;
    background: rgba(2, 6, 23, 0.5); border-radius: 6px;
}
.ek-cerceve { fill: none; stroke: rgba(148, 163, 184, 0.35); stroke-width: 1; }
.ek-izgara { stroke: rgba(148, 163, 184, 0.16); stroke-width: 1; }
/* Aks (ofset 0) çizgisi: kesitin merkezini göstersin, kot çizgileriyle
   karışmasın diye kesikli. */
.ek-aks-cizgi { stroke: rgba(34, 211, 238, 0.55); stroke-width: 1; stroke-dasharray: 3,3; }
.ek-eksen { fill: #94a3b8; font-size: 9px; font-family: 'Outfit', sans-serif; }
.ek-eksen-y { text-anchor: end; }
.ek-eksen-x { text-anchor: middle; }
/* Uç etiketleri çerçeve kenarında: ortalanırsa yarısı viewBox dışına taşıp
   kırpılır ("Sağ 15" → "Sağ 1"). Yazdırma sayfasıyla aynı kural. */
.ek-eksen-bas { text-anchor: start; }
.ek-eksen-son { text-anchor: end; }
.ek-bos { font-size: 12px; color: #f59e0b; padding: 12px 2px; }
.ek-butonlar { display: flex; gap: 8px; margin-top: 10px; }
.ek-butonlar.hidden { display: none; }
.ek-butonlar .btn { flex: 1; font-size: 12px; padding: 6px 8px; }
/* Zorunlu yüzey seçimi yapılmamışsa (ya da iki seçici aynı yüzeyi gösteriyorsa)
   seçici kırmızı çerçevelenir — uyarı satırı panelin başka yerinde kalıyor,
   neyin eksik olduğu seçicinin kendisinde de görünsün. */
.ek-form select.ek-eksik, .pf-form select.ek-eksik { border-color: #ef4444; box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.45); }
/* F04: geçersiz yüzey seçiminde eski sonuç "güncel değil" — soluk, çizgili, tıklanmaz */
.ek-bayat { opacity: 0.38; filter: grayscale(1); pointer-events: none; user-select: none; }
.ek-bayat-not { margin: 6px 0 8px; padding: 7px 9px; border-radius: 6px; font-size: 12px; line-height: 1.45;
    color: #fde68a; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.45); }
.ek-kayit-guncelle, .ek-kubaj-guncelle { margin: 2px 0 6px; font-size: 11.5px; padding: 5px 8px; }
.ek-kayit-guncelle.hidden, .ek-kubaj-guncelle.hidden,
.ek-kubaj-kaydet.hidden { display: none; }
.ek-kubaj-bolum .ek-kubaj-hesapla { font-size: 12px; padding: 6px 8px; margin-bottom: 6px; }
.ek-kubaj-bolum .ek-kubaj-hesapla:disabled { opacity: 0.45; cursor: not-allowed; }
.ek-kubaj-durum { font-size: 11.5px; margin-bottom: 6px; display: none; }
.ek-kubaj-bolum .ek-kubaj-kaydet { margin-top: 8px; }
.ek-kubaj-liste-bas { margin-top: 8px; }
/* Kayıtla karşılaştırma: aynıysa yeşil, farklıysa sarı — kübaj kaydı bir
   miktar belgesi, farkı gizlenmez. */
.ek-kubaj-kayit {
    margin-top: 6px; padding: 5px 7px; border-radius: 5px; font-size: 11px;
    background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35);
}
.ek-kubaj-kayit.ek-kubaj-fark {
    background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.45);
}
/* Cetvel önizlemesi kendi içinde kayar (200 istasyona kadar çıkabilir). */
.ek-kubaj-tablo { margin-top: 6px; max-height: 170px; overflow-y: auto; }
.ek-kubaj-tablo table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.ek-kubaj-tablo th, .ek-kubaj-tablo td {
    padding: 2px 4px; text-align: right; border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    font-variant-numeric: tabular-nums;
}
.ek-kubaj-tablo th { position: sticky; top: 0; background: #0f172a; color: var(--text-secondary); font-weight: 600; }
.ek-kubaj-tablo td:first-child, .ek-kubaj-tablo th:first-child { text-align: left; }

/* ── Kayıtlı kesitler bölümü (kesit-kayit.js) ───────────────────────────────
   Boykesit ve enkesit panellerinin PAYLAŞTIĞI görünüm — iki ayrı sınıf seti
   yazılsaydı biri güncellenip öteki unutulurdu. Koyu temada `color` açıkça
   verilir (beyaz zeminli kontrol değil ama input'lar için gerekli). */
.kk-bolum {
    margin-top: 10px; padding-top: 8px;
    border-top: 1px solid var(--border);
}
.kk-baslik {
    font-size: 11px; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.kk-kaydet { display: flex; gap: 6px; margin-bottom: 6px; }
.kk-kaydet input {
    flex: 1; min-width: 0; padding: 5px 7px; font-size: 12px;
    background: rgba(2, 6, 23, 0.6); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 5px;
}
.kk-kaydet .btn { flex: 0 0 auto; font-size: 12px; padding: 5px 10px; }
/* Liste kendi içinde kayar: onlarca kayıtta panel sayfa boyu uzamasın.
   Panelin kendisi de kaydırılabilir olduğu için iç çubuk 150 px'de sınırlanır. */
.kk-liste { max-height: 150px; overflow-y: auto; }
.kk-satir {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 0; font-size: 12px;
}
.kk-yukle {
    flex: 1; min-width: 0; text-align: left;
    background: none; border: none; color: #93c5fd; cursor: pointer;
    padding: 2px 0; font-size: 12px; font-family: inherit;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kk-yukle:hover { color: #dbeafe; text-decoration: underline; }
.kk-meta { flex: 0 0 auto; font-size: 10px; color: var(--text-secondary); }
.kk-sil {
    flex: 0 0 auto; background: none; border: none; cursor: pointer;
    font-size: 12px; padding: 2px 3px; opacity: 0.65;
}
.kk-sil:hover { opacity: 1; }
.kk-bos { font-size: 11px; color: var(--text-secondary); padding: 3px 0; }

@media (max-width: 768px) {
    /* Mobilde alta yapışır — sağ üstte durursa harita kontrollerini kapatır.
       `top` masaüstü kuralından SIFIRLANMALI. */
    .enkesit-panel {
        left: 6px; right: 6px; width: auto; bottom: 8px; top: auto;
        max-height: 66vh;
    }
    .ek-svg { height: 150px; }
}

/* ── 3D bilgi kutusu (parsel · yol · nokta · bina KML) ─────────────────────
   2D'de bu bilgi Leaflet popup'ında duruyor; 3D'de Leaflet yok, aynı DOM
   içeriği (`vektorPopupIcerik`) bu kutuya konuyor. Yer SAĞ ÜST: sol alt/üst
   masaüstünde sidebar'ın altında kalıyor, sağ altta Cesium'un kendi
   kontrolleri ve kübaj sonuç paneli var. */
.vektor-bilgi-3d {
    position: absolute;
    top: 12px;
    right: 56px;
    z-index: 403;
    width: 300px;
    max-width: calc(100vw - 68px);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    /* Koyu tema tuzağı: kutu kendi `color`unu AÇIKÇA verir. */
    color: #e2e8f0;
    font-size: 12px;
}
.vb3-bas {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 600; font-size: 12px;
    flex: 0 0 auto;
}
.vb3-bas span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vb3-bas button {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    cursor: pointer;
    padding: 1px 7px;
    line-height: 1.4;
    flex: 0 0 auto;
}
/* `min-height: 0` ŞART — flex çocuğu içeriğinden küçülmezse overflow hiç
   devreye girmez ve uzun parsel listesi kutuyu ekran dışına taşırır
   (izin pop-up'ındaki ve sidebar başlığındaki birebir aynı tuzak). */
.vb3-govde {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
}
@media (max-width: 768px) {
    .vektor-bilgi-3d { right: 8px; left: 8px; width: auto; max-height: 55vh; }
}

/* ── 3D model kıyaslama bölücüsü (app.js → window.KIYAS3D) ───────────────────
   2D'deki .leaflet-sbs-divider'ın Cesium karşılığı. #cesiumContainer'ın içinde
   durur; katman paneli (#cesiumLayerPanel z 1000) üstte kalsın diye z 900.
   Koyu tema tuzağı: JS ile kurulan etiket/tutamak kendi rengini AÇIKÇA verir. */
.kiyas3d-bolucu {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    margin-left: -2px;
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    z-index: 900;
    cursor: ew-resize;
    touch-action: none;
}
/* 4 px'lik çubuk parmakla/fareyle zor tutulur: görünmez geniş tutma alanı */
.kiyas3d-bolucu::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    right: -10px;
}
.kiyas3d-tutamak {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: #fff;
    color: #334155;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.kiyas3d-etiket {
    position: absolute;
    top: 14px;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.88);
    color: #e2e8f0;
    font-size: 0.75rem;
    white-space: nowrap;
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}
.kiyas3d-etiket.sol { right: 10px; }
.kiyas3d-etiket.sag { left: 10px; }
/* Kübaj HAKEDİŞ formu: .ek-form satırlarını kullanır; tek başına duran uzun
   alanlar (poz açıklamaları) aynı görünümle tam satır olur. */
.ek-kubaj-hk { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ek-kubaj-hk .ek-hk-uzun {
    display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px;
    font-size: 10.5px; color: var(--text-secondary);
}
.ek-kubaj-hk .ek-hk-uzun input, .ek-kubaj-hk input[type="date"] {
    width: 100%; padding: 5px 6px; font-size: 12px;
    background: rgba(2, 6, 23, 0.6); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 5px; color-scheme: dark;
}
.ek-kubaj-hk .ek-kubaj-hk-indir { font-size: 12px; padding: 7px 8px; }
/* Enkesit ARŞİVİ önizlemesi: belge + parsel + yol işaret listeleri. */

/* ── Ürün markası (Opus4d) ──────────────────────────────────────────────
   Logolar static/opus4d/ altında; koyu tema için "-dark" (beyaz yazılı)
   varyant. Kurumun kendi adı/logosu white-label ayarlarından gelir — bu
   ÜRÜNÜN markasıdır, kurumunkinin yerine geçmez. */
.logo-marka { height: 34px; width: auto; max-width: 100%; display: block; }
.logo-giris { height: 26px; width: auto; display: block; margin-bottom: 10px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (max-width: 768px) {
    /* Bottom sheet'in "mini" durumunda (~90 px) yer dar: logo arama kutusunu itmesin */
    .logo-marka { height: 24px; }
}

/* ── 360° panorama içi geçiş: öteki fotoğrafların ikonları (bkz. app.js foto360IkonHotspotlari) ── */
.pano360-ikon {
    border-radius: 50%; background: #ef4444; color: #fff; border: 2px solid #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55); transition: transform 0.15s;
}
.pano360-ikon svg { width: 55%; height: 55%; }
.pano360-ikon:hover { transform: scale(1.15); background: #3b82f6; }
.pano360-ikon-yazi {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px;
    font-size: 10px; line-height: 1.2; white-space: nowrap; padding: 1px 5px; border-radius: 6px;
    background: rgba(0, 0, 0, 0.6); color: #fff; pointer-events: none;
}
.pano360-serit {
    position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 5;
    max-width: 90%; padding: 6px 12px; border-radius: 8px; font-size: 0.8rem;
    background: rgba(245, 158, 11, 0.95); color: #1f2937; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.pano360-serit a { color: #1f2937; font-weight: 600; margin-left: 6px; }
.pano360-yon-not { font-size: 0.72rem; color: #f59e0b; }
#btnHizala360.pano360-aktif { background: var(--primary); color: #fff; }

/* ── 3D katman paneli GRUPLARI (katmanPaneli3DGrupla) — 2D ile aynı gruplar ──
   Panel KOYU zeminli: renkler açık tonda verilir. */
.cesium-layer-list-wrapper .kg3d {
    margin-bottom: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
}
.cesium-layer-list-wrapper .kg3d-bas {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    user-select: none;
}
.cesium-layer-list-wrapper .kg3d-ok {
    font-size: 10px;
    color: #94a3b8 !important;
    transition: transform 0.15s;
}
.cesium-layer-list-wrapper .kg3d.kapali .kg3d-ok { transform: rotate(-90deg); }
.cesium-layer-list-wrapper .kg3d-baslik {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cesium-layer-list-wrapper .kg3d-say {
    font-size: 10px;
    color: #94a3b8 !important;
}
.cesium-layer-list-wrapper .kg3d-toplu {
    padding: 2px 7px;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.18);
}
.cesium-layer-list-wrapper .kg3d-toplu[data-on="1"] {
    color: #34d399;
    border-color: #34d399;
}
.cesium-layer-list-wrapper .kg3d-icerik { padding: 6px 8px 0; }
.cesium-layer-list-wrapper .kg3d.kapali .kg3d-icerik { display: none; }
.cesium-layer-list-wrapper .kg3d-satir {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 6px;
}
.cesium-layer-list-wrapper .kg3d-ad {
    font-size: 11px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 3D lejantı — #cesiumContainer içinde, katman simgesinin hemen üstünde.
   Kapsayıcı 2D'de gizlendiği için iki lejant aynı anda görünmez. Katman
   paneli açılınca (z 1000) bunun üstüne biner — panel öncelikli. */
.katman-lejant-3d {
    position: absolute;
    left: 20px;
    bottom: 84px;
    z-index: 900;
    max-width: calc(100% - 40px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
@media (max-width: 768px) {
    .katman-lejant-3d {
        left: 12px;
        bottom: 160px;
        max-width: 70vw;
        max-height: 30vh;
    }
    /* Dar ekranda uzun lejant adları alt satıra geçer (yoksa m² kırpılıyordu). */
    .katman-lejant-3d .bina-tipi-legend-satir { white-space: normal; }
    .katman-lejant-3d .bina-tipi-legend-satir > span:last-child { white-space: nowrap; }
}

/* ── Katman belgesi görüntüleyici (enkesit paftası vb.) ─────────────────────
   Gövdeye eklenir, 2D ve 3D'de aynı. Kutu koyu; yazı rengi AÇIKÇA verilir. */
.katman-belge-perde { position: fixed; inset: 0; z-index: 6000; background: rgba(2, 6, 23, 0.72);
    display: flex; align-items: center; justify-content: center; padding: 18px; }
/* Genişlik ekranın %40'ı, pencere KARE (proje sahibinin isteği): yükseklik
   genişliğe eşit, ekrana sığmazsa %90 ile sınırlı. Harita ve bilgi kutusu
   arkada görünür kalsın; çok küçük pencerede pafta okunmaz → alt sınır. */
.katman-belge-kutu { width: max(40vw, 460px); height: min(max(40vw, 460px), 90vh); max-width: 96vw; display: flex; flex-direction: column;
    background: #0f172a; color: #e2e8f0; border: 1px solid rgba(255,255,255,0.14); border-radius: 10px;
    overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.55); }
.katman-belge-bas { display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.12); flex: 0 0 auto; }
.katman-belge-ad { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 0.9rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.katman-belge-dgm { flex: 0 0 auto; width: auto; padding: 4px 10px; font-size: 0.75rem; text-decoration: none; }
.katman-belge-govde { flex: 1 1 auto; min-height: 0; background: #1e293b; display: flex; }
.katman-belge-cerceve { flex: 1 1 auto; width: 100%; height: 100%; border: 0; background: #fff; }
.katman-belge-resim { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.katman-belge-durum { margin: auto; font-size: 0.9rem; color: #94a3b8; padding: 20px; text-align: center; }
@media (max-width: 768px) { .katman-belge-perde { padding: 0; } .katman-belge-kutu { width: 100%; height: 100%; border-radius: 0; } }

/* Kesit gezintisi — bilgi kutusunda önceki / sonraki kilometre */
.kesit-gezinti:empty { display: none; }
.kesit-gez-satir {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.kesit-gez-dgm {
    font-size: 11px; padding: 4px 8px; white-space: nowrap;
    color: #7dd3fc; border-color: rgba(125, 211, 252, 0.45);
}
.kesit-gez-sira, .kesit-gez-bos { font-size: 11px; color: #94a3b8; white-space: nowrap; }

