/**
 * 仅深色模式样式：浅色/默认不加载任何覆盖，布局与改版前一致。
 */

/* —— 主题开关（不改变页面布局） —— */
.toolbar-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.theme-switch.theme-switch--visible {
  display: inline-flex !important;
  align-items: center;
}

.theme-switch-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.theme-switch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  color: #909399;
  transition: color 0.2s ease;
}

.theme-switch-icon svg {
  display: block;
}

html[data-theme="dark"] .theme-switch-icon--dark {
  color: #3b82f6;
}

html:not([data-theme="dark"]) .theme-switch-icon--light {
  color: #2e6bf1;
}

.theme-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.theme-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.theme-switch-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #dcdfe6;
  transition: background 0.2s ease;
}

.theme-switch-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.theme-switch-input:checked + .theme-switch-slider {
  background: linear-gradient(90deg, #2067e8 0%, #0f9de9 100%);
}

.theme-switch-input:checked + .theme-switch-slider::before {
  transform: translateX(20px);
}

.theme-switch-input:focus-visible + .theme-switch-slider {
  box-shadow: 0 0 0 3px rgba(32, 103, 232, 0.28);
}

html[data-theme="dark"] .theme-switch-slider {
  background: rgba(255, 255, 255, 0.18);
}

/* —— 深色模式：仅配色，不改侧栏宽高/间距 —— */
html[data-theme="dark"] {
  color-scheme: dark;
  --dm-page-bg: #121214;
  --dm-card-bg: #1f2229;
  --dm-card-border: rgba(255, 255, 255, 0.08);
  --dm-text: #f3f4f6;
  --dm-text-muted: #9ca3af;
  --dm-control-bg: #2a2e38;
  --dm-control-border: rgba(255, 255, 255, 0.12);
  --dm-input-bg: #2a2e38;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] body#kt_body {
  background-color: var(--dm-page-bg) !important;
  color: var(--dm-text);
}

html[data-theme="dark"] .content,
html[data-theme="dark"] #kt_content,
html[data-theme="dark"] #kt_wrapper {
  background-color: var(--dm-page-bg);
}

html[data-theme="dark"] .card {
  background-color: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
  color: var(--dm-text);
}

