/* =========================================
   GENEL AYARLAR
   ========================================= */
:root {
    --bg-body: #F3F4F6;
    --surface: #FFFFFF;
    --primary-red: #D32F2F;
    --success-green: #00C853;
    --accent-yellow: #FFD600;
    --neon-orange: #FF6D00;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --border: #E5E7EB;
    --nav-w: 60px;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-body); color: var(--text-dark);
    font-family: 'Inter', sans-serif; display: flex; height: 100vh; overflow: hidden;
}

/* NAV */
.nav-rail {
    width: var(--nav-w); background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center; padding: 15px 0; z-index: 100;
}
.desktop-logo { font-family: 'Montserrat', sans-serif; font-weight: 900; color: var(--primary-red); font-size: 1.2rem; margin-bottom: 30px; }
.nav-links { display: flex; flex-direction: column; gap: 15px; }
.nav-item { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-gray); cursor: pointer; transition: 0.2s; font-size: 1rem; }
.nav-item.active { background: #FFF1F1; color: var(--primary-red); }

/* MAIN */
.main-content { flex: 1; display: flex; flex-direction: column; width: calc(100% - var(--nav-w)); }
.mobile-header { display: none; }

/* HARİTA */
.map-section {
    flex: 2; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; /* Ortala */
    position: relative;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    overflow: hidden; /* Dışarı taşan her şeyi kes */
    padding-bottom: 40px; /* Alttan biraz pay ver ki yazı sıkışmasın */
}
.map-container { 
    width: 95%; 
    max-width: 850px; 
    height: 100%; /* Yüksekliği section'a uydur */
    max-height: 400px; /* Çok uzamasın */
    position: relative; 
    display: flex;
    align-items: center;
    justify-content: center;
}
#svg-turkey-map { 
    width: 100%; 
    height: 100%; 
    max-height: 100%; /* SVG asla taşmasın */
    overflow: visible; 
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); 
}

