/* =========================================================
📌 1) ROOT VARIABLES
========================================================= */
:root {
  --radius: 4px;
  --border: 1px solid #ddd;
  --font-bold: 700;
  --bg-base: #f7f7f7;
  --bg-hover: #f2f4f7;
  --font-size: 12px;
  --font-color: #555;
}

/* =========================================================
📌 2) HTML / BODY / RESET
========================================================= */
html,
body {
  height: 100%;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f1f5f9;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

ul { list-style: none; }

/* =========================================================
📌 3) LEAFLET — ZORUNLU GÖRÜNÜRLÜK FIX
========================================================= */
#mainMap {
  width: 100%;
  height: 100%;
}
/* =========================================================
🧩 MAP PAGE — NAV ALTINDA ORTALI SEARCH DOCK (YENİ)
- Arama box sadece harita sayfasında
- Panel açık/kapalıdan etkilenmez
- Okul sabitlenince görünür
- Üst menünün altında tam ortalanır, submenu ile birlikte hareket eder
========================================================= */

/* Harita sayfasında nav-wrapper sticky kalsın */
#pageMaps .nav-wrapper{
  position: sticky;
  top: 0;
  z-index: 2000;
}

/* Nav altında arama dock */
#mapSearchDock{
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 8px 10px;
  display: none; /* okul sabitlenince JS açacak */
}
.nav-wrapper.full #mapSearchDock{ max-width: 100%; }

/* panel-search nav dock içine taşındığında */
#panel-search.is-navdock{
  display: block !important;
  width: min(520px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.80);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}

/* öneriler dock altında düzgün aksın */
#panel-search.is-navdock #search-suggest{
  max-height: 320px;
}

/* Harita sayfasında okul sabit değilse arama gizli (JS ayrıca kontrol ediyor) */
#pageMaps:not(.school-fixed) #mapSearchDock{ display:none; }

/* =========================================================
📌 4) NAV WRAPPER
========================================================= */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 999;
  max-width: 900px;
  margin: 0 auto;
  transition: max-width 0.35s ease;
}

.nav-wrapper.full { max-width: 100%; }

/* =========================================================
📌 5) ACCORDION MENU
========================================================= */
.accordion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: center;
}

.accordion > li {
  border: 1px solid #d8dde5;
  border-radius: 6px;
  background: #fafbff;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.accordion > li:hover {
  background: #f2f4f7;
  border-color: #c7ced8;
}

.accordion .link {
  cursor: pointer;
  display: block;
  padding: 14px 35px 14px 14px;
  font-size: 14px;
  color: #555;
  font-weight: 700;
  text-align: center;
  position: relative;
}

.accordion li.open .link { color: #b63b4d; }

.icon-left {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* =========================================================
📌 6) SUBMENU
========================================================= */
.submenu {
  display: none;
  background: #f3f5fa;
}

.submenu li { border-top: 1px solid #dde2ec; }

.submenu a {
  display: block;
  position: relative;
  padding: 12px 12px 12px 32px;
  text-align: center;
  color: #555;
  font-size: var(--font-size);
  text-decoration: none;
  cursor: pointer;
}

.submenu a:hover {
  background: #e7ebf2;
  color: #b63b4d;
  font-weight: bold;
}

.submenu a i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* =========================================================
📌 7) APP PAGE / MAP PAGE
========================================================= */
.app-page { display: none; }
.app-page.active { display: block; }

#pageMaps {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #f1f5f9;
}

.maps-wrapper {
  position: absolute;
  inset: 0;
  padding: 0;
  margin: 0;
  max-width: none;
}

