/* Import Modern Reports CSS */
@import url('reports-modern.css');

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

/* Body */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f4f7fc;
  overflow-x: hidden;
}

.time-filter-booking-btn,
.time-filter-report-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  text-align: center;
  cursor: pointer;
  background-color: #f3f4f6;
  color: #4b5563;
}

/* Group layout for report buttons */
.time-filter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center; /* mobile: center */
}

@media (min-width: 768px) {
  .time-filter-btn-group {
    justify-content: flex-start; /* desktop: left */
  }
}

.time-filter-booking-btn.active,
.time-filter-report-btn.active {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.time-filter-booking-btn:hover,
.time-filter-report-btn:hover {
  background-color: #dbeafe;
  color: #2563eb;
}

.time-filter-booking-btn.active:hover,
.time-filter-report-btn.active:hover {
  background-color: #1d4ed8;
  color: #ffffff;
}

/* ====================== SPECIFIC SECTIONS FILTERS ====================== */

.booking-filter-container {
  display: flex;
}

@media (max-width: 640px) {
  #customStartDate,
  #customEndDate,
  #customStartBookingDate,
  #customEndBookingDate,
  #customStartReportDate,
  #customEndReportDate {
    width: 100%;
    border: 1.5px solid #d1d5db;
    padding: 8px;
  }
}

/* Buttons: Tạo hóa đơn, Sửa hóa đơn, Thanh toán, Up ảnh */

#reviewInvoiceDetailBtn,
#payInvoiceDetailBtn {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  height: 2.25rem;
  min-width: 100px;
  border-radius: 0.5rem;
}

@media (max-width: 640px) {
  #reviewInvoiceDetailBtn,
  #payInvoiceDetailBtn {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    height: 2rem;
    min-width: 80px;
  }
}

/* Invoices Table */
#invoicesListTabs {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

#invoicesListTabs th,
#invoicesListTabs td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  line-height: 1.4;
}

#invoicesListTabs th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

#invoicesListTabs td {
  font-size: 0.85rem;
}

#invoicesListTabs .status-paid {
  color: #16a34a;
  background-color: #dcfce7;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#invoicesListTabs .status-pending {
  color: #2563eb;
  background-color: #eff6ff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#invoicesListTabs .detail-btn {
  color: #2563eb;
  cursor: pointer;
  transition: color 0.2s ease;
}

#invoicesListTabs .detail-btn:hover {
  color: #1e40af;
}

#bookingsListTabs .status-success {
  color: #16a34a;
  background-color: #dcfce7;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-deleted {
  color: #dc2626;
  background-color: #fee2e2;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-pending {
  color: #2563eb;
  background-color: #eff6ff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-waiting {
  color: #d97706;
  background-color: #fef9c3;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-message-success {
  color: #16a34a;
  background-color: #dcfce7;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-message-failed {
  color: #dc2626;
  background-color: #fee2e2;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-reminder-success {
  color: #16a34a;
  background-color: #dcfce7;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-reminder-deleted {
  color: #dc2626;
  background-color: #fee2e2;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-reminder-waiting {
  color: #d97706;
  background-color: #fef9c3;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-reminder-failed {
  color: #dc2626;
  background-color: #fee2e2;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-cancel-success {
  color: #16a34a;
  background-color: #dcfce7;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

#bookingsListTabs .status-cancel-failed {
  color: #dc2626;
  background-color: #fee2e2;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  display: inline-block;
}

@media (max-width: 640px) {
  #invoicesListTabs th,
  #invoicesListTabs td {
    padding: 0.5rem;
  }

  #invoicesListTabs th {
    font-size: 0.85rem;
  }

  #invoicesListTabs td {
    font-size: 0.75rem;
  }
}

/* Customer Photos */
.customer-photo {
  height: 80px;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Customer Info */
#customerInfo .font-semibold.text-gray-800 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 640px) {
  #customerInfo .font-semibold.text-gray-800,
  #customerPromo .text-sm.text-blue-500 {
    font-size: 0.7rem;
  }

  #customerDob .text-sm.text-gray-500,
  #customerLastVisit .text-sm.text-gray-500 {
    font-size: 0.65rem;
  }
}

button,
.button,
.service-group-btn,
.invoice-tab,
.modal button {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  background-clip: padding-box;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .time-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .mb-6 {
    margin-bottom: 1rem;
  }
}

