* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  background: #0a0e15;
  color: #e6e6e6;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button,
.chip,
.tbtn,
.ac-item {
  touch-action: manipulation;
}
@supports (padding: env(safe-area-inset-bottom)) {
  #fab,
  #list,
  #navPanel {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
header {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: linear-gradient(180deg, #141a26 0%, #0e131c 100%);
  border-bottom: 1px solid #1f2735;
  z-index: 500;
  position: relative;
}
header .hdr-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
header h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#meta {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.dot.clear {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}
.dot.threat {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  display: inline-block;
  padding: 4px 10px;
  background: #1e2937;
  border: 1px solid #2c3a4f;
  border-radius: 14px;
  font-size: 11px;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  transition:
    opacity 0.15s,
    background 0.15s;
}
.chip:hover {
  background: #243144;
}
.chip.off {
  opacity: 0.35;
}
.chip.src {
  background: #1e293b;
}

.vote {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.vote button {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  border: 1px solid #2c3a4f;
  background: #1a2233;
  color: #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.vote button:hover:not(:disabled) {
  background: #243144;
}
.vote button:disabled {
  opacity: 0.5;
  cursor: default;
}
.vote .v-keep {
  color: #86efac;
  border-color: #14532d;
}
.vote .v-gone {
  color: #fca5a5;
  border-color: #7f1d1d;
}
.vote .v-keep:hover:not(:disabled) {
  background: #14532d;
}
.vote .v-gone:hover:not(:disabled) {
  background: #7f1d1d;
}

.pop .vote {
  margin-top: 8px;
}
.pop .vote button {
  font-size: 10px;
  padding: 4px 6px;
}

/* FAB + modal */
#fab {
  position: fixed;
  right: 360px;
  bottom: 24px;
  z-index: 600;
  padding: 12px 18px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: 0;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  cursor: pointer;
}
#fab:hover {
  transform: translateY(-2px);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 700;
}
.modal.hidden {
  display: none;
}
.modal-box {
  background: #11161f;
  border: 1px solid #232a36;
  border-radius: 12px;
  padding: 18px;
  width: 360px;
  max-width: 92vw;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  color: #f1f5f9;
  font-size: 15px;
}
.modal-head button {
  background: transparent;
  color: #94a3b8;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.type-grid-3 .tbtn {
  padding: 14px 4px;
  font-size: 13px;
}
.type-grid-3 {
  grid-template-columns: repeat(2, 1fr);
}

.ac-wrap {
  position: relative;
}
.ac-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0c1119;
  border: 1px solid #232a36;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
}
.ac-list.hidden {
  display: none;
}
.ac-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #cbd5e1;
  border-bottom: 1px solid #161c28;
}
.ac-item:hover,
.ac-item.sel {
  background: #1a2233;
}
.ac-item small {
  display: block;
  color: #64748b;
  font-size: 10px;
  margin-top: 2px;
}
.tbtn {
  padding: 9px 4px;
  background: #1a2233;
  border: 1px solid #2c3a4f;
  color: #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.tbtn:hover {
  background: #243144;
}
.tbtn.selected.threat {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fca5a5;
}
.tbtn.selected.clear {
  background: #14532d;
  border-color: #22c55e;
  color: #86efac;
}
.modal-label {
  display: block;
  margin: 8px 0 4px;
  font-size: 11px;
  color: #94a3b8;
}
#rPlace,
#rText {
  width: 100%;
  padding: 8px 10px;
  background: #0c1119;
  border: 1px solid #232a36;
  color: #e6e6e6;
  font-size: 13px;
  font-family: inherit;
  border-radius: 6px;
}
#rPlace:focus,
#rText:focus {
  outline: none;
  border-color: #2563eb;
}
.loc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.gps-btn {
  padding: 7px 12px;
  background: #1e293b;
  border: 1px solid #2c3a4f;
  color: #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.gps-btn:hover {
  background: #243144;
}
#gpsStat {
  font-size: 11px;
  color: #64748b;
}
#submitReport {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#submitReport:disabled {
  background: #1e293b;
  color: #64748b;
  cursor: not-allowed;
}
#reportMsg {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
  color: #94a3b8;
  min-height: 16px;
}
#reportMsg.ok {
  color: #86efac;
}
#reportMsg.err {
  color: #fca5a5;
}

