/* KHAI BÁO BIẾN HỆ THỐNG Z-INDEX */
:root {
  --z-map: 1;
  --z-route-card: 105;
  --z-menu: 110;
  --z-center-pin: 800;
  --z-floating-controls: 1005;
  --z-top-float: 1100;
  --z-popup: 9000;
  --z-overlay: 10000;
  --z-confirm-btn: 10000;
  --z-focus-suggestions: 100000;
  --z-focus-mode: 99999;
  --z-alert: 1000000;
  --z-nav-sheet: 9980;   /* Bảng trượt nằm dưới */
  --z-bottom-nav: 9990;  /* Thanh 4 nút luôn nổi trên cùng, bấm được mọi lúc */

  /* KÍCH THƯỚC CHUẨN CỦA VÙNG AN TOÀN DƯỚI ĐÁY MÀN HÌNH (SAFE AREA BOTTOM NAV) */
  --nav-h: 58px;                                    /* Chiều cao phần bấm được */
  /* Khoảng chừa dưới 4 nút. Apple chuẩn là 34px nhưng nhìn rỗng,
     lấy 60% vừa sát mép vừa không đụng thanh gạt Home.
     Muốn sát hơn nữa: đổi 0.6 thành 0.35. Muốn chuẩn Apple: env(safe-area-inset-bottom, 0px) */
  --nav-safe: max(6px, calc(env(safe-area-inset-bottom, 0px) * 0.6));
  --nav-total: calc(var(--nav-h) + var(--nav-safe));/* Tổng chiều cao thực tế chiếm chỗ */
  --stack-bottom: calc(var(--nav-total) + 8px);     /* Mốc đáy của mọi khối nổi phía trên nav */
  --nav-green: #00b14f;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body { 
  font-family: 'Google Sans', Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; 
  max-width: 480px; 
  margin: auto; 
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
  position: relative;
}

input, button, select, textarea {
  font-family: 'Google Sans', Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* ============================================================================
   VÙNG AN TOÀN DƯỚI ĐÁY MÀN HÌNH - THANH ĐIỀU HƯỚNG 4 NÚT (SAFE AREA BOTTOM NAV)
   4 NÚT: ĐẶT XE  •  TÀI XẾ  •  GẦN ĐÂY  •  TIỆN ÍCH
   ============================================================================ */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: var(--nav-total);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  /* Nền phủ kín xuống tận mép dưới, KHÔNG để hở khe trắng ở vùng tai thỏ */
  padding: 0 0 var(--nav-safe) 0;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -6px 22px rgba(15, 23, 42, 0.10);
  z-index: var(--z-bottom-nav);
  box-sizing: border-box;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-bottom-nav .nav-item {
  position: relative;
  background: transparent;
  border: none;
  margin: 0;
  padding: 0;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.22s ease, transform 0.14s ease;
}

/* VẠCH CHỈ BÁO NHỎ TRÊN ĐẦU NÚT ĐANG CHỌN */
.app-bottom-nav .nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--nav-green);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-bottom-nav .nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.app-bottom-nav .nav-icon {
  width: 36px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  transition: background 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-bottom-nav .nav-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-bottom-nav .nav-item.active {
  color: var(--nav-green);
}

.app-bottom-nav .nav-item.active .nav-icon {
  background: rgba(0, 177, 79, 0.12);
  transform: translateY(-1px);
}

.app-bottom-nav .nav-label {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.app-bottom-nav .nav-item:active {
  transform: scale(0.9);
}

/* CHẤM ĐẾM SỐ TÀI XẾ ĐANG Ở GẦN, GẮN TRÊN NÚT TÀI XẾ */
.app-bottom-nav .nav-badge {
  position: absolute;
  top: 5px;
  left: 50%;
  margin-left: 5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ef4444;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  box-sizing: content-box;
  display: none;
  animation: navBadgePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-bottom-nav .nav-badge.show {
  display: block;
}

@keyframes navBadgePop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ẨN THANH ĐIỀU HƯỚNG KHI BÀN PHÍM ẢO ĐANG BẬT ĐỂ KHÔNG CHE Ô NHẬP */
body.focus-pickup .app-bottom-nav,
body.focus-dest .app-bottom-nav {
  transform: translateY(110%);
  pointer-events: none !important;
}

/* DARK MODE CHO THANH ĐIỀU HƯỚNG */
.dark-mode .app-bottom-nav {
  background: rgba(23, 33, 51, 0.94);
  border-top-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.45);
}

.dark-mode .app-bottom-nav .nav-item {
  color: #94a3b8;
}

.dark-mode .app-bottom-nav .nav-item.active {
  color: #34d399;
}

.dark-mode .app-bottom-nav .nav-item.active::before {
  background: #34d399;
}

.dark-mode .app-bottom-nav .nav-item.active .nav-icon {
  background: rgba(52, 211, 153, 0.16);
}

.dark-mode .app-bottom-nav .nav-badge {
  border-color: #172133;
}

/* ============================================================================
   BẢNG TRƯỢT LÊN TỪ VÙNG AN TOÀN (BOTTOM SHEET) DÙNG CHO NÚT GẦN ĐÂY & TIỆN ÍCH
   ============================================================================ */
.nav-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: var(--z-nav-sheet);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.nav-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-sheet {
  position: fixed;
  bottom: var(--nav-total);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.25);
  z-index: calc(var(--z-nav-sheet) + 1);
  padding: 8px 14px 14px 14px;
  box-sizing: border-box;
  transform: translateY(102%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 66vh;
  display: flex;
  flex-direction: column;
}

.nav-sheet.active {
  transform: translateY(0);
}

.nav-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 4px;
  background: #cbd5e1;
  margin: 2px auto 10px auto;
  flex-shrink: 0;
}

.nav-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px 4px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.nav-sheet-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
}

