/* ==============================================================================
   TAKSICO - Yönetici Paneli Stilleri (admin.css)
   Profesyonel Operasyon Merkezi, Vektör İkonlu, Kesinlikle Emojisiz
   ============================================================================== */

.admin-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-main);
}

/* Yan Menü (Sidebar) */
.admin-sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition);
}

.admin-brand {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-nav {
  flex: 1;
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}

.nav-item:hover {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .icon {
  stroke: var(--text-dim);
}
.nav-item:hover .icon {
  stroke: var(--text-main);
}
.nav-item.active .icon {
  stroke: var(--primary);
}

.nav-badge {
  margin-left: auto;
  background-color: var(--status-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

/* Ana İçerik Alanı */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.admin-topbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-content {
  padding: 1.25rem;
  flex: 1;
}

/* KPI Kartları */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--border-strong);
}

.stat-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Canlı Harita Konteyneri */
.admin-map-container {
  height: calc(100vh - 160px);
  height: calc(100dvh - 160px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-strong);
}

#admin-map {
  width: 100%;
  height: 100%;
  background: #0B0E17;
}

/* Mapbox GL JS Yönetim Haritası */
.admin-map-container .mapboxgl-map {
  width: 100%;
  height: 100%;
}

.map-drawer {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 320px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
}

.map-drawer.active {
  display: block;
}

.map-legend {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background-color: rgba(15, 21, 35, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  z-index: 1000;
  display: flex;
  gap: 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Veri Tabloları */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.table th {
  background-color: var(--bg-surface-elevated);
  padding: 0.75rem 0.95rem;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.table td {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Mobilde Hamburger / Kapanabilir Sidebar */
@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .admin-content {
    padding: 0.9rem;
  }
}

/* Canlı Müşteri Pini & Nabız Animasyonu */
@keyframes customerPulse {
  0% { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(2.4); opacity: 0; }
}

.custom-customer-pin-wrap {
  background: transparent !important;
  border: none !important;
}

.badge-purple {
  background-color: rgba(139, 92, 246, 0.18);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.badge-yellow {
  background-color: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