/* Mobil styles dosyanin sonuna tasinmis - cascade icin */

header button {
  margin-left: auto;
  background: #2563eb;
  color: #fff;
  border: 0;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}
header button:hover {
  background: #1d4ed8;
}

#map {
  position: absolute;
  top: 56px;
  left: 0;
  right: 340px;
  bottom: 0;
}
#list {
  position: absolute;
  top: 56px;
  right: 0;
  bottom: 0;
  width: 340px;
  overflow-y: auto;
  border-left: 1px solid #1f2735;
  background: #0c1119;
}
#list::-webkit-scrollbar {
  width: 8px;
}
#list::-webkit-scrollbar-track {
  background: #0c1119;
}
#list::-webkit-scrollbar-thumb {
  background: #1f2735;
  border-radius: 4px;
}

.item {
  padding: 11px 14px;
  border-bottom: 1px solid #161c28;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  border-left: 3px solid transparent;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.item:hover {
  background: #11192a;
}
.item.clear {
  border-left-color: #22c55e;
}
.item.threat {
  border-left-color: #ef4444;
}

.item b {
  color: #f1f5f9;
  font-weight: 600;
}
.item .src {
  color: #64748b;
  font-size: 11px;
  margin-top: 2px;
}
.item .txt {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 4px;
}
.item .time {
  color: #64748b;
  font-size: 11px;
  float: right;
}
.item .kw {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kw.clear {
  background: #14532d;
  color: #86efac;
}
.kw.threat {
  background: #7f1d1d;
  color: #fca5a5;
}

.empty {
  padding: 30px 20px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

/* Popup */
.leaflet-popup-content-wrapper {
  background: #141a26;
  color: #e6e6e6;
  border-radius: 8px;
  border: 1px solid #1f2735;
}
.leaflet-popup-tip {
  background: #141a26;
}
.leaflet-popup-content {
  margin: 12px 14px;
  min-width: 200px;
}
.pop .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.pop .badge.clear {
  background: #14532d;
  color: #86efac;
}
.pop .badge.threat {
  background: #7f1d1d;
  color: #fca5a5;
}
.pop .pp {
  font-weight: 600;
  margin-top: 6px;
  color: #f1f5f9;
}
.pop .pt {
  font-size: 12px;
  margin-top: 4px;
  color: #cbd5e1;
}
.pop-admin {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #2c3a4f;
}
.pop-admin button {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  border: 1px solid #7c3aed;
  background: #1e1b4b;
  color: #c4b5fd;
  border-radius: 4px;
  cursor: pointer;
}
.pop-admin button.pa-del {
  border-color: #b91c1c;
  background: #450a0a;
  color: #fca5a5;
}
.pop .pm {
  font-size: 10px;
  color: #64748b;
  margin-top: 6px;
}

/* Marker style - radar.jpeg gorseline gore */
.pin-threat,
.pin-clear,
.pin-radar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.pin-threat {
  background: #ef4444;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.4);
}
.pin-clear {
  background: #22c55e;
  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.4);
}
.pin-radar {
  background: #7c3aed;
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Marker pulse (dis halka) */
.rmark div {
  animation: pulse 2.5s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Leaflet attribution gizle */
.leaflet-control-attribution {
  display: none !important;
}

/* Cluster restyle */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(37, 99, 235, 0.4) !important;
}
.marker-cluster div {
  background: #2563eb !important;
  color: #fff !important;
  font-weight: 700;
}

/* GPS Banner */
#gpsBanner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 80px;
  z-index: 700;
  background: #11161f;
  border: 1px solid #2563eb;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  max-width: 480px;
  margin: 0 auto;
}
#gpsBanner .gb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #f1f5f9;
  font-size: 14px;
}
#gpsBanner .gb-row button {
  background: transparent;
  color: #94a3b8;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}
