/**
* Template Name: NiceAdmin - v2.4.1
* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
:root {
  scroll-behavior: smooth;

  /* ==========================================================================
     1. DESIGN TOKENS — LIGHT MODE (DEFAULT)
     ========================================================================== */
  color-scheme: light;

  /* --- Nền & Bề mặt (Backgrounds & Surfaces) --- */
  --bg-main: #f6f9ff;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-header: #f8fafc;
  --bg-card-footer: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  --bg-input: #ffffff;
  --bg-input-disabled: #f8fafc;
  --bg-header: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-modal: #ffffff;
  --bg-modal-header: #f8fafc;
  --bg-modal-footer: #f8fafc;
  --bg-dropdown: #ffffff;
  --bg-dropdown-hover: #f1f5f9;
  --bg-table-header: #f8fafc;
  --bg-table-striped: #f8fafc;
  --bg-table-hover: #f1f5f9;

  /* --- Màu chữ & Độ tương phản (Typography & Contrast — WCAG AAA/AA) --- */
  --text-primary: #0f172a;       /* Slate-900: 16.4:1 contrast on white */
  --text-secondary: #334155;     /* Slate-700: 9.6:1 contrast on white */
  --text-muted: #64748b;         /* Slate-500: 4.6:1 contrast on white */
  --text-heading: #012970;       /* Heading navy blue */
  --text-link: #2563eb;          /* Blue-600 */
  --text-link-hover: #1d4ed8;    /* Blue-700 */
  --text-inverse: #ffffff;
  --text-on-dark: #f8fafc;

  /* --- Đường viền & Phân cách (Borders & Dividers) --- */
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-strong: #cbd5e1;
  --border-focus: #3b82f6;

  /* --- Màu thương hiệu & Chức năng (Brand & Semantic Accents) --- */
  --color-primary: #2563eb;
  --color-primary-rgb: 37, 99, 235;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-primary-border: #bfdbfe;

  --color-success: #16a34a;
  --color-success-hover: #15803d;
  --color-success-light: #f0fdf4;
  --color-success-border: #bbf7d0;

  --color-warning: #d97706;
  --color-warning-hover: #b45309;
  --color-warning-light: #fffbeb;
  --color-warning-border: #fde68a;

  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-danger-light: #fef2f2;
  --color-danger-border: #fecaca;

  --color-info: #0284c7;
  --color-info-hover: #0369a1;
  --color-info-light: #f0f9ff;
  --color-info-border: #bae6fd;

  /* --- Đổ bóng (Elevation & Shadows) --- */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 16px rgba(1, 41, 112, 0.08);
  --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.15);

  /* --- Ánh xạ biến chuẩn Bootstrap 5 --- */
  --bs-body-bg: var(--bg-main);
  --bs-body-color: var(--text-primary);
  --bs-border-color: var(--border-color);
  --bs-secondary-bg: var(--bg-card);
  --bs-tertiary-bg: var(--bg-subtle);
  --bs-secondary-color: var(--text-secondary);
  --bs-tertiary-color: var(--text-muted);
  --bs-link-color: var(--color-primary);
  --bs-link-hover-color: var(--color-primary-hover);
  --bs-card-bg: var(--bg-card);
  --bs-card-color: var(--text-primary);
  --bs-card-border-color: var(--border-color);
  --bs-modal-bg: var(--bg-modal);
  --bs-modal-color: var(--text-primary);
  --bs-modal-border-color: var(--border-color);

  /* Tương thích ngược với các biến cục bộ cũ */
  --app-surface: var(--bg-card);
  --app-surface-raised: var(--bg-subtle);
  --app-text: var(--text-primary);
  --app-muted: var(--text-muted);

  /* Floating Action Buttons (FAB) tokens */
  --fab-right: 22px;
  --fab-bottom-base: 20px;
  --fab-gap: 12px;
  --fab-btt-size: 40px;
  --fab-chat-size: 52px;
  --fab-z-index: 1040;
  --fab-bottom-space: 120px;
}

/* ==========================================================================
   2. DESIGN TOKENS — DARK MODE (TƯƠNG THÍCH CHUẨN WCAG 2.1)
   ========================================================================== */
