* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#map { position: absolute; inset: 44px 0 0 0; }

/* панель фильтра по виду топлива */
.fuelbar {
  position: fixed; top: 52px; left: 10px; right: 10px; z-index: 5;
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; -webkit-overflow-scrolling: touch;
}
.fbtn {
  flex: 0 0 auto; border: 0; border-radius: 18px; padding: 7px 14px; cursor: pointer;
  background: rgba(255,255,255,.95); color: #111; font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.fbtn.active { background: #1db954; color: #fff; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 44px; z-index: 5;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: #0b0b0c; color: #fff;
}
.topbar .muted { color: #9aa0a6; font-size: 12px; }

.legend {
  position: fixed; left: 10px; bottom: 10px; z-index: 5;
  background: rgba(255,255,255,.95); border-radius: 10px; padding: 8px 10px;
  display: flex; gap: 12px; font-size: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.green { background: #1db954; } .dot.amber { background: #f5a623; }
.dot.red { background: #e03131; } .dot.grey { background: #9aa0a6; }

.panel {
  position: fixed; right: 10px; bottom: 10px; z-index: 6; width: 320px; max-width: calc(100vw - 20px);
  background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.panel.hidden, .toast.hidden { display: none; }
.panel { max-height: calc(100vh - 64px); overflow-y: auto; }
.panel h3 { margin: 0 0 4px; font-size: 16px; }
.panel .sub { color: #6b7280; font-size: 12px; margin-bottom: 10px; }
.panel .addr { color: #6b7280; font-size: 12px; margin: 2px 0 8px; }
.panel .fuel { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 6px 0; padding-top: 8px; border-top: 1px solid #f0f0f2; }
.panel .fuel b { display: inline-block; width: 50px; }
.panel .fuel .fstate { font-size: 12px; color: #374151; margin-right: auto; }
.panel .cond-tags { flex-basis: 100%; font-size: 11px; color: #8a6d3b; }
.panel .cond { margin-top: 10px; font-size: 12px; color: #374151; }
.panel .cond input[type=number] { width: 92px; padding: 4px 6px; margin: 4px 4px 0 0; border: 1px solid #d1d5db; border-radius: 6px; }
.panel .cond label { display: inline-block; margin-top: 4px; }
.panel button {
  border: 0; border-radius: 8px; padding: 6px 10px; margin: 2px; cursor: pointer; font-size: 13px; color: #fff;
}
.btn-yes { background: #1db954; } .btn-low { background: #f5a623; } .btn-no { background: #e03131; }
.btn-bell { background: #4b5563; }
.panel .close { position: absolute; top: 8px; right: 12px; cursor: pointer; color: #9aa0a6; border: 0; background: none; font-size: 18px; }
.queue-row { margin-top: 6px; font-size: 12px; color: #374151; }
.queue-row select { margin-left: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 7;
  background: #111; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13px;
}

/* кнопка «найти топливо рядом» и список рекомендаций */
.fab {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 4;
  border: 0; border-radius: 22px; padding: 12px 18px; cursor: pointer;
  background: #1db954; color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.panel .prof { display: flex; gap: 6px; margin: 6px 0 10px; }
.panel .prof button { color: #374151; background: #eef0f3; }
.panel .prof button.active { background: #1db954; color: #fff; }
.panel .rec { padding: 8px 0; border-top: 1px solid #f0f0f2; cursor: pointer; }
.panel .rec:first-of-type { border-top: 0; }
.panel .rec b { font-size: 14px; }
