/* ═══════════════════════════════════════════════════════════
   MANZIL ADMIN — Page-Specific Styles
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════ LOGIN SCREEN ═══════════════ */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 10000;
  padding: 20px;
}
.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 32px 32px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-4);
  animation: modalIn 0.4s var(--ease-out);
}
.login-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--text);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 20px;
}
html[data-theme="dark"] .login-logo {
  background: var(--teal);
  color: #0B0B0A;
}
.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.login-title span { color: var(--teal); }
.login-sub {
  text-align: center;
  font-size: 12px;
  color: var(--text-4);
  margin-bottom: 28px;
  font-weight: 500;
}
.password-wrap { position: relative; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s var(--ease);
}
.password-toggle:hover { color: var(--text); }
.btn-login {
  width: 100%;
  height: 44px;
  background: var(--text);
  color: var(--surface);
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s var(--ease);
  margin-top: 8px;
}
.btn-login:hover { opacity: 0.9; }
html[data-theme="dark"] .btn-login {
  background: var(--teal);
  color: #0B0B0A;
}
.login-error {
  color: var(--red);
  font-size: 12px;
  text-align: center;
  margin-top: 12px;
  min-height: 16px;
  font-weight: 500;
}
.login-clock {
  text-align: center;
  font-size: 11px;
  color: var(--text-4);
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--mono);
}

/* ═══════════════ HERO (Detail Pages) ═══════════════ */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 20px;
  }
}
.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--text), var(--text-2));
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}
html[data-theme="dark"] .hero-avatar {
  background: linear-gradient(135deg, var(--teal), #14B8A6);
  color: #0B0B0A;
}
.hero-info { flex: 1; min-width: 0; }
.hero-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.hero-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.15;
}
.hero-id {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text-4);
  margin-bottom: 12px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
}
.hero-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-5);
}
.hero-meta .strong { color: var(--text); font-weight: 600; }
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ═══════════════ DETAIL LAYOUT (2-col) ═══════════════ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}
@media (max-width: 1100px) {
  .detail-layout { grid-template-columns: 1fr; }
}
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.side-panel::-webkit-scrollbar { width: 4px; }
.side-panel::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.side-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.side-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s var(--ease);
  width: 100%;
  text-align: left;
}
.side-action:hover { color: var(--text); }
.side-action i {
  width: 15px;
  color: var(--text-3);
  flex-shrink: 0;
  font-size: 13px;
}
.side-action.danger { color: var(--red); }
.side-action.danger i { color: var(--red); }

/* ═══════════════════════════════════════════════════════════
   DRIVER & USER MAP MARKERS — Pulse + Highlight + Dark Theme
   ═══════════════════════════════════════════════════════════ */

/* ═══ KEYFRAME ANIMATIONS ═══ */

@keyframes driverPulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes driverDotPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

/* ═══ DRIVER MARKER ═══ */

.driver-marker-icon {
  background: transparent !important;
  border: none !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

.driver-marker-icon:hover > div:last-child {
  transform: scale(1.12);
  transition: transform 0.18s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
}

.driver-marker-icon.focused > div:last-child {
  box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.35),
              0 8px 20px rgba(0, 0, 0, 0.5) !important;
}

/* ═══ USER MARKER ═══ */

.user-marker-icon {
  background: transparent !important;
  border: none !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

.user-marker-icon:hover > div:last-child {
  transform: scale(1.1);
  transition: transform 0.18s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
}

.user-marker-icon.focused > div:last-child {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35),
              0 8px 20px rgba(0, 0, 0, 0.5) !important;
}

/* ═══ GENERIC CUSTOM MARKER ═══ */

.custom-marker {
  background: transparent !important;
  border: none !important;
}

/* ═══ POPUP — Dark Theme ═══ */

.driver-popup .leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  background: #0F172A;
  color: #fff;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.driver-popup .leaflet-popup-content {
  margin: 12px 16px;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  color: #fff;
}

.driver-popup .leaflet-popup-content b,
.driver-popup .leaflet-popup-content strong {
  color: #fff;
  font-weight: 800;
}

.driver-popup .leaflet-popup-content small,
.driver-popup .leaflet-popup-content span {
  color: rgba(255, 255, 255, 0.7);
}

.driver-popup .leaflet-popup-tip {
  background: #0F172A;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* ═══ LEAFLET ZOOM CONTROL — Dark Theme ═══ */

.leaflet-control-zoom {
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
  border: none !important;
}

.leaflet-control-zoom a {
  background: #0F172A !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-weight: 700 !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 18px !important;
}

.leaflet-control-zoom a:hover {
  background: #1E293B !important;
}

/* ═══ ATTRIBUTION ═══ */

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 8px 0 0 0 !important;
  font-size: 10px !important;
  padding: 3px 8px !important;
}

/* ═══ MAP CONTAINER POLISH ═══ */

#driverMiniMap,
#userMiniMap {
  border-radius: 12px;
  overflow: hidden;
  z-index: 0;
}

#driverMiniMap .leaflet-pane,
#userMiniMap .leaflet-pane {
  z-index: auto;
}