[data-bs-theme="dark"] {
  color-scheme: dark;

  /* --- Nền & Bề mặt (Deep Slate Midnight) --- */
  --bg-main: #0b111e;
  --bg-surface: #151f32;
  --bg-card: #151f32;
  --bg-card-header: #1a273e;
  --bg-card-footer: #1a273e;
  --bg-subtle: #1e2c45;
  --bg-hover: #263857;
  --bg-input: #0f1726;
  --bg-input-disabled: #182337;
  --bg-header: #111a2c;
  --bg-sidebar: #111a2c;
  --bg-modal: #151f32;
  --bg-modal-header: #1a273e;
  --bg-modal-footer: #1a273e;
  --bg-dropdown: #172236;
  --bg-dropdown-hover: #22324f;
  --bg-table-header: #19253b;
  --bg-table-striped: #162238;
  --bg-table-hover: #1e2d49;

  /* --- Màu chữ & Độ tương phản cao (Không bị chìm, tối thiểu 7:1) --- */
  --text-primary: #f8fafc;       /* 15.5:1 ratio on #151f32 (WCAG AAA) */
  --text-secondary: #cbd5e1;     /* 11.5:1 ratio on #151f32 (WCAG AAA) */
  --text-muted: #94a3b8;         /* 6.5:1 ratio on #151f32 (WCAG AA) */
  --text-heading: #f8fafc;       /* Luôn sáng rõ, không dùng xám tối */
  --text-link: #60a5fa;          /* Blue-400: 7.8:1 ratio */
  --text-link-hover: #93c5fd;    /* Blue-300 */
  --text-inverse: #0b111e;
  --text-on-dark: #f8fafc;

  /* --- Đường viền & Phân cách rõ ràng --- */
  --border-color: #2b3b55;
  --border-subtle: #1f2d44;
  --border-strong: #3d5073;
  --border-focus: #60a5fa;

  /* --- Màu nhấn sáng rõ trên nền tối (High-vibrancy Accents) --- */
  --color-primary: #3b82f6;
  --color-primary-rgb: 59, 130, 246;
  --color-primary-hover: #60a5fa;
  --color-primary-light: rgba(59, 130, 246, 0.16);
  --color-primary-border: rgba(59, 130, 246, 0.35);

  --color-success: #34d399;
  --color-success-hover: #6ee7b7;
  --color-success-light: rgba(52, 211, 153, 0.16);
  --color-success-border: rgba(52, 211, 153, 0.35);

  --color-warning: #fbbf24;
  --color-warning-hover: #fcd34d;
  --color-warning-light: rgba(251, 191, 36, 0.16);
  --color-warning-border: rgba(251, 191, 36, 0.35);

  --color-danger: #f87171;
  --color-danger-hover: #fca5a5;
  --color-danger-light: rgba(248, 113, 113, 0.16);
  --color-danger-border: rgba(248, 113, 113, 0.35);

  --color-info: #38bdf8;
  --color-info-hover: #7dd3fc;
  --color-info-light: rgba(56, 189, 248, 0.16);
  --color-info-border: rgba(56, 189, 248, 0.35);

  /* --- Đổ bóng chiều sâu Dark Mode --- */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-dropdown: 0 12px 36px rgba(0, 0, 0, 0.55);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.65);

  /* --- Đồng bộ biến chuẩn Bootstrap 5 sang Dark --- */
  --bs-body-bg: var(--bg-main);
  --bs-body-color: var(--text-primary);
  --bs-border-color: var(--border-color);
  --bs-secondary-bg: var(--bg-card);
  --bs-tertiary-bg: var(--bg-subtle);
  --bs-secondary-color: var(--text-secondary);
  --bs-tertiary-color: var(--text-muted);
  --bs-link-color: var(--color-primary);
  --bs-link-hover-color: var(--color-primary-hover);
  --bs-card-bg: var(--bg-card);
  --bs-card-color: var(--text-primary);
  --bs-card-border-color: var(--border-color);
  --bs-modal-bg: var(--bg-modal);
  --bs-modal-color: var(--text-primary);
  --bs-modal-border-color: var(--border-color);

  /* Tương thích ngược */
  --app-surface: var(--bg-card);
  --app-surface-raised: var(--bg-subtle);
  --app-text: var(--text-primary);
  --app-muted: var(--text-muted);
}

/* ==========================================================================
   3. BASE STYLING (THEME-AWARE)
   ========================================================================== */
body {
  font-family: var(--font-family-base, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  background-color: var(--bg-main);
  color: var(--text-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-bs-theme="dark"] body {
  background-color: var(--bg-main) !important;
  color: var(--text-primary) !important;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--text-link-hover);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--text-heading);
}

p, span, label, td, th, li {
  color: inherit;
}

/* ==========================================================================
   4. TỰ ĐỘNG THÍCH ỨNG THEME CHO CÁC THÀNH PHẦN CSS CHÍNH (WCAG READY)
   ========================================================================== */

/* ----- 4.1 Card (Thẻ giao diện) ----- */
[data-bs-theme="dark"] .card {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-card) !important;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
  background-color: var(--bg-card-header) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-header h1,
[data-bs-theme="dark"] .card-header h2,
[data-bs-theme="dark"] .card-header h3,
[data-bs-theme="dark"] .card-header h4,
[data-bs-theme="dark"] .card-header h5,
[data-bs-theme="dark"] .card-header h6 {
  color: var(--text-heading) !important;
}