.promo-checkbox-option {
  border: 1px solid #e5e7eb;
  /* Viền nhẹ */
  background-color: #ffffff;
}

.promo-checkbox-option.selected {
  background-color: #dbeafe;
  /* Màu xanh nhạt khi chọn */
  border-color: #3b82f6;
  /* Viền xanh đậm */
}

.promo-checkbox-option input[type='radio'] {
  accent-color: #3b82f6;
  /* Màu xanh cho radio button */
  width: 16px;
  height: 16px;
}

.promo-checkbox-option label {
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}

#promoStatus {
  font-size: 12px;
  color: #6b7280;
  /* Màu xám nhạt cho trạng thái */
}

#promoListSelect,
#paymentMethodSelect {
  max-width: 170px;
}

/* Đảm bảo bảng có thể cuộn ngang và bố cục cố định */
#invoicesListTabs.invoice-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Cố định 3 cột đầu tiên (STT, Ảnh, Khách hàng) */

#invoicesListTabs th:nth-child(2),
#invoicesListTabs td:nth-child(2) {
  position: sticky;
  left: -10px;
  min-width: 50px;
  max-width: 50px;
  z-index: 30;
  border-right: 1px solid #e5e7eb;
}

#invoicesListTabs th:nth-child(3),
#invoicesListTabs td:nth-child(3) {
  position: sticky;
  left: 30px;
  min-width: 120px;
  max-width: 160px;
  z-index: 30;
  border-right: 1px solid #e5e7eb;
}

/* Cố định thead khi cuộn dọc */
#invoicesListTabs thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px solid #e5e7eb;
}

/* Định nghĩa chiều rộng cho các cột còn lại */
#invoicesListTabs th:nth-child(1),
#invoicesListTabs td:nth-child(1) {
  min-width: 40px;
  max-width: 40px;
}

#invoicesListTabs th:nth-child(4),
#invoicesListTabs td:nth-child(4) {
  min-width: 120px;
  max-width: 120px;
}

#invoicesListTabs th:nth-child(5),
#invoicesListTabs td:nth-child(5) {
  min-width: 250px;
  max-width: 250px;
}

#invoicesListTabs th:nth-child(6),
#invoicesListTabs th:nth-child(7),
#invoicesListTabs th:nth-child(8),
#invoicesListTabs td:nth-child(6),
#invoicesListTabs td:nth-child(7),
#invoicesListTabs td:nth-child(8),
#invoicesListTabs th:nth-child(9),
#invoicesListTabs td:nth-child(9) {
  min-width: 100px;
  max-width: 100px;
}

#invoicesListTabs th:nth-child(10),
#invoicesListTabs th:nth-child(11),
#invoicesListTabs th:nth-child(12),
#invoicesListTabs th:nth-child(13),
#invoicesListTabs th:nth-child(14),
#invoicesListTabs td:nth-child(10),
#invoicesListTabs td:nth-child(11),
#invoicesListTabs td:nth-child(12),
#invoicesListTabs td:nth-child(13),
#invoicesListTabs td:nth-child(14) {
  min-width: 120px;
  max-width: 120px;
}

#invoicesListTabs th:nth-child(15),
#invoicesListTabs td:nth-child(15),
#invoicesListTabs th:nth-child(16),
#invoicesListTabs td:nth-child(16),
#invoicesListTabs th:nth-child(17),
#invoicesListTabs td:nth-child(17) {
  min-width: 150px;
  max-width: 150px;
}

/* Đảm bảo nội dung trong ô không bị tràn */
#invoicesListTabs td,
#invoicesListTabs th {
  white-space: inherit;
  padding: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
  font-size: smaller;
}

/* Đảm bảo cột cố định không bị che khuất bởi nội dung khác */
#invoicesListTabs .sticky {
  position: sticky !important;
}

/* Responsive */
@media (max-width: 768px) {
  #invoicesListTabs th,
  #invoicesListTabs td {
    padding: 0.5rem;
    font-size: 0.65rem;
  }

  #invoicesListTabs th:nth-child(1),
  #invoicesListTabs td:nth-child(1) {
    min-width: 30px;
    max-width: 40px;
  }

  #invoicesListTabs th:nth-child(2),
  #invoicesListTabs td:nth-child(2) {
    min-width: 40px;
    max-width: 40px;
  }

  #invoicesListTabs th:nth-child(3),
  #invoicesListTabs td:nth-child(3) {
    min-width: 120px;
    max-width: 120px;
  }
}