.nav-sheet-close {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  line-height: 1;
}

.nav-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 8px 0;
}

.nav-sheet-group-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 4px 4px 4px;
}

.nav-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}

.nav-sheet-item:active {
  transform: scale(0.98);
  background: #f1f5f9;
}

.nav-sheet-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.nav-sheet-item-text {
  flex: 1;
  min-width: 0;
}

.nav-sheet-item-main {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-sheet-item-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-sheet-item-arrow {
  font-size: 15px;
  color: #cbd5e1;
  flex-shrink: 0;
}

.nav-sheet-empty {
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  padding: 26px 12px;
  line-height: 1.5;
}

.dark-mode .nav-sheet {
  background: #172133;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
}

.dark-mode .nav-sheet-handle { background: #475569; }
.dark-mode .nav-sheet-header { border-bottom-color: #334155; }
.dark-mode .nav-sheet-title { color: #f8fafc; }
.dark-mode .nav-sheet-close { background: #334155; color: #e2e8f0; }
.dark-mode .nav-sheet-item:active { background: #1e293b; }
.dark-mode .nav-sheet-item-icon { background: #0f172a; }
.dark-mode .nav-sheet-item-main { color: #f1f5f9; }
.dark-mode .nav-sheet-item-sub,
.dark-mode .nav-sheet-empty { color: #94a3b8; }

/* THANH CẢNH BÁO MẤT MẠNG KHI SÓNG YẾU/OFFLINE */
.network-offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #ef4444;
  color: #ffffff;
  text-align: center;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 700;
  z-index: var(--z-alert);
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.4);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
  pointer-events: none;
  box-sizing: border-box;
}

.network-offline-bar.show {
  transform: translateY(0);
}

.network-offline-bar.online-back {
  background: #22c55e;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.4);
}

/* KHÓA BODY CỐ ĐỊNH KHI FOCUS TRÁNH BÀN PHÍM ẢO ĐẨY TRÔI KHUNG NHẬP */
body.focus-pickup,
body.focus-dest {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

/* BẢN ĐỒ CỐ ĐỊNH NỀN */
#map { 
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: none;
}

/* KHUNG PC CHUẨN TỐI ĐA 480PX KHI XEM TRÊN MÁY TÍNH */
@media (min-width: 481px) {
  html {
    background-color: #cbd5e1;
  }

  #map {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 480px !important;
    height: 100% !important;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
  }

  .top-float-bar {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 480px !important;
  }

  .bottom-section {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 480px !important;
  }

  .bottom-main-bar,
  .price-card {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 20px) !important;
    max-width: 460px !important;
  }

  .collapsible-drivers-panel {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 20px) !important;
    max-width: 460px !important;
  }

  .fixed-center-pin {
    left: 50% !important;
  }

  body.dark-mode {
    background-color: #0f172a;
  }
}

/* CỤM NÚT NỔI GÓC TRÊN MÀN HÌNH */
.top-float-bar {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: var(--z-top-float);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  box-sizing: border-box;
}

.btn-theme-toggle-float {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  padding: 0;
  color: #334155;
}

.btn-theme-toggle-float:active {
  transform: scale(0.92);
}

/* CỤM TOP CONTAINER CHỨA CÁC KHỐI ĐỊA CHỈ NẰM PHÍA TRÊN */
.bottom-section {
  position: fixed;
  top: 0 !important;
  bottom: auto !important;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  z-index: 1000;
  background: transparent !important;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 10px;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box;
  max-height: 70dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.bottom-section::after {
  display: none !important;
}

/* DÒNG THÔNG BÁO HƯỚNG DẪN KHI CHỌN VỊ TRÍ TRÊN BẢN ĐỒ */
.map-select-notice {
  order: 1;
  display: none;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 11px 14px;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  pointer-events: auto !important;
}

/* KHỐI 1: THẺ NHẬP ĐỊA CHỈ (THẺ NỔI ĐỘC LẬP NẰM TRÊN CÙNG) */
.route-card {
  order: 2;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  position: relative;
  pointer-events: auto !important;
  z-index: var(--z-route-card);
  overflow: visible !important;
  box-sizing: border-box;
  margin-bottom: 8px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* CHIỀU CAO DÒNG NHẬP VÀ ĐỘ THOÁNG KHUNG VỊ TRÍ */
.route-input-item {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 42px;
  z-index: 10;
  box-sizing: border-box;
  width: 100%;
}

.pickup-group {
  z-index: 20;
}

.dest-group {
  z-index: 10;
}

/* NÚT TRỜ VỀ KHI VÀO CHẾ ĐỘ FOCUS */
.btn-back-focus {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #0f172a;
  cursor: pointer;
  padding: 0 8px 0 0;
  margin-right: 4px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dark-mode .btn-back-focus {
  color: #f8fafc;
}

/* KHÓA VÀ ẨN HOÀN TOÀN ĐƯỜNG TRẮNG CÙNG KHUNG ĐÁY KHI DÙNG Ô NHẬP LIỆU */
body.focus-pickup .bottom-section,
body.focus-dest .bottom-section {
  transform: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  pointer-events: none !important;
}

body.focus-pickup .bottom-section::after,
body.focus-dest .bottom-section::after {
  display: none !important;
}

body.focus-pickup .route-card,
body.focus-dest .route-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* CHẾ ĐỘ FOCUS ĐẨY NGUYÊN DÒNG ĐIỂM ĐÓN / ĐIỂM ĐẾN LÊN ĐẦU MÀN HÌNH */
body.focus-pickup .pickup-group,
body.focus-dest .dest-group {
  position: fixed !important;
  top: calc(10px + env(safe-area-inset-top, 0px)) !important;
  left: 14px !important;
  right: 14px !important;
  width: calc(100% - 28px) !important;
  max-width: 452px !important;
  margin: 0 auto !important;
  z-index: var(--z-focus-mode) !important;
  background: #ffffff !important;
  border: 2px solid #00b14f !important;
  border-radius: 14px !important;
  padding: 6px 12px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18) !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
}

/* ẨN NÚT CHI TIẾT VÀ NÚT CHỌN BẢN ĐỒ KHI Ở CHẾ ĐỘ FOCUS */
body.focus-pickup .pickup-group #btnPickupDetail,
body.focus-pickup .pickup-group .btn-pin-select,
body.focus-dest .dest-group .btn-pin-select,
body.focus-dest .dest-group .btn-swap-route,
body.focus-dest .dest-group .btn-reset-icon {
  display: none !important;
}

@media (min-width: 481px) {
  body.focus-pickup .pickup-group,
  body.focus-dest .dest-group {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 28px) !important;
    max-width: 452px !important;
  }
}

body.focus-pickup .pickup-group .btn-back-focus,
body.focus-dest .dest-group .btn-back-focus {
  display: flex !important;
}

body.focus-pickup .pickup-group .pickup-icon,
body.focus-dest .dest-group .dest-icon {
  display: none !important;
}

body.focus-pickup .pickup-group .action-buttons-right,
body.focus-dest .dest-group .action-buttons-right {
  display: flex !important;
}

/* KHỐI 3: DANH SÁCH 7 ĐIỂM ĐẾN GẦN ĐÂY THẺ NỔI ĐỘC LẬP NẰM PHÍA TRÊN */
.recent-dests-block {
  order: 3;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  display: none;
  pointer-events: auto !important;
}

/* BẢNG GỢI Ý KHI GÕ TÌM KIẾM AUTOCOMPLETE */
.suggestions-list { 
  position: absolute; 
  top: 100% !important; 
  bottom: auto !important;
  left: 0; 
  right: 0; 
  background: #ffffff; 
  border: 1px solid #cbd5e1; 
  border-radius: 14px; 
  max-height: 220px; 
  overflow-y: auto; 
  z-index: 9999 !important; 
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18); 
  display: none; 
  margin-top: 4px !important; 
  -webkit-overflow-scrolling: touch;
}

body.focus-pickup .pickup-group .suggestions-list,
body.focus-dest .dest-group .suggestions-list {
  top: 100% !important;
  bottom: auto !important;
  left: 0 !important;
  right: 0 !important;
  margin-top: 6px !important;
  max-height: 50dvh !important;
  z-index: var(--z-focus-suggestions) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  border-radius: 14px !important;
  -webkit-overflow-scrolling: touch; 
}

/* ICON ĐẦU DÒNG */
.route-icon {
  font-size: 15px;
  margin-right: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-icon svg {
  width: 20px;
  height: 20px;
}

/* Ô NHẬP VĂN BẢN */
.route-input-item input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: none;
  background: transparent;
  font-size: 14.5px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  padding: 8px 0;
  box-sizing: border-box;
}

.pickup-group input,
.dest-group input {
  padding-right: 0 !important;
}

.action-buttons-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: 4px;
  z-index: 30;
}

/* NÚT XÓA CHỮ (NÚT X) - ĐÃ ẨN HOÀN TOÀN */
.btn-clear-input {
  display: none !important;
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: bold;
  color: #64748b;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.route-divider {
  position: relative;
  height: 1px;
  background: #e2e8f0;
  margin: 0 4px 0 32px;
}

/* NÚT HOÁN ĐỔI */
.btn-swap-route {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  color: #00b14f;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, border-color 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.btn-swap-route:hover {
  background: #f0fdf4;
  border-color: #00b14f;
}

.btn-swap-route:active {
  background: #dcfce7;
}

/* NÚT ĐẶT LẠI ĐIỂM ĐÓN/ĐẾN TRONG DÒNG ĐIỂM ĐẾN */
.btn-reset-icon { 
  background: #ffffff; 
  border: 1px solid #cbd5e1; 
  color: #dc2626; 
  border-radius: 8px; 
  width: 32px; 
  height: 32px; 
  display: none; 
  align-items: center; 
  justify-content: center; 
  cursor: pointer; 
  flex-shrink: 0; 
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); 
  transition: all 0.2s ease;
  padding: 0; 
}

.btn-reset-icon svg {
  width: 16px;
  height: 16px;
}

.btn-reset-icon:hover { 
  background: #fef2f2; 
  border-color: #dc2626;
}

.btn-reset-icon:active { 
  transform: scale(0.95); 
}

.dark-mode .btn-reset-icon {
  background: #334155;
  border-color: #475569;
  color: #fca5a5;
}

.dark-mode .btn-reset-icon:hover {
  background: #450a0a;
}

.dark-mode .btn-swap-route {
  background: #334155;
  border-color: #475569;
  color: #6ee7b7;
}

.suggestion-loading {
  padding: 12px 14px;
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.dark-mode .suggestion-loading {
  color: #94a3b8;
}

/* NÚT CHI TIẾT */
.btn-pickup-detail {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 32px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
}

.btn-pickup-detail:hover {
  background: #f1f5f9;
  border-color: #00b14f;
  color: #00b14f;
}

.btn-pickup-detail.has-note {
  background: #f0fdf4;
  border-color: #00b14f;
  color: #16a34a;
}

/* NÚT SỬA GHIM TÂM NGẮM */
.btn-pin-select {
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.btn-pin-select svg {
  width: 18px;
  height: 18px;
}

/* NÚT CHỌN ĐIỂM ĐÓN */
.pickup-group .btn-pin-select {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}

.pickup-group .btn-pin-select:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

/* NÚT CHỌN ĐIỂM ĐẾN */
.dest-group .btn-pin-select {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #2563eb;
}

.dest-group .btn-pin-select:hover {
  background: #dbeafe;
  border-color: #2563eb;
}

.dark-mode .pickup-group .btn-pin-select {
  background: #450a0a;
  border-color: #991b1b;
  color: #fca5a5;
}

.dark-mode .dest-group .btn-pin-select {
  background: #172554;
  border-color: #1e40af;
  color: #93c5fd;
}

/* NÚT XÁC NHẬN CHỌN VỊ TRÍ */
.btn-confirm-select {
  position: fixed;
  bottom: calc(var(--stack-bottom) + 2px);
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  max-width: 460px;
  margin: 0 auto;
  z-index: var(--z-confirm-btn);
  display: none;
  padding: 15px 20px;
  background: #00b14f;
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,177,79,0.35);
  letter-spacing: 0.3px;
  pointer-events: auto !important;
  box-sizing: border-box;
}

/* KHI ĐANG GHIM VỊ TRÍ TRÊN BẢN ĐỒ: ẨN HẲN THẺ CHỨA 2 Ô NHẬP .route-card */
body.selecting-pickup .route-card,
body.selecting-dest .route-card,
body.selecting-pickup .bottom-main-bar,
body.selecting-pickup .collapsible-drivers-panel,
body.selecting-pickup .recent-dests-block,
body.selecting-pickup #priceCard,
body.selecting-dest .bottom-main-bar,
body.selecting-dest .collapsible-drivers-panel,
body.selecting-dest .recent-dests-block,
body.selecting-dest #priceCard {
  display: none !important;
}

body.selecting-pickup .btn-confirm-select,
body.selecting-dest .btn-confirm-select,
body.selecting-pickup .map-select-notice,
body.selecting-dest .map-select-notice {
  display: block !important;
}

/* CỤM NÚT NỔI GPS GÓC DƯỚI PHẢI - DI CHUYỂN DỰA TRÊN ĐƯỜNG CONG TƯƠNG ĐỒNG BẢNG 3 TÀI XẾ */
.floating-controls-stack {
  position: fixed;
  bottom: calc(var(--stack-bottom) + 60px);
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: var(--z-floating-controls);
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(calc(-1 * var(--panel-offset, 0px)));
}

.btn-gps-float {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.btn-gps-float svg {
  width: 24px;
  height: 24px;
}

.btn-gps-float:hover {
  background: #ffffff;
  color: #00b14f;
  transform: translateY(-2px);
}

.btn-gps-float:active {
  transform: translateY(0) scale(0.95);
}

/* KHỐI 2: CỐ ĐỊNH PHÍA TRÊN VÙNG AN TOÀN */
.bottom-main-bar {
  position: fixed;
  bottom: var(--stack-bottom);
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  padding: 8px 10px;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  pointer-events: auto !important;
  box-sizing: border-box;
  transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.right-vehicle-price-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CẤU TRÚC DÃY 4 ICON CHỌN XE 1-CHẠM TRỰC TIẾP */
.quick-vehicle-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

.btn-vehicle-tab {
  background: transparent;
  border: none;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-vehicle-tab:active {
  transform: scale(0.9);
}

.btn-vehicle-tab.active {
  background: #00b14f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 177, 79, 0.35);
}

/* KHỐI GIÁ TIỀN & SỐ KM DƯỚI CÙNG */
.price-card {
  position: fixed;
  bottom: var(--stack-bottom);
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #00b14f;
  border-radius: 18px;
  padding: 10px 16px;
  box-shadow: 0 -4px 18px rgba(0, 177, 79, 0.2);
  z-index: 1000;
  pointer-events: auto !important;
  box-sizing: border-box;
}

.price-card-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.price-amount {
  font-size: 21px;
  font-weight: 800;
  color: #15803d;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.price-sub {
  font-size: 11.5px;
  color: #16a34a;
  font-weight: 700;
  margin-top: 2px;
}

/* TỰ ĐỘNG ĐẨY TẦNG CÁC THẺ KHI CÓ KHỐI CƯỚC PHÍ NẰM DƯỚI CÙNG */
body.has-price-card .bottom-main-bar {
  bottom: calc(var(--stack-bottom) + 64px) !important;
}

body.has-price-card .collapsible-drivers-panel {
  bottom: calc(var(--stack-bottom) + 124px) !important;
}

body.has-price-card .floating-controls-stack {
  bottom: calc(var(--stack-bottom) + 124px) !important;
}

.btn-drivers-toggle {
  background: #00b14f;
  color: #ffffff;
  border: none;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 8px rgba(0, 177, 79, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
  animation: pulse-live 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse-live {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.btn-drivers-toggle:active {
  transform: scale(0.96);
}

.btn-drivers-toggle.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.3);
}

.btn-drivers-toggle.active .live-dot {
  background-color: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8);
}

.arrow-icon {
  font-size: 12px;
  transition: transform 0.25s ease;
}

/* KHUNG 3 TÀI XẾ SỔ LÊN TRÊN KHI BẤM NÚT TÀI XẾ */
.collapsible-drivers-panel {
  position: fixed;
  bottom: calc(var(--stack-bottom) + 60px);
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  max-width: 460px;
  margin: 0 auto;
  z-index: 999;
  pointer-events: auto !important;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: #ffffff;
  border-radius: 16px;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding 0.35s ease, bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.collapsible-drivers-panel.show {
  max-height: 55dvh !important;
  overflow-y: auto !important;
  opacity: 1;
  padding: 12px 12px 30px 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
}

.panel-header {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.radius-badge {
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
}

/* GHIM CỐ ĐỊNH CHÍNH GIỮA MÀN HÌNH */
.fixed-center-pin {
  position: fixed;
  top: 50vh;
  top: 50dvh;
  left: 50vw;
  transform: translate(-50%, -100%);
  z-index: var(--z-center-pin);
  pointer-events: none;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fixed-center-pin .pin-svg {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
  transition: transform 0.2s ease, fill 0.3s ease;
}

.fixed-center-pin .pin-shadow {
  width: 14px;
  height: 5px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  margin-top: -2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.map-moving .fixed-center-pin {
  transform: translate(-50%, -125%);
}
body.map-moving .fixed-center-pin .pin-shadow {
  transform: scale(0.4);
  opacity: 0.15;
}

.suggestion-item { 
  padding: 12px 14px; 
  font-size: 14px; 
  border-bottom: 1px solid #f1f5f9; 
  cursor: pointer; 
  color: #334155; 
  transition: background-color 0.15s ease;
}

.suggestion-item:last-child { 
  border-bottom: none; 
}

.suggestion-item:hover,
.suggestion-item.highlighted { 
  background: #f0fdf4; 
  color: #16a34a; 
}

.dark-mode .suggestion-item.highlighted {
  background: #064e3b;
  color: #6ee7b7;
}

.btn-action-zalo {
  background: #0068ff;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 104, 255, 0.2);
}

.btn-action-zalo:active {
  transform: scale(0.95);
}

.btn-action-phone {
  background: #22c55e;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.btn-action-phone:active {
  transform: scale(0.95);
}

.btn-action-rating {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-action-rating:active {
  transform: scale(0.95);
}

.driver-avatar-img { 
  width: 42px; 
  height: 42px; 
  border-radius: 50%; 
  object-fit: cover; 
  border: 2px solid #00b14f; 
  flex-shrink: 0; 
  background: #e2e8f0; 
}

.top3-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: visible !important;
}

.top3-item:last-child { 
  margin-bottom: 0; 
}

.top3-item.selected {
  border-color: #00b14f;
  background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(0, 177, 79, 0.15);
}

/* POPUP MENU CHỌN KÊNH NHẮN TIN TỰ ĐỘNG THOÁT KHUÔN CẮT (POSITION FIXED) */
.contact-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.contact-popover-menu {
  position: fixed;
  z-index: 999999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  box-sizing: border-box;
}

/* LEAFLET POPUP KHUNG TRÊN BẢN ĐỒ */
.leaflet-pane.leaflet-popup-pane {
  z-index: var(--z-popup) !important;
}

.leaflet-popup {
  z-index: var(--z-popup) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-content {
  overflow: visible !important;
}

.contact-menu-item {
  padding: 7px 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.contact-menu-item .contact-icon {
  font-size: 13px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-menu-item:hover {
  background: #f0fdf4;
  color: #00b14f;
}

/* CHẾ ĐỘ TỐI (DARK MODE) */
body.dark-mode, html.dark-mode {
  background: #0f172a !important;
  color: #e2e8f0;
}

.dark-mode .leaflet-tile-pane {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

.dark-mode .bottom-section {
  background: transparent !important;
  box-shadow: none !important;
}

.dark-mode .recent-dests-block,
.dark-mode .map-select-notice,
.dark-mode .bottom-main-bar,
.dark-mode .collapsible-drivers-panel,
.dark-mode .price-card,
.dark-mode .contact-popover-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc;
}

.dark-mode .quick-vehicle-bar {
  background: #0f172a;
  border-color: #334155;
}

.dark-mode .btn-vehicle-tab.active {
  background: #00b14f;
}

.dark-mode .btn-theme-toggle-float {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.dark-mode .route-card,
.dark-mode .route-input-item,
.dark-mode .route-input-item.pickup-group,
.dark-mode .route-input-item.dest-group {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

.dark-mode #pickupInput,
.dark-mode #destInput,
.dark-mode #pickupDetailInput {
  background-color: #1e293b !important;
  color: #ffffff !important;
  caret-color: #00b14f !important;
  -webkit-text-fill-color: #ffffff !important;
}

.dark-mode #pickupInput::placeholder,
.dark-mode #destInput::placeholder,
.dark-mode #pickupDetailInput::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

.dark-mode .route-divider {
  background: #334155 !important;
}

.dark-mode .btn-pickup-detail {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
}

.dark-mode .btn-pickup-detail.has-note {
  background: #064e3b;
  border-color: #059669;
  color: #6ee7b7;
}

.dark-mode .suggestions-list {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
}

.dark-mode .suggestion-item {
  color: #f8fafc !important;
  border-bottom: 1px solid #334155 !important;
}

.dark-mode .suggestion-item:hover {
  background: #334155 !important;
  color: #6ee7b7;
}

.dark-mode .suggestion-loading {
  color: #94a3b8;
}

.dark-mode .price-amount { 
  color: #6ee7b7; 
}

.dark-mode .price-sub {
  color: #86efac;
}

.dark-mode .price-card-label {
  color: #cbd5e1;
}

.dark-mode .btn-drivers-toggle {
  background: #00b14f;
  color: #ffffff;
}

.dark-mode .btn-drivers-toggle.active {
  background: #334155;
  color: #f8fafc;
}

.dark-mode .btn-gps-float {
  background: rgba(30, 41, 59, 0.95);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.dark-mode .top3-item {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .top3-item.selected {
  background: #064e3b;
  border-color: #059669;
}

.dark-mode .leaflet-popup-content-wrapper,
.dark-mode .leaflet-popup-tip {
  background: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.dark-mode .driver-popup-name {
  color: #f8fafc !important;
}

.dark-mode .custom-alert-box {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

.dark-mode .custom-alert-title {
  color: #f8fafc !important;
}

.dark-mode .custom-alert-msg {
  color: #cbd5e1 !important;
}

.dark-mode #pickupDetailInput {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

.dark-mode .contact-menu-item {
  color: #cbd5e1;
}

.dark-mode .contact-menu-item:hover {
  background: #334155;
  color: #6ee7b7;
}

.custom-alert-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-alert-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-alert-box {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 24px 20px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.05);
  transform: scale(0.88) translateY(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-alert-overlay.active .custom-alert-box {
  transform: scale(1) translateY(0);
}

.custom-alert-icon {
  font-size: 42px;
  margin-bottom: 12px;
  line-height: 1;
  display: inline-block;
}

.custom-alert-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.custom-alert-msg {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 20px;
  white-space: pre-line;
  font-weight: 500;
}

.custom-alert-btn {
  background: linear-gradient(135deg, #00b14f 0%, #009643 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 177, 79, 0.35);
  transition: all 0.2s ease;
}

.custom-alert-btn:active {
  transform: scale(0.97);
}

/* RENDER BẢN ĐỒ */
.leaflet-container {
  background-color: #f1f5f9 !important;
}

.dark-mode .leaflet-container {
  background-color: #121212 !important;
}

.leaflet-map-pane {
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.leaflet-tile-container {
  will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
  will-change: transform;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.2, 0, 0.2, 1);
}

body.focus-pickup .btn-confirm-select,
body.focus-dest .btn-confirm-select,
body.selecting-pickup.focus-pickup .btn-confirm-select,
body.selecting-dest.focus-pickup .btn-confirm-select,
body.selecting-pickup.focus-dest .btn-confirm-select,
body.selecting-dest.focus-dest .btn-confirm-select,
body.focus-pickup .floating-controls-stack,
body.focus-dest .floating-controls-stack,
body.focus-pickup .top-float-bar,
body.focus-dest .top-float-bar,
body.focus-pickup .bottom-main-bar,
body.focus-dest .bottom-main-bar,
body.focus-pickup .collapsible-drivers-panel,
body.focus-dest .collapsible-drivers-panel,
body.focus-pickup .recent-dests-block,
body.focus-dest .recent-dests-block,
body.focus-pickup .price-card,
body.focus-dest .price-card,
body.focus-pickup .route-divider,
body.focus-dest .route-divider,
body.focus-pickup .dest-group,
body.focus-dest .pickup-group {
  display: none !important;
}

.top-menu-popover {
  pointer-events: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: var(--z-menu);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 210px;
}

.top-menu-option {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-menu-option:hover {
  background: #f1f5f9;
  color: #00b14f;
}

.dark-mode .top-menu-popover {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .top-menu-option {
  color: #cbd5e1;
}

.dark-mode .top-menu-option:hover {
  background: #334155;
  color: #6ee7b7;
}

body.selecting-pickup .btn-confirm-select {
  background: #dc2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

body.selecting-dest .btn-confirm-select {
  background: #2563eb !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}