#gpsBanner .gb-msg {
  font-size: 12px;
  color: #cbd5e1;
  margin: 6px 0 10px;
  line-height: 1.5;
}
#gpsBanner #gpsBannerRetry {
  width: 100%;
  padding: 10px;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
@media (min-width: 900px) {
  #gpsBanner {
    left: auto;
    right: 360px;
    bottom: 90px;
    width: 320px;
  }
}

/* Paywall */
.paywall {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(10, 14, 21, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Header + admin bar gorunsun: bunlar z-index 500+ ama paywall 800.
     Bunun yerine overlay top'tan ASAGI baslar */
  top: 56px;
}
body.has-admin-bar .paywall {
  top: 90px;
}
.paywall.hidden {
  display: none;
}
.pw-card {
  background: linear-gradient(180deg, #11161f 0%, #0c1119 100%);
  border: 1px solid #232a36;
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.pw-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pw-card p {
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 18px;
}
.pw-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.pw-plans-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.pw-free-only {
  grid-template-columns: 1fr;
}
.pw-plan.trial {
  border-color: #22c55e;
  background: linear-gradient(180deg, #052e16, #1a2233);
}
.pw-plan.trial button {
  background: #16a34a;
}
.pw-plan.trial .pw-save {
  color: #86efac;
}
.pw-plan {
  background: #1a2233;
  border: 1px solid #2c3a4f;
  border-radius: 10px;
  padding: 14px 10px;
}
.pw-plan.featured {
  border-color: #c084fc;
  background: linear-gradient(180deg, #1e1b4b, #1a2233);
}
.pw-plan b {
  color: #cbd5e1;
  font-size: 13px;
}
.pw-plan .pw-price {
  font-size: 22px;
  color: #f1f5f9;
  font-weight: 700;
  margin: 8px 0;
}
.pw-plan .pw-save {
  font-size: 10px;
  color: #86efac;
  margin-bottom: 8px;
}
.pw-plan button {
  width: 100%;
  padding: 8px;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
.pw-plan.featured button {
  background: linear-gradient(90deg, #7c3aed, #2563eb);
}
.pw-or {
  font-size: 12px;
  color: #64748b;
  margin: 14px 0 8px;
}
.pw-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.pw-auth button {
  padding: 12px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pw-auth .pw-buy {
  background: linear-gradient(90deg, #7c3aed, #2563eb);
  color: #fff;
}
.pw-auth #pwLogin {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #2c3a4f;
  width: 100%;
}
#pwLogin {
  width: 100%;
  padding: 10px;
  background: #1e293b;
  border: 1px solid #2c3a4f;
  color: #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.pw-form {
  margin-top: 14px;
}
.pw-form input {
  width: 100%;
  padding: 9px;
  margin-bottom: 8px;
  background: #0c1119;
  border: 1px solid #232a36;
  color: #e6e6e6;
  border-radius: 6px;
  font-size: 13px;
}
.pw-form button {
  width: 100%;
  padding: 10px;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
.pw-err {
  color: #fca5a5;
  font-size: 12px;
  margin-top: 6px;
}
.pw-forgot {
  color: #60a5fa;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  margin-top: 8px;
}
.pw-forgot:hover {
  text-decoration: underline;
}

/* Admin Bar - default gizli, body.has-admin-bar ile gosterilir */
#adminBar {
  background: linear-gradient(90deg, #7c3aed, #2563eb);
  color: #fff;
  padding: 6px 14px;
  display: none;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  z-index: 600;
  position: relative;
}
body.has-admin-bar #adminBar {
  display: flex;
}
#adminBar a {
  color: #fde68a;
  text-decoration: none;
  font-weight: 600;
}
#adminBar a:hover {
  text-decoration: underline;
}
#adminBar .ed-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
#adminBar button {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: 0;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
body.has-admin-bar header {
  top: 34px;
}
body.has-admin-bar #map,
body.has-admin-bar #list {
  top: 90px !important;
}
body.has-admin-bar #routeBar {
  bottom: 0 !important;
}

/* RouteBar - default gizli, has-route-bar aktif olunca gorunur */
#routeBar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 340px;
  z-index: 490;
  background: rgba(12, 17, 25, 0.96);
  border-top: 1px solid #1f2735;
  border-radius: 12px 12px 0 0;
  padding: 10px 12px;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}
.rb-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.rb-ac {
  flex: 1;
  min-width: 0;
}
#rFrom,
#rTo {
  width: 100%;
  padding: 8px 10px;
  background: #0c1119;
  border: 1px solid #232a36;
  color: #e6e6e6;
  font-size: 13px;
  border-radius: 6px;
  font-family: inherit;
}
#rFrom:focus,
#rTo:focus {
  outline: none;
  border-color: #2563eb;
}
#routeBar button {
  padding: 7px 12px;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#routeBar button.ghost {
  background: #1e293b;
  border: 1px solid #2c3a4f;
}
#routeBar button.active {
  background: #f59e0b !important;
  color: #422006 !important;
}
#routeBar button:hover {
  filter: brightness(1.15);
}
#routeSummary {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  min-height: 14px;
}
body.has-route-bar #routeBar {
  display: block;
}
/* Uyari ve Sohbet paneli (icon acılır) */
.side-panel {
  position: absolute;
  top: 56px;
  right: 0;
  bottom: 0;
  width: 340px;
  background: #0c1119;
  border-left: 1px solid #1f2735;
  z-index: 510;
  overflow-y: auto;
  display: none;
}
.side-panel.open {
  display: block;
}
.side-panel .sp-head {
  padding: 12px 14px;
  border-bottom: 1px solid #1f2735;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #f1f5f9;
  font-weight: 700;
  position: sticky;
  top: 0;
  background: #0c1119;
  z-index: 2;
}
.side-panel .sp-head button {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}
.sp-item {
  padding: 10px 14px;
  border-bottom: 1px solid #161c28;
  cursor: pointer;
  font-size: 13px;
}
.sp-item:hover {
  background: #11192a;
}
.sp-item .sp-src {
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
}
.sp-item .sp-time {
  color: #64748b;
  font-size: 10px;
  float: right;
}
.sp-item .sp-text {
  color: #cbd5e1;
  margin-top: 4px;
  line-height: 1.4;
}
.sp-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px !important;
}
.sp-mini .sp-time {
  float: none !important;
  color: #64748b;
  font-size: 11px;
  min-width: 40px;
}
.sp-mini .sp-kw {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.sp-mini b {
  color: #f1f5f9;
  font-size: 13px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-mini2 {
  padding: 10px 12px !important;
}
.sp-mini2-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-mini2-head .sp-time {
  color: #64748b;
  font-size: 11px;
  min-width: 40px;
  float: none !important;
}
.sp-mini2-head .sp-kw {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.sp-mini2-head b {
  color: #f1f5f9;
  font-size: 13px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-mini2-desc {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.4;
}
/* Chat full-screen (WhatsApp benzeri) */
.chat-full {
  position: fixed;
  inset: 0;
  z-index: 900;
  background:
    linear-gradient(rgba(10, 14, 21, 0.92), rgba(10, 14, 21, 0.92)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><circle cx='20' cy='20' r='1' fill='%231f2735'/></svg>");
  display: none;
  flex-direction: column;
}
.chat-full.open {
  display: flex;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #1e293b, #0c1119);
  border-bottom: 1px solid #1f2735;
  z-index: 2;
}
.chat-head .sp-close {
  background: transparent;
  border: 0;
  color: #cbd5e1;
  cursor: pointer;
  padding: 4px;
  border-radius: 999px;
}
.chat-head .sp-close:hover {
  background: #232a36;
}
.chat-head .chat-title b {
  color: #f1f5f9;
  font-size: 15px;
  display: block;
}
.chat-head .chat-title small {
  color: #94a3b8;
  font-size: 11px;
}
.cp-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
  -webkit-overflow-scrolling: touch;
}
.cp-msg {
  background: #1a2233;
  border: 1px solid #2c3a4f;
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 85%;
  align-self: flex-start;
}
.cp-msg.own {
  background: #1e3a8a;
  border-color: #2563eb;
  align-self: flex-end;
}
.cp-msg .cp-u {
  font-size: 11px;
  color: #60a5fa;
  font-weight: 700;
}
.cp-msg.own .cp-u {
  color: #93c5fd;
}
.cp-msg .cp-t {
  color: #f1f5f9;
  font-size: 13px;
  margin-top: 2px;
  word-wrap: break-word;
}
.cp-msg .cp-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}
.cp-input {
  padding: 10px 12px;
  background: #0c1119;
  border-top: 1px solid #1f2735;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.cp-input input {
  flex: 1;
  padding: 11px 14px;
  background: #11161f;
  border: 1px solid #232a36;
  color: #e6e6e6;
  border-radius: 999px;
  font-size: 16px; /* mobil focus zoom onlemek icin >=16 */
}
.cp-input input:focus {
  outline: none;
  border-color: #2563eb;
}
.cp-input button {
  width: 44px;
  height: 44px;
  padding: 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.cp-input button#cpEmojiBtn {
  background: #1e293b;
  border: 1px solid #2c3a4f;
  color: #cbd5e1;
  box-shadow: none;
}
.cp-input button:hover {
  filter: brightness(1.1);
}
.cp-emoji {
  padding: 10px 12px;
  background: #0c1119;
  border-top: 1px solid #1f2735;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}
.cp-emoji span {
  font-size: 24px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.cp-emoji span:hover {
  background: #1e293b;
}
.cp-msg-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}
.cp-msg-row.own {
  justify-content: flex-end;
}
.cp-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Nav Panel */
#navPanel {
  position: absolute;
  top: 116px;
  right: 0;
  bottom: 0;
  width: 340px;
  background: #0c1119;
  border-left: 1px solid #1f2735;
  overflow-y: auto;
  z-index: 510;
}
#navPanel.hidden {
  display: none;
}
.nav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #1f2735;
  position: sticky;
  top: 0;
  background: #0c1119;
}
.nav-head button {
  background: transparent;
  color: #94a3b8;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}
.nav-section {
  padding: 10px 14px 4px;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}
#navSummary {
  padding: 10px 14px;
  font-size: 13px;
  color: #cbd5e1;
  border-bottom: 1px solid #161c28;
}
.nav-start-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: #22c55e;
  color: #052e16;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.nav-start-btn.active {
  background: #f59e0b;
  color: #422006;
}
.nav-alert {
  padding: 9px 14px;
  border-bottom: 1px solid #161c28;
  border-left: 3px solid #ef4444;
  cursor: pointer;
  font-size: 12px;
}
.nav-alert:hover {
  background: #11192a;
}
.nav-alert .nat {
  display: inline-block;
  padding: 2px 6px;
  background: #7f1d1d;
  color: #fca5a5;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 6px;
}
.nav-alert .nakm {
  float: right;
  color: #fbbf24;
  font-weight: 600;
}
.nav-step {
  padding: 8px 14px;
  border-bottom: 1px solid #161c28;
  font-size: 12px;
  color: #cbd5e1;
}
.nav-step .nsd {
  color: #64748b;
  font-size: 11px;
  margin-top: 2px;
}
.nav-step.next {
  background: #11192a;
  border-left: 3px solid #2563eb;
}

