/* ═══════════════════════════════════════════════════════════════
   GPS.CSS — v4.94: Canlı Texnik İzləmə (Google Maps)
   Qaranlıq panel (#07090f arxa plan) + göy aksent (#3b82f6)
   ═══════════════════════════════════════════════════════════════ */

.gps-layout{
  display: flex;
  gap: 14px;
  height: calc(100vh - 250px);
  min-height: 440px;
  max-height: 820px;
}

/* ── Sol sidebar (268px) — açıq tema (v4.99: yalnız xəritənin içi qara) ── */
.gps-sidebar{
  width: 268px;
  flex: 0 0 268px;
  background: #FFFFFF;
  border: 1px solid #E2E9F3;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(20,35,55,.08);
}
.gps-sb-head{
  padding: 14px 16px 12px;
  border-bottom: 1px solid #EFF3F9;
}
.gps-sb-title{
  font-size: 13px;
  font-weight: 800;
  color: #12233B;
  letter-spacing: .02em;
}
.gps-sb-sub{
  font-size: 11.5px;
  color: #6B7F99;
  margin-top: 2px;
}
.gps-sb-list{
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.gps-sb-list::-webkit-scrollbar{ width: 6px; }
.gps-sb-list::-webkit-scrollbar-thumb{ background:#D5DFEA; border-radius:6px; }
.gps-sb-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease;
}
.gps-sb-item:hover{ background: #F2F6FC; }
.gps-sb-avatar{
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #E4EEF9;
  color: #1D5FB8;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.gps-sb-body{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gps-sb-name{
  font-size: 12.5px; font-weight: 700; color: #1A2B45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gps-sb-role{ font-size: 11px; color: #6B7F99; }
.gps-sb-right{ display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.gps-sb-dot{ width: 9px; height: 9px; border-radius: 50%; }
.gps-sb-dot-on{ background: #22C55E; animation: gpsPulseDot 1.6s infinite; }
.gps-sb-dot-off{ background: #9AA9BE; }
.gps-sb-time{ font-size: 10.5px; color: #6B7F99; white-space: nowrap; }
.gps-sb-empty{ padding: 22px 16px; text-align: center; color: #6B7F99; font-size: 12.5px; line-height: 1.5; }

/* ── Xəritə (yalnız BURANIN içi qara qalır — Google dark stil) ── */
.gps-map-wrap{
  flex: 1;
  min-width: 0;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #E2E9F3;
  background: #0B1017;
  box-shadow: 0 8px 24px rgba(20,35,55,.08);
}
#gpsMap{ width: 100%; height: 100%; }
/* ── Marşrut izi məlumat çubuğu ── */
.gps-route-info{
  position: absolute;
  top: 12px; left: 12px;
  z-index: 5;
  display: flex; align-items: center; gap: 10px;
  background: rgba(7,9,15,.92);
  border: 1px solid #2A3D55;
  color: #DDE8F5;
  font-size: 12px; font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
  max-width: 60%;
}
.gps-route-info span{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gps-route-close{
  border: none;
  background: #22334A;
  color: #8EA3BF;
  width: 22px; height: 22px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  flex: 0 0 22px;
  line-height: 1;
  transition: background .15s, color .15s;
}
.gps-route-close:hover{ background: #3B82F6; color: #fff; }

.gps-map-empty{
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(7,9,15,.74);
  color: #8EA3BF;
  font-size: 14px; font-weight: 700; letter-spacing: .02em;
  z-index: 2;
  pointer-events: none;
}
.gps-map-setup{
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: #0B1017;
  z-index: 3;
  padding: 20px;
}
.gps-setup-card{
  width: 100%; max-width: 420px;
  background: #10161F;
  border: 1px solid #22334A;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}
.gps-setup-ico{
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #14263F;
  color: #5FA8FF;
  display: flex; align-items: center; justify-content: center;
}
.gps-setup-card h3{ margin: 0 0 6px; color: #E8F0FA; font-size: 15px; font-weight: 800; }
.gps-setup-card p{ margin: 0 0 16px; color: #7C8FA8; font-size: 12.5px; line-height: 1.6; }
.gps-key-input{
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #2A3D55;
  background: #0B1017;
  color: #DDE8F5;
  font-size: 13px;
  outline: none;
}
.gps-key-input:focus{ border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.gps-key-hint{ margin-top: 10px; font-size: 12px; color: #F0A35E; min-height: 16px; }
.gps-key-save{
  margin-top: 12px;
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: #3B82F6;
  color: #fff;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  transition: background .15s;
}
.gps-key-save:hover{ background: #2563EB; }

/* ── Header rozetkaları ── */
.gps-badge{
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 800;
}
.gps-badge-on{ background: rgba(22,163,74,.1); color: #16A34A; border: 1px solid rgba(22,163,74,.3); }
.gps-badge-off{ background: rgba(107,127,153,.1); color: #5C7089; border: 1px solid rgba(107,127,153,.25); }
.gps-live{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; color: #16A34A;
}
.gps-live-dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E;
  animation: gpsPulseDot 1.6s infinite;
}

/* ── Marker: initials + pulsasiya ── */
.gps-pin{
  position: relative;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .18s ease;
}
.gps-pin:hover{ transform: scale(1.08); }
.gps-pin-ring{
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(34,197,94,.35);
  animation: gpsPulseRing 1.8s ease-out infinite;
}
.gps-pin-dot{
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #16A34A;
  border: 2px solid #B8F5CE;
  color: #06250F;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
/* v4.98: ad etiketi — yalnız seçili marker və ya yüksək zoom-da görünür */
.gps-pin-label{
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  display: none;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(7,9,15,.92);
  border: 1px solid #2A3D55;
  color: #DDE8F5;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  pointer-events: none;
  z-index: 2;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gps-pin-sel .gps-pin-label,
#gpsMapView[data-zoom="high"] .gps-pin .gps-pin-label{ display: block; }

/* v4.99: SEÇİLİ texnik markeri — YANIB-SÖNƏN nöqtə (yer adlarının üstündən seçilir) */
.gps-pin-sel{ transform: scale(1.15); z-index: 100; }
.gps-pin-sel:hover{ transform: scale(1.2); }
.gps-pin-sel .gps-pin-ring{
  background: rgba(59,130,246,.5);
  animation: gpsPulseSel 1.1s ease-out infinite;
}
.gps-pin-sel .gps-pin-dot{
  width: 44px; height: 44px;
  font-size: 13px;
  background: #2F6FED;
  border: 3px solid #FFFFFF;
  color: #FFFFFF;
  animation: gpsSelBlink 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(47,111,237,.35), 0 6px 22px rgba(47,111,237,.65);
}
/* yanıb-sönmə: parlaq → sönük (yer adları markerin altında itmir) */
@keyframes gpsSelBlink{
  0%,100%{ box-shadow: 0 0 0 4px rgba(47,111,237,.45), 0 0 26px 6px rgba(47,111,237,.85); }
  50%{ box-shadow: 0 0 0 4px rgba(47,111,237,.2), 0 0 8px 2px rgba(47,111,237,.25); }
}
@keyframes gpsPulseSel{
  0%{ transform: scale(.45); opacity: .9; }
  100%{ transform: scale(1.9); opacity: 0; }
}

/* v4.99: yüksək zoom (≥13) — markerlər böyüyür, ad etiketi açılır */
#gpsMapView[data-zoom="high"] .gps-pin{ width: 54px; height: 54px; }
#gpsMapView[data-zoom="high"] .gps-pin-dot{ width: 40px; height: 40px; font-size: 12.5px; }
#gpsMapView[data-zoom="high"] .gps-pin-sel{ transform: scale(1.25); }
#gpsMapView[data-zoom="high"] .gps-pin-sel .gps-pin-dot{ width: 50px; height: 50px; font-size: 14px; }
#gpsMapView[data-zoom="high"] .gps-pin-sel .gps-pin-label{ font-size: 11.5px; }

/* v4.98: sidebar-da seçili texnik vurğusu — açıq temada */
.gps-sb-item-sel{
  background: rgba(47,111,237,.1);
  box-shadow: inset 0 0 0 1px rgba(47,111,237,.4);
}
.gps-sb-item-sel:hover{ background: rgba(47,111,237,.16); }
.gps-sb-item-sel .gps-sb-name{ color: #2F6FED; }

/* v4.98: 8 saat pəncərəsi — qalan vaxt + progress bar (açıq temada) */
.gps-sb-track{
  font-size: 10px;
  color: #16A34A;
  font-weight: 700;
  white-space: nowrap;
}
.gps-sb-track.low{ color: #DC2626; }
.gps-sb-trackbar{
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(22,163,74,.16);
  overflow: hidden;
  margin-top: 3px;
}
.gps-sb-trackbar i{
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #22C55E;
  transition: width .4s ease;
}
.gps-sb-trackbar-mid{ background: rgba(245,158,11,.16); }
.gps-sb-trackbar-mid i{ background: #F59E0B; }
.gps-sb-trackbar-low{ background: rgba(239,68,68,.16); }
.gps-sb-trackbar-low i{ background: #EF4444; }

/* ── Popup ── */
.gps-pop{ min-width: 208px; font-size: 12.5px; }
.gps-pop-head{
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.gps-pop-avatar{
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  background: #1D3A5F; color: #8FC4FF;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.gps-pop-name{ font-weight: 800; color: #12233B; font-size: 13.5px; }
.gps-pop-role{ font-size: 11.5px; color: #5C7089; font-weight: 600; }
.gps-pop-row{
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0;
  border-top: 1px solid #EDF1F7;
  color: #5C7089;
}
.gps-pop-row b{ color: #12233B; }
.gps-pop-coords{
  margin-top: 8px;
  padding: 7px 9px;
  background: #F3F6FB;
  border-radius: 8px;
  color: #3B5570;
  font-size: 11.5px;
  font-family: Consolas, Menlo, monospace;
}

/* ── Animasiyalar ── */
@keyframes gpsPulseRing{
  0%{ transform: scale(.45); opacity: .85; }
  100%{ transform: scale(1.65); opacity: 0; }
}
@keyframes gpsPulseDot{
  0%{ box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70%{ box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100%{ box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ═══════════════════════════════════════════════════════════════
   GPS.CSS — v4.96: Real-Time Map (müstəqil tam ekran view) əlavələri
   ═══════════════════════════════════════════════════════════════ */

/* ── Tam ekran view başlığı — açıq tema (v4.99) ── */
#gpsMapView{ display:none; }
.rtm-head{
  display:flex; align-items:center; gap:12px;
  padding:0 20px;
  height:64px; box-sizing:border-box;
  background:#FFFFFF;
  border-bottom:1px solid #E2E9F3;
  position:relative; z-index:4;
}
.rtm-home{
  width:38px; height:38px; flex:0 0 38px;
  border-radius:10px;
  border:1px solid #D5DFEA;
  background:#F2F6FC; color:#3A5570;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.rtm-home:hover{ background:#2F6FED; color:#fff; border-color:#2F6FED; }
.rtm-title-wrap{ display:flex; flex-direction:column; min-width:0; }
.rtm-title{ font-size:15px; font-weight:800; color:#12233B; letter-spacing:.02em; line-height:1.2; }
.rtm-sub{ font-size:11px; color:#6B7F99; }
.rtm-badges{ margin-left:auto; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rtm-refresh{
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 14px; border-radius:9px;
  border:1px solid #D5DFEA;
  background:#F2F6FC; color:#3A5570;
  font-size:12px; font-weight:700; cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.rtm-refresh:hover{ background:#2F6FED; color:#fff; border-color:#2F6FED; }
.rtm-refresh.spinning svg{ animation:rtmSpin 1s linear infinite; }
@keyframes rtmSpin{ 100%{ transform:rotate(360deg); } }

/* ── Tam ekran view-da layout doldurur ── */
#gpsMapView .gps-layout{
  height:calc(100vh - 65px);
  max-height:none; min-height:400px;
  border-radius:0; padding:12px;
  box-sizing:border-box;
}
#gpsMapView .gps-sidebar,
#gpsMapView .gps-map-wrap{ border-radius:12px; }

/* ── 3) GPS KÖHNƏLMƏSİ: kəhrəba "köhnə" vəziyyəti (açıq temada) ── */
.gps-sb-dot-stale{ background:#F59E0B; animation:gpsPulseAmber 1.6s infinite; }
@keyframes gpsPulseAmber{
  0%{ box-shadow:0 0 0 0 rgba(245,158,11,.55); }
  70%{ box-shadow:0 0 0 7px rgba(245,158,11,0); }
  100%{ box-shadow:0 0 0 0 rgba(245,158,11,0); }
}
.gps-sb-item-stale{ background:rgba(245,158,11,.07); }
.gps-sb-item-stale:hover{ background:rgba(245,158,11,.13); }
.gps-sb-item-off{ opacity:.7; }
.gps-sb-item-off:hover{ opacity:1; }
.gps-sb-warn-badge{
  display:inline-flex; align-items:center;
  font-size:9px; font-weight:800; letter-spacing:.02em;
  padding:2px 7px; margin-top:3px;
  border-radius:999px;
  background:rgba(245,158,11,.12); color:#B45309;
  border:1px solid rgba(245,158,11,.35);
  white-space:nowrap;
}
.gps-sb-warn-badge.off{ background:rgba(220,38,38,.08); color:#DC2626; border-color:rgba(220,38,38,.3); }
.gps-badge-stale{ background:rgba(245,158,11,.1); color:#B45309; border:1px solid rgba(245,158,11,.3); }

/* Marker rəngləri statusa görə */
.gps-pin-stale .gps-pin-ring{ background:rgba(245,158,11,.35); animation:gpsPulseRing 1.8s ease-out infinite; }
.gps-pin-stale .gps-pin-dot{ background:#F59E0B; border-color:#FDE9C8; color:#3A2404; }
.gps-pin-off .gps-pin-ring{ background:rgba(122,138,153,.25); animation:none; }
.gps-pin-off .gps-pin-dot{ background:#4A5A70; border-color:#6B7F99; color:#DDE8F5; }

/* Popup status sətirləri */
.gps-pop-warn{ color:#B45309; }
.gps-stale-txt{ color:#D97706; }
.gps-off-txt{ color:#DC2626; }
.gps-fresh-txt{ color:#16A34A; }

/* ── Mobil uyğunlaşma ── */
@media (max-width: 900px){
  .gps-layout{ flex-direction: column; height: auto; }
  .gps-sidebar{ width: 100%; flex: none; max-height: 260px; }
  .gps-map-wrap{ height: 480px; }
  #gpsMapView .gps-layout{ height:auto; }
}
