:root {
    --green: #10b981; --green-light: #d1fae5;
    --red: #ef4444; --yellow: #eab308;
    --bg-main: #f3f4f6; --bg-card: #ffffff;
    --text-main: #111827; --text-muted: #6b7280;
    --border: #e5e7eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
body { overflow: hidden; background: var(--bg-main); }
#app { position: relative; width: 100vw; height: 100vh; }
#map { position: absolute; inset: 0; z-index: 1; }

#sidebar {
    position: absolute; top: 15px; left: 15px; bottom: 15px; width: 380px;
    background: var(--bg-main); border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 10; display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; position: relative; }

.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.logo-block { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--text-main); }
.logo-icon { background: var(--text-main); color: var(--green); width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.geo-btn { background: var(--bg-main); border: none; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text-main); display: flex; align-items: center; gap: 4px; }
.info-text { font-size: 12px; color: var(--text-muted); padding: 0 20px; margin-bottom: 15px; }

.action-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 15px; border-bottom: 1px solid var(--border); }
.chip-btn { flex: 0 0 auto; background: #fff; border: 1px solid var(--border); padding: 8px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--text-main); transition: 0.2s; }
.chip-btn:hover { background: var(--bg-main); }
.filter-dots { display: flex; gap: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.red { background: var(--red); } .dot.gray { background: #9ca3af; }
.green-outline { border-color: var(--green); color: var(--green); background: var(--green-light); }
.chip-close { color: #9ca3af; margin-left: 4px; font-weight: bold; }

.nearby-section { flex: 1; display: flex; flex-direction: column; background: var(--bg-main); }
.nearby-header { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.nearby-header h2 { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.smart-btn { background: var(--green-light); color: #059669; border: 1px solid var(--green); padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; cursor: pointer; }

.stations-list { padding: 0 15px 15px; overflow-y: auto; flex: 1; }
.station-card { background: var(--bg-card); border-radius: 16px; padding: 12px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; cursor: pointer; border: 1px solid transparent; transition: 0.2s; }
.station-card:hover, .station-card.active { border-color: var(--green); box-shadow: 0 4px 12px rgba(16,185,129,0.1); transform: translateY(-1px); }
.card-logo { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: bold; color: var(--red); font-size: 12px; }
.card-body { flex: 1; }
.card-status { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 5px; margin-bottom: 2px; }
.status-text.red { color: var(--red); } .status-text.green { color: var(--green); } .status-text.yellow { color: #ca8a04; } .status-text.gray { color: var(--text-muted); }
.card-brand { font-size: 15px; font-weight: 700; color: var(--text-main); }
.card-fuels { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.card-right { text-align: right; }
.card-dist { font-size: 14px; font-weight: 700; color: var(--text-main); }
.card-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

.bottom-tabbar { background: #fff; height: 60px; display: flex; border-top: 1px solid var(--border); padding: 0 10px; z-index: 100; }
.tab-btn { flex: 1; background: none; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #9ca3af; cursor: pointer; gap: 4px; }
.tab-btn span { font-size: 20px; }
.tab-btn.active { color: var(--green); }

.search-blur-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 60px; background: rgba(243, 244, 246, 0.6); backdrop-filter: blur(12px); z-index: 50; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: 0.3s; }
.search-blur-backdrop:not(.hidden) { opacity: 1; pointer-events: auto; }
.search-top-bar { padding: 20px; display: flex; gap: 10px; align-items: center; }
.search-input-clean { flex: 1; background: #fff; border: 1px solid #3b82f6; border-radius: 16px; padding: 14px 16px; font-size: 15px; outline: none; box-shadow: 0 4px 15px rgba(0,0,0,0.05); color: var(--text-main); }
.search-input-clean::placeholder { color: #9ca3af; }
.search-close-circle { background: #fff; border: 1px solid var(--border); width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; color: var(--text-main); box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: 0.2s; }
.search-results-clean { list-style: none; padding: 0 20px; overflow-y: auto; }
.search-results-clean li { padding: 15px; background: #fff; border-radius: 16px; margin-bottom: 10px; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }

.details-panel { position: absolute; top: 15px; left: 410px; bottom: 15px; width: 400px; background: #fff; border-radius: 24px; box-shadow: 10px 10px 40px rgba(0,0,0,0.1); z-index: 9; transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); overflow-y: auto; }
.details-panel.hidden { transform: translateX(-110%); opacity: 0; pointer-events: none; }

/* 🚀 ИДЕАЛЬНОЕ ЦЕНТРИРОВАНИЕ ШИРОКОГО ФИЛЬТРА */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: 0.3s; backdrop-filter: blur(2px); }
.modal-backdrop:not(.hidden) { opacity: 1; pointer-events: auto; }
.modal-backdrop:not(.hidden) .bottom-sheet { transform: translateY(0); }

.bottom-sheet { 
    background: #fff; width: 100%; border-radius: 24px 24px 0 0; padding: 25px; 
    transform: translateY(100%); transition: 0.3s; position: absolute; bottom: 0; 
}
.wide-sheet { 
    max-width: 1000px; /* Растягиваем как на скрине */
    margin: 0 auto; 
    left: 0; right: 0; /* Жестко по центру */
}

.sheet-title { font-size: 12px; font-weight: 600; color: #9ca3af; text-transform: uppercase; margin-bottom: 10px; }
.sheet-title.center { text-align: center; margin-top: 25px; }
.filter-list { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 20px; }
.filter-row { padding: 15px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.f-left b { font-size: 15px; color: var(--text-main); }
.f-left small { font-size: 12px; color: var(--text-muted); display: block; margin-top: 4px; margin-left: 18px; }
.f-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.f-dot.gray { background: #9ca3af; } .f-dot.green { background: var(--green); } .f-dot.multi { background: linear-gradient(90deg, var(--green) 33%, var(--yellow) 33% 66%, var(--red) 66%); }
.check-icon { color: var(--green); font-weight: bold; font-size: 18px; }
.radio-circle { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 50%; }
.chips-selector { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.sel-chip { padding: 10px 18px; background: #fff; border: 1px solid var(--border); border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sel-chip.active { border-color: var(--green); color: var(--green); background: var(--green-light); }
.btn-sheet-close { width: 100%; background: var(--bg-main); border: none; padding: 16px; border-radius: 16px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 15px; }

/* Кастомные пины */
.custom-pin-wrap { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding-bottom: 8px; }
.custom-pin { width: 32px; height: 32px; background: #1c2024; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; border: 2px solid #fff; transition: 0.3s; z-index: 2;}
.custom-pin.green { box-shadow: 0 0 16px 6px rgba(16, 185, 129, 0.45); }
.custom-pin.yellow { box-shadow: 0 0 16px 6px rgba(234, 179, 8, 0.45); }
.custom-pin.red { box-shadow: 0 0 16px 6px rgba(239, 68, 68, 0.45); }
.custom-pin.gray { box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.custom-pin::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); border-width: 5px 5px 0; border-style: solid; border-color: #1c2024 transparent transparent transparent; }
.pin-dot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; z-index: 3;}
.pin-dot.green { background: var(--green); }
.pin-dot.yellow { background: var(--yellow); }
.pin-dot.red { background: var(--red); }
.pin-dot.gray { background: #9ca3af; }

@media (max-width: 768px) {
    #sidebar { top: auto; bottom: 0; left: 0; width: 100%; height: 60vh; border-radius: 24px 24px 0 0; }
    .details-panel { top: 40vh; left: 0; bottom: 0; width: 100%; border-radius: 24px 24px 0 0; transform: translateY(110%); z-index: 20; }
    .search-blur-backdrop { bottom: 0; border-radius: 24px 24px 0 0; }
    .wide-sheet { max-width: 100%; } /* На мобилках на всю ширину */
}