@media (max-width: 900px) {
  #routeBar {
    bottom: 0 !important;
    top: auto !important;
    right: 0;
    padding: 6px 8px;
  }
  .rb-row {
    flex-wrap: wrap;
  }
  .rb-ac {
    flex: 1 1 100%;
  }
  body.has-route-bar #map { /* bottom drawer */ }
  #navPanel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 50vh;
    max-height: 50vh;
    border-left: 0;
    border-top: 1px solid #1f2735;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: height 0.2s ease;
  }
  #navPanel.collapsed {
    height: 44px !important;
    overflow: hidden !important;
  }
  /* Nav acikken bildirim listesi gizlenir, harita nav yuksekligine adapte */
  body.nav-active #list {
    display: none !important;
  }
  body.nav-active #map {
    bottom: 50vh !important;
  }
  body.nav-active.nav-collapsed #map {
    bottom: 44px !important;
  }
  .nav-head {
    cursor: pointer;
  }
  .nav-head::before {
    content: "";
    display: block;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #475569;
    border-radius: 2px;
  }
  .nav-head {
    position: sticky;
    top: 0;
    padding-top: 18px;
  }
}

/* Top Pill: en yakin uyari sayisi + kartlar */
#topPill {
  position: absolute;
  top: 68px;
  left: 12px;
  right: 12px;
  z-index: 480;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.tp-pill {
  pointer-events: auto;
  background: rgba(17, 22, 31, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid #232a36;
  border-radius: 24px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.tp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}
.tp-count {
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}
.tp-cards {
  pointer-events: auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
}
.tp-card {
  background: rgba(17, 22, 31, 0.96);
  border: 1px solid #232a36;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.tp-card .tp-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tp-card .tp-info b {
  color: #f1f5f9;
  font-size: 12px;
  display: block;
}
.tp-card .tp-info small {
  color: #94a3b8;
  font-size: 11px;
}
.tp-card .tp-dist {
  color: #60a5fa;
  font-weight: 700;
  font-size: 13px;
}

/* Alt aksiyon bari (4 buton) */
#actionBar {
  display: none;
  position: fixed;
  bottom: 60px;
  left: 12px;
  right: 12px;
  z-index: 500;
  gap: 8px;
}
#actionBar .ab-btn {
  flex: 1;
  background: rgba(17, 22, 31, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid #232a36;
  border-radius: 20px;
  padding: 8px 6px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
#actionBar .ab-icon {
  font-size: 16px;
  font-weight: 800;
}