/* =========================================================
📌 8) DASHBOARD
========================================================= */
.dashboard-wrapper {
  max-width: 1100px;
  margin: 18px auto;
  padding: 0 8px;
  transition: max-width 0.35s ease;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-item {
  position: relative;
  aspect-ratio: 1/1;
  width: 100%;
  max-height: 250px;
  border: 1px solid #d8dde5;
  border-radius: 6px;
  background: #fafbff;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-item:hover {
  background: #f2f4f7;
  border-color: #c7ced8;
  box-shadow: inset 0 0 0 2px #94a3b8, 0 6px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.dashboard-item:hover .dashboard-link i {
  transform: scale(1.12);
  color: #ea868f;
}

.dashboard-link {
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #555;
  text-align: center;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(1.5px);
}

.dashboard-link i {
  font-size: 26px;
  transition: transform 0.25s ease, color 0.25s ease, text-shadow 0.25s ease;
}

/* Hover accents (same) */
.dashboard-link i,
.dashboard-link {
  transition: color 0.25s ease, text-shadow 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.dashboard-item:nth-child(1):hover .dashboard-link,
.dashboard-item:nth-child(1):hover .dashboard-link i { color:#ea868f;text-shadow:0 0 6px rgba(234,134,143,.65); }

.dashboard-item:nth-child(2):hover .dashboard-link,
.dashboard-item:nth-child(2):hover .dashboard-link i { color:#75b798;text-shadow:0 0 6px rgba(117,183,152,.65); }

.dashboard-item:nth-child(3):hover .dashboard-link,
.dashboard-item:nth-child(3):hover .dashboard-link i { color:#0dcaf0;text-shadow:0 0 6px rgba(13,202,240,.65); }

.dashboard-item:nth-child(4):hover .dashboard-link,
.dashboard-item:nth-child(4):hover .dashboard-link i { color:#ffcd39;text-shadow:0 0 6px rgba(255,205,57,.65); }

.dashboard-item:nth-child(5):hover .dashboard-link,
.dashboard-item:nth-child(5):hover .dashboard-link i { color:#c5b3e6;text-shadow:0 0 6px rgba(197,179,230,.65); }

.dashboard-item:nth-child(6):hover .dashboard-link,
.dashboard-item:nth-child(6):hover .dashboard-link i { color:#79dfc1;text-shadow:0 0 6px rgba(121,223,193,.65); }

.dashboard-item:nth-child(7):hover .dashboard-link,
.dashboard-item:nth-child(7):hover .dashboard-link i { color:#a370f7;text-shadow:0 0 6px rgba(163,112,247,.65); }

.dashboard-item:nth-child(8):hover .dashboard-link,
.dashboard-item:nth-child(8):hover .dashboard-link i { color:#e685b5;text-shadow:0 0 6px rgba(230,133,181,.65); }

.dashboard-item:nth-child(1):hover { box-shadow: inset 0 0 0 2px #ea868f, 0 0 14px rgba(234,134,143,.55), 0 6px 18px rgba(0,0,0,.12); }
.dashboard-item:nth-child(2):hover { box-shadow: inset 0 0 0 2px #75b798, 0 0 14px rgba(117,183,152,.55), 0 6px 18px rgba(0,0,0,.12); }
.dashboard-item:nth-child(3):hover { box-shadow: inset 0 0 0 2px #0dcaf0, 0 0 14px rgba(13,202,240,.55), 0 6px 18px rgba(0,0,0,.12); }
.dashboard-item:nth-child(4):hover { box-shadow: inset 0 0 0 2px #ffcd39, 0 0 14px rgba(255,205,57,.55), 0 6px 18px rgba(0,0,0,.12); }
.dashboard-item:nth-child(5):hover { box-shadow: inset 0 0 0 2px #c5b3e6, 0 0 14px rgba(197,179,230,.55), 0 6px 18px rgba(0,0,0,.12); }
.dashboard-item:nth-child(6):hover { box-shadow: inset 0 0 0 2px #79dfc1, 0 0 14px rgba(121,223,193,.55), 0 6px 18px rgba(0,0,0,.12); }
.dashboard-item:nth-child(7):hover { box-shadow: inset 0 0 0 2px #a370f7, 0 0 14px rgba(163,112,247,.55), 0 6px 18px rgba(0,0,0,.12); }
dashboard-item:nth-child(8):hover { box-shadow: inset 0 0 0 2px #e685b5, 0 0 14px rgba(230,133,181,.55), 0 6px 18px rgba(0,0,0,.12); }

/* =========================================================
📌 9) MINI MAP
========================================================= */
.mini-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
  filter: grayscale(1) contrast(0.92);
  transition: 0.25s ease;
}

.dashboard-item:hover .mini-map {
  opacity: 0.98;
  filter: none;
}

/* =========================================================
📌 10) RESPONSIVE
========================================================= */
@media (max-width: 992px) { .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .dashboard-link { font-size: 13px; gap: 6px; }
  .dashboard-link i { font-size: 22px; }
  .mini-map { display: none; }
}
@media (max-width: 480px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* =========================================================
📌 11) SPLIT BUTTON
========================================================= */
.split-btn {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.split-btn.is-interactive {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.icon-part {
  background: rgba(0, 0, 0, 0.15);
  padding: 9px 13px;
  display: flex;
  align-items: center;
}

.label-part {
  opacity: 0;
  max-width: 0;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  transform: translateX(12px);
  transition: 0.45s ease;
}

.split-btn:hover .label-part {
  opacity: 1;
  max-width: 240px;
  padding: 0 8px;
  transform: translateX(0);
}

.split-btn.success { background: #75b798; }
.split-btn.primary { background: #c5b3e6; }
.split-btn.secondary { background: #6c757d; }
.split-btn.danger { background: #ea868f; }
.split-btn.warning { background: #ffcd39; }
.split-btn.light { background: #e9ecef; }
.split-btn.info { background: #0dcaf0; }
.split-btn.dark { background: #e685b5; }
.split-btn.edit { background: #79dfc1; }
.split-btn.excel { background: #a370f7; }

/* =========================================================
📌 12) MAP BACK BUTTON
========================================================= */
.map-back-btn {
  position: absolute;
  left: 10px;
  bottom: 15px;
  z-index: 1001;
}

/* =========================================================
🗺️ LEAFLET CONTROL VISIBILITY FIX
========================================================= */
.leaflet-control-container,
.leaflet-control {
  z-index: 1200;
}

/* =========================================================
🎨 LEAFLET CONTROLS — THEME OVERRIDE (FINAL)
========================================================= */
.leaflet-bar,
.leaflet-control {
  border: 1px solid #d8dde5;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.leaflet-bar a,
.leaflet-control-fullscreen a {
  background: #fafbff;
  color: #555;
  width: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 16px;
  text-align: center;
  border-bottom: 1px solid #dde2ec;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.leaflet-bar a:last-child { border-bottom: none; }

.leaflet-bar a:hover,
.leaflet-control-fullscreen a:hover {
  background: #f2f4f7;
  color: #ea868f;
  box-shadow: inset 0 0 0 2px rgba(234, 134, 143, 0.45), 0 0 10px rgba(234, 134, 143, 0.45);
  transform: scale(1.08);
}

.leaflet-bar a:active { transform: scale(0.96); }

.leaflet-fullscreen-on .leaflet-control-fullscreen a {
  background: #75b798;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45), 0 0 12px rgba(117, 183, 152, 0.6);
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out { font-weight: 700; font-size: 18px; }

.leaflet-bottom.leaflet-right .leaflet-control { margin: 0 12px 12px 0; }
.leaflet-top.leaflet-right .leaflet-control { margin: 12px 12px 0 0; }
.leaflet-top.leaflet-left .leaflet-control { margin: 12px 0 0 12px; }
.leaflet-bottom.leaflet-left .leaflet-control { margin: 0 0 12px 12px; }

/* =========================================================
🛑 HIDE LEAFLET DEFAULT CONTROLS (FINAL)
========================================================= */
.leaflet-control-zoom,
.leaflet-control-fullscreen { display: none !important; }

/* =========================================================
🗺️ MAP UI PANEL — CUSTOM CONTROLS
========================================================= */
.map-ui-panel {
  position: absolute;
  right: 18px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1100;
}

/* =========================================================
📍 MAP SEARCH — ADDRESS SEARCH PANEL
========================================================= */
.map-search-panel { display:none !important; }

/* =========================================================
👻 GHOST MARKER — COLOR SYSTEM (FINAL)
========================================================= */
.leaflet-marker-pane { z-index: 700 !important; }

.ghost-halo {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  pointer-events: none;
  background: rgba(176, 42, 55, 0.6);
  box-shadow: 0 0 0 10px rgba(176, 42, 55, 0.45),
    0 0 22px rgba(176, 42, 55, 0.85),
    0 0 40px rgba(176, 42, 55, 0.75);
  filter: blur(0.4px);
}

.ghost-halo.ghost-school {
  background: rgba(171, 41, 106, 0.65);
  box-shadow: 0 0 0 12px rgba(171, 41, 106, 0.5),
    0 0 26px rgba(171, 41, 106, 0.9),
    0 0 46px rgba(171, 41, 106, 0.8);
}

.ghost-halo.is-pulse { animation: ghostPulseStrong 1.15s infinite cubic-bezier(0.22, 0.61, 0.36, 1); }

@keyframes ghostPulseStrong {
  0% { transform: scale(0.55); opacity: 1; }
  70% { transform: scale(1.9); opacity: 0.4; }
  100% { transform: scale(2.6); opacity: 0; }
}

.ghost-route-line { animation: ghostRouteFlow 1.2s linear infinite; }
@keyframes ghostRouteFlow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -32; } }

/* =========================================================
🏫 SCHOOL PANEL — FINAL
========================================================= */
.school-panel {
  position: absolute;
  right: 18px;
  bottom: 210px;
  width: 320px;
  max-width: calc(100% - 24px);
  background: #fafbff;
  border: 1px solid #d8dde5;
  border-radius: 10px;
  padding: 10px;
  z-index: 1120;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  display: none;
}

.school-panel.active { display: block; }

#schoolPanelToggle.locked { background: #75b798; }
#schoolPanelToggle.locked i { color: #fff; }

.school-panel .sp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.school-panel .sp-title {
  font-weight: 800;
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
}

.school-panel .sp-title i {
  color: rgb(171, 41, 106);
  text-shadow: 0 0 10px rgba(171, 41, 106, 0.35);
}

.school-panel .sp-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.school-panel .sp-line {
  font-size: 12px;
  color: #555;
  line-height: 1.35;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e7ebf2;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  max-height: 96px;
  overflow: auto;
}

.school-panel .sp-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.school-panel .sp-actions .split-btn { flex: 1; justify-content: center; }

/* =========================================================
🏫 SCHOOL PREVIEW ICON
========================================================= */
.school-preview {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(171, 41, 106, 0.25), 0 6px 18px rgba(0, 0, 0, 0.25);
}

.school-preview i { font-size: 16px; color: rgb(171, 41, 106); }

.school-preview.is-preview {
  box-shadow: 0 0 0 6px rgba(176, 42, 55, 0.35), 0 0 18px rgba(176, 42, 55, 0.55);
  animation: pulseSchool 1.4s ease-out infinite;
}

@keyframes pulseSchool {
  0% { box-shadow: 0 0 0 0 rgba(176, 42, 55, 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(176, 42, 55, 0); }
}

/* =========================================================
🗺️ GOOGLE MAPS STYLE — ROUTE LABEL
========================================================= */
.gmaps-route-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 48px;
  background: #f1f3f4;
  border: 2px solid #dadce0;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  font-family: Arial, Helvetica, sans-serif;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.gmaps-icon { font-size: 14px; line-height: 1; }
.gmaps-text { display: flex; flex-direction: column; line-height: 1.05; }
.gmaps-time { font-size: 13px; font-weight: 700; color: #1e8e3e; }
.gmaps-dist { font-size: 11px; color: #5f6368; }

/* =========================================================
✅ PANEL
========================================================= */
#panel {
  position: relative;
  z-index: 1350 !important;
  width: 360px;
  flex:0 0 360px;
  height: calc(100vh - 120px);
  background: rgba(0, 0, 0, 0.8);
  color: #eee;
  border-radius: 4px;
  overflow: auto;
  scrollbar-width: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

#panel::-webkit-scrollbar { display: none; }

#panel-info {
  padding: 12px;
  border-bottom: 1px solid #3c3c3c;
}

#panel-info .title { font-weight: 700; font-size: 14px; }
#panel-info .desc { font-size: 11px; opacity: 0.7; margin-top: 2px; }

#panelToggle {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  padding: 12px 8px;
  font-size: 22px;
  cursor: pointer;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.2s;
}

#panel-wrap.open ~ #panelToggle { left: calc(20px + 336px + 4px); }
#panelToggle:hover { background: #3a3a3a; }

#panel-wrap {
  position: fixed;
  top: 50px;
  width: 360px;
  padding: 0 0 18px 0;
  transform: translateX(-120%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1300 !important;
  pointer-events: none;
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:12px;
}

#panel-wrap.open {
  transform: translateX(0);
  pointer-events: auto;
}

/* =========================================================
🧩 PANEL SEARCH (Haritaya girince görünmez / panel açılınca görünür)
========================================================= */
#panel-search{
  width: 360px;
  flex: 0 0 360px;
  padding: 10px;
  border-radius: 4px;
  background: rgba(0,0,0,.80);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  display: none;
}

#panel-search input#searchBox{
  width: 100%;
  outline: none;
  border-radius: 8px;
  padding: 10px 10px;
  color: #fff;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
}

/* =========================================================
✅ KİLİT TOAST + LOCK MODAL
========================================================= */
.app-toast{
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20000;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 800;
  user-select: none;
  pointer-events: none;
}
.app-toast--lock{ color: #fff; }
.app-toast--lock i{ color: #fff; text-shadow: 0 0 10px rgba(234,134,143,.45); }

.lock-modal{ position: fixed; inset: 0; z-index: 19990; display: none; }
.lock-modal.active{ display:block; }

.lock-backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
}

.lock-card{
  position:absolute; left:50%; top:50%;
  transform: translate(-50%,-50%);
  width: min(640px, calc(100% - 24px));
  background: rgba(15,15,15,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,.55);
  color:#fff;
  overflow:hidden;
}

.lock-head{ padding: 14px 14px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.lock-title{ font-weight: 900; font-size: 14px; display:flex; align-items:center; gap:10px; }
.lock-title i{ color: rgb(171,41,106); text-shadow: 0 0 12px rgba(171,41,106,.35); }
.lock-sub{ margin-top:6px; font-size: 12px; opacity:.75; line-height: 1.35; }

.lock-body{
  display:grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 12px;
  padding: 12px 14px 14px;
}
@media (max-width: 720px){ .lock-body{ grid-template-columns: 1fr; } }

.lock-search input{
  width: 100%;
  padding: 10px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color:#fff;
  outline:none;
  font-size: 12px;
}
.lock-search input:focus{
  border-color: rgba(13,202,240,.55);
  box-shadow: 0 0 0 3px rgba(13,202,240,.20);
}

.lock-results{
  margin-top: 8px;
  border-radius: 6px;
  overflow:hidden;
  max-height: 260px;
  overflow-y:auto;
  border: 1px solid rgba(255,255,255,.10);
  background: #0f0f0f;
  display:none;
}
.lock-results.active{ display:block; }

.lock-results .item{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor:pointer;
  font-size: 12px;
  transition: background .15s ease, transform .12s ease;
}
.lock-results .item:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
  font-weight: 800;
}
.lock-results .item:last-child{ border-bottom:none; }

.lock-preview{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  padding: 10px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.lock-preview-line{ font-size: 12px; line-height: 1.35; }
.lock-preview-line .k{ opacity:.75; margin-right: 6px; }
.lock-preview-line .v{ font-weight: 900; }
.lock-fix{ width: 100%; justify-content: center; }
.lock-hint{ font-size: 11px; opacity:.70; }

/* =========================================================
✅ SUGGEST (daha sade + cursor pointer)
========================================================= */
#search-suggest{
  margin-top: 8px;
  border-radius: 6px;
  overflow:auto !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 1px solid rgba(255,255,255,.10);
  display:none;
  max-height: 280px;
  background: rgba(0,0,0,.55);
}
#search-suggest::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
}
#search-suggest .sep{
  padding: 10px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
}

#search-suggest .item{
  padding: 10px 10px;
  font-size: 12px;
  color: rgba(255,255,255,.86);
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer;                 /* ✅ */
  user-select: none;
  background: transparent;
  border-left: 4px solid rgba(255,255,255,.08);
  transition: background .12s ease, transform .10s ease, border-left-color .12s ease;
}

#search-suggest .item:last-child{ border-bottom:none; }

#search-suggest .item:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
  font-weight: 700;
}

#search-suggest .item.is-active{
  background: rgba(255,255,255,.10);
  font-weight: 700;
}

#search-suggest .item.grp-student{ border-left-color: rgba(255,205,57,.70); }
#search-suggest .item.grp-address{ border-left-color: rgba(117,183,152,.70); }
#search-suggest .item.grp-external{ border-left-color: rgba(13,202,240,.70); }
/* =========================================================
🔒 LOCK MODAL SUGGEST HOVER — FINAL
- okul adresi belirleme (lock modal) öneri hover’ı,
  arama önerileriyle aynı davranış
========================================================= */
.lock-results .item{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  font-size: 12px;
  user-select: none;
  background: transparent;
  border-left: 4px solid rgba(255,255,255,.08);
  transition: background .12s ease, transform .10s ease, border-left-color .12s ease;
}

.lock-results .item:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
  font-weight: 700;
}

.lock-results .item:last-child{ border-bottom:none; }

/* =========================================================
👤 POPUP (Mini)
========================================================= */
.student-mini{ min-width: 210px; font-family: system-ui, Arial, sans-serif; }
.student-mini .name{ font-weight: 900; font-size: 13px; margin-bottom: 8px; }
.student-mini .row{ display:flex; gap:8px; }
.student-mini button{
  flex:1; border:0; border-radius: 10px; padding: 10px 10px;
  cursor:pointer; font-weight: 900; font-size: 12px; color:#fff;
}
.student-mini button:disabled{ opacity:.45; cursor:not-allowed; }
.student-mini .btn-route{ background: #0dcaf0; }
.student-mini .btn-add{ background: #ffcd39; color:#111; }
.student-mini .hint{ margin-top: 8px; font-size: 11px; opacity: .75; }

/* ========== SERVİS SEÇ MODAL ========== */
.svc-modal{ position: fixed; inset: 0; z-index: 21000; display:none; }
.svc-modal.active{ display:block; }
.svc-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); }
.svc-card{
  position:absolute; left:50%; top:50%; transform: translate(-50%,-50%);
  width: min(420px, calc(100% - 24px));
  background: rgba(15,15,15,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,.55);
  color:#fff;
  padding: 14px;
}
.svc-title{ font-weight: 900; display:flex; align-items:center; gap:10px; margin-bottom: 12px; }
.svc-student{ font-weight: 800; opacity:.75; margin-left: 6px; }
.svc-grid{ display:grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (max-width: 520px){ .svc-grid{ grid-template-columns: repeat(3, 1fr); } }
.svc-btn{
  border:0; border-radius: 6px; padding: 12px 0; font-weight: 900;
  cursor:pointer; background: rgba(255,255,255,.08); color:#fff;
  transition: transform .12s ease, background .15s ease;
}
.svc-btn:hover{ background: rgba(255,255,255,.12); transform: translateY(-1px); }
.svc-remove{
  margin-top: 10px; width: 100%;
  border:0; border-radius: 6px; padding: 10px 12px;
  cursor:pointer; font-weight: 900;
  background: rgba(234,134,143,.16); color:#fff;
}
.svc-remove:hover{ background: rgba(234,134,143,.24); }

/* ========== MARKER SERVİS ROZETİ ========== */
.addr-icon{ position: relative; width: 22px; height: 22px; border-radius: 4px; display:flex; align-items:center; justify-content:center; font-size: 12px; font-weight: bold; }
.addr-icon.exact { background: #4caf50; color: #fff; }
.addr-icon.approx { background: #c9b037; color: #111; }
.addr-icon.weak  { background: #a94442; color: #fff; }

.addr-icon .svc-badge{
  position:absolute; right: -6px; top: -6px;
  min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,205,57,.95);
  color:#111;
  font-weight: 900;
  font-size: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}

/* =========================================================
✅ TABS + LISTS + SERVICES (same)
========================================================= */
#tabs {
  display: flex;
  border: 1px solid #3c3c3c;
  border-left: none;
  position: sticky;
  top: 0;
  z-index: 50;
  background: #2f2f2f;
}

#tabs .tab {
  flex: 1;
  padding: 10px;
  background: #2f2f2f;
  border: none;
  color: #aaa;
  cursor: pointer;
}

#tabs .tab.active {
  background: #1f1f1f;
  color: #fff;
  font-weight: 600;
}

.tab-panel { display: none; padding: 10px; }
.tab-panel.active { display: block; }

#panel ul { list-style: none; padding: 0; margin: 0; }
#panel ul > li {
  margin-bottom: 6px;
  padding: 6px;
  border-radius: 4px;
  font-size: 12px;
}

#panel ul > li.exact { background: #4caf50; color: #fff; }
#panel ul > li.approx { background: #c9b037; color: #111; }
#panel ul > li.weak  { background: #a94442; color: #fff; }

.status-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin:10px 0 8px; padding:10px 12px;
  font-size:12px; font-weight:600;
  cursor:pointer; user-select:none;
  background:#2f2f2f;
  border:1px solid #3c3c3c;
  border-radius:4px;
}
.status-head .count{ font-weight:700; opacity:.85; font-size:11px; }
.status-head::after{ content:"▾"; font-size:12px; opacity:.7; transform: translateY(1px); transition: transform .2s ease; margin-left:8px; }
.status-head.collapsed::after{ transform: rotate(-90deg); }
.status-head.exact{ border-top: 3px solid #4caf50; }
.status-head.approx{ border-top: 3px solid #c9b037; }
.status-head.weak{ border-top: 3px solid #a94442; }

.status-list{ overflow:hidden; transition: max-height .25s ease, opacity .2s ease; opacity:1; }
.status-list.expanded{ max-height:1000px; }
.status-list.collapsed{ max-height:0; opacity:0; pointer-events:none; }

@keyframes countPulse { 0%{transform:scale(1);opacity:.85} 40%{transform:scale(1.12);opacity:1} 100%{transform:scale(1);opacity:.85} }
.status-head.count-pulse .count{ animation: countPulse .28s ease; }

.service-box{ background:#1f1f1f; border:1px solid #444; border-radius:4px; margin-bottom:8px; overflow:hidden; }
.service-header{ display:flex; justify-content:space-between; align-items:center; padding:10px 12px; cursor:pointer; font-weight:600; background:#2b2b2b; }
.service-box.open .service-header{ background:#343434; }
.service-body{ display:none; padding:10px; }
service-box.open .service-body{ display:block; }
.service-header .chevron{ transition: transform .2s ease; }
.service-box.open .chevron{ transform: rotate(180deg); }
.service-drop{ min-height: 50px; border: 1px dashed #666; padding: 3px; }
.service-drop li{ background:#4caf50; color:#fff; }
#assignable li{ background:#4caf50; color:#fff; cursor: grab; }

.leaflet-marker-icon.highlight { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }

/* =========================================================
🧩 LEAFLET POPUP — FINAL (beyaz arkaplanı kaldır)
========================================================= */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip{
  background: rgba(0,0,0,.66) !important;
  color: rgba(255,255,255,.85) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.35) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}

.leaflet-popup-content{
  margin: 5px 6px !important;
}

.leaflet-popup-close-button{
  color: rgba(255,255,255,.9) !important;
}
.leaflet-popup-close-button:hover{
  color: #fff !important;
}

.leaflet-popup-content-wrapper{
  padding: 0 !important;
  border-radius: 4px !important;
  text-align:center !important;
}

.leaflet-popup-content{
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.leaflet-popup-tip{
  width: 10px !important;
  height: 10px !important;
}

/* popup içindeki mini öğrenci kartı için */
.student-mini{
  min-width: 180px !important;
}

.student-mini .name{
  font-size: 11px !important;
  margin-bottom: 6px !important;
}

.student-mini button{
  padding: 8px 8px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}

.student-mini .hint{
  font-size: 10px !important;
}