/* Styling cho bảng bookings */
#bookingsListTabs {
  width: 100%;
  border-spacing: 0;
  -webkit-overflow-scrolling: touch;
  /* Tối ưu cuộn trên iOS */
  scrollbar-width: thin;
  /* Giảm độ rộng thanh cuộn trên Firefox */
  scrollbar-color: #cbd5e0 #f7fafc;
  /* Màu thanh cuộn trên Firefox */
}

#bookingsListTabs thead {
  background-color: #f7fafc;
}

#bookingsListTabs th {
  position: sticky;
  top: 0;
  background-color: #f7fafc;
  z-index: 10;
  padding: 12px;
  font-weight: 600;
  font-size: smaller;
  border-bottom: 2px solid #e2e8f0;
  will-change: transform;
  /* Tối ưu hóa hiệu suất */
  transform: translateZ(0);
}

#bookingsListTabs th:first-child {
  left: -1px;
  z-index: 11;
  /* Đảm bảo cột đầu tiên luôn nằm trên các cột khác khi cuộn ngang */
  border-right: 2px solid #e2e8f0;
}

#bookingsListTabs td {
  padding: 12px;
  font-size: smaller;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
  will-change: transform;
  /* Tối ưu hóa hiệu suất */
  transform: translateZ(0);
}

#bookingsListTabs tr {
  transition: background-color 0.2s;
}

#bookingsListTabs td:first-child {
  position: sticky;
  left: -1px;
  z-index: 11;
  border-right: 2px solid #e2e8f0;
  will-change: transform;
  /* Tối ưu hóa hiệu suất */
  transform: translateZ(0);
}

#bookingsListTabs td img {
  transition: transform 0.2s;
}

#bookingsListTabs td img:hover {
  transform: scale(1.1);
}

/* Định nghĩa min-width cho các cột để tránh bị bóp */
#bookingsListTabs th:nth-child(1),
#bookingsListTabs td:nth-child(1) {
  min-width: 50px;
  max-width: 50px;
}

#bookingsListTabs th:nth-child(2),
#bookingsListTabs td:nth-child(2),
#bookingsListTabs th:nth-child(3),
#bookingsListTabs td:nth-child(3),
#bookingsListTabs th:nth-child(8),
#bookingsListTabs td:nth-child(8),
#bookingsListTabs th:nth-child(9),
#bookingsListTabs td:nth-child(9),
#bookingsListTabs th:nth-child(10),
#bookingsListTabs td:nth-child(10) {
  min-width: 120px;
}

#bookingsListTabs th:nth-child(4),
#bookingsListTabs td:nth-child(4),
#bookingsListTabs th:nth-child(5),
#bookingsListTabs td:nth-child(5) {
  min-width: 150px;
}

#bookingsListTabs th:nth-child(6),
#bookingsListTabs td:nth-child(6) {
  min-width: 130px;
}

#bookingsListTabs th:nth-child(7),
#bookingsListTabs td:nth-child(7) {
  min-width: 150px;
}

#bookingsListTabs th:nth-child(11),
#bookingsListTabs td:nth-child(11),
#bookingsListTabs th:nth-child(12),
#bookingsListTabs td:nth-child(12) {
  min-width: 100px;
}

/* Responsive */
@media (max-width: 768px) {
  #bookingsListTabs th,
  #bookingsListTabs td {
    padding: 8px;
    font-size: 12px;
  }
}

/* ====================== REPORTS & CHARTS ====================== */
.reports-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .reports-charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.report-chart-card {
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.report-chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.chart-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.card-report {
  min-height: 120px;
  text-align: center;
  align-content: center;
}

.sub-card {
  background-color: #f9fafb;
  color: #3b82f6;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .chart-container {
    max-width: 100%;
  }
}

/* Services and Payment Sections */
.section-title {
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.service-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb; /* gray-200 */
}

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

.service-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.staff-name {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: left;
}

.service-price {
  font-size: 0.875rem;
  color: var(--text);
}

.no-services {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Payment Details */
.payment-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.875rem;
}