/* Alt tab bar (5 sekme) */
#tabBar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #0c1119;
  border-top: 1px solid #1f2735;
  z-index: 500;
  padding-bottom: env(safe-area-inset-bottom);
}
#tabBar .tb-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: 0;
  color: #64748b;
  font-size: 10px;
  cursor: pointer;
  position: relative;
}
#tabBar .tb-btn.active {
  color: #60a5fa;
}
#tabBar .tb-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px;
  text-align: center;
}

/* ============== MOBIL (dosya sonu - cascade kazansin) ============== */
@media (max-width: 900px) {
  header {
    height: 44px !important;
    gap: 8px !important;
    padding: 0 10px !important;
  }
  header h1 {
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }
  header .chips,
  #srcChips {
    display: none !important;
  }
  #meta {
    font-size: 10px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  header button#refresh {
    padding: 4px 10px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }

  #map {
    position: absolute !important;
    top: 44px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 44px !important;
    width: auto !important;
  }

  #list {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 44px !important;
    border-left: 0 !important;
    border-top: 1px solid #1f2735 !important;
    background: #0c1119 !important;
    overflow: hidden !important;
    z-index: 450 !important;
    transition: height 0.22s ease !important;
  }
  #list.half {
    height: 50vh !important;
    overflow-y: auto !important;
  }
  #list.full {
    height: 85vh !important;
    overflow-y: auto !important;
  }
  body.sheet-half #map {
    bottom: 50vh !important;
  }
  body.sheet-full #map {
    bottom: 85vh !important;
  }

  #list::before {
    content: "" !important;
    display: block !important;
    position: sticky !important;
    top: 0 !important;
    width: 50px !important;
    height: 4px !important;
    background: #475569 !important;
    border-radius: 2px !important;
    margin: 8px auto 4px !important;
  }
  #list::after {
    content: "Bildirimler — yukari kaydir" !important;
    display: block !important;
    position: sticky !important;
    top: 16px !important;
    text-align: center !important;
    font-size: 10px !important;
    color: #64748b !important;
    margin-bottom: 6px !important;
    pointer-events: none !important;
  }
  #list.half::after,
  #list.full::after {
    content: "Bildirimler" !important;
  }

  #fab {
    right: 14px !important;
    bottom: 58px !important;
    transition: bottom 0.22s !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
  }
  body.sheet-half #fab {
    bottom: calc(50vh + 14px) !important;
  }
  body.sheet-full #fab {
    bottom: calc(85vh + 14px) !important;
  }

  .leaflet-bottom.leaflet-left {
    bottom: 50px !important;
  }
  body.sheet-half .leaflet-bottom.leaflet-left {
    bottom: calc(50vh + 6px) !important;
  }
  body.sheet-full .leaflet-bottom.leaflet-left {
    bottom: calc(85vh + 6px) !important;
  }
  .item {
    padding: 9px 12px !important;
    font-size: 12px !important;
  }
  .modal-box {
    width: 96vw !important;
    padding: 14px !important;
    max-height: 88vh !important;
  }
  .tbtn {
    font-size: 12px !important;
    padding: 12px 4px !important;
  }
  /* RouteBar mobil: iki input tam genislik, butonlar 5'li grid */
  #routeBar {
    padding: 6px !important;
    bottom: 112px !important;
    right: 0 !important;
    border-radius: 12px 12px 0 0 !important;
  }
  #routeBar .rb-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
  }
  #routeBar .rb-ac {
    grid-column: 1 / -1 !important;
  }
  #routeBar button {
    padding: 8px 6px !important;
    font-size: 11px !important;
  }
  #routeSummary {
    font-size: 10px !important;
  }
  /* Admin bar mobil */
  #adminBar {
    padding: 4px 8px !important;
    font-size: 11px !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  #adminBar .ed-toggle {
    font-size: 11px !important;
  }
  #adminBar button {
    padding: 3px 8px !important;
    font-size: 11px !important;
  }
  body.has-admin-bar #map,
  body.has-admin-bar #list {
    top: 76px !important;
  }
  body.has-admin-bar #routeBar {
    bottom: 0 !important;
    top: auto !important;
  }
  /* Paywall mobil */
  .paywall {
    padding: 12px !important;
  }
  .pw-card {
    padding: 20px 16px !important;
  }
  .pw-card h2 {
    font-size: 18px !important;
  }
  .pw-plans-3 {
    grid-template-columns: 1fr !important;
  }
  /* Modal bildirim - buton row */
  .loc-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .loc-row .gps-btn {
    flex: 1 1 45% !important;
    padding: 8px !important;
    font-size: 11px !important;
  }
  #gpsStat {
    flex-basis: 100% !important;
    font-size: 10px !important;
  }
  /* Nav panel scroll icin daha iyi taps */
  #navPanel {
    -webkit-overflow-scrolling: touch !important;
  }
  .nav-alert {
    padding: 10px 12px !important;
  }
  .nav-step {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  /* Popup mobilde daha buyuk hedef */
  .pop-admin button {
    padding: 8px !important;
    font-size: 12px !important;
  }
  /* Autocomplete mobilde tam genislik + touch */
  .ac-list {
    max-height: 200px !important;
  }
  .ac-item {
    padding: 12px !important;
    font-size: 14px !important;
  }
  /* Baslat butonu (nav) mobilde belirgin */
  .nav-start-btn {
    padding: 12px !important;
    font-size: 15px !important;
  }
  /* Mobilde alt action bar + tab bar aktif, eski #list gizli */
  #actionBar {
    display: flex !important;
  }
  #tabBar {
    display: flex !important;
  }
  #list {
    display: none !important;
  }
  #fab {
    display: none !important;
  }
  #map {
    bottom: 56px !important;
  }
  body.has-admin-bar #topPill {
    top: 108px !important;
  }
  /* Route bar bottom drawer: topPill konumu degismesin */
}
/* Cok kucuk ekran (≤380px) */
@media (max-width: 380px) {
  #routeBar .rb-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  #routeBar button {
    font-size: 10px !important;
  }
  header h1 {
    font-size: 10px !important;
  }
  #fab {
    padding: 8px 10px !important;
    font-size: 11px !important;
  }
}

/* Klavye acikken (mobil): alt barlari gizle, routeBar klavyeye yapissin */
body.kb-open #actionBar,
body.kb-open #tabBar { display: none !important; }
body.kb-open #routeBar { bottom: 0 !important; }
body.kb-open #map { bottom: 0 !important; }
