/* ===== CSS Variables & Design Tokens ===== */
:root {
    /* Color Palette – Istanbul inspired */
    --bg-primary: #0f1117;
    --bg-secondary: #161822;
    --bg-tertiary: #1e2030;
    --bg-card: #1a1c2e;
    --bg-glass: rgba(22, 24, 34, 0.85);
    
    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --accent-warm: #f59e0b;
    --accent-danger: #ef4444;
    --accent-success: #10b981;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;
    
    --border-color: rgba(99, 102, 241, 0.15);
    --border-light: rgba(255, 255, 255, 0.06);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --sidebar-width: 320px;
    --detail-width: 380px;
    --header-height: 60px;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AVM Category colors */
.cat-merkezi { --cat-color: #6366f1; }
.cat-transit { --cat-color: #06b6d4; }
.cat-anadolu-rekabet { --cat-color: #f59e0b; }
.cat-bolgesel-destinasyon { --cat-color: #10b981; }
.cat-donusum { --cat-color: #f97316; }
.cat-sorunlu { --cat-color: #ef4444; }

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== Loading Overlay ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.loader-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.loader-ring {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.loader-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 52px;
    height: 52px;
    margin: 6px;
    border: 3px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-ring div:nth-child(1) { animation-delay: -0.45s; border-top-color: #6366f1; }
.loader-ring div:nth-child(2) { animation-delay: -0.3s; border-top-color: #818cf8; }
.loader-ring div:nth-child(3) { animation-delay: -0.15s; border-top-color: #06b6d4; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 220px;
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.35s ease;
}

/* ===== Header ===== */
#main-header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.header-titles h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-titles .subtitle {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    gap: 8px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.stat-pill i {
    font-size: 0.7rem;
    color: var(--accent-primary);
}

.stat-pill:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ===== App Container / Layout ===== */
#app-container {
    display: flex;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    position: relative;
}

/* ===== Sidebar ===== */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 50;
    transition: margin-left var(--transition-smooth);
    position: relative;
}

.sidebar-inner-scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

/* ===== Panel Toggle Buttons (float outside panels) ===== */
.panel-toggle-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 60px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    color: var(--text-secondary);
    transition: left var(--transition-smooth), right var(--transition-smooth), color var(--transition-fast), background var(--transition-fast);
    box-shadow: var(--shadow-sm);
    padding: 0;
}

.panel-toggle-btn:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
}

/* Sidebar toggle - sits on right edge of sidebar */
.panel-toggle-btn.sidebar-toggle {
    left: var(--sidebar-width);
    border-left: none;
    border-radius: 0 8px 8px 0;
}

#sidebar.collapsed ~ .panel-toggle-btn.sidebar-toggle {
    left: 0;
}

#sidebar.collapsed ~ .panel-toggle-btn.sidebar-toggle i {
    transform: rotate(180deg);
}

/* Detail panel toggle - sits on left edge of detail panel */
.panel-toggle-btn.detail-toggle {
    right: var(--detail-width);
    border-right: none;
    border-radius: 8px 0 0 8px;
    display: none; /* hidden until detail panel is visible */
}

#detail-panel:not(.hidden) ~ .panel-toggle-btn.detail-toggle {
    display: flex;
}

#detail-panel.collapsed ~ .panel-toggle-btn.detail-toggle {
    right: 0;
}

#detail-panel.collapsed ~ .panel-toggle-btn.detail-toggle i {
    transform: rotate(180deg);
}