.payment-label {
  color: var(--text);
}

.payment-value {
  color: var(--text);
}

.payment-discount {
  color: #dc2626; /* red-600 */
}

.payment-total {
  font-weight: 600;
  color: #16a34a; /* green-600 */
}

.payment-total-label {
  color: var(--text);
}

/* Images Section */
.images-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.image-wrapper {
  position: relative;
  flex-shrink: 0;
}

.invoice-image {
  width: 5rem; /* 80px */
  height: 5rem;
  object-fit: cover;
  border-radius: 0.375rem;
  transition: transform 0.2s ease;
}

.invoice-image:hover {
  transform: scale(1.05);
  cursor: pointer;
}

@media (min-width: 640px) {
  .invoice-image {
    width: 6rem; /* 96px */
    height: 6rem;
  }
}

@media (min-width: 768px) {
  .invoice-image {
    width: 7rem; /* 112px */
    height: 7rem;
  }
}

.no-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: #6b7280; /* gray-500 */
}

.no-images-icon {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
}

/* Action Buttons */
.actions-container {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.action-btn {
  padding: 4px 8px;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: white;
  transition: background-color 0.2s ease;
}

.upload-image-btn {
  background-color: #3b82f6; /* blue-500 */
}

.upload-image-btn:hover {
  background-color: #2563eb; /* blue-600 */
}

.upload-feedback-btn {
  background-color: #6b7280; /* gray-500 */
}

.upload-feedback-btn:hover {
  background-color: #4b5563; /* gray-600 */
}

.not-image-btn {
  background-color: #ef4444; /* red-500 */
}

.not-image-btn:hover {
  background-color: #dc2626; /* red-600 */
}

.review-btn {
  background-color: #eab308; /* yellow-500 */
  padding: 0.5rem 1.5rem;
}

.review-btn:hover {
  background-color: #ca8a04; /* yellow-600 */
}

.pay-btn {
  background-color: #16a34a; /* green-600 */
  padding: 0.5rem 1.5rem;
}

.pay-btn:hover {
  background-color: #15803d; /* green-700 */
}

/* Search and Refresh Container */
.search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Search Input */
.search-input {
  width: 50%;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: #374151; /* gray-700 */
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: #3b82f6; /* blue-500 */
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.search-input::placeholder {
  color: #9ca3af; /* gray-400 */
}

/* Refresh Button */
.refresh-btn {
  background-color: #3b82f6; /* blue-500 */
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.refresh-btn:hover {
  background-color: #2563eb; /* blue-600 */
}

.report-fillter {
  display: flex;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  justify-content: flex-start;
  align-items: baseline;
}

@media (min-width: 768px) {
  .report-fillter {
    display: flex;
    justify-content: center;
    flex-flow: row;
    gap: 20px;
  }
}

/* ====================== Modern Select: paymentMethodFilter ====================== */
/* Make the payment method select modern, touch-friendly and responsive while
   keeping its position in the layout unchanged. */
#paymentMethodFilter {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  padding: 8px;
  height: 2.4rem;
  line-height: 1.2;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b7280' stroke-width='2'><path d='M6 8l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 1em;
  font-size: small;
  color: #111827;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

#paymentMethodFilter::-ms-expand {
  display: none; /* hide default IE arrow */
}

#paymentMethodFilter:hover {
  border-color: #93c5fd;
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.06);
}

#paymentMethodFilter:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* ensure other small filter selects follow the same visual language but
   keep their width so layout/position is preserved */
.invoice-filters-grid .filter-item select,
.invoice-filters-grid .filter-item .flex-1,
.invoice-filters-grid .filter-item select.flex-1 {
  -webkit-appearance: none;
  appearance: none;
  padding: 0.4rem 1.6rem 0.4rem 0.5rem;
  height: 2.2rem;
  border-radius: 0.45rem;
  border: 1px solid #d1d5db;
  background-color: #fff;
  font-size: 0.9rem;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.12s ease;
}

.invoice-filters-grid .filter-item select:hover {
  border-color: #c7ddff;
}

/* Keep the desktop width/position unchanged but make selects full-width on small screens */
.invoice-filters-grid .filter-item select {
  min-width: 100px;
  max-width: 220px;
}

