/* İstasyonlar sayfaları (harita ve detay): istasyon kartı, filtre paneli, detay sayfası. Filtre görünümü filters.css. */
/* İstasyon kartı */
/* İstasyon kartı: risk haritasındaki kayıt kartının düzeni (başlık + rozet, bayraklı konum satırları, koordinat kutusu) */
.st-card { font-family: 'Inter', sans-serif; min-width: 230px; }
.st-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.st-avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; background: #f5f3ff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; overflow: hidden; }
.st-avatar img { width: 100%; height: 100%; object-fit: cover; }
.st-title { flex: 1; min-width: 0; }
.st-name { color: #1e293b; font-size: 1rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-badge { background: #7c3aed; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; white-space: nowrap; }
.st-rows { margin-bottom: 8px; font-size: 0.85rem; color: #475569; }
.st-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.st-row:last-child { margin-bottom: 0; }
.st-key { display: flex; align-items: center; gap: 6px; }
.st-icon { font-size: 1rem; width: 16px; text-align: center; }
.st-value { font-weight: 500; color: #0f172a; text-align: right; }
.st-mono { font-family: monospace; }
.st-coords { background: #f8fafc; padding: 8px; border-radius: 6px; font-size: 0.85rem; color: #475569; }

/* Panel içeriği kadar uzar, kendi içinde kaymaz (3 filtre + düğmeler ekrana sığar); açılır liste panelin üzerine açılır */
.filter-panel.collapsed { max-height: 48px !important; overflow: hidden !important; }

/* ---------------- İstasyon detay sayfası (/Stations/Detail): solda istasyon kartı, sağda harita, filtreler ve tespit listesi ---------------- */
.sd-page { max-width: 1280px; margin: 0 auto; padding: 24px 16px 48px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.sd-card { background: #fff; border: 1px solid #eef2f8; border-radius: 16px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05); padding: 18px; }
.sd-side { position: sticky; top: calc(var(--header-h, 64px) + 16px); display: flex; flex-direction: column; gap: 16px; }

/* Risk lejantı (risk haritasındaki lejant gibi) */
.sd-legend-title { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 0; }
.sd-legend-path { margin: 2px 0 0; font-size: 0.8rem; color: #64748b; font-weight: 500; }
.sd-legend-item { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.sd-legend-item strong { display: block; color: #0f172a; font-size: 0.95rem; }
.sd-legend-item small { color: #64748b; font-size: 0.8rem; }
.sd-legend-color { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; }
.sd-legend-stats { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e2e8f0; display: grid; gap: 10px; }
.sd-legend-stats div { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: #334155; }
.sd-legend-stats strong { color: #3b82f6; font-size: 1.1rem; }
.sd-photo { width: 88px; height: 88px; border-radius: 16px; background: #f5f3ff; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; overflow: hidden; margin-bottom: 12px; }
.sd-photo img { width: 100%; height: 100%; object-fit: cover; }
.sd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sd-head .sd-photo { margin-bottom: 0; flex-shrink: 0; }
.sd-head-text { min-width: 0; }
.sd-head .sd-name { overflow-wrap: anywhere; }
.sd-side .sd-head .st-badge { margin-bottom: 0; }
.sd-name { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 0 0 8px; word-break: break-word; }
.sd-side .st-badge { display: inline-block; margin-bottom: 14px; }
.sd-side .st-rows { padding-top: 12px; border-top: 1px solid #e2e8f0; }
.sd-meta { margin-top: 12px; font-size: 0.8rem; color: #64748b; }
.sd-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.sd-map { height: 380px; border-radius: 16px; overflow: hidden; border: 1px solid #eef2f8; }
.sd-title { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.sd-title .badge-count { background: #7c3aed; color: #fff; border-radius: 20px; padding: 2px 10px; font-size: 0.8rem; }
.sd-filters { display: grid; grid-template-columns: repeat(2, minmax(180px, 240px)) minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.sd-filters .filter-group { margin: 0; }
.sd-filters .filter-actions { margin-top: 0; width: auto; }
.sd-list { display: flex; flex-direction: column; gap: 12px; }
.sd-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid #eef2f8; border-radius: 14px; background: #fff; }
.sd-item:hover { border-color: #ddd6fe; box-shadow: 0 6px 16px -10px rgba(124, 58, 237, 0.45); }
.sd-item.sd-focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.sd-icon { width: 56px; height: 56px; border-radius: 12px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #94a3b8; }
.sd-icon img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.sd-item-title { font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sd-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sd-item-meta { font-size: 0.85rem; color: #64748b; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sd-thumbs { display: flex; gap: 6px; margin-top: 8px; }
.sd-thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; }
.sd-detail-btn { background: #3b82f6; color: #fff; padding: 6px 14px; border-radius: 8px; text-decoration: none; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.sd-detail-btn:hover { background: #2563eb; color: #fff; }
.sd-empty { text-align: center; color: #64748b; padding: 28px 12px; }

/* Bölge gezintisinin geri düğmesi detay sayfasında haritanın köşesinde (sayfa kaydırılır) */
.floating-back-btn.in-map { position: absolute; top: 10px; right: 10px; }

/* Sayfalama: "1-10 / 37", sayfa numaraları, sayfa başına kayıt */
.sd-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: #64748b; }
.sd-pager:empty { display: none; }
.sd-pager-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sd-page-btn { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #1e293b; font-weight: 600; cursor: pointer; }
.sd-page-btn:hover:not(:disabled):not(.active) { border-color: #93c5fd; color: #2563eb; }
.sd-page-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; cursor: default; }
.sd-page-btn:disabled { opacity: 0.4; cursor: default; }
.sd-page-gap { padding: 0 4px; }
.sd-pager-size select { margin-left: 6px; height: 36px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0 8px; background: #fff; color: #1e293b; }

/* İstasyon kartındaki (haritadaki açılır kart) Detay bağlantısı */
.st-actions { margin-top: 8px; text-align: right; }
.st-actions a { background: #3b82f6; color: #fff !important; padding: 4px 12px; border-radius: 4px; text-decoration: none; font-size: 0.75rem; font-weight: 500; }

@media (max-width: 900px) {
    .sd-page { grid-template-columns: 1fr; }
    .sd-side { position: static; }
    .sd-filters { grid-template-columns: 1fr; }
    .sd-item { grid-template-columns: 48px minmax(0, 1fr); }
    .sd-item .sd-detail-btn { grid-column: 1 / -1; justify-self: start; }
    .sd-map { height: 300px; }
    .sd-pager { justify-content: center; }
}