.sidebar-section {
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section.flex-grow {
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.section-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.section-header h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-header h3 i {
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.toggle-icon {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    transition: transform var(--transition-fast);
}

.section-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    padding: 0 16px 14px;
    overflow: hidden;
    max-height: 1200px; /* U-2 Fix: başlangıç değeri ekle, transition çalışsın */
    transition: max-height var(--transition-smooth), padding var(--transition-smooth);
}

.section-content.collapsed {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}

.section-content.scrollable {
    overflow: visible;
}

.badge {
    background: var(--accent-primary);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

/* Layer Toggles */
.layer-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 2px;
}

.layer-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.layer-toggle input {
    display: none;
}

.toggle-slider {
    width: 34px;
    height: 18px;
    background: var(--bg-primary);
    border: 1px solid var(--text-tertiary);
    border-radius: 10px;
    position: relative;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-tertiary);
    top: 2px;
    left: 2px;
    transition: var(--transition-fast);
}

.layer-toggle input:checked + .toggle-slider {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.layer-toggle input:checked + .toggle-slider::after {
    transform: translateX(16px);
    background: white;
}

.layer-icon {
    font-size: 0.85rem;
    width: 20px;
    text-align: center;
}

.layer-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Filter Controls */
.filter-group {
    margin-bottom: 14px;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 8px;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.chip {
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.chip.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.chip:hover:not(.active) {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.select-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: var(--font-family);
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.select-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.range-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.range-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 4px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
    transition: var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.radius-buttons {
    display: flex;
    gap: 5px;
}

.radius-btn {
    flex: 1;
    padding: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.radius-btn:hover:not(.active) {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* AVM List */
.avm-card {
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.avm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--cat-color, var(--accent-primary));
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: var(--transition-fast);
}

.avm-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.avm-card:hover::before {
    opacity: 1;
}

.avm-card.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
}

.avm-card.selected::before {
    opacity: 1;
}

.avm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.avm-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
    margin-right: 8px;
}

.avm-card-cat {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.avm-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.avm-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.avm-card-meta i {
    font-size: 0.65rem;
}

/* ===== Map ===== */
#map-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    z-index: 60;
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

/* Leaflet overrides */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-light) !important;
    font-size: 16px !important;
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    transition: var(--transition-fast);
}

.leaflet-control-zoom a:hover {
    background: var(--bg-tertiary) !important;
    color: var(--accent-primary) !important;
}

.leaflet-control-attribution {
    background: var(--bg-glass) !important;
    color: var(--text-tertiary) !important;
    font-size: 0.65rem !important;
    backdrop-filter: blur(8px);
    border: none !important;
}

.leaflet-control-attribution a {
    color: var(--accent-secondary) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 12px 14px !important;
    font-family: var(--font-family) !important;
    font-size: 0.82rem !important;
    line-height: 1.5;
}

.leaflet-popup-tip {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: none !important;
}

.leaflet-popup-close-button {
    color: var(--text-tertiary) !important;
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 90px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* OVERLAP FIX: Move map controls to the right when sidebar is open (Desktop) */
@media (min-width: 769px) {
    body.sidebar-open:not(.sidebar-collapsed) .map-controls {
        left: 360px; /* 320px sidebar + gaps */
    }
}

.map-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-light);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.map-btn:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* ===== Legends ===== */
.legend-container {
    position: absolute;
    bottom: 32px;
    left: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100% - 32px);
    max-height: calc(100% - 64px);
    overflow: hidden;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* OVERLAP FIX: Move legends to the right when sidebar is open (Desktop) */
@media (min-width: 769px) {
    body.sidebar-open:not(.sidebar-collapsed) .legend-container {
        left: 352px; /* 320px sidebar + gaps */
    }
}

.legend-container > * {
    pointer-events: auto; /* Enable clicks on actual children */
}

.legend-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: bottom left;
}

.legend-wrapper.collapsed {
    transform: scale(0) translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Map Legend */
.map-legend {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: var(--shadow-md);
    min-width: 140px;
    font-size: 0.85rem; /* Shrunk slightly */
    transition: var(--transition-smooth);
}

.map-legend.hidden {
    display: none !important;
}

.legend-header h4 {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.legend-color {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Isochrone Control Panel ===== */
.isochrone-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 40px));
    width: 310px;
    max-width: calc(100vw - 40px);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    z-index: 650; /* Below Leaflet popups (700) */
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

/* OVERLAP FIX: Panel centered, visible state resets to center */

.isochrone-panel.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.isochrone-panel.collapsed {
    width: 48px !important;
    transform: translateX(-50%) translateY(0);
    cursor: pointer;
}

.isochrone-panel.collapsed .iso-mode-tabs,
.isochrone-panel.collapsed .iso-time-selector,
.isochrone-panel.collapsed .iso-stats {
    display: none;
}

.isochrone-panel.collapsed .iso-panel-header #btn-toggle-iso i {
    transform: rotate(180deg);
}

.iso-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.08));
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    /* min-width KALDIRILDI - panel width'i takip etsin */
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
}