@media (max-width: 640px) {
  .invoice-filters-grid .filter-item {
    width: 100%;
  }

  .invoice-filters-grid .filter-item select,
  #paymentMethodFilter {
    width: 100%;
    background-position: right 6px center;
  }
}

/* ============================================================================== */

/* Sync styles for review filters so they match the modern select look
   while keeping layout/position and `.hidden` handling intact */
.review-filter-group select,
#reviewTypeFilter,
#reviewRatingFilter {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 2px 10px;
  height: 2.2rem;
  border-radius: 0.45rem;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b7280' stroke-width='2'><path d='M6 8l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 0.95em;
  font-size: small;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.12s ease;
}

.review-filter-group select:hover,
#reviewTypeFilter:hover,
#reviewRatingFilter:hover {
  border-color: #c7ddff;
}

#reviewTypeFilter:focus,
#reviewRatingFilter:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

/* Do not override `.hidden` - keep it functional (some selects intentionally hidden) */
.review-filter-group select.hidden,
#reviewRatingFilter.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .review-filter-group select,
  #reviewTypeFilter {
    width: 100% !important;
    max-width: none;
    background-position: right 6px center;
  }
  #reviewRatingFilter {
    min-width: 70px !important;
    max-width: 120px !important;
  }
}

/* ====================== Pill Select Component ====================== */
/* ====================== PILL SELECT - MOVED TO modals.css ====================== */
/* CSS đã được di chuyển sang modals.css để tránh trùng lặp */
/* Chỉ giữ lại CSS đặc biệt cho staff selection */

.staff-option-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Staff option CSS đã di chuyển sang modals.css */

/* Animation */
@keyframes mkt192-fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .mkt192-modal-container {
    max-width: 95%;
    margin: 10px;
  }
  .mkt192-modal-header h3 {
    font-size: 16px;
  }

  .mkt192-pill-select-value-wrapper {
    padding: 10px 12px;
    min-height: 44px;
  }

  .mkt192-pill {
    padding: 6px 10px;
    font-size: 13px;
  }

  .mkt192-pill-option {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Dark mode CSS has been moved to dark-mode.css */

/* Tables adapt to variables for consistent dark look */
#invoicesListTabs,
#bookingsListTabs {
  background: transparent;
  border-collapse: separate;
}

#invoicesListTabs thead th,
#bookingsListTabs thead th {
  background-color: var(--table-header-bg) !important;
  color: var(--text) !important;
  border-bottom-color: var(--table-border) !important;
}

#invoicesListTabs td,
#invoicesListTabs th,
#bookingsListTabs td,
#bookingsListTabs th {
  background-color: var(--table-row-bg);
  border-color: var(--table-border) !important;
  color: var(--text) !important;
}

/* Alerts / toasts (if exists) */
.toast-info,
.alert-info {
  background-color: var(--alert-info-bg) !important;
  color: var(--alert-info-text) !important;
}

.toast-error,
.alert-error {
  background-color: var(--alert-error-bg) !important;
  color: var(--alert-error-text) !important;
}

/* Subtle border use across components */
.border,
.rounded,
.modal,
.input,
select,
button {
  border-color: var(--border) !important;
}

/* Table headers and other subtle surfaces */
#invoicesListTabs thead th,
#bookingsListTabs thead th,
.modal-header,
.mkt192-modal-header {
  background-color: var(--surface) !important;
}

/* Text muted color */
.text-muted,
.muted,
.customer-promo,
.user-role {
  color: var(--muted) !important;
}

/* ============================================================================== */

