body {
        background-color: #f4f7f6;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      }
      
      /* Navbar Navbar */
      .top-navbar {
        background-color: #ffffff;
        box-shadow: 0 2px 15px rgba(0,0,0,0.04);
      }

      /* Card chứa nội dung */
      .main-card {
        border: none;
        border-radius: 1.25rem;
        box-shadow: 0 5px 25px rgba(0,0,0,0.05);
        background: #ffffff;
        overflow: hidden;
      }

      /* Nav Pills (Tabs) */
      .nav-pills .nav-link {
        color: #5c636a;
        border-radius: 0.75rem;
        padding: 0.6rem 1.25rem;
        font-weight: 500;
        transition: all 0.25s ease;
        border: 1px solid transparent;
      }
      .nav-pills .nav-link:hover {
        background-color: #f8f9fa;
        border-color: #e9ecef;
      }
      .nav-pills .nav-link.active {
        /* MỚI: dùng màu chủ đạo vàng đồng (--logo-color, khai báo ở
           assets/custom-theme.css - luôn được load cùng file này) thay cho
           xanh dương mặc định của Bootstrap. */
        background-color: var(--logo-color, #f5a623);
        color: white;
        box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
      }

      /* Table Styles */
      .custom-table {
        margin-bottom: 0;
      }
      .custom-table thead th {
        background-color: #fcfcfc;
        color: #6c757d;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.8px;
        border-bottom: 2px solid #f0f0f0;
        padding: 1rem 1.25rem;
      }
      .custom-table tbody td {
        padding: 1rem 1.25rem;
        vertical-align: middle;
        border-bottom: 1px solid #f8f9fa;
        color: #333;
        font-size: 0.95rem;
      }
      .custom-table tbody tr:hover td {
        background-color: #f8faff;
      }

      /* Filter Select */
      .filter-wrapper {
        position: relative;
        min-width: 320px;
      }
      .filter-icon {
        position: absolute;
        top: 50%;
        left: 1rem;
        transform: translateY(-50%);
        color: #adb5bd;
        z-index: 5;
        pointer-events: none;
      }
      .filter-select {
        border-radius: 0.75rem;
        padding-left: 2.75rem;
        border-color: #e2e8f0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        font-weight: 500;
        color: #495057;
      }
      .filter-select:focus {
        border-color: var(--logo-color, #f5a623);
        box-shadow: 0 0 0 0.25rem rgba(245, 166, 35, 0.18);
      }

      /* Modal */

      .modal-size{
        width: 10px;
      }
      .modal-content {
        border: none;
        border-radius: 1.25rem;
      }
      .modal-header {
        border-bottom: 1px solid #f4f6f8;
        background-color: #fafbfc;
        border-top-left-radius: 1.25rem;
        border-top-right-radius: 1.25rem;
      }


.tracking-timeline {
  position: relative;
  padding-left: 30px;
  margin-top: 20px;
}
.tracking-timeline::before {
  display: none;
}

/* Tạo đoạn nối từ bước hiện tại đến bước tiếp theo */
.timeline-step::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: -25px; /* Kéo dài xuống khít với margin-bottom: 25px của bước tiếp theo */
  left: -19px; /* Căn giữa hoàn hảo với timeline-icon */
  width: 2px;
  background: #e9ecef; /* Màu xám mặc định[cite: 2] */
  z-index: 0; /* Đặt phía sau icon */
}

/* Ẩn đoạn nối ở bước cuối cùng để không bị dư đường kẻ */
.timeline-step:last-child::before {
  display: none;
}

/* Tô màu xanh (#198754) cho đường nối nếu bước đó đã hoàn thành (completed)[cite: 2] */
.timeline-step.completed::before {
  background: #198754; 
}

/* Tô màu vàng đồng cho đường nối khi bước đang active (MỚI: đổi từ xanh dương
   Bootstrap sang màu chủ đạo, khớp --logo-color ở assets/custom-theme.css) */
.timeline-step.active::before {
  background: var(--logo-color, #f5a623);
}
.timeline-step {
  position: relative;
  margin-bottom: 25px;
}
.timeline-step:last-child {
  margin-bottom: 0;
}
.timeline-icon {
  position: absolute;
  left: -30px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e9ecef;
  border: 2px solid #fff;
  z-index: 1;
}

/* 1. Định nghĩa các hiệu ứng chuyển động (Keyframes) */

/* Hiệu ứng toả sáng vòng ngoài cho bước đang Active */
@keyframes pulse-primary {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

/* Hiệu ứng nảy (scale) nhẹ khi một bước được đánh dấu là Completed */
@keyframes pop-in {
  0% {
    transform: scale(0.5);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* 2. Áp dụng hiệu ứng vào các trạng thái của timeline-icon */

/* Khi bước đang ở trạng thái active (đang chờ duyệt ở bước này) */
.timeline-step.active .timeline-icon {
  background: #0d6efd; /* Màu xanh dương của Bootstrap primary */
  animation: pulse-primary 1.5s infinite; /* Tỏa sáng liên tục lặp lại vô hạn */
}

/* Khi bước đã hoàn thành (completed)[cite: 2] */
.timeline-step.completed .timeline-icon {
  background: #198754; /* Màu xanh lá của Bootstrap success[cite: 2] */
}

/* CHỈ phát animation "nảy" (pop-in) cho icon của bước VỪA MỚI chuyển sang
   completed (class "just-completed" do JS gắn thêm - xem showOrderProgress()
   trong leader-orders.js), tránh lặp lại animation vô nghĩa cho các bước đã
   hoàn thành từ trước mỗi khi modal tự làm mới (realtime). */
.timeline-step.completed.just-completed .timeline-icon {
  animation: pop-in 0.4s ease-out forwards;
}

/* ---- THÊM MỚI: animation "chạy lướt xuống" cho đoạn nối (::before) khi 1
   bước VỪA MỚI được duyệt - mô phỏng hiệu ứng tiến độ "chảy" xuống bước kế
   tiếp thay vì đổi màu tức thì. CHỈ áp dụng cho bước có class
   "just-completed" (JS chỉ gắn cho đúng bước vừa đổi trạng thái ở lần render
   gần nhất, xem leader-orders.js#showOrderProgress()). ---- */
@keyframes flow-down {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.timeline-step.just-completed::before {
  transform-origin: top;
  animation: flow-down 0.7s ease-out forwards;
}
.timeline-step.rejected .timeline-icon {
  background: #dc3545; /* Màu đỏ của Bootstrap danger */
}
.timeline-content h6 {
  margin-bottom: 2px;
  font-weight: bold;
}
.timeline-content small {
  color: #6c757d;
}

/* ================= MỚI: Dark mode ================= */
/* Toàn bộ file này (leader-orders.html) dùng nền trắng cứng cho navbar/card/
   table/modal, không theo biến CSS nào - override riêng cho
   data-bs-theme="dark" (assets/theme.js), đồng bộ tông màu với
   assets/custom-theme.css. */
[data-bs-theme="dark"] body {
  background-color: #151515;
}
[data-bs-theme="dark"] .top-navbar {
  background-color: #181818 !important;
}
[data-bs-theme="dark"] .main-card {
  background: #1c1c1c;
}
[data-bs-theme="dark"] .custom-table thead th {
  background-color: #232323;
  color: #999999;
  border-bottom-color: #333333;
}
[data-bs-theme="dark"] .custom-table tbody td {
  border-bottom-color: #2e2e2e;
  color: #eaeaea;
}
[data-bs-theme="dark"] .custom-table tbody tr:hover td {
  background-color: #232323;
}
[data-bs-theme="dark"] .filter-select {
  border-color: #333333;
  color: #eaeaea;
  background-color: #1c1c1c;
}
[data-bs-theme="dark"] .modal-header {
  background-color: #1c1c1c;
  border-bottom-color: #2e2e2e;
}
[data-bs-theme="dark"] .timeline-content small {
  color: #999999;
}