.iso-panel-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Collapsed state için min-width yok, width zaten 48px */
.isochrone-panel.collapsed .iso-panel-header {
    padding: 12px 8px;
    justify-content: center;
}

.isochrone-panel.collapsed .iso-panel-header h3 {
    display: none;
}

.iso-panel-header i {
    color: var(--accent-primary);
    font-size: 1rem;
}

.iso-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.85rem;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.iso-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.iso-mode-tabs {
    display: flex;
    padding: 8px 12px;
    gap: 6px;
    border-bottom: 1px solid var(--border-light);
}

.iso-tab {
    flex: 1;
    padding: 7px 4px;
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.iso-tab i {
    font-size: 0.8rem;
}

.iso-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.iso-tab:hover:not(.active) {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.iso-time-selector {
    padding: 10px 12px;
}

.iso-time-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.iso-time-group.hidden {
    display: none;
}

.iso-time-check {
    cursor: pointer;
    user-select: none;
}

.iso-time-check input {
    display: none;
}

.iso-time-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    color: var(--text-tertiary);
    transition: all 0.25s ease;
    position: relative;
}

.iso-time-check input:checked + .iso-time-badge {
    background: var(--ring-color, rgba(99, 102, 241, 0.2));
    border-color: var(--ring-color, var(--accent-primary));
    color: var(--text-primary);
    box-shadow: 0 0 12px var(--ring-color, rgba(99, 102, 241, 0.3));
}

.iso-stats {
    padding: 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
}

.iso-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    border: 1px solid var(--border-light);
    font-size: 0.75rem;
}

.iso-stat-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.iso-stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.iso-ring-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid;
    flex-shrink: 0;
}

/* ===== Detail Panel ===== */
#detail-panel {
    width: var(--detail-width);
    min-width: var(--detail-width);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-light);
    overflow: hidden;
    z-index: 50;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: margin-right var(--transition-smooth), opacity var(--transition-smooth), width var(--transition-smooth), min-width var(--transition-smooth);
}

.detail-inner-scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#detail-panel.hidden {
    width: 0;
    min-width: 0;
    border: none;
    padding: 0;
    overflow: hidden;
    opacity: 0;
}

#detail-panel.collapsed {
    margin-right: calc(-1 * var(--detail-width));
}

.detail-header {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
    border-bottom: 1px solid var(--border-light);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.detail-category {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    margin-bottom: 6px;
}

.detail-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.detail-district {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

.detail-body {
    padding: 16px 20px;
}

/* Metric Grid */
.metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.metric-card {
    padding: 14px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-fast);
}

.metric-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.metric-card:last-child {
    grid-column: 1 / -1;
}

.metric-icon {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 6px;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.metric-label {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Detail Sections */
.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.detail-section h3 i {
    font-size: 0.75rem;
    color: var(--accent-primary);
}

/* Access Grid */
.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.access-card {
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    text-align: center;
}

.access-card .access-icon {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.access-card .access-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.access-card .access-label {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Transit Lines */
.transit-line-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    margin-bottom: 5px;
    transition: var(--transition-fast);
}

.transit-line-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(3px);
}

.transit-line-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
}

.transit-line-info {
    flex: 1;
    min-width: 0;
}

.transit-line-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transit-line-stops {
    font-size: 0.65rem;
    color: var(--text-tertiary);
}

.transit-line-dist {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-secondary);
    white-space: nowrap;
}

/* Population Stats */
.pop-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    border: 1px solid var(--border-light);
}

.pop-stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pop-stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Nearby AVMs */
.nearby-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nearby-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(3px);
}

.nearby-dist {
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.nearby-dist-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.nearby-dist-unit {
    font-size: 0.58rem;
    color: var(--text-tertiary);
}

.nearby-info {
    flex: 1;
    min-width: 0;
}

.nearby-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nearby-meta {
    font-size: 0.68rem;
    color: var(--text-tertiary);
}

/* ===== Custom AVM Marker ===== */
.avm-marker {
    position: relative;
    cursor: pointer;
}

.avm-marker-inner {
    width: 26px;
    height: 26px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    position: relative;
}

.avm-marker-inner::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50% 50% 50% 0;
}