/* ====================== INVOICE TIME FILTER BUTTONS - HIỆN ĐẠI ====================== */
.invoice-time-filter-container {
  background: transparent;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

.invoice-filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.invoice-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.invoice-filter-btn i {
  font-size: 0.875rem;
  transition: transform 0.25s ease;
}

.invoice-filter-btn span {
  white-space: nowrap;
}

.invoice-filter-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.invoice-filter-btn:hover i {
  transform: scale(1.1);
}

.invoice-filter-btn.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.invoice-filter-btn.active i {
  animation: pulse-icon 1.5s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Custom Date Container */
.invoice-custom-date-container {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.invoice-custom-date-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.invoice-date-input {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.invoice-date-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-separator {
  color: #9ca3af;
  font-size: 0.875rem;
  padding: 0 0.25rem;
}

.invoice-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.invoice-apply-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.invoice-apply-btn:active {
  transform: translateY(0);
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  .invoice-filter-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    justify-content: center;
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
  }

  .invoice-filter-btn span {
    display: none;
  }

  .invoice-filter-btn i {
    font-size: 1rem;
  }

  .invoice-custom-date-inputs {
    flex-direction: column;
    width: 100%;
  }

  .invoice-date-input {
    width: 100%;
  }

  .date-separator {
    display: none;
  }

  .invoice-apply-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Dark mode support */
.mkt192-dark .invoice-filter-btn {
  background: #1f2937;
  border-color: #374151;
  color: #d1d5db;
}

.mkt192-dark .invoice-filter-btn:hover {
  background: #374151;
  border-color: #60a5fa;
  color: #93c5fd;
}

.mkt192-dark .invoice-filter-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #3b82f6;
  color: #ffffff;
}

.mkt192-dark .invoice-custom-date-container {
  background: #1f2937;
  border-color: #374151;
}

.mkt192-dark .invoice-date-input {
  background: #111827;
  border-color: #374151;
  color: #d1d5db;
}

.mkt192-dark .date-separator {
  color: #6b7280;
}

/* ====================== SERVICE FILTER BUTTONS ====================== */

.service-filter-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 5px 0;
  overflow: auto;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.mkt192-dark .service-filter-buttons {
  background: #2d3748;
}

.service-time-filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray);
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.service-time-filter-btn:hover {
  background: #f9fafb;
  border-color: #60a5fa;
  color: #2563eb;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.service-time-filter-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.service-time-filter-btn i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.service-time-filter-btn:hover i {
  transform: scale(1.1);
}

.service-time-filter-btn span {
  display: inline;
}

.time-filter-select {
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.time-filter-container {
  padding: 0.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  animation: slideDown 0.3s ease-out;
}

.custom-time-filter-select {
  padding: 0.75rem;
  display: flex;
}

.hidden {
  display: none;
}

/* Dark mode for service buttons */
.mkt192-dark .service-time-filter-btn {
  background: #1f2937;
  border-color: #374151;
  color: #d1d5db;
}

.mkt192-dark .service-time-filter-btn:hover {
  background: #374151;
  border-color: #60a5fa;
  color: #93c5fd;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.15);
}

.mkt192-dark .service-time-filter-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Mobile responsive */
@media (max-width: 640px) {
  .service-filter-buttons {
    gap: 0.35rem;
    padding: 0.5rem;
  }

  .service-time-filter-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }

  .service-time-filter-btn i {
    font-size: 1rem;
  }
}

/* ====================== INVOICE FILTERS - TỐI ƯU CHO MOBILE & DESKTOP ====================== */

/* Container chính */
.invoice-filters-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 10px;
}

/* Mỗi hàng có 2 cột */
.filter-row-2cols {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 cột đều nhau trên mobile */
  gap: 0.2rem;
  align-items: center;
}

/* Desktop: Gom gọn, canh trái, không dàn trải */
@media (min-width: 768px) {
  .invoice-filters-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .filter-row-2cols {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }

  .filter-item {
    min-width: 180px;
    max-width: 250px;
  }
}

/* Input & Select chung */
.filter-item input,
.filter-item select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.5rem;
  background: #f9fafb;
  font-size: 16px;
  transition: all 0.2s ease;
}

.filter-item input:focus,
.filter-item select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: #ffffff;
}

/* Review group nhỏ gọn */
.review-filter-group {
  display: flex;
  gap: 0.35rem;
}

.review-filter-group select {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem;
  height: 38px;
  min-width: 100px;
}

/* ====================== TABLE CONTROLS ====================== */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
}

.table-controls-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.875rem;
  color: #4b5563;
}

.items-per-page-select {
  padding: 0.25rem 0.2rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #ffffff;
  font-size: 0.875rem;
  min-width: 60px;
}

.table-controls-right {
  display: flex;
  justify-content: flex-end;
}

/* ====================== PAGINATION ====================== */
.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.pagination-info {
  font-weight: 500;
}

.pagination-buttons {
  display: flex;
  gap: 0.35rem;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  background: #f3f4f6;
  border-color: #94a3b8;
}

