:root {
  --bg: #0b111d;
  --bg-soft: rgba(17, 24, 39, 0.92);
  --bg-card: rgba(24, 33, 50, 0.92);
  --text: #e5edf8;
  --muted: #9aa8bc;
  --line: rgba(255,255,255,0.08);
  --blue: #1d8cff;
  --yellow: #ffd84d;
  --green: #57d47d;
  --red: #ff5f6d;
  --shadow: 0 12px 40px rgba(0,0,0,0.35);
  --radius: 18px;
  --font: Inter, system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); height: 100%; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
#app { display: grid; grid-template-columns: 390px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, rgba(8,13,24,0.96), rgba(10,14,26,0.92)); border-right: 1px solid var(--line); padding: 18px; overflow-y: auto; }
.map-shell { position: relative; min-height: 100vh; }
#map { height: 100vh; width: 100%; }
.brand { display: flex; align-items: center; margin-bottom: 14px; }
.brand h1 { margin: 0; font-size: 1.5rem; }
.brand span { color: var(--yellow); }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; backdrop-filter: blur(8px); }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-header h2 { margin: 0; font-size: 1.02rem; }
.between { justify-content: space-between; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.08); color: var(--yellow); font-size: 0.82rem; }
.stack { display: flex; flex-direction: column; }
.gap-sm { gap: 10px; }
.mt-sm { margin-top: 10px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.92rem; }
input, select, textarea { width: 100%; background: rgba(255,255,255,0.04); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; }
textarea { min-height: 92px; resize: vertical; }
.btn, .icon-btn { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,0.05); border-radius: 12px; padding: 10px 14px; cursor: pointer; transition: .15s ease; }
.btn:hover, .icon-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.08); }
.btn-primary { background: linear-gradient(180deg, #2898ff, #0e74e6); border-color: transparent; }
.btn-secondary { background: linear-gradient(180deg, #334155, #1f2937); }
.btn-ghost { background: rgba(255,255,255,0.04); }
.grid-2, .filters-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topbar { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 1000; display: flex; gap: 12px; }
.topbar input { flex: 1; background: rgba(15, 23, 42, 0.92); box-shadow: var(--shadow); }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toast-container { position: absolute; right: 16px; bottom: 16px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 11px 14px; background: rgba(15, 23, 42, 0.96); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.reports-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.report-item { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.03); }
.report-item h3 { margin: 6px 0; font-size: 0.98rem; }
.report-meta { color: var(--muted); font-size: 0.83rem; }
.report-footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.vote-btn, .mini-btn { border: 0; border-radius: 10px; background: rgba(255,255,255,0.08); color: var(--text); padding: 8px 10px; cursor: pointer; }
.report-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 0.78rem; }
.badge-delay { background: rgba(255,216,77,0.18); color: #ffe37c; }
.badge-breakdown { background: rgba(255,95,109,0.18); color: #ff9aa3; }
.badge-detour { background: rgba(174,112,255,0.18); color: #c9a5ff; }
.badge-missing_trip { background: rgba(29,140,255,0.18); color: #8bc6ff; }
.badge-crowded { background: rgba(255,153,51,0.18); color: #ffc47d; }
.badge-stop_issue { background: rgba(87,212,125,0.18); color: #9df0b6; }
.badge-other, .badge-new { background: rgba(255,255,255,0.1); color: #e5edf8; }
.badge-verified { background: rgba(87,212,125,0.18); color: #9df0b6; }
.badge-closed { background: rgba(255,95,109,0.18); color: #ff9aa3; }
.auth-status { margin-bottom: 10px; color: var(--muted); }
.tracking-panel { display: grid; gap: 8px; }
.tracking-row { display: flex; justify-content: space-between; gap: 12px; }
.search-results { position: absolute; top: 70px; left: 16px; z-index: 1100; width: min(560px, calc(100% - 32px)); background: rgba(15, 23, 42, 0.97); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.search-result { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: rgba(255,255,255,0.05); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: rgba(15, 23, 42, 0.96); color: var(--text); }
.leaflet-popup-content { margin: 12px 14px; }
.popup-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.popup-title h3 { margin: 0; }
.popup-actions { display: flex; gap: 8px; margin-top: 10px; }
@media (max-width: 1080px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { max-height: none; }
  #map { height: 60vh; }
  .topbar { position: sticky; top: 0; padding-top: 16px; }
}