[data-bs-theme="dark"] .card-subtitle {
  color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .card-body {
  color: var(--text-primary) !important;
}

/* Khử hoàn toàn lỗi mất màu khi các phần tử có class .bg-white hoặc .bg-light hoặc .text-dark */
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .card.bg-white {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .card.bg-light {
  background-color: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .text-dark {
  color: var(--text-primary) !important;
}

/* DataTables Dark Mode Global Consistency */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_processing {
  color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* ----- 4.2 Modal (Hộp thoại tương tác) ----- */
[data-bs-theme="dark"] .modal-content {
  background-color: var(--bg-modal) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-modal) !important;
}

[data-bs-theme="dark"] .modal-header {
  background-color: var(--bg-modal-header) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .modal-header .modal-title,
[data-bs-theme="dark"] .modal-title {
  color: var(--text-heading) !important;
}

[data-bs-theme="dark"] .modal-body {
  background-color: var(--bg-modal) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .modal-footer {
  background-color: var(--bg-modal-footer) !important;
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border-color) !important;
}

/* Khắc phục các modal-header/footer có gắn sẵn .bg-light, .bg-white */
[data-bs-theme="dark"] .modal-header.bg-light,
[data-bs-theme="dark"] .modal-header.bg-white,
[data-bs-theme="dark"] .modal-footer.bg-light,
[data-bs-theme="dark"] .modal-footer.bg-white {
  background-color: var(--bg-modal-header) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Nút đóng modal dạng chéo 'X' */
[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.75;
}
[data-bs-theme="dark"] .btn-close:hover {
  opacity: 1;
}

/* ----- 4.3 Button (Nút bấm đổi màu tự động) ----- */
[data-bs-theme="dark"] .btn-light {
  background-color: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
[data-bs-theme="dark"] .btn-light:hover,
[data-bs-theme="dark"] .btn-light:focus {
  background-color: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-strong) !important;
}

[data-bs-theme="dark"] .btn-outline-dark {
  color: var(--text-primary) !important;
  border-color: var(--border-strong) !important;
}
[data-bs-theme="dark"] .btn-outline-dark:hover,
[data-bs-theme="dark"] .btn-outline-dark:focus {
  background-color: var(--bg-subtle) !important;
  color: #ffffff !important;
  border-color: var(--border-focus) !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-secondary:focus {
  background-color: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-strong) !important;
}

[data-bs-theme="dark"] .btn-dark {
  background-color: #24344d !important;
  border-color: #3d5073 !important;
  color: #f8fafc !important;
}
[data-bs-theme="dark"] .btn-dark:hover,
[data-bs-theme="dark"] .btn-dark:focus {
  background-color: #2f4363 !important;
  border-color: #4f6894 !important;
  color: #ffffff !important;
}

/* ----- 4.4 Form Controls (Ô nhập liệu, Dropdown chọn, Nhãn) ----- */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] input[type="text"]:not(#headerSearchInput),
[data-bs-theme="dark"] input[type="password"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="number"],
[data-bs-theme="dark"] input[type="search"]:not(#headerSearchInput),
[data-bs-theme="dark"] input[type="tel"],
[data-bs-theme="dark"] input[type="url"] {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Date & Datetime-local inputs in Dark Mode: Đảm bảo popup chọn ngày và nội dung hiển thị sắc nét */
[data-bs-theme="dark"] input[type="date"],
[data-bs-theme="dark"] input[type="datetime-local"],
[data-bs-theme="dark"] input[type="time"],
[data-bs-theme="dark"] input[type="month"] {
  color-scheme: dark !important;
  background-color: #172133 !important;
  color: #f8fafc !important;
  border: 1.5px solid #334767 !important;
  font-weight: 500;
}

/* Nút icon mở lịch: Nổi bật rõ nét, dễ nhìn và dễ bấm */
[data-bs-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-bs-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator,
[data-bs-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 6px;
  background-color: rgba(59, 130, 246, 0.25);
  filter: brightness(0) invert(1) !important;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

[data-bs-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator:hover,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
[data-bs-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator:hover,
[data-bs-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(59, 130, 246, 0.45);
  transform: scale(1.08);
}

/* Hiển thị số ngày/tháng/năm/giờ/phút rõ ràng trên nền tối */
[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-fields-wrapper,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-text,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-text {
  color: #94a3b8 !important;
  padding: 0 1px;
}

[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-month-field,
[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-day-field,
[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-year-field,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-month-field,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-day-field,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-year-field,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-ampm-field {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-month-field:focus,
[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-day-field:focus,
[data-bs-theme="dark"] input[type="date"]::-webkit-datetime-edit-year-field:focus,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-month-field:focus,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-day-field:focus,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-year-field:focus,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-hour-field:focus,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-minute-field:focus,
[data-bs-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit-ampm-field:focus {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-radius: 3px;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled,
[data-bs-theme="dark"] .form-control[readonly] {
  background-color: var(--bg-input-disabled) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-subtle) !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .form-select::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.85;
}

[data-bs-theme="dark"] .input-group-text {
  background-color: var(--bg-subtle) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .col-form-label {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .form-check-input {
  background-color: var(--bg-input);
  border-color: var(--border-strong);
}

[data-bs-theme="dark"] .form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

[data-bs-theme="dark"] .form-check-label {
  color: var(--text-primary);
}

[data-bs-theme="dark"] .form-floating > label {
  color: var(--text-muted);
}

[data-bs-theme="dark"] .form-text {
  color: var(--text-muted) !important;
}

/* ----- 4.5 Tables (Bảng dữ liệu) ----- */
[data-bs-theme="dark"] table,
[data-bs-theme="dark"] .table {
  --bs-table-color: var(--text-primary);
  --bs-table-bg: var(--bg-card);
  --bs-table-border-color: var(--border-color);
  --bs-table-striped-bg: var(--bg-table-striped);
  --bs-table-striped-color: var(--text-primary);
  --bs-table-hover-bg: var(--bg-table-hover);
  --bs-table-hover-color: var(--text-primary);
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .table > :not(caption) > * > * {
  background-color: var(--bg-card);
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] thead th {
  background-color: var(--bg-table-header) !important;
  color: var(--text-primary) !important;
  border-bottom: 2px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: var(--bg-table-striped) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
  background-color: var(--bg-table-hover) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light > th,
[data-bs-theme="dark"] .table-light > td {
  background-color: var(--bg-table-header) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* ----- 4.6 Dropdown Menus & Popovers ----- */
[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--bg-dropdown) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-dropdown) !important;
}

[data-bs-theme="dark"] .dropdown-item {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus,
[data-bs-theme="dark"] .dropdown-item.active {
  background-color: var(--bg-dropdown-hover) !important;
  color: var(--color-primary-hover) !important;
}

[data-bs-theme="dark"] .dropdown-header {
  color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .dropdown-divider {
  border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .dropdown-menu-arrow::before {
  background: var(--bg-dropdown) !important;
  border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .dropdown-footer a {
  color: var(--text-link) !important;
}

/* ----- 4.7 Header & Sidebar ----- */
/* Khi không có màu tùy chỉnh (mặc định): Dark Mode ưu tiên màu đen hệ thống */
[data-bs-theme="dark"] #header:not(.header--custom-color),
[data-bs-theme="dark"] .header:not(.header--custom-color) {
  background-color: var(--bg-header) !important;
  background: var(--bg-header) !important;
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Khi người dùng chọn màu header riêng: Luôn ưu tiên màu mới nhất mà người dùng chọn */
#header.header--custom-color,
.header.header--custom-color,
[data-bs-theme="dark"] #header.header--custom-color,
[data-bs-theme="dark"] .header.header--custom-color {
  background-color: var(--header-user-bg) !important;
  background: var(--header-user-bg) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] #header:not(.header--custom-color) .logo span,
[data-bs-theme="dark"] .header:not(.header--custom-color) .logo span {
  color: var(--text-heading) !important;
}

#header.header--custom-color .logo span,
[data-bs-theme="dark"] #header.header--custom-color .logo span {
  color: var(--header-user-fg) !important;
}

[data-bs-theme="dark"] #header:not(.header--custom-color) .toggle-sidebar-btn,
[data-bs-theme="dark"] .header:not(.header--custom-color) .toggle-sidebar-btn {
  color: var(--text-primary) !important;
}

#header.header--custom-color .toggle-sidebar-btn,
[data-bs-theme="dark"] #header.header--custom-color .toggle-sidebar-btn {
  color: var(--header-user-fg) !important;
}

[data-bs-theme="dark"] #header:not(.header--custom-color) .nav-icon,
[data-bs-theme="dark"] .header:not(.header--custom-color) .nav-icon {
  color: var(--text-primary) !important;
}

#header.header--custom-color .nav-icon,
[data-bs-theme="dark"] #header.header--custom-color .nav-icon {
  color: var(--header-user-fg) !important;
}

[data-bs-theme="dark"] #header:not(.header--custom-color) #greetingText,
[data-bs-theme="dark"] #header:not(.header--custom-color) #greetingWord {
  color: var(--text-primary) !important;
}

#header.header--custom-color #greetingText,
#header.header--custom-color #greetingWord,
[data-bs-theme="dark"] #header.header--custom-color #greetingText,
[data-bs-theme="dark"] #header.header--custom-color #greetingWord {
  color: var(--header-user-fg) !important;
}

[data-bs-theme="dark"] .header .search-bar {
  background: transparent !important;
}

[data-bs-theme="dark"] .header:not(.header--custom-color) .search-form input {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
}

[data-bs-theme="dark"] .header:not(.header--custom-color) .search-form input::placeholder {
  color: rgba(248, 250, 252, 0.65) !important;
}

#header.header--custom-color .hsearch-input-row input,
[data-bs-theme="dark"] #header.header--custom-color .hsearch-input-row input {
  background-color: var(--header-user-input-bg, rgba(255, 255, 255, 0.20)) !important;
  color: var(--header-user-fg) !important;
  border: 1.5px solid var(--header-user-input-border, rgba(255, 255, 255, 0.45)) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.20) !important;
}

#header.header--custom-color .hsearch-input-row input::placeholder,
[data-bs-theme="dark"] #header.header--custom-color .hsearch-input-row input::placeholder {
  color: var(--header-user-fg) !important;
  opacity: .85 !important;
}

[data-bs-theme="dark"] .header:not(.header--custom-color) .search-form button i {
  color: #94a3b8 !important;
}

#header.header--custom-color .search-form button,
#header.header--custom-color .search-form button i,
[data-bs-theme="dark"] #header.header--custom-color .search-form button,
[data-bs-theme="dark"] #header.header--custom-color .search-form button i {
  color: var(--header-user-fg) !important;
}

#header.header--custom-color .hsearch-clear,
[data-bs-theme="dark"] #header.header--custom-color .hsearch-clear {
  color: var(--header-user-fg) !important;
}

/* Sidebar: Mặc định tối ưu tiên nền đen; nếu người dùng chọn màu riêng thì áp dụng màu đó */
[data-bs-theme="dark"] #sidebar:not(.sidebar--custom-color),
[data-bs-theme="dark"] .sidebar:not(.sidebar--custom-color) {
  background-color: var(--bg-sidebar) !important;
  background: var(--bg-sidebar) !important;
  color: var(--text-primary) !important;
  border-right: 1px solid var(--border-color) !important;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.35) !important;
}

#sidebar.sidebar--custom-color,
.sidebar.sidebar--custom-color,
[data-bs-theme="dark"] #sidebar.sidebar--custom-color,
[data-bs-theme="dark"] .sidebar.sidebar--custom-color {
  background-color: var(--sidebar-user-bg) !important;
  background: var(--sidebar-user-bg) !important;
  color: var(--sidebar-user-fg) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
}

#sidebar.sidebar--custom-color .sidebar-nav > .nav-item > a,
#sidebar.sidebar--custom-color .sidebar-nav .nav-content a,
[data-bs-theme="dark"] #sidebar.sidebar--custom-color .sidebar-nav > .nav-item > a,
[data-bs-theme="dark"] #sidebar.sidebar--custom-color .sidebar-nav .nav-content a {
  color: var(--sidebar-user-fg) !important;
}

#sidebar.sidebar--custom-color .sidebar-nav > .nav-item > a > i.ms-auto,
[data-bs-theme="dark"] #sidebar.sidebar--custom-color .sidebar-nav > .nav-item > a > i.ms-auto {
  color: var(--sidebar-user-fg) !important;
}

[data-bs-theme="dark"] .sidebar::-webkit-scrollbar {
  background-color: var(--bg-sidebar) !important;
}

[data-bs-theme="dark"] .sidebar::-webkit-scrollbar-thumb {
  background-color: var(--border-strong) !important;
}

/* Global utility overrides under dark mode */
[data-bs-theme="dark"] .bg-white {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .text-dark {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .text-black {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-link {
  background-color: var(--bg-subtle) !important;
  color: var(--color-primary) !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-link.collapsed {
  background-color: transparent !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-link.collapsed:hover {
  background-color: var(--bg-subtle) !important;
  color: var(--color-primary) !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-link.collapsed i {
  color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-heading {
  color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-content a {
  color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-content a:hover,
[data-bs-theme="dark"] .sidebar-nav .nav-content a.active {
  color: var(--color-primary) !important;
}

/* ----- 4.8 Tabs, Accordion, Breadcrumb, Badges ----- */
[data-bs-theme="dark"] .nav-tabs-bordered {
  border-bottom: 2px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .nav-tabs-bordered .nav-link {
  color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .nav-tabs-bordered .nav-link:hover,
[data-bs-theme="dark"] .nav-tabs-bordered .nav-link:focus {
  color: var(--color-primary) !important;
}

[data-bs-theme="dark"] .nav-tabs-bordered .nav-link.active {
  background-color: transparent !important;
  color: var(--color-primary) !important;
  border-bottom: 2px solid var(--color-primary) !important;
}

[data-bs-theme="dark"] .accordion-item {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .accordion-button {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  background-color: var(--bg-subtle) !important;
  color: var(--color-primary) !important;
}

[data-bs-theme="dark"] .accordion-flush .accordion-body {
  color: var(--text-secondary) !important;
  background-color: var(--bg-card) !important;
}

[data-bs-theme="dark"] .breadcrumb {
  color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .breadcrumb a {
  color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .breadcrumb a:hover {
  color: var(--color-primary) !important;
}

[data-bs-theme="dark"] .breadcrumb .breadcrumb-item::before {
  color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .breadcrumb .active {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .list-group-item {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Badge thích ứng */
[data-bs-theme="dark"] .badge.bg-light,
[data-bs-theme="dark"] .badge.bg-white {
  background-color: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

[data-bs-theme="dark"] .badge.text-dark {
  color: var(--text-primary) !important;
}

/* Phân trang (Pagination) */
[data-bs-theme="dark"] .pagination .page-link {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .pagination .page-link:hover {
  background-color: var(--bg-hover) !important;
  color: var(--color-primary) !important;
}

/* ----- 4.9 KHẮC PHỤC TRIỆT ĐỂ CÁC CLASS TIỆN ÍCH LÀM CHÌM CHỮ / MẤT MÀU ----- */
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-black,
[data-bs-theme="dark"] .text-body {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-black-50 {
  color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light {
  background-color: var(--bg-card) !important;
}

[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end {
  border-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .pagetitle h1 {
  color: var(--text-heading) !important;
}

[data-bs-theme="dark"] #footer,
[data-bs-theme="dark"] .footer {
  background-color: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  border-top-color: var(--border-color) !important;
}

[data-bs-theme="dark"] .footer .copyright,
[data-bs-theme="dark"] .footer .credits {
  color: var(--text-secondary) !important;
}

/* Third party: Select2, DataTables, Quill */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
  background-color: var(--bg-input) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .select2-dropdown {
  background-color: var(--bg-dropdown) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: var(--bg-input) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .ql-snow .ql-stroke {
  stroke: var(--text-muted) !important;
}
[data-bs-theme="dark"] .ql-snow .ql-fill {
  fill: var(--text-muted) !important;
}
[data-bs-theme="dark"] .ql-snow .ql-picker {
  color: var(--text-muted) !important;
}
[data-bs-theme="dark"] .ql-snow .ql-picker-options {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}
[data-bs-theme="dark"] .ql-editor {
  color: var(--text-primary) !important;
}

/*--------------------------------------------------------------
# Main
--------------------------------------------------------------*/
#main {
  margin-top: 60px;
  padding: 20px 30px;
  transition: all 0.3s;
}

@media (max-width: 1199px) {
  #main {
    padding: 20px;
  }
}

/*--------------------------------------------------------------
# Page Title
--------------------------------------------------------------*/
.pagetitle {
  margin-bottom: 10px;
}

.pagetitle h1 {
  font-size: 24px;
  margin-bottom: 0;
  font-weight: 600;
  color: var(--text-heading);
}

/*--------------------------------------------------------------
# Back to top button & Floating Action Buttons (FAB Stack)
--------------------------------------------------------------*/
.back-to-top {
  position: fixed !important;
  visibility: hidden;
  opacity: 0;
  right: var(--fab-right) !important;
  bottom: calc(var(--fab-bottom-base) + env(safe-area-inset-bottom, 0px)) !important;
  z-index: var(--fab-z-index) !important;
  background: #4154f1;
  width: var(--fab-btt-size) !important;
  height: var(--fab-btt-size) !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.back-to-top i {
  font-size: 24px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  background: #6776f4;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(65, 84, 241, 0.35);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/* Nút Chatbot AI: Luôn xếp tầng TRÊN nút Back to top */
#chatLauncherBtn,
.chat-launcher-btn {
  position: fixed !important;
  right: var(--fab-right);
  bottom: calc(var(--fab-bottom-base) + var(--fab-btt-size) + var(--fab-gap) + env(safe-area-inset-bottom, 0px));
  width: var(--fab-chat-size) !important;
  height: var(--fab-chat-size) !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18) !important;
  border: 2px solid #0F5B4C !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  z-index: calc(var(--fab-z-index) + 1) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
  cursor: pointer;
  text-decoration: none;
}

#chatLauncherBtn:hover,
.chat-launcher-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 8px 24px rgba(15, 91, 76, 0.32) !important;
}

#chatLauncherBtn img,
.chat-launcher-btn img {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

#chatLauncherBtn .chat-tooltip,
.chat-launcher-btn .chat-tooltip {
  position: absolute !important;
  right: calc(100% + 14px) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(15, 23, 42, 0.94) !important;
  color: #ffffff !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22) !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
  z-index: 1070 !important;
}

#chatLauncherBtn:hover .chat-tooltip,
.chat-launcher-btn:hover .chat-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) translateX(-4px) !important;
}

/* Khoảng đệm an toàn ở đáy nội dung - không che phân trang, DataTables, footer */
main#main,
.main {
  padding-bottom: calc(var(--fab-bottom-space) + env(safe-area-inset-bottom, 0px)) !important;
}

.dataTables_wrapper {
  margin-bottom: 24px !important;
}

#footer,
footer {
  margin-bottom: calc(15px + env(safe-area-inset-bottom, 0px));
}

/* Responsive cho màn hình di động / hẹp */
@media (max-width: 576px) {
  :root {
    --fab-right: 14px;
    --fab-bottom-base: 14px;
    --fab-gap: 10px;
    --fab-btt-size: 36px;
    --fab-chat-size: 46px;
    --fab-bottom-space: 105px;
  }
}

/*--------------------------------------------------------------
# Override some default Bootstrap stylings
--------------------------------------------------------------*/
/* Dropdown menus */
.dropdown-menu {
  border-radius: 4px;
  padding: 10px 0;
  -webkit-animation-name: dropdown-animate;
  animation-name: dropdown-animate;
  -webkit-animation-duration: 0.2s;
  animation-duration: 0.2s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  border: 0;
  box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
  text-align: center;
  font-size: 15px;
  padding: 10px 25px;
}

.dropdown-menu .dropdown-footer a {
  color: #444444;
  text-decoration: underline;
}

.dropdown-menu .dropdown-footer a:hover {
  text-decoration: none;
}

.dropdown-menu .dropdown-divider {
  color: #a5c5fe;
  margin: 0;
}

.dropdown-menu .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: 0.3s;
}

.dropdown-menu .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
  line-height: 0;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f6f9ff;
}

@media (min-width: 768px) {
  .dropdown-menu-arrow::before {
    content: "";
    width: 13px;
    height: 13px;
    background: #fff;
    position: absolute;
    top: -7px;
    right: 20px;
    transform: rotate(45deg);
    border-top: 1px solid #eaedf1;
    border-left: 1px solid #eaedf1;
  }
}

@-webkit-keyframes dropdown-animate {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }

  0% {
    opacity: 0;
  }
}

@keyframes dropdown-animate {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }

  0% {
    opacity: 0;
  }
}

/* Light Backgrounds */
.bg-primary-light {
  background-color: #cfe2ff;
  border-color: #cfe2ff;
}

.bg-secondary-light {
  background-color: #e2e3e5;
  border-color: #e2e3e5;
}

.bg-success-light {
  background-color: #d1e7dd;
  border-color: #d1e7dd;
}

.bg-danger-light {
  background-color: #f8d7da;
  border-color: #f8d7da;
}

.bg-warning-light {
  background-color: #fff3cd;
  border-color: #fff3cd;
}

.bg-info-light {
  background-color: #cff4fc;
  border-color: #cff4fc;
}

.bg-dark-light {
  background-color: #d3d3d4;
  border-color: #d3d3d4;
}

/* Card */
.card {
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
}

.card-header,
.card-footer {
  border-color: var(--border-color);
  background-color: var(--bg-card-header);
  color: var(--text-secondary);
  padding: 15px;
}

.card-title {
  padding: 20px 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
  font-family: var(--font-family-heading, 'Inter', sans-serif);
}

.card-title span {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

.card-body {
  padding: 0 20px 20px 20px;
  color: var(--text-primary);
}

.card-img-overlay {
  background-color: rgba(255, 255, 255, 0.6);
}

/* Alerts */
.alert-heading {
  font-weight: 600;
  font-family: var(--font-family-heading, 'Inter', sans-serif);
  font-size: 20px;
  color: inherit;
}

/* Close Button */
.btn-close {
  background-size: 25%;
}

.btn-close:focus {
  outline: 0;
  box-shadow: none;
}

/* Accordion */
.accordion-item {
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.accordion-button:focus {
  outline: 0;
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  color: var(--color-primary);
  background-color: var(--bg-subtle);
}

.accordion-flush .accordion-button {
  padding: 15px 0;
  background: none;
  border: 0;
}

.accordion-flush .accordion-button:not(.collapsed) {
  box-shadow: none;
  color: var(--color-primary);
}

.accordion-flush .accordion-body {
  padding: 0 0 15px 0;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  font-size: 15px;
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 14px;
  font-family: var(--font-family-base, 'Inter', sans-serif);
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: 0.3s;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .breadcrumb-item::before {
  color: var(--text-muted);
}

.breadcrumb .active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Bordered Tabs */
.nav-tabs-bordered {
  border-bottom: 2px solid var(--border-color);
}

.nav-tabs-bordered .nav-link {
  margin-bottom: -2px;
  border: none;
  color: var(--text-secondary);
}

.nav-tabs-bordered .nav-link:hover,
.nav-tabs-bordered .nav-link:focus {
  color: var(--color-primary);
}

.nav-tabs-bordered .nav-link.active {
  background-color: transparent;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.logo {
  line-height: 1;
}

@media (min-width: 1200px) {
  .logo {
    width: 280px;
  }
}

.logo img {
  max-height: 26px;
  margin-right: 6px;
}

.logo span {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-heading);
  font-family: var(--font-family-heading, 'Inter', sans-serif);
}

.header {
  transition: all 0.5s;
  z-index: 997;
  height: 60px;
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  padding-left: 20px;
  /* Toggle Sidebar Button */
  /* Search Bar */
}

.header .toggle-sidebar-btn {
  font-size: 32px;
  padding-left: 10px;
  cursor: pointer;
  color: var(--text-primary);
}

.header .search-bar {
  min-width: 360px;
  padding: 0 20px;
}

@media (max-width: 1199px) {
  .header .search-bar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    padding: 20px;
    box-shadow: var(--shadow-dropdown);
    background: var(--bg-header);
    z-index: 9999;
    transition: 0.3s;
    visibility: hidden;
    opacity: 0;
  }

  .header .search-bar-show {
    top: 60px;
    visibility: visible;
    opacity: 1;
  }
}

.header .search-form {
  width: 100%;
}

.header .search-form input {
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  font-size: 14px;
  color: var(--text-primary);
  padding: 7px 38px 7px 8px;
  border-radius: 4px;
  transition: 0.3s;
  width: 100%;
}

.header .search-form input:focus,
.header .search-form input:hover {
  outline: none;
  box-shadow: 0 0 10px 0 rgba(37, 99, 235, 0.15);
  border: 1px solid var(--border-focus);
}

.header .search-form button {
  border: 0;
  padding: 0;
  margin-left: -30px;
  background: none;
}

.header .search-form button i {
  color: var(--text-secondary);
}

/*--------------------------------------------------------------
# Header Nav
--------------------------------------------------------------*/
.header-nav ul {
  list-style: none;
}

.header-nav>ul {
  margin: 0;
  padding: 0;
}

.header-nav .nav-icon {
  font-size: 22px;
  color: var(--text-primary);
  margin-right: 25px;
  position: relative;
}

.header-nav .nav-profile {
  color: var(--text-primary);
}

.header-nav .nav-profile img {
  max-height: 36px;
}

.header-nav .nav-profile span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-nav .badge-number {
  position: absolute;
  inset: -2px -5px auto auto;
  font-weight: normal;
  font-size: 12px;
  padding: 3px 6px;
}

.header-nav .notifications {
  inset: 8px -15px auto auto !important;
}

.header-nav .notifications .notification-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  transition: 0.3s;
}

.header-nav .notifications .notification-item i {
  margin: 0 20px 0 10px;
  font-size: 24px;
}

.header-nav .notifications .notification-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.header-nav .notifications .notification-item p {
  font-size: 13px;
  margin-bottom: 3px;
  color: #919191;
}

.header-nav .notifications .notification-item:hover {
  background-color: #f6f9ff;
}

.header-nav .messages {
  inset: 8px -15px auto auto !important;
}

.header-nav .messages .message-item {
  padding: 15px 10px;
  transition: 0.3s;
}

.header-nav .messages .message-item a {
  display: flex;
}

.header-nav .messages .message-item img {
  margin: 0 20px 0 10px;
  max-height: 40px;
}

.header-nav .messages .message-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #444444;
}

.header-nav .messages .message-item p {
  font-size: 13px;
  margin-bottom: 3px;
  color: #919191;
}

.header-nav .messages .message-item:hover {
  background-color: #f6f9ff;
}

.header-nav .profile {
  min-width: 240px;
  padding-bottom: 0;
  top: 8px !important;
}

.header-nav .profile .dropdown-header h6 {
  font-size: 18px;
  margin-bottom: 0;
  font-weight: 600;
  color: #444444;
}

.header-nav .profile .dropdown-header span {
  font-size: 14px;
}

.header-nav .profile .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: 0.3s;
}

.header-nav .profile .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
  line-height: 0;
}

.header-nav .profile .dropdown-item:hover {
  background-color: #f6f9ff;
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 300px;
  z-index: 996;
  transition: all 0.3s;
  padding: 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #aab7cf transparent;
  box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1);
  background-color: var(--bg-sidebar);
}

@media (max-width: 1199px) {
  .sidebar {
    left: -300px;
  }
}

.sidebar::-webkit-scrollbar {
  width: 5px;
  height: 8px;
  background-color: var(--bg-sidebar);
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #aab7cf;
}

@media (min-width: 1200px) {

  #main,
  #footer {
    margin-left: 300px;
  }
}

@media (max-width: 1199px) {
  .toggle-sidebar .sidebar {
    left: 0;
  }
}

@media (min-width: 1200px) {

  .toggle-sidebar #main,
  .toggle-sidebar #footer {
    margin-left: 0;
  }

  .toggle-sidebar .sidebar {
    left: -300px;
  }
}

.sidebar-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav li {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-item {
  margin-bottom: 5px;
}

.sidebar-nav .nav-heading {
  font-size: 11px;
  text-transform: uppercase;
  color: #899bbd;
  font-weight: 600;
  margin: 10px 0 5px 15px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  transition: 0.3s;
  background: var(--bg-subtle);
  padding: 10px 15px;
  border-radius: 4px;
}

.sidebar-nav .nav-link i {
  font-size: 16px;
  margin-right: 10px;
  color: var(--color-primary);
}

.sidebar-nav .nav-link.collapsed {
  color: var(--text-primary);
  background: transparent;
}

.sidebar-nav .nav-link.collapsed i {
  color: var(--text-muted);
}

.sidebar-nav .nav-link:hover {
  color: var(--color-primary);
  background: var(--bg-subtle);
}

.sidebar-nav .nav-link:hover i {
  color: var(--color-primary);
}

.sidebar-nav .nav-link .bi-chevron-down {
  margin-right: 0;
  transition: transform 0.2s ease-in-out;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

.sidebar-nav .nav-content {
  padding: 5px 0 0 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: 0.3s;
  padding: 10px 0 10px 40px;
}

.sidebar-nav .nav-content a i {
  font-size: 6px;
  margin-right: 8px;
  line-height: 0;
  border-radius: 50%;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: var(--color-primary);
}

.sidebar-nav .nav-content a.active i {
  background-color: var(--color-primary);
}

/*--------------------------------------------------------------
# Dashboard
--------------------------------------------------------------*/
/* Filter dropdown */
.dashboard .filter {
  position: absolute;
  right: 0px;
  top: 15px;
}

.dashboard .filter .icon {
  color: #aab7cf;
  padding-right: 20px;
  padding-bottom: 5px;
  transition: 0.3s;
  font-size: 16px;
}

.dashboard .filter .icon:hover,
.dashboard .filter .icon:focus {
  color: var(--color-primary);
}

.dashboard .filter .dropdown-header {
  padding: 8px 15px;
}

.dashboard .filter .dropdown-header h6 {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0;
  padding: 0;
}

.dashboard .filter .dropdown-item {
  padding: 8px 15px;
}

/* Info Cards */
.dashboard .info-card {
  padding-bottom: 10px;
}

.dashboard .info-card h6 {
  font-size: 28px;
  color: var(--text-heading);
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.dashboard .card-icon {
  font-size: 32px;
  line-height: 0;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  flex-grow: 0;
}

.dashboard .sales-card .card-icon {
  color: #4154f1;
  background: #f6f6fe;
}

.dashboard .revenue-card .card-icon {
  color: #2eca6a;
  background: #e0f8e9;
}

.dashboard .customers-card .card-icon {
  color: #ff771d;
  background: #ffecdf;
}

/* Activity */
.dashboard .activity {
  font-size: 14px;
}

.dashboard .activity .activity-item .activite-label {
  color: #888;
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
  min-width: 64px;
}

.dashboard .activity .activity-item .activite-label::before {
  content: "";
  position: absolute;
  right: -11px;
  width: 4px;
  top: 0;
  bottom: 0;
  background-color: #eceefe;
}

.dashboard .activity .activity-item .activity-badge {
  margin-top: 3px;
  z-index: 1;
  font-size: 11px;
  line-height: 0;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid #fff;
  flex-grow: 0;
}

.dashboard .activity .activity-item .activity-content {
  padding-left: 10px;
  padding-bottom: 20px;
}

.dashboard .activity .activity-item:first-child .activite-label::before {
  top: 5px;
}

.dashboard .activity .activity-item:last-child .activity-content {
  padding-bottom: 0;
}

/* News & Updates */
.dashboard .news .post-item+.post-item {
  margin-top: 15px;
}

.dashboard .news img {
  width: 80px;
  float: left;
  border-radius: 5px;
}

.dashboard .news h4 {
  font-size: 15px;
  margin-left: 95px;
  font-weight: bold;
  margin-bottom: 5px;
}

.dashboard .news h4 a {
  color: var(--text-heading);
  transition: 0.3s;
}

.dashboard .news h4 a:hover {
  color: var(--color-primary);
}

.dashboard .news p {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 95px;
}

/* Recent Sales */
.dashboard .recent-sales {
  font-size: 14px;
}

.dashboard .recent-sales .table thead {
  background: var(--bg-table-header);
}

.dashboard .recent-sales .table thead th {
  border: 0;
}

.dashboard .recent-sales .dataTable-top {
  padding: 0 0 10px 0;
}

.dashboard .recent-sales .dataTable-bottom {
  padding: 10px 0 0 0;
}

/* Top Selling */
.dashboard .top-selling {
  font-size: 14px;
}

.dashboard .top-selling .table thead {
  background: var(--bg-table-header);
}

.dashboard .top-selling .table thead th {
  border: 0;
}

.dashboard .top-selling .table tbody td {
  vertical-align: middle;
}

.dashboard .top-selling img {
  border-radius: 5px;
  max-width: 60px;
}

/*--------------------------------------------------------------
# Icons list page
--------------------------------------------------------------*/
.iconslist {
  display: grid;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding-top: 15px;
}

.iconslist .icon {
  background-color: var(--bg-card);
  border-radius: 0.25rem;
  text-align: center;
  color: var(--text-heading);
  padding: 15px 0;
  border: 1px solid var(--border-color);
}

.iconslist i {
  margin: 0.25rem;
  font-size: 2.5rem;
}

.iconslist .label {
  font-family: var(--bs-font-monospace);
  display: inline-block;
  width: 100%;
  overflow: hidden;
  padding: 0.25rem;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

/*--------------------------------------------------------------
# Profie Page
--------------------------------------------------------------*/
.profile .profile-card img {
  max-width: 120px;
}

.profile .profile-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 10px 0 0 0;
}

.profile .profile-card h3 {
  font-size: 18px;
}

.profile .profile-card .social-links a {
  font-size: 20px;
  display: inline-block;
  color: var(--text-muted);
  line-height: 0;
  margin-right: 10px;
  transition: 0.3s;
}

.profile .profile-card .social-links a:hover {
  color: var(--color-primary);
}

.profile .profile-overview .row {
  margin-bottom: 20px;
  font-size: 15px;
}

.profile .profile-overview .card-title {
  color: var(--text-heading);
}

.profile .profile-overview .label {
  font-weight: 600;
  color: var(--text-muted);
}

.profile .profile-edit label {
  font-weight: 600;
  color: var(--text-muted);
}

.profile .profile-edit img {
  max-width: 120px;
}

/*--------------------------------------------------------------
# F.A.Q Page
--------------------------------------------------------------*/
.faq .basic h6 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
}

.faq .basic p {
  color: var(--text-secondary);
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info-box {
  padding: 28px 30px;
}

.contact .info-box i {
  font-size: 38px;
  line-height: 0;
  color: var(--color-primary);
}

.contact .info-box h3 {
  font-size: 20px;
  color: var(--text-heading);
  font-weight: 700;
  margin: 20px 0 10px 0;
}

.contact .info-box p {
  padding: 0;
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
  color: var(--text-secondary);
}

.contact .php-email-form .error-message {
  display: none;
  color: #fff;
  background: #ed3c0d;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.contact .php-email-form .sent-message {
  display: none;
  color: #fff;
  background: #18d26e;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.contact .php-email-form .loading {
  display: none;
  background: var(--bg-card);
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
}

.contact .php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid #18d26e;
  border-top-color: #eee;
  -webkit-animation: animate-loading 1s linear infinite;
  animation: animate-loading 1s linear infinite;
}

.contact .php-email-form input,
.contact .php-email-form textarea {
  border-radius: 4px;
  box-shadow: none;
  font-size: 14px;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.contact .php-email-form input:focus,
.contact .php-email-form textarea:focus {
  border-color: var(--border-focus);
}

.contact .php-email-form input {
  padding: 10px 15px;
}

.contact .php-email-form textarea {
  padding: 12px 15px;
}

.contact .php-email-form button[type=submit] {
  background: var(--color-primary);
  border: 0;
  padding: 10px 30px;
  color: #fff;
  transition: 0.4s;
  border-radius: 4px;
}

.contact .php-email-form button[type=submit]:hover {
  background: var(--color-primary-hover);
}

@-webkit-keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Error 404
--------------------------------------------------------------*/
.error-404 {
  padding: 30px;
}

.error-404 h1 {
  font-size: 180px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0;
  line-height: 150px;
}

.error-404 h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 30px;
}

.error-404 .btn {
  background: var(--color-primary);
  color: #fff;
  padding: 8px 30px;
}

.error-404 .btn:hover {
  background: var(--color-primary-hover);
}

@media (min-width: 992px) {
  .error-404 img {
    max-width: 50%;
  }
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  padding: 20px 0;
  font-size: 14px;
  transition: all 0.3s;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.footer .copyright {
  text-align: center;
  color: var(--text-secondary);
}

.footer .credits {
  padding-top: 5px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}