html[data-theme="dark"] .card .card-header,
html[data-theme="dark"] .card .card-body,
html[data-theme="dark"] .card .card-footer {
  background-color: transparent;
  border-color: var(--dm-card-border);
  color: var(--dm-text);
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] h1.text-dark,
html[data-theme="dark"] .fw-bolder.text-dark {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-muted {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-300 {
  border-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-control-solid {
  background-color: var(--dm-input-bg) !important;
  border-color: var(--dm-control-border) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: var(--dm-input-bg) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .table {
  color: var(--dm-text);
  --bs-table-bg: transparent;
  --bs-table-color: var(--dm-text);
  --bs-table-border-color: var(--dm-card-border);
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  border-color: var(--dm-card-border);
  color: var(--dm-text);
}

html[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: transparent;
  color: var(--dm-text);
}

/* —— 列表分页（DataTables + Metronic 上一页/下一页箭头） —— */
html[data-theme="dark"] .pagination .page-item .page-link {
  background-color: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .page-item.next:not(:hover):not(:focus):not(.disabled) .page-link,
html[data-theme="dark"] .page-item.previous:not(:hover):not(:focus):not(.disabled) .page-link,
html[data-theme="dark"] .page-item.prev:not(:hover):not(:focus):not(.disabled) .page-link {
  background-color: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .page-item:hover:not(.disabled) .page-link {
  background-color: var(--dm-control-bg) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .page-item.disabled .page-link,
html[data-theme="dark"] .page-item.disabled .page-link:focus {
  background-color: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
  color: var(--dm-text-muted) !important;
  opacity: 0.5;
}

html[data-theme="dark"] .page-item.active .page-link {
  background-color: #2e6bf1 !important;
  border-color: #2e6bf1 !important;
  color: #fff !important;
}

html[data-theme="dark"] .page-item.next:not(:hover):not(:focus):not(.disabled) .page-link i,
html[data-theme="dark"] .page-item.previous:not(:hover):not(:focus):not(.disabled) .page-link i,
html[data-theme="dark"] .page-item.prev:not(:hover):not(:focus):not(.disabled) .page-link i {
  color: #b0b5c0 !important;
}

html[data-theme="dark"] .page-item.next:not(:hover):not(:focus):not(.disabled) .page-link .previous,
html[data-theme="dark"] .page-item.previous:not(:hover):not(:focus):not(.disabled) .page-link .previous,
html[data-theme="dark"] .page-item.prev:not(:hover):not(:focus):not(.disabled) .page-link .previous {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 9' fill='%23b0b5c0'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.06463 4.42111C1.96161 4.22088 1.9809 3.9637 2.12863 3.78597L5.12847 0.177181C5.31402 -0.046034 5.63049 -0.060261 5.83532 0.145404C6.04015 0.351069 6.05578 0.698744 5.87023 0.921959L3.19406 4.14137L5.84414 7.06417C6.03896 7.27904 6.03835 7.62686 5.84278 7.84105C5.64721 8.05524 5.33073 8.05469 5.13591 7.83982L2.14806 4.54449C2.1141 4.50704 2.08629 4.46541 2.06463 4.42111Z'/%3e%3c/svg%3e") !important;
}

html[data-theme="dark"] .page-item.next:not(:hover):not(:focus):not(.disabled) .page-link .next,
html[data-theme="dark"] .page-item.previous:not(:hover):not(:focus):not(.disabled) .page-link .next,
html[data-theme="dark"] .page-item.prev:not(:hover):not(:focus):not(.disabled) .page-link .next {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 9' fill='%23b0b5c0'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.93537 4.57889C6.03839 4.77912 6.0191 5.0363 5.87137 5.21403L2.87153 8.82282C2.68598 9.04603 2.36951 9.06026 2.16468 8.8546C1.95985 8.64893 1.94422 8.30126 2.12977 8.07804L4.80594 4.85863L2.15586 1.93583C1.96104 1.72096 1.96165 1.37314 2.15722 1.15895C2.35279 0.944757 2.66927 0.945311 2.86409 1.16018L5.85194 4.45551C5.8859 4.49296 5.91371 4.53459 5.93537 4.57889Z'/%3e%3c/svg%3e") !important;
}

html[data-theme="dark"] .page-item:hover:not(.disabled) .page-link .previous,
html[data-theme="dark"] .page-item:focus:not(.disabled) .page-link .previous {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 9' fill='%236ea8ff'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.06463 4.42111C1.96161 4.22088 1.9809 3.9637 2.12863 3.78597L5.12847 0.177181C5.31402 -0.046034 5.63049 -0.060261 5.83532 0.145404C6.04015 0.351069 6.05578 0.698744 5.87023 0.921959L3.19406 4.14137L5.84414 7.06417C6.03896 7.27904 6.03835 7.62686 5.84278 7.84105C5.64721 8.05524 5.33073 8.05469 5.13591 7.83982L2.14806 4.54449C2.1141 4.50704 2.08629 4.46541 2.06463 4.42111Z'/%3e%3c/svg%3e") !important;
}

html[data-theme="dark"] .page-item:hover:not(.disabled) .page-link .next,
html[data-theme="dark"] .page-item:focus:not(.disabled) .page-link .next {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 9' fill='%236ea8ff'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.93537 4.57889C6.03839 4.77912 6.0191 5.0363 5.87137 5.21403L2.87153 8.82282C2.68598 9.04603 2.36951 9.06026 2.16468 8.8546C1.95985 8.64893 1.94422 8.30126 2.12977 8.07804L4.80594 4.85863L2.15586 1.93583C1.96104 1.72096 1.96165 1.37314 2.15722 1.15895C2.35279 0.944757 2.66927 0.945311 2.86409 1.16018L5.85194 4.45551C5.8859 4.49296 5.91371 4.53459 5.93537 4.57889Z'/%3e%3c/svg%3e") !important;
}

html[data-theme="dark"] div.dataTables_wrapper div.dataTables_info,
html[data-theme="dark"] div.dataTables_wrapper div.dataTables_length,
html[data-theme="dark"] div.dataTables_wrapper div.dataTables_length label {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .modal-content {
  background: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border);
  color: var(--dm-text);
}

html[data-theme="dark"] .modal-content input,
html[data-theme="dark"] .modal-content .form-control {
  background-color: var(--dm-input-bg) !important;
  border-color: var(--dm-control-border) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  border-color: var(--dm-card-border);
}

html[data-theme="dark"] .select2-container--bootstrap5 .select2-selection,
html[data-theme="dark"] .select2-container--default .select2-selection--single {
  background-color: var(--dm-input-bg) !important;
  border-color: var(--dm-control-border) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .select2-container--bootstrap5 .select2-selection__rendered,
html[data-theme="dark"] .select2-container--default .select2-selection__rendered {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .select2-dropdown {
  background-color: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .select2-results__option {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .select2-results__option--highlighted {
  background-color: rgba(46, 107, 241, 0.2) !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .select2-results__option--selected {
  background-color: #2e6bf1 !important;
  color: #fff !important;
}

html[data-theme="dark"] .swal2-popup:not(.swal2-toast) {
  background: var(--dm-card-bg) !important;
  color: var(--dm-text) !important;
  border: 1px solid var(--dm-card-border);
}

html[data-theme="dark"] .swal2-popup:not(.swal2-toast) .swal2-title {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .swal2-popup:not(.swal2-toast) .swal2-html-container {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .swal2-container.swal2-backdrop-show:not(:has(.swal2-toast)) {
  background: rgba(0, 0, 0, 0.62) !important;
}

html[data-theme="dark"] #pageLoading.page-loader {
  background: rgba(0, 0, 0, 0.62) !important;
}

html[data-theme="dark"] #pageLoading.page-loader .text-gray-800 {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .daterangepicker {
  background: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border);
  color: var(--dm-text);
  color-scheme: dark;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .daterangepicker .calendar-table,
html[data-theme="dark"] .daterangepicker .ranges {
  background: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border);
}

html[data-theme="dark"] .daterangepicker .drp-calendar th,
html[data-theme="dark"] .daterangepicker .drp-calendar td {
  color: var(--dm-text);
}

html[data-theme="dark"] .daterangepicker .drp-calendar th.month {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .daterangepicker .drp-calendar th.next span,
html[data-theme="dark"] .daterangepicker .drp-calendar th.prev span {
  border-color: var(--dm-text-muted);
}

html[data-theme="dark"] .daterangepicker .drp-calendar td.available.off {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .daterangepicker .drp-calendar td.today,
html[data-theme="dark"] .daterangepicker .drp-calendar td.today.active {
  background: rgba(52, 101, 255, 0.18) !important;
  color: #6ea8ff !important;
}

html[data-theme="dark"] .daterangepicker .drp-calendar td.in-range.available:not(.active):not(.off):not(.today),
html[data-theme="dark"] .daterangepicker .drp-calendar td:hover {
  background-color: rgba(52, 101, 255, 0.12) !important;
  color: #6ea8ff !important;
}

html[data-theme="dark"] .daterangepicker .ranges li {
  color: var(--dm-text-muted);
}

html[data-theme="dark"] .daterangepicker .ranges li:hover {
  background-color: rgba(52, 101, 255, 0.12) !important;
  color: #6ea8ff !important;
}

html[data-theme="dark"] .daterangepicker .ranges li.active {
  background-color: #2e6bf1 !important;
  color: #fff !important;
}

html[data-theme="dark"] .daterangepicker.show-ranges.show-calendar .ranges {
  border-left-color: var(--dm-card-border) !important;
}

/* 时分秒（及年月）下拉：覆盖 plugins 的 #eee 与 Metronic 透明+深字 */
html[data-theme="dark"] .daterangepicker .calendar-time {
  color: var(--dm-text);
}

html[data-theme="dark"] .daterangepicker select.hourselect,
html[data-theme="dark"] .daterangepicker select.minuteselect,
html[data-theme="dark"] .daterangepicker select.secondselect,
html[data-theme="dark"] .daterangepicker select.ampmselect,
html[data-theme="dark"] .daterangepicker select.monthselect,
html[data-theme="dark"] .daterangepicker select.yearselect {
  background-color: var(--dm-input-bg) !important;
  border: 1px solid var(--dm-control-border) !important;
  color: var(--dm-text) !important;
  border-radius: 6px;
  -webkit-appearance: menulist;
  appearance: auto;
}

html[data-theme="dark"] .daterangepicker select.hourselect:focus,
html[data-theme="dark"] .daterangepicker select.minuteselect:focus,
html[data-theme="dark"] .daterangepicker select.secondselect:focus,
html[data-theme="dark"] .daterangepicker select.ampmselect:focus,
html[data-theme="dark"] .daterangepicker select.monthselect:focus,
html[data-theme="dark"] .daterangepicker select.yearselect:focus {
  background-color: var(--dm-control-bg) !important;
  border-color: #6ea8ff !important;
  color: var(--dm-text) !important;
  outline: none;
}

html[data-theme="dark"] .daterangepicker select option {
  background-color: var(--dm-card-bg);
  color: var(--dm-text);
}

html[data-theme="dark"] .daterangepicker .calendar-time select.disabled {
  color: var(--dm-text-muted) !important;
  opacity: 0.6;
}

html[data-theme="dark"] .daterangepicker .drp-buttons {
  border-top-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .daterangepicker .drp-selected {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .daterangepicker .drp-buttons .cancelBtn {
  color: var(--dm-text-muted) !important;
  background-color: var(--dm-input-bg) !important;
  border-color: var(--dm-control-border) !important;
}

html[data-theme="dark"] .lang-switch .menu-link,
html[data-theme="dark"] .lang-switch .menu-title {
  color: var(--dm-text);
}

html[data-theme="dark"] .table thead.text-gray-400 th,
html[data-theme="dark"] .table thead th.text-gray-400 {
  color: var(--dm-text-muted) !important;
}

/* 固定操作列（批次统计等 DataTables + FixedColumns） */
html[data-theme="dark"] #kt_customers_table th.batch-op-col,
html[data-theme="dark"] #kt_customers_table td.batch-op-col,
html[data-theme="dark"] table.dataTable thead tr > .dtfc-fixed-left,
html[data-theme="dark"] table.dataTable thead tr > .dtfc-fixed-right,
html[data-theme="dark"] table.dataTable tfoot tr > .dtfc-fixed-left,
html[data-theme="dark"] table.dataTable tfoot tr > .dtfc-fixed-right,
html[data-theme="dark"] table.dataTable tbody tr > .dtfc-fixed-left,
html[data-theme="dark"] table.dataTable tbody tr > .dtfc-fixed-right,
html[data-theme="dark"] #kt_customers_table_wrapper .dtfc-fixed-right,
html[data-theme="dark"] .dtfc-fixed-right {
  background-color: var(--dm-card-bg) !important;
  color: var(--dm-text);
}

html[data-theme="dark"] div.dtfc-left-top-blocker,
html[data-theme="dark"] div.dtfc-right-top-blocker,
html[data-theme="dark"] div.dtfc-left-bottom-blocker,
html[data-theme="dark"] div.dtfc-right-bottom-blocker {
  background-color: var(--dm-card-bg) !important;
}

html[data-theme="dark"] div.dataTables_wrapper div.dataTables_processing {
  background-color: var(--dm-card-bg) !important;
  color: var(--dm-text-muted) !important;
  border: 1px solid var(--dm-card-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] #kt_customers_table .batch-op-col .btn-primary {
  background-color: #2e6bf1 !important;
  border-color: #2e6bf1 !important;
  color: #fff !important;
}

html[data-theme="dark"] #kt_customers_table .batch-op-col .btn-danger {
  background-color: #e0526d !important;
  border-color: #e0526d !important;
  color: #fff !important;
}

html[data-theme="dark"] .content-frame {
  background: var(--dm-page-bg);
}

/* —— 左侧菜单深色（main 壳层 #kt_aside，布局尺寸不变） —— */
html[data-theme="dark"] #kt_aside.aside {
  background-color: #1f2229 !important;
  border-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] #kt_aside .aside-logo {
  background-color: #1f2229 !important;
}

html[data-theme="dark"] #kt_aside .sidebar-brand-title {
  color: #f3f4f6 !important;
}

html[data-theme="dark"] #kt_aside .menu-link,
html[data-theme="dark"] #kt_aside .menu-title,
html[data-theme="dark"] #kt_aside .menu-icon,
html[data-theme="dark"] #kt_aside .menu-icon i {
  color: #b0b5c0 !important;
}

html[data-theme="dark"] #kt_aside .menu-item .menu-link.active {
  background-color: rgba(52, 101, 255, 0.16) !important;
  color: #6ea8ff !important;
}

html[data-theme="dark"] #kt_aside .menu-item .menu-link.active .menu-title,
html[data-theme="dark"] #kt_aside .menu-item .menu-link.active .menu-icon,
html[data-theme="dark"] #kt_aside .menu-item .menu-link.active .menu-icon i {
  color: #6ea8ff !important;
}

html[data-theme="dark"] #kt_aside .aside-menu .menu-item .menu-link:hover:not(.disabled):not(.active),
html[data-theme="dark"] #kt_aside .aside-menu .menu-item.hover > .menu-link:not(.disabled):not(.active) {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #6ea8ff !important;
}

html[data-theme="dark"] #kt_aside .aside-menu .menu-item .menu-link:hover:not(.disabled):not(.active) .menu-title,
html[data-theme="dark"] #kt_aside .aside-menu .menu-item .menu-link:hover:not(.disabled):not(.active) .menu-icon,
html[data-theme="dark"] #kt_aside .aside-menu .menu-item .menu-link:hover:not(.disabled):not(.active) .menu-icon i {
  color: #6ea8ff !important;
}

html[data-theme="dark"] #kt_aside .menu-sub-dropdown {
  background: linear-gradient(to bottom, #2a2e38 0%, #252830 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] #kt_aside .menu-sub-dropdown .menu-link,
html[data-theme="dark"] #kt_aside .menu-sub-dropdown .menu-title {
  color: #d1d5db !important;
}

html[data-theme="dark"] #kt_aside .menu-sub-dropdown .menu-link:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] #kt_aside .user-group {
  background: linear-gradient(to bottom, #2a2e38 0%, #252830 100%) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] #kt_aside .user-group .text-black,
html[data-theme="dark"] #kt_aside .user-group .text-gray-700 {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_aside .fa-chevron-down {
  color: #9ca3af !important;
}

html[data-theme="dark"] #kt_aside #kt_aside_toggle .svg-icon path {
  fill: #9ca3af !important;
}

html[data-theme="dark"] #kt_aside .mobile-lang-switcher {
  background: #1f2229 !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] #kt_aside .mobile-lang-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #b0b5c0 !important;
}

html[data-theme="dark"] #kt_aside .mobile-lang-btn:hover,
html[data-theme="dark"] #kt_aside .mobile-lang-btn.active {
  background: rgba(52, 101, 255, 0.18) !important;
  border-color: rgba(110, 168, 255, 0.45) !important;
  color: #6ea8ff !important;
}

html[data-theme="dark"] .mobile-header {
  background: #1f2229 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .mobile-logo-title {
  color: #f3f4f6 !important;
}

html[data-theme="dark"] .mobile-menu-toggle {
  color: #6ea8ff !important;
}

html[data-theme="dark"] [data-kt-aside-minimize="on"] #kt_aside .aside-menu .menu-item .menu-link.active {
  background-color: rgba(52, 101, 255, 0.16) !important;
}

/* —— 首页数据卡片与图表容器 —— */
html[data-theme="dark"] .home-index-page {
  background-color: var(--dm-page-bg);
  color: var(--dm-text);
}

html[data-theme="dark"] .home-index-page .bg-white {
  background-color: var(--dm-card-bg) !important;
}

html[data-theme="dark"] .home-index-page [style*="border: 1px solid #e7e9eb"] {
  border-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .home-index-page .text-gray-500,
html[data-theme="dark"] .home-index-page .text-\[13px\] {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .home-index-page .text-\[20px\],
html[data-theme="dark"] .home-index-page .text-\[30px\],
html[data-theme="dark"] .home-index-page [data-stat] {
  color: var(--dm-text) !important;
}

/* —— 个人信息下拉 —— */
html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown .fw-bolder,
html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown #userInfo_name,
html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown #userInfo_name span:first-child {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown .text-gray-600,
html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown #batch_size,
html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown #expiry_time {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] #kt_header_user_menu_toggle .user_info_btn > span,
html[data-theme="dark"] #kt_header_user_menu_toggle .user_info_btn span span {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown > div > div[style*="color: #888c9f"],
html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown > div > div[style*="color:#888c9f"] {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] #kt_header_user_menu_toggle .menu-sub-dropdown > div > div[style*="888c9f"] span {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] #kt_header_user_menu_toggle .user_info_btn .fa-solid,
html[data-theme="dark"] #kt_header_user_menu_toggle_mobile .user_info_btn .fa-solid {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] #kt_header_user_menu_toggle_mobile .menu-sub-dropdown .fw-bolder,
html[data-theme="dark"] #kt_header_user_menu_toggle_mobile .menu-sub-dropdown #userInfo_name,
html[data-theme="dark"] #kt_header_user_menu_toggle_mobile .user_info_btn > span,
html[data-theme="dark"] #kt_header_user_menu_toggle_mobile .menu-sub-dropdown .text-gray-600,
html[data-theme="dark"] #kt_header_user_menu_toggle_mobile .menu-sub-dropdown #batch_size,
html[data-theme="dark"] #kt_header_user_menu_toggle_mobile .menu-sub-dropdown #expiry_time {
  color: var(--dm-text) !important;
}

/* —— 修改密码弹窗（Swal force-pwd） —— */
html[data-theme="dark"] .force-pwd-popup.swal2-popup {
  background: var(--dm-card-bg) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .force-pwd-title {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .force-pwd-field input {
  background: var(--dm-input-bg) !important;
  border-color: var(--dm-control-border) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .force-pwd-field input::placeholder {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .force-pwd-prefix,
html[data-theme="dark"] .force-pwd-eye {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .force-pwd-rule {
  background: rgba(46, 107, 241, 0.15) !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .force-pwd-cancel {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .force-pwd-popup .swal2-validation-message {
  color: #f87171 !important;
}

/* —— 短信模板：弹窗与编辑区 —— */
html[data-theme="dark"] #kt_modal_add_customer .modal-content {
  background: var(--dm-card-bg) !important;
  color: var(--dm-text);
}

html[data-theme="dark"] #kt_modal_add_customer .modal-header,
html[data-theme="dark"] #kt_modal_add_customer .modal-header h2,
html[data-theme="dark"] #kt_modal_add_customer .modal-body label {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_modal_add_customer .modal-footer {
  background: var(--dm-card-bg) !important;
  border-top-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] #kt_modal_add_customer .areacontainer {
  border-color: var(--dm-control-border) !important;
}

html[data-theme="dark"] #kt_modal_add_customer .areanumbers {
  border-right-color: var(--dm-control-border) !important;
  background-color: var(--dm-input-bg) !important;
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] #kt_modal_add_customer .areatextarea {
  background-color: var(--dm-input-bg) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_modal_add_customer .text-danger {
  color: #f87171 !important;
}

html[data-theme="dark"] #kt_customers_table tbody.text-gray-600 {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] #kt_customers_table tbody td {
  color: var(--dm-text);
}

html[data-theme="dark"] #kt_customers_table tbody td .btn-primary {
  background-color: #2e6bf1 !important;
  border-color: #2e6bf1 !important;
  color: #fff !important;
}

html[data-theme="dark"] #kt_customers_table.table-row-dashed > tbody > tr > td {
  border-bottom-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] #kt_customers_table.table-row-dashed > tbody > tr > td:last-child {
  border-bottom: none !important;
}

/* —— 短信聊天：左侧会话卡片 —— */
html[data-theme="dark"] .chat-session-sidebar .card.card-flush,
html[data-theme="dark"] .chat-message-panel .card {
  background-color: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .chat-list-card {
  background: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .chat-list-card.bg-light-warning {
  background: rgba(52, 101, 255, 0.14) !important;
  border-color: #6ea8ff !important;
  box-shadow: 0 0 0 1px rgba(110, 168, 255, 0.2) !important;
}

html[data-theme="dark"] .chat-card-phone,
html[data-theme="dark"] .chat-card-phone-line {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] .chat-card-name {
  color: #fbbf24 !important;
}

html[data-theme="dark"] .chat-card-time {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .chat-card-stats {
  border-top-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .chat-card-stat {
  border-right-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] .chat-card-stat-label {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] .chat-card-stat-num--unread {
  color: #9ca3af !important;
}

html[data-theme="dark"] #stopSortIndex {
  background: rgba(30, 34, 42, 0.92) !important;
  color: #6ea8ff !important;
  border-color: #6ea8ff !important;
}

/* —— 短信聊天：右侧对话区 —— */
html[data-theme="dark"] #showMessageParent {
  background: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] #showMessageParent .bg-light-info.text-dark,
html[data-theme="dark"] #showMessageParent [data-kt-element="message-text"].bg-light-info {
  background: rgba(59, 130, 246, 0.22) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #showMessageParent .bg-light-primary,
html[data-theme="dark"] #showMessageParent .bg-secondary.bg-light-primary {
  background: rgba(52, 101, 255, 0.28) !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_chat_messenger_header,
html[data-theme="dark"] #kt_chat_messenger_header .fs-20,
html[data-theme="dark"] #kt_chat_messenger_header label {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_chat_messenger_footer.card-footer {
  background: var(--dm-card-bg) !important;
  border-color: var(--dm-card-border) !important;
}

html[data-theme="dark"] #area_content .d-flex.flex-stack {
  background: transparent !important;
}

html[data-theme="dark"] #sendMessageText.form-control-flush {
  background: transparent !important;
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_content #kt_toolbar h1.text-dark {
  color: var(--dm-text) !important;
}

html[data-theme="dark"] #kt_toolbar .chat-toolbar-filter-label {
  color: var(--dm-text-muted) !important;
}

html[data-theme="dark"] #unredText {
  color: var(--dm-text-muted) !important;
}