.pagination-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-current {
  padding: 0 12px;
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 480px) {
  .filter-pair {
    grid-template-columns: 1fr;
  }
  .pagination-container {
    text-align: center;
  }
}

@media (min-width: 768px) {
  .pagination-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ====================== CUSTOM DATE RANGE STYLES ====================== */
#customDateRangeContainer {
  transition: all 0.2s ease;
}
#customDateRangeContainer input {
  min-width: 120px;
  max-width: 120px;
}

/* Desktop: Thu gọn custom date range, canh trái */
@media (min-width: 768px) {
  #customDateRangeContainer {
    display: inline-flex;
    width: auto;
  }

  #customDateRangeContainer .flex {
    width: auto;
  }

  #customDateRangeContainer input {
    max-width: 150px;
  }
}

/* === BOOKINGS: ẨN TEXT TRÊN MOBILE === */
@media (max-width: 640px) {
  #booking-table-settings-btn span {
    display: none;
  }
  #booking-table-settings-btn {
    padding: 8px !important;
  }
}

/* === CUSTOM DATE: RESPONSIVE === */
#customBookingDateContainer input {
  min-width: 110px;
}
@media (max-width: 480px) {
  #customBookingDateContainer .date-separator {
    display: none;
  }
}

/* Styles for the new toggle switch in Truy Thu modal */
#mkt192-change-staff-toggle:checked ~ .block {
  background-color: #2563eb; /* blue-600 */
}

#mkt192-change-staff-toggle:checked ~ .dot {
  transform: translateX(1.5rem);
}

/* Red penalty icon */
.actions-column .truy-thu-btn.has-penalty i {
  color: red !important;
}

/* Loading state for buttons */
.truy-thu-btn.loading,
button.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.truy-thu-btn.loading:hover,
button.loading:hover {
  opacity: 0.6;
}

/* ============================================================================== */
/* All dark mode styles moved to dark-mode.css for better organization */
/* ============================================================================== */

/* =============================================
   🎨 MEMBERSHIP BADGE STYLES - VIP Customer
   ============================================= */

/* Badge container with premium gradient */
.membership-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: help;
  flex-shrink: 0;
}

/* Crown icon styling */
.membership-badge i {
  font-size: 0.65rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* Hover effect - subtle scale and glow */
.membership-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
}

/* Animation for initial appearance */
@keyframes badge-appear {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.membership-badge {
  animation: badge-appear 0.4s ease-out;
}

/* Row hover effect enhancement for VIP customers */
tr:has(.membership-badge):hover {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Dark mode support */
body.mkt192-dark .membership-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.5);
}

body.mkt192-dark .membership-badge:hover {
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.7);
}

body.mkt192-dark tr:has(.membership-badge):hover {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.12) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .membership-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    gap: 0.2rem;
  }

  .membership-badge i {
    font-size: 0.7rem;
  }
}

/* =============================================
   🎫 PROMO BADGE STYLES - Promotion Code
   ============================================= */

/* Base promo badge styling */
.promo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: #ffffff;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: help;
  flex-shrink: 0;
}

/* Valid promo - Blue gradient */
.promo-badge-valid {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.promo-badge-valid:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.6);
  transform: scale(1.15);
}

/* Invalid promo - Red gradient */
.promo-badge-invalid {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.promo-badge-invalid:hover {
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.6);
  transform: scale(1.15);
}

/* Expired promo - Gray gradient */
.promo-badge-expired {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 50%, #4b5563 100%);
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.4);
}

.promo-badge-expired:hover {
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.6);
  transform: scale(1.15);
}

/* Promo icon styling */
.promo-badge i {
  font-size: 0.65rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* Animation for promo badge */
@keyframes promo-badge-appear {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.promo-badge {
  animation: promo-badge-appear 0.4s ease-out 0.1s backwards;
}

/* Dark mode support for promo badges */
body.mkt192-dark .promo-badge-valid {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.5);
}

body.mkt192-dark .promo-badge-invalid {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.5);
}

body.mkt192-dark .promo-badge-expired {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
  box-shadow: 0 2px 8px rgba(75, 85, 99, 0.5);
}

/* Mobile responsive for promo badge */
@media (max-width: 640px) {
  .promo-badge {
    width: 1.1rem;
    height: 1.1rem;
  }

  .promo-badge i {
    font-size: 0.6rem;
  }
}