.avm-marker-inner i {
    transform: rotate(45deg);
    font-size: 11px;
    color: white;
    z-index: 1;
}

.avm-marker:hover .avm-marker-inner {
    transform: rotate(-45deg) scale(1.15);
}

.avm-marker-pulse {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Popup styling */
.popup-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.popup-cat {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.popup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.popup-stat {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.popup-stat strong {
    color: var(--text-primary);
    display: block;
    font-size: 0.82rem;
}

.popup-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 7px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
}

.popup-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

/* Custom tooltip for isochrone labels */
.iso-label {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-family: var(--font-family) !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: white !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 8px rgba(0,0,0,0.5) !important;
    padding: 2px 6px !important;
}

.iso-label::before {
    display: none !important;
}

/* Custom tooltip */
.custom-tooltip {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
    font-family: var(--font-family) !important;
    font-size: 0.78rem !important;
    padding: 6px 10px !important;
}

.custom-tooltip::before {
    border-top-color: var(--bg-secondary) !important;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes isoRingPulse {
    0% { opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { opacity: 0.8; }
}

.avm-card {
    animation: fadeIn 0.4s ease forwards;
}

/* ===== Spotlight / Magnifying Glass Effect ===== */
#spotlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 800;
    opacity: 0;
    transition: opacity 0.3s ease;
    --spot-x: 50%;
    --spot-y: 50%;
    background: radial-gradient(
        circle 120px at var(--spot-x) var(--spot-y),
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

#spotlight-overlay.active {
    opacity: 1;
}

/* AVM marker zoom animation on hover when spotlight is active */
.avm-marker:hover .avm-marker-inner {
    transform: rotate(-45deg) scale(1.25);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.avm-marker:hover .avm-marker-pulse {
    animation: spotlightPulse 1.5s ease-out infinite;
}

@keyframes spotlightPulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(2); opacity: 0.3; }
    100% { transform: scale(3); opacity: 0; }
}

/* ===== Analysis Legend (shows during AVM selection) ===== */
.analysis-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.85rem;
    z-index: 600;
}

.analysis-legend.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===== Modals (Categories & Guide) ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 i {
    color: var(--accent-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    color: var(--text-secondary);
    line-height: 1.6;
}

.category-info-item {
    margin-bottom: 24px;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-primary);
}

.category-info-item:last-child {
    margin-bottom: 0;
}

.category-info-item h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-info-item h3 i {
    font-size: 0.7rem;
}

.category-info-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* Guide List */
.guide-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
}

.guide-list li .style-icon {
    font-size: 1.2rem;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Sidebar Branding & Link */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
    border-bottom: 1px solid var(--border-light);
}

.external-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.external-link:hover {
    transform: translateY(-2px);
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.brand-text {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Scrollbar styling for modals */
.scrollable::-webkit-scrollbar,
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}
.scrollable::-webkit-scrollbar-track,
.custom-scroll::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
.scrollable::-webkit-scrollbar-thumb,
.custom-scroll::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 10px;
}

/* ===== Map Controls Extra ===== */
.mobile-menu-btn {
    display: none;
}

.mobile-only {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 280px;
        --detail-width: 340px;
    }
    .isochrone-panel {
        width: 280px;
    }
}

@media (max-width: 900px) {
    .header-right {
        display: none;
    }
    
    :root {
        --sidebar-width: 260px;
        --detail-width: 300px;
    }
    .isochrone-panel {
        width: 260px;
    }
}