.city { fill: #EAEAEA; stroke: #111; stroke-width: 0.6; transition: fill 0.3s ease; cursor: pointer; }
.city:hover { stroke: #000; stroke-width: 1.5; z-index: 99; filter: drop-shadow(0 0 5px rgba(255,109,0,0.6)); }

.map-tooltip {
    position: fixed; top: 0; left: 0; transform: translate(-50%, -130%);
    background: rgba(17, 24, 39, 0.95); color: #fff; padding: 6px 12px;
    border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600;
    pointer-events: none; opacity: 0; border: 1px solid var(--neon-orange); z-index: 10000; white-space: nowrap;
}
.map-tooltip.visible { opacity: 1; }

.map-stat { 
    position: absolute; 
    bottom: -10px; /* Haritanın biraz daha altına ittik */
    right: 20px; 
    text-align: right; 
    pointer-events: none; 
    z-index: 10;
}
.map-stat .cyber-num { 
    font-family: 'Orbitron', sans-serif; 
    font-weight: 700; 
    font-size: 2.2rem; 
    color: var(--text-dark); 
    line-height: 1;
    text-shadow: 2px 2px 0px #fff; /* Okunabilirlik için gölge */
}
.map-stat small { color: var(--primary-red); font-weight: 700; font-size: 0.65rem; }

.desktop-search { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; width: 300px; height: 35px; z-index: 50; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.desktop-search input { flex: 1; padding: 5px 15px; border: none; outline: none; font-size: 0.8rem; background: transparent; text-transform: uppercase; }
.desktop-search button { background: transparent; color: var(--text-gray); border: none; padding: 0 15px; cursor: pointer; }
.search-results { position: absolute; top: 105%; left: 0; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; max-height: 200px; overflow-y: auto; display: none; z-index: 200; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.result-item { padding: 8px 15px; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 0.75rem; font-weight: 600; }

/* TICKER */
.ticker-wrap { height: 25px; background: var(--text-dark); color: #fff; display: flex; align-items: center; overflow: hidden; border-top: 2px solid var(--primary-red); flex: none; }
.ticker { display: inline-block; white-space: nowrap; animation: marquee 20s linear infinite; }
.ticker-item { display: inline-block; padding: 0 30px; font-size: 0.7rem; font-weight: 500; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* DASHBOARD (2 Sütun) */
.dashboard-grid { flex: 1; padding: 15px; gap: 15px; background: var(--bg-body); display: flex; overflow: hidden; }

/* Sol Kolon (%60) - POPÜLER */
.trends-card { 
    flex: 0.6; 
    height: 100%; 
    display: flex; flex-direction: column; overflow: hidden; 
}
.trend-table-header { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--text-gray); margin-bottom: 5px; padding: 0 5px; font-weight: 700; flex: none; }
.trend-list { overflow-y: auto; flex: 1; padding-right: 2px; }
.t-item { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 4px; background: #fcfcfc; border: 1px solid #f0f0f0; cursor: pointer; margin-bottom: 4px; }
.t-item:hover { border-color: var(--text-dark); background: #fff; }
.t-name { font-size: 0.75rem; font-weight: 700; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; }
.t-price { font-family: 'Orbitron'; font-size: 0.8rem; font-weight: 600; color: var(--text-dark); }

/* Sağ Kolon (%40) - GRAFİK */
.chart-card { 
    flex: 0.4; 
    height: 220px !important; /* SABİT YÜKSEKLİK */
}
.chart-wrapper { position: relative; width: 100%; height: 100%; overflow: hidden; }
.chart-overlay-price { position: absolute; top: 0; left: 0; font-family: 'Orbitron'; font-size: 1.1rem; font-weight: 700; color: var(--text-dark); background: rgba(255,255,255,0.9); padding: 2px 6px; border-radius: 4px; z-index: 10;}
#miniChart { width: 100% !important; height: 100% !important; }

/* KART GENEL */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; border-bottom: 2px solid #f0f0f0; padding-bottom: 5px; flex: none; }
.card-header h4 { font-family: 'Montserrat'; font-weight: 800; font-size: 0.8rem; color: var(--text-dark); }
.header-tag { background: var(--accent-yellow); color: #000; font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
#chart-model-name {
    font-size: 0.65rem; 
    color: var(--text-gray); 
    font-weight: 600; 
    text-transform: uppercase; 
    text-align: right;
    
    /* Uzun isimleri kesmek için */
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    max-width: 120px; /* Maksimum genişlik */
    display: inline-block;
}
/* =========================================
   6. MOBİL UYUMLULUK (DÜZELTİLDİ: YAN YANA & FULL EKRAN)
   ========================================= */
/* =========================================
   6. MOBİL UYUMLULUK (DÜZELTİLDİ: YAN YANA & FULL EKRAN)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Sayfa Yapısı */
    body { 
        flex-direction: column; 
        overflow-y: auto !important; /* Kaydırmayı aç */
        height: auto; 
        -webkit-overflow-scrolling: touch; 
    }
    
    /* 2. Navigasyon (En Altta) */
    .nav-rail { 
        flex-direction: row; width: 100%; height: 50px; 
        position: fixed; bottom: 0; padding: 0; 
        justify-content: space-around; border-top: 1px solid var(--border); 
        box-shadow: 0 -5px 15px rgba(0,0,0,0.05); 
        background: var(--surface); z-index: 1000;
    }
    .desktop-logo { display: none; }
    .nav-links { flex-direction: row; width: 100%; justify-content: space-around; }
    .nav-item { font-size: 1.2rem; }
    
    /* 3. Header (En Üstte) */
    .mobile-header { 
        display: flex; justify-content: space-between; align-items: center; 
        padding: 0 15px; height: 50px; background: var(--surface); 
        border-bottom: 1px solid var(--border); 
        position: fixed; top: 0; width: 100%; z-index: 999; 
    }
    .mobile-header .logo { font-family: 'Montserrat'; font-weight: 900; font-size: 1.1rem; color: var(--primary-red); }
    .status-dot { width: 8px; height: 8px; background: var(--success-green); border-radius: 50%; }

    .main-content { margin: 0; padding-top: 50px; padding-bottom: 60px; width: 100%; }
    
    /* 4. HARİTA (Kenar Boşluğu Yok, Tam Genişlik) */
    .map-section { 
        flex: none; 
        height: 280px; /* Sabit yükseklik */
        padding: 10px 0; 
        justify-content: flex-start; /* Yukarı yasla */
    }
.map-container { 
        width: 100%; 
        transform: scale(1.0); /* Büyütme yapma, sığsın */
        max-height: 220px;
    }
        .desktop-search { display: none; }
    /* İlan Sayısı Mobilde */
    .map-stat { 
        bottom: 0px; 
        right: 15px; 
    }
    .map-stat .cyber-num { font-size: 1.6rem; }
    .map-stat small { font-size: 0.6rem; }

    /* 5. DASHBOARD: YAN YANA (GRID) */
    .dashboard-grid { 
        display: grid;
        grid-template-columns: 1fr 1fr; /* %50 SOL - %50 SAĞ */
        gap: 8px; /* Araları çok açma */
        padding: 8px; /* Kenarlardan az boşluk */
        height: auto; 
        overflow: visible; 
        padding-bottom: 80px; 
    }
    
    /* Flex kapsayıcılarını devreden çıkar, direkt grid'e otursunlar */
    .dashboard-left, .dashboard-right { display: contents; } 

    /* 6. KART BOYUTLARI (SABİT VE EŞİT) */
    
    /* Sol: Popüler Modeller */
    .trends-card { 
        grid-column: 1 / 2; 
        height: 250px !important; /* Yükseklik Sabit */
        overflow: hidden;
    }
    
    /* Sağ: Fiyat Endeksi */
    .chart-card { 
        grid-column: 2 / 3; 
        height: 250px !important; /* Popüler ile aynı boyda olsun */
    }

    /* Kart İçi Sıkıştırma (Sığması İçin) */
    .card { padding: 8px; border-radius: 8px; }
    .card-header { margin-bottom: 5px; padding-bottom: 4px; }
    .card-header h4 { font-size: 0.55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .header-tag { font-size: 0.45rem; padding: 1px 3px; }
    
    /* Liste Yazıları */
    .t-item { padding: 5px; margin-bottom: 3px; }
    .t-name { font-size: 0.6rem; max-width: 65px; } /* İsim taşmasın */
    .t-price { font-size: 0.65rem; }

    /* Grafik Yazıları */
    .chart-overlay-price { font-size: 0.8rem; top: 0; left: 0; padding: 2px 4px; }
#chart-model-name { 
        max-width: 90px; /* Mobilde daha dar */
        font-size: 0.6rem;
    }
}

/* === VALUATION PAGE STYLES === */
.valuation-page { overflow-y: auto; height: auto; }
.valuation-container { max-width: 800px; margin: 20px auto; padding: 0 15px; }

.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.form-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px;
}

.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-gray); margin-bottom: 5px; }
.form-group input, .form-group select {
    width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--border);
    font-family: 'Inter', sans-serif; font-size: 1rem; background: #fff;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-red); }

/* Checkbox Tasarımı */
.checkbox-group { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 10px; }
.custom-checkbox {
    display: flex; align-items: center; cursor: pointer; font-size: 0.9rem; user-select: none;
}
.custom-checkbox input { display: none; }
.checkmark {
    height: 20px; width: 20px; background-color: #eee; border-radius: 4px; margin-right: 8px; position: relative;
}
.custom-checkbox input:checked ~ .checkmark { background-color: var(--primary-red); }
.custom-checkbox.danger input:checked ~ .checkmark { background-color: #D32F2F; }
.checkmark:after {
    content: ""; position: absolute; display: none;
    left: 7px; top: 3px; width: 5px; height: 10px;
    border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.custom-checkbox input:checked ~ .checkmark:after { display: block; }

/* Dev Buton */
.analyze-btn {
    width: 100%; background: linear-gradient(135deg, #111827 0%, #374151 100%);
    color: white; padding: 16px; border: none; border-radius: 12px;
    font-family: 'Orbitron', sans-serif; font-size: 1.1rem; letter-spacing: 1px;
    margin-top: 25px; cursor: pointer; position: relative; overflow: hidden;
}
.btn-shine {
    position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}
@keyframes shine { 100% { left: 200%; } }

/* === REPORT & PDF STYLES === */
.report-paper {
    background: white; padding: 30px; border-radius: 0; 
    box-shadow: 0 0 20px rgba(0,0,0,0.1); margin: 20px auto; max-width: 800px;
    position: relative; overflow: hidden;
}

.report-header { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 20px; }
.report-logo { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.5rem; }
.report-logo span { color: var(--primary-red); }

.vehicle-summary h2 { font-size: 1.5rem; margin-bottom: 10px; }
.badges .badge { background: #eee; padding: 5px 10px; border-radius: 4px; font-weight: 600; font-size: 0.9rem; }

.price-scenarios { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin: 25px 0; }
.price-card { padding: 15px; border-radius: 8px; text-align: center; color: white; }
.fast-sell { background: #E53935; }
.market-val { background: #43A047; transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.high-sell { background: #FDD835; color: #333; }

.p-title { font-size: 0.8rem; opacity: 0.9; margin-bottom: 5px; }
.p-val { font-size: 1.4rem; font-weight: 800; font-family: 'Orbitron', sans-serif; }
.p-desc { font-size: 0.7rem; opacity: 0.8; }

.ai-analysis-box { background: #F9FAFB; border-left: 4px solid var(--primary-red); padding: 20px; margin-bottom: 20px; border-radius: 0 8px 8px 0; }
.ai-text { font-size: 0.95rem; line-height: 1.6; color: #374151; white-space: pre-line; }

.evidence-list a {
    display: block; padding: 10px; margin-bottom: 5px; background: #fff; border: 1px solid #eee;
    text-decoration: none; color: #333; font-size: 0.9rem; display: flex; justify-content: space-between;
}
.evidence-list a:hover { background: #f5f5f5; color: var(--primary-red); }

.action-bar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 99; }
.action-btn { padding: 12px 25px; border-radius: 30px; border: none; font-weight: 600; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.action-btn.primary { background: var(--text-dark); color: white; }
.action-btn.secondary { background: white; color: var(--text-dark); }

/* PDF Üretilirken Gizlenecekler */
.hidden { display: none !important; }
/* =======================================================
   NAV-BAR ÇAKIŞMA DÜZELTMESİ (LAYOUT SHIFT)
   Bunu dosyanın en altına ekle
   ======================================================= */

/* MASAÜSTÜ: İçeriği Nav-Bar kadar sağa it */
@media (min-width: 901px) {
    body {
        padding-left: 80px !important; /* Nav-Bar genişliği kadar boşluk */
        box-sizing: border-box;        /* Taşmaları engelle */
    }

    /* Eğer özel bir container kullanıyorsan onu da garantiye alalım */
    .main-content, .container, .dashboard-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* MOBİL: Sol boşluğu iptal et, alta boşluk ver */
@media (max-width: 900px) {
    body {
        padding-left: 0 !important;      /* Soldaki boşluğu sıfırla */
        padding-bottom: 90px !important; /* Alttaki Nav-Bar için yer aç */
    }
}
/* =========================================
   MOBİL İÇİN ÖZEL HIZ AYARI (EN ALTA EKLE)
   ========================================= */
@media (max-width: 900px) {
    .ticker {
        /* Buradaki saniyeyi düşürürsen HIZLANIR, artırırsan YAVAŞLAR */
        /* Masaüstünde 10s ise, mobilde 5s veya 3s yap fişek gibi akar */
        animation-duration: 20s !important; 
    }
    
    .ticker-wrap {
        /* Mobilde şerit biraz daha ince olsun dersen opsiyonel */
        height: 30px !important;
    }
}