/* ===== Mobile Specific (<= 768px) ===== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-size: 1.25rem;
        cursor: pointer;
        margin-right: 12px;
        padding: 4px;
        align-items: center;
        justify-content: center;
    }

    .mobile-only {
        display: inline-flex !important;
    }

    .logo-icon {
        display: none; /* Hide logo icon on very small screens to save space */
    }

    #sidebar {
        position: fixed !important;
        transform: translateX(-100%) !important;
        left: 0 !important;
        top: var(--header-height) !important;
        width: 85% !important;
        max-width: 320px !important;
        height: calc(100vh - var(--header-height)) !important;
        z-index: 2000 !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow-y: auto !important;
        border-right: 1px solid var(--border-light) !important;
        box-shadow: 4px 0 24px rgba(0,0,0,0.5) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #sidebar.active {
        transform: translateX(0) !important;
    }

    .section-content {
        max-height: none !important;
        opacity: 1 !important;
        padding: 16px !important;
    }

    .section-content.collapsed {
        display: block !important;
    }

    .section-header .toggle-icon {
        display: none; /* No collapsible logic on mobile */
    }

    /* Make detail panel bottom sheet style */
    #detail-panel {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        height: 60vh;
        border-radius: 20px 20px 0 0;
        border: none;
        border-top: 1px solid var(--border-light);
        z-index: 1000;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        visibility: visible;
        pointer-events: auto;
    }

    #detail-panel:not(.hidden) {
        transform: translateY(0);
        display: flex;
    }

    /* Hide close button on header, user can swipe down or tap X */
    .detail-header .close-btn {
        top: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    /* ... (mevcut sidebar, detail-panel vb. kuralları aynı kalacak) ... */

    /* Isochrone Panel: mobile'da fixed konum, detail panel üstünde */
    .isochrone-panel {
        position: fixed !important; /* U-1 Fix: stacking context kurtar */
        bottom: 16px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 92%;
        max-width: 350px;
        z-index: 1500 !important; /* Detail panel 1000'den yüksek */
    }

    .isochrone-panel.visible {
        transform: translateX(-50%) translateY(0);
    }

    /* Detail panel açıkken izokron panelini yukarı it */
    body.detail-open .isochrone-panel.visible {
        bottom: calc(55vh + 16px);
    }

    /* Map controls mobile konum */
    .map-controls {
        top: 90px;
        left: 10px;
        right: auto;
    }

    .map-legend {
        bottom: 16px;
        left: 16px;
        transform: scale(0.85);
        transform-origin: bottom left;
    }

    .analysis-legend {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: auto;
        transform: scale(0.85);
        transform-origin: bottom right;
    }

    .analysis-legend.visible {
        transform: scale(0.85) translateY(0);
    }

    #detail-panel {
        height: 55vh;
    }

    header {
        padding: 0 12px;
    }

    .stat-pill {
        padding: 4px 8px;
        font-size: 0.68rem;
    }
}


/* Transit Tooltips & Popups */
.glass-tooltip {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 6px 10px !important;
    font-family: 'Inter', sans-serif !important;
}

.transit-tooltip {
    line-height: 1.4;
}

.transit-popup h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 5px;
}

.transit-popup p {
    margin: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.transit-popup strong {
    color: var(--text-primary);
}

/* ===== Gayrimenkul Analizi (A Sikkı) ===== */
.re-comparison, .re-mini-chart, .re-score {
    margin-bottom: 16px;
}

.re-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.re-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.re-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* A1: Kiyaslama Bari */
.re-bar-container {
    margin-top: 6px;
}

.re-bar-track {
    position: relative;
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 5px;
    overflow: visible;
}

.re-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.re-bar-marker {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 18px;
    background: var(--text-primary);
    transform: translateX(-50%);
    border-radius: 1px;
    opacity: 0.6;
}

.re-bar-marker::after {
    content: "Ist. Ort.";
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.re-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.re-bar-labels strong {
    color: var(--text-primary);
}

/* A2: Mini Bar Chart */
.re-mini-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.re-mini-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    min-width: 85px;
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.re-mini-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.re-mini-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.re-mini-val {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 38px;
    text-align: right;
}

/* A3: Skor Halka */
.re-score-ring {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 12px auto;
}

.re-score-svg {
    width: 100%;
    height: 100%;
}

.re-score-svg circle:last-child {
    transition: stroke-dasharray 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.re-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    font-weight: 800;
}

.re-score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.re-score-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 3px 0;
    border-bottom: 1px solid var(--border-light);
}

.re-score-item:last-child {
    border-bottom: none;
}

.re-score-item span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}
