/* ==========================================================================
   MẪN NHI PRINT & TECH - HỆ THỐNG ĐỒNG BỘ GIAO DIỆN (THEME SYSTEM)
   Đồng bộ 100% chuẩn D:\QuanLyGiaoXu\ManNhi_Print_Tech & demo_menu.html
   Hỗ trợ 3 chế độ:
   1. ☀️ Sáng (Light Soft): Giữ nguyên nền sáng gốc của phần mềm, rõ ràng tinh tế
   2. 🌗 Muted Soft (Dark Muted / Slate): Tông Slate xám xanh dịu mắt, làm việc lâu không mỏi
   3. 🌙 Dark Tech (Cyber Dark): Tông đen xanh công nghệ cao, tương phản sắc nét
   ========================================================================== */

:root {
  --cyan: #00aeef;
  --cyan-glow: rgba(0, 174, 239, 0.35);
  --magenta: #e6007e;
  --magenta-glow: rgba(230, 0, 126, 0.35);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.35);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.35);
  --indigo: #8b5cf6;
  --indigo-glow: rgba(139, 92, 246, 0.35);
  --rose: #f43f5e;
}

/* ==========================================================================
   1. ☀️ GIAO DIỆN SÁNG (THEME LIGHT SOFT - GIỮ NGUYÊN 100% CHUẨN GỐC)
   ========================================================================== */
body.theme-light, [data-theme="light"] {
  --bg: #f4f7f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --table-th-bg: #243447;
  --table-th-text: #ffffff;
  --table-border: #e2e8f0;
  --table-hover: #f1f5f9;
}

/* ==========================================================================
   2. 🌗 GIAO DIỆN MUTED SOFT (DARK MUTED / SLATE - DỊU MẮT)
   Đồng bộ 100% chuẩn D:\QuanLyGiaoXu\ManNhi_Print_Tech
   ========================================================================== */
body.theme-muted, body.theme-slate, [data-theme="muted"], [data-theme="slate"] {
  --primary: #1e293b;
  --bg: #1e293b;
  --card-bg: #334155;
  --card-border: rgba(255, 255, 255, 0.15);
  --table-bg: #243247;
  --border-color: rgba(255, 255, 255, 0.14);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --input-bg: #1e293b;
  --input-border: rgba(255, 255, 255, 0.18);
  --table-th-bg: linear-gradient(90deg, #1e293b 0%, #0369a1 100%);
  --table-th-text: #ffffff;
  --table-border: rgba(255, 255, 255, 0.12);
  --table-hover: rgba(56, 189, 248, 0.1);
}

body.theme-muted, body.theme-slate {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

/* Autofill fix cho Muted Soft */
body.theme-muted input:-webkit-autofill,
body.theme-slate input:-webkit-autofill,
body.theme-muted select:-webkit-autofill,
body.theme-slate select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 0 0 1000px #1e293b inset !important;
  caret-color: #ffffff !important;
}

/* Khối Cards & Containers chung cho Muted Soft */
body.theme-muted .card, body.theme-slate .card,
body.theme-muted .wrap, body.theme-slate .wrap,
body.theme-muted .wrap-card, body.theme-slate .wrap-card,
body.theme-muted .dashboard, body.theme-slate .dashboard,
body.theme-muted .customer-box, body.theme-slate .customer-box,
body.theme-muted .debt-box, body.theme-slate .debt-box,
body.theme-muted .bill-box, body.theme-slate .bill-box,
body.theme-muted .history-box, body.theme-slate .history-box,
body.theme-muted .convert-box, body.theme-slate .convert-box,
body.theme-muted .detail-box, body.theme-slate .detail-box,
body.theme-muted .filter-box, body.theme-slate .filter-box,
body.theme-muted .lock-box, body.theme-slate .lock-box,
body.theme-muted .console-box, body.theme-slate .console-box,
body.theme-muted .preview-card, body.theme-slate .preview-card,
body.theme-muted .icon-style-card, body.theme-slate .icon-style-card,
body.theme-muted .icon-preview-box, body.theme-slate .icon-preview-box,
body.theme-muted .report-view, body.theme-slate .report-view,
body.theme-muted .content-box, body.theme-slate .content-box,
body.theme-muted .input-card, body.theme-slate .input-card,
body.theme-muted .table-container, body.theme-slate .table-container,
body.theme-muted .modal-content, body.theme-slate .modal-content,
body.theme-muted .modal-box, body.theme-slate .modal-box,
body.theme-muted .modal-iframe-content, body.theme-slate .modal-iframe-content,
body.theme-muted .box, body.theme-slate .box,
body.theme-muted .bill-stats-bar, body.theme-slate .bill-stats-bar,
body.theme-muted .vattu-card, body.theme-slate .vattu-card,
body.theme-muted .stats-bar, body.theme-slate .stats-bar,
body.theme-muted .stats-grid, body.theme-slate .stats-grid,
body.theme-muted .header-area, body.theme-slate .header-area,
body.theme-muted .history-wrap, body.theme-slate .history-wrap {
  background: #334155 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Headers của trang trong Muted Soft */
body.theme-muted .header-only-title, body.theme-slate .header-only-title,
body.theme-muted .header-bottom, body.theme-slate .header-bottom,
body.theme-muted .page-header, body.theme-slate .page-header,
body.theme-muted .header, body.theme-slate .header,
body.theme-muted .buyer-info-header, body.theme-slate .buyer-info-header,
body.theme-muted .bill-picker-header, body.theme-slate .bill-picker-header,
body.theme-muted .top-nav-bar, body.theme-slate .top-nav-bar,
body.theme-muted .report-header, body.theme-slate .report-header,
body.theme-muted .history-header, body.theme-slate .history-header {
  background: #334155 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

body.theme-muted .quick-filters, body.theme-slate .quick-filters {
  background: #334155 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Headings & Text trong Muted Soft */
body.theme-muted h1, body.theme-slate h1,
body.theme-muted h2, body.theme-slate h2,
body.theme-muted h3, body.theme-slate h3,
body.theme-muted h4, body.theme-slate h4,
body.theme-muted .main-title, body.theme-slate .main-title,
body.theme-muted .report-title h2, body.theme-slate .report-title h2 {
  color: #ffffff !important;
}

body.theme-muted label, body.theme-slate label,
body.theme-muted .sub-title, body.theme-slate .sub-title,
body.theme-muted .report-title p, body.theme-slate .report-title p,
body.theme-muted .filter-summary, body.theme-slate .filter-summary,
body.theme-muted .quick-filter-label, body.theme-slate .quick-filter-label,
body.theme-muted .kpi-label, body.theme-slate .kpi-label,
body.theme-muted .stat-label, body.theme-slate .stat-label,
body.theme-muted .stat-lbl, body.theme-slate .stat-lbl {
  color: #cbd5e1 !important;
}

/* Inputs & Form Controls trong Muted Soft */
body.theme-muted input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body.theme-slate input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body.theme-muted select, body.theme-slate select,
body.theme-muted textarea, body.theme-slate textarea {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
}

body.theme-muted input:focus, body.theme-slate input:focus,
body.theme-muted select:focus, body.theme-slate select:focus,
body.theme-muted textarea:focus, body.theme-slate textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
  outline: none !important;
}

/* Bảng biểu trong Muted Soft */
body.theme-muted table, body.theme-slate table,
body.theme-muted .main-table, body.theme-slate .main-table,
body.theme-muted .demo-table, body.theme-slate .demo-table,
body.theme-muted .bill-table, body.theme-slate .bill-table,
body.theme-muted .history-table, body.theme-slate .history-table,
body.theme-muted .summary-table, body.theme-slate .summary-table,
body.theme-muted .stock-table, body.theme-slate .stock-table,
body.theme-muted .customer-table, body.theme-slate .customer-table,
body.theme-muted .view-table, body.theme-slate .view-table {
  background: #243247 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.theme-muted th, body.theme-slate th,
body.theme-muted thead, body.theme-slate thead,
body.theme-muted thead tr, body.theme-slate thead tr,
body.theme-muted .main-table thead, body.theme-slate .main-table thead,
body.theme-muted .demo-table thead, body.theme-slate .demo-table thead,
body.theme-muted .bill-table thead, body.theme-slate .bill-table thead {
  background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.theme-muted td, body.theme-slate td,
body.theme-muted .main-table td, body.theme-slate .main-table td,
body.theme-muted .demo-table td, body.theme-slate .demo-table td,
body.theme-muted .bill-table td, body.theme-slate .bill-table td,
body.theme-muted .history-table td, body.theme-slate .history-table td {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

body.theme-muted tbody tr:hover td, body.theme-slate tbody tr:hover td,
body.theme-muted .main-table tbody tr:hover td, body.theme-slate .main-table tbody tr:hover td,
body.theme-muted .demo-table tbody tr:hover td, body.theme-slate .demo-table tbody tr:hover td {
  background: rgba(56, 189, 248, 0.1) !important;
}

/* KPI / Stat cards trong Muted Soft */
body.theme-muted .kpi-card, body.theme-slate .kpi-card,
body.theme-muted .stat-card, body.theme-slate .stat-card {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
}

body.theme-muted .kpi-val, body.theme-slate .kpi-val,
body.theme-muted .stat-value, body.theme-slate .stat-value,
body.theme-muted .stat-val, body.theme-slate .stat-val,
body.theme-muted .card-value, body.theme-slate .card-value {
  color: #ffffff !important;
}

body.theme-muted .quick-filters button, body.theme-slate .quick-filters button {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
}
body.theme-muted .quick-filters button:hover, body.theme-slate .quick-filters button:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
body.theme-muted .quick-filters button[aria-pressed="true"], body.theme-slate .quick-filters button[aria-pressed="true"] {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}
body.theme-muted .status-count, body.theme-slate .status-count {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}


/* ==========================================================================
   MUTED SOFT PRO REFINEMENT (Khử triệt để mảng trắng và tối ưu tương phản)
   ========================================================================== */
body.theme-muted .panel, body.theme-slate .panel,
body.theme-muted .report-section, body.theme-slate .report-section,
body.theme-muted .checkout-panel, body.theme-slate .checkout-panel,
body.theme-muted .services-panel, body.theme-slate .services-panel,
body.theme-muted .source-card, body.theme-slate .source-card,
body.theme-muted .nv-card, body.theme-slate .nv-card,
body.theme-muted .filter-box, body.theme-slate .filter-box {
  background: #334155 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

body.theme-muted .panel-head, body.theme-slate .panel-head,
body.theme-muted .report-section h3, body.theme-slate .report-section h3,
body.theme-muted .customer-bar, body.theme-slate .customer-bar {
  background: #243247 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

body.theme-muted .panel-title, body.theme-slate .panel-title,
body.theme-muted .report-section h3, body.theme-slate .report-section h3 {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

body.theme-muted .actions, body.theme-slate .actions {
  background: #243247 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

body.theme-muted .readonly-pill, body.theme-slate .readonly-pill {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #38bdf8 !important;
}

body.theme-muted .form-nhap, body.theme-slate .form-nhap {
  background: #243247 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: 5px solid var(--cyan) !important;
}

body.theme-muted .tab-btn, body.theme-slate .tab-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
body.theme-muted .tab-btn.active, body.theme-slate .tab-btn.active {
  background: #334155 !important;
  color: #38bdf8 !important;
  border-top: 4px solid var(--cyan) !important;
}

body.theme-muted .stat-grid .card, body.theme-slate .stat-grid .card {
  background: #334155 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 4px solid var(--cyan) !important;
}
body.theme-muted .report-section table, body.theme-slate .report-section table {
  background: #243247 !important;
}
body.theme-muted .report-section thead, body.theme-slate .report-section thead,
body.theme-muted .report-section thead tr, body.theme-slate .report-section thead tr,
body.theme-muted .report-section table tr:has(> th), body.theme-slate .report-section table tr:has(> th) {
  background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
  background-size: 100% 100% !important;
}
body.theme-muted .report-section th, body.theme-slate .report-section th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-muted .report-section th:last-child, body.theme-slate .report-section th:last-child {
  border-right: none !important;
}
body.theme-muted .report-section td, body.theme-slate .report-section td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
body.theme-muted .detail-row td, body.theme-slate .detail-row td,
body.theme-muted .detail-box, body.theme-slate .detail-box {
  background: #243247 !important;
  color: #f8fafc !important;
}
body.theme-muted .detail-box table th, body.theme-slate .detail-box table th {
  background: #1e293b !important;
  color: #ffffff !important;
}

body.theme-muted #table-history-main td [style*="color:#333"],
body.theme-muted #table-history-main td [style*="color: #333"],
body.theme-muted .history-box td [style*="color:#333"],
body.theme-muted .history-box td [style*="color: #333"] {
  color: #34d399 !important;
  font-weight: 800 !important;
}

body.theme-muted #table-history-main td [style*="color:var(--magenta)"],
body.theme-muted #table-history-main td [style*="color: var(--magenta)"],
body.theme-muted .history-box td [style*="color:var(--magenta)"],
body.theme-muted .history-box td [style*="color: var(--magenta)"] {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

body.theme-muted #table-history-main td [style*="color:red"],
body.theme-muted #table-history-main td [style*="color: red"],
body.theme-muted .history-box td [style*="color:red"],
body.theme-muted .history-box td [style*="color: red"] {
  color: #f87171 !important;
  font-weight: 800 !important;
}

body.theme-muted #table-history-main td [style*="color:#555"],
body.theme-muted #table-history-main td [style*="color: #555"],
body.theme-muted .history-box td [style*="color:#555"],
body.theme-muted .history-box td [style*="color: #555"] {
  color: #cbd5e1 !important;
}

body.theme-muted #table-history-main td:nth-child(2) span,
body.theme-muted .history-box td:nth-child(2) span {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}
body.theme-muted .history-customer-toggle {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Các quy tắc Muted Soft chuyên biệt trích xuất từ các trang D:\QuanLyGiaoXu\ManNhi_Print_Tech */
body.theme-muted {
            background-color: #1e293b !important;
            color: #f8fafc !important;
        }
body.theme-muted .bill-box,
        body.theme-muted .history-box {
            background: #334155 !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            color: #ffffff !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
        }
body.theme-muted .report-header { border-bottom-color: rgba(255, 255, 255, 0.12) !important; }
body.theme-muted .report-title h2 { color: #ffffff !important; }
body.theme-muted .report-title p { color: #cbd5e1 !important; }
body.theme-muted .btn-tool-header {
            background: rgba(255, 255, 255, 0.08) !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
            color: #f8fafc !important;
        }
body.theme-muted .btn-tool-header:hover {
            background: var(--cyan) !important;
            border-color: var(--cyan) !important;
            color: #ffffff !important;
        }
body.theme-muted .kpi-card {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .kpi-val { color: #ffffff !important; }
body.theme-muted .kpi-label { color: #cbd5e1 !important; }
body.theme-muted .kpi-sub { color: #94a3b8 !important; }
body.theme-muted .info-group label { color: #cbd5e1 !important; }
body.theme-muted .info-group input,
        body.theme-muted .info-group select,
        body.theme-muted #bang-san-pham input,
        body.theme-muted #bang-san-pham select,
        body.theme-muted #bang-san-pham textarea,
        body.theme-muted .select-kieu-in,
        body.theme-muted .input-format,
        body.theme-muted #timkiem-50-bill {
            background: #1e293b !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .info-group input:focus,
        body.theme-muted .info-group select:focus,
        body.theme-muted #bang-san-pham input:focus,
        body.theme-muted #bang-san-pham select:focus,
        body.theme-muted #bang-san-pham textarea:focus,
        body.theme-muted #timkiem-50-bill:focus {
            border-color: #38bdf8 !important;
            box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
        }
body.theme-muted .filter-bar {
            background: rgba(255, 255, 255, 0.04) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
body.theme-muted .form-field label { color: #cbd5e1 !important; }
body.theme-muted .form-field input,
        body.theme-muted .form-field select {
            background: rgba(15, 23, 42, 0.6) !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
            color: #ffffff !important;
        }
body.theme-muted .form-field input[readonly] {
            background: rgba(30, 41, 59, 0.8) !important;
            color: #e2e8f0 !important;
        }
body.theme-muted #sobill { color: #38bdf8 !important; }
body.theme-muted table.demo-table,
        body.theme-muted table.bill-table,
        body.theme-muted table.history-table {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-muted table.demo-table thead,
        body.theme-muted table.bill-table thead,
        body.theme-muted table.history-table thead {
            background: linear-gradient(90deg, #0f172a 0%, #1e3a5f 100%) !important;
        }
body.theme-muted table.demo-table th,
        body.theme-muted table.bill-table th,
        body.theme-muted table.history-table th {
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            background: transparent !important;
        }
body.theme-muted table.demo-table td,
        body.theme-muted table.bill-table td,
        body.theme-muted table.history-table td {
            background: transparent !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
            color: #f8fafc !important;
        }
body.theme-muted table.demo-table tbody tr:hover td,
        body.theme-muted table.bill-table tbody tr:hover td,
        body.theme-muted table.history-table tbody tr:hover td {
            background: rgba(0, 174, 239, 0.1) !important;
        }
body.theme-muted .stt-cell { color: #38bdf8 !important; }
body.theme-muted .thanhtien { color: #38bdf8 !important; }
body.theme-muted .deduct-pill {
            background: rgba(16, 185, 129, 0.2) !important;
            color: #6ee7b7 !important;
            border-color: rgba(16, 185, 129, 0.4) !important;
        }
body.theme-muted .deduct-pill.warning {
            background: rgba(245, 158, 11, 0.2) !important;
            color: #fcd34d !important;
            border-color: rgba(245, 158, 11, 0.4) !important;
        }
body.theme-muted .btn-row-move { color: #38bdf8 !important; }
body.theme-muted .btn-row-move:hover { color: #7dd3fc !important; }
body.theme-muted .summary-card {
            background: rgba(30, 41, 59, 0.7) !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .summary-table td:first-child { color: #cbd5e1 !important; }
body.theme-muted .summary-table td:nth-child(2) { color: #f8fafc !important; }
body.theme-muted .summary-table td:last-child { color: #94a3b8 !important; }
body.theme-muted .summary-divider { border-top-color: rgba(255, 255, 255, 0.15) !important; }
body.theme-muted .magenta-bold { color: #f472b6 !important; font-weight: 800 !important; }
body.theme-muted #conno { color: #f472b6 !important; font-weight: 800 !important; }
body.theme-muted .input-tam-ung {
            background: #1e293b !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted #tien-hang-view { color: #ffffff !important; }
body.theme-muted #tien-thue-view { color: #cbd5e1 !important; }
body.theme-muted #muc-vat {
            background: #1e293b !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .summary-container { border-top-color: rgba(255, 255, 255, 0.15) !important; }
body.theme-muted .btn-add,
body.theme-muted .btn-add-row,
body.theme-slate .btn-add,
body.theme-slate .btn-add-row,
[data-theme="muted"] .btn-add,
[data-theme="muted"] .btn-add-row,
[data-theme="slate"] .btn-add,
[data-theme="slate"] .btn-add-row {
            background: rgba(0, 174, 239, 0.12) !important;
            border-color: #38bdf8 !important;
            color: #38bdf8 !important;
        }
body.theme-muted .btn-tool-cyan {
            background: rgba(56, 189, 248, 0.15) !important;
            border-color: #38bdf8 !important;
            color: #38bdf8 !important;
        }
body.theme-muted .btn-tool-secondary {
            background: rgba(255, 255, 255, 0.08) !important;
            border-color: rgba(255, 255, 255, 0.16) !important;
            color: #cbd5e1 !important;
        }
body.theme-muted .btn-chip {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            color: #f8fafc !important;
        }
body.theme-muted .history-header h3 { color: #ffffff !important; }
body.theme-muted table.history-table td {
            background: rgba(30, 41, 59, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted table.history-table tr:hover td {
            background: rgba(56, 189, 248, 0.1) !important;
        }
body.theme-muted .bill-so-dathu {
            color: #4ade80 !important;
            background: rgba(16, 185, 129, 0.15) !important;
            border-color: rgba(16, 185, 129, 0.35) !important;
        }
body.theme-muted .bill-so-conno {
            color: #f472b6 !important;
            background: rgba(230, 0, 126, 0.15) !important;
            border-color: rgba(230, 0, 126, 0.35) !important;
        }
body.theme-muted .status-pill-dathu { color: #f8fafc !important; font-weight: 800; }
body.theme-muted .bill-creator-cell { color: #cbd5e1 !important; font-weight: 400 !important; }
body.theme-muted .customer-product-toggle { color: #ffffff !important; border-bottom-color: rgba(255, 255, 255, 0.3) !important; }
body.theme-muted .customer-product-toggle:hover { color: var(--cyan) !important; }
body.theme-muted table.history-table td small { color: #cbd5e1 !important; }
body.theme-muted .btn-mini-vip:disabled {
            background: rgba(255, 255, 255, 0.1) !important;
            color: #94a3b8 !important;
        }
body.theme-muted .modal-content,
        body.theme-muted .iframe-container {
            background: #334155 !important;
            color: #ffffff !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
        }
body.theme-muted .modal-content h3 { color: #ffffff !important; }
body.theme-muted .modal-content label { color: #cbd5e1 !important; }
body.theme-muted .modal-content input,
        body.theme-muted .modal-content select {
            background: #1e293b !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .modal-content div[style*="background:#f8fafc"],
        body.theme-muted .modal-content div[style*="background: #f8fafc"],
        body.theme-muted .modal-content div[style*="background:white"],
        body.theme-muted .modal-content div[style*="background: white"] {
            background: rgba(255, 255, 255, 0.06) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f8fafc !important;
        }
body.theme-muted .modal-content button[style*="background:white"],
        body.theme-muted .modal-content button[style*="background: white"],
        body.theme-muted .modal-content button[style*="background:#f9f9f9"],
        body.theme-muted .modal-content button[style*="background:#f0f9fd"],
        body.theme-muted .modal-content button[style*="background:#fffcf5"] {
            background: rgba(255, 255, 255, 0.08) !important;
            border-color: rgba(255, 255, 255, 0.16) !important;
            color: #ffffff !important;
        }
body.theme-muted #dim-modal-ten { color: #38bdf8 !important; }
body.theme-dark .modal-view-tabbar,
        body.theme-muted .modal-view-tabbar {
            border-bottom-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .btn-tab-view-modal,
        body.theme-muted .btn-tab-view-modal {
            background: #1e293b !important;
            color: #94a3b8 !important;
        }
body.theme-dark .btn-tab-view-modal.active,
        body.theme-muted .btn-tab-view-modal.active {
            background: rgba(0, 174, 239, 0.2) !important;
            color: #38bdf8 !important;
            border-bottom: 2px solid #38bdf8 !important;
        }
body.theme-dark .view-bill-meta-box,
        body.theme-muted .view-bill-meta-box {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-meta-title,
        body.theme-muted .view-bill-meta-title {
            color: #ffffff !important;
        }
body.theme-dark .view-bill-meta-sub,
        body.theme-muted .view-bill-meta-sub {
            color: #94a3b8 !important;
        }
body.theme-dark .view-bill-table thead,
        body.theme-dark .view-bill-history-table thead,
        body.theme-dark .view-bill-table thead tr,
        body.theme-dark .view-bill-history-table thead tr {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-muted .view-bill-table thead,
        body.theme-muted .view-bill-history-table thead,
        body.theme-muted .view-bill-table thead tr,
        body.theme-muted .view-bill-history-table thead tr {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-dark .view-bill-table th,
        body.theme-muted .view-bill-table th,
        body.theme-dark .view-bill-history-table th,
        body.theme-muted .view-bill-history-table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .view-bill-table td,
        body.theme-muted .view-bill-table td,
        body.theme-dark .view-bill-history-table td,
        body.theme-muted .view-bill-history-table td {
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-table td strong,
        body.theme-muted .view-bill-table td strong {
            color: #ffffff !important;
        }
body.theme-dark .view-bill-total-box,
        body.theme-muted .view-bill-total-box,
        body.theme-dark .view-bill-history-info,
        body.theme-muted .view-bill-history-info {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-total-box b,
        body.theme-muted .view-bill-total-box b {
            color: #ffffff !important;
        }
body.theme-dark .view-bill-empty-history,
        body.theme-muted .view-bill-empty-history {
            background: rgba(15, 23, 42, 0.4) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #94a3b8 !important;
        }
body.theme-muted .modal-bom-header {
            border-bottom-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .modal-bom-title {
            color: #ffffff !important;
        }
body.theme-muted .modal-bom-close {
            color: #cbd5e1 !important;
        }
body.theme-muted .modal-bom-close:hover {
            color: #ffffff !important;
        }
body.theme-muted .modal-bom-topbox {
            background: rgba(15, 23, 42, 0.5) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .modal-bom-label {
            color: #cbd5e1 !important;
        }
body.theme-muted .modal-bom-input {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .modal-bom-sec-title {
            color: #ffffff !important;
        }
body.theme-muted .modal-bom-table-wrap {
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .modal-bom-table thead,
body.theme-muted .modal-bom-table thead tr {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-muted .modal-bom-table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .modal-bom-table td {
            background: rgba(30, 41, 59, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted .modal-bom-table-input {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .modal-bom-tfoot-row {
            background: rgba(15, 23, 42, 0.6) !important;
            border-top-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .modal-bom-tfoot-label {
            color: #cbd5e1 !important;
        }
body.theme-muted .modal-bom-pricing-bar {
            background: rgba(15, 23, 42, 0.6) !important;
            border-color: rgba(56, 189, 248, 0.3) !important;
        }
body.theme-muted .modal-bom-lo-label {
            color: #cbd5e1 !important;
        }
body.theme-muted .modal-bom-lo-val {
            color: #38bdf8 !important;
        }
body.theme-muted .modal-bom-dongia-box {
            background: #1e293b !important;
        }
body.theme-muted .modal-bom-dongia-input {
            background: #0f172a !important;
        }
body.theme-muted .modal-bom-note {
            color: #cbd5e1 !important;
        }
body.theme-muted .btn-bom-btn {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
            color: #38bdf8 !important;
        }
body.theme-muted .btn-bom-btn:hover {
            background: #334155 !important;
            color: #ffffff !important;
        }
body.theme-muted .btn-bom-btn.btn-bom-del {
            background: rgba(239, 68, 68, 0.18) !important;
            border-color: rgba(239, 68, 68, 0.35) !important;
            color: #fca5a5 !important;
        }
body.theme-muted .btn-bom-btn.btn-bom-del:hover {
            background: rgba(239, 68, 68, 0.3) !important;
            color: #ffffff !important;
        }
body.theme-muted .modal-bom-btn-cancel {
            background: rgba(255, 255, 255, 0.1) !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
            color: #ffffff !important;
        }
body.theme-muted .pagination-container {
            background: rgba(36, 50, 71, 0.92) !important;
            border: 1px solid rgba(148, 163, 184, 0.35) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        }
body.theme-muted .pag-info { color: #cbd5e1 !important; }
body.theme-muted .pag-btn {
            background: rgba(255, 255, 255, 0.07) !important;
            color: #e2e8f0 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .pag-btn:hover:not(:disabled) {
            background: rgba(56, 189, 248, 0.2) !important;
            color: #38bdf8 !important;
            border-color: #38bdf8 !important;
        }
body.theme-muted .pag-btn.active {
            background: #38bdf8 !important;
            color: #0f172a !important;
            font-weight: 800 !important;
            border-color: #38bdf8 !important;
        }
body.theme-muted .bill-box,
        body.theme-muted .history-box {
            background: #334155 !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            color: #ffffff !important;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
        }
body.theme-muted .kpi-card {
            background: rgba(30, 41, 59, 0.7) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
body.theme-muted .filter-bar {
            background: rgba(30, 41, 59, 0.6) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
body.theme-muted .form-field input,
        body.theme-muted .form-field select,
        body.theme-muted #search {
            background: #1e293b !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted #search::placeholder {
            color: #94a3b8 !important;
        }
body.theme-muted .form-field input[readonly] {
            background: #243247 !important;
            color: #94a3b8 !important;
        }
body.theme-muted table.demo-table {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted table.demo-table thead {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
        }
body.theme-muted table.demo-table th {
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted table.demo-table td {
            border-color: rgba(255, 255, 255, 0.08) !important;
            color: #f8fafc !important;
        }
body.theme-muted #bang-san-pham input,
        body.theme-muted #bang-san-pham textarea {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .summary-card {
            background: rgba(30, 41, 59, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .summary-container { border-top-color: rgba(255, 255, 255, 0.12) !important; }
body.theme-muted .btn-act-dark {
            background: rgba(255, 255, 255, 0.08) !important;
            border: 1px solid rgba(255, 255, 255, 0.16) !important;
            color: #f8fafc !important;
        }
body.theme-muted .compact-products { border-top-color: rgba(255,255,255,0.15) !important; color: #cbd5e1 !important; }
body.theme-muted .compact-product-head { color: #94a3b8 !important; }
body.theme-muted .compact-product-row { border-top-color: rgba(255,255,255,0.1) !important; }
body.theme-muted .compact-product-name { color: #f8fafc !important; }
body.theme-muted .customer-product-toggle { color: #f8fafc !important; border-bottom-color: rgba(255,255,255,0.3) !important; }
body.theme-muted .report-view {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #ffffff !important;
            box-shadow: 0 15px 35px rgba(0,0,0,0.35) !important;
        }
body.theme-muted .kpi-card {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted .kpi-val, body.theme-muted .card-value { color: #ffffff !important; }
body.theme-muted .filter-bar {
            background: rgba(15, 23, 42, 0.5) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-muted .filter-grid input,
        body.theme-muted #input-admin-pass {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
            color: #ffffff !important;
        }
body.theme-muted .demo-table, body.theme-muted table {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .demo-table thead, body.theme-muted table thead,
body.theme-muted .view-table thead, body.theme-muted .view-table thead tr {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
            background-size: 100% 100% !important;
            color: #ffffff !important;
            border-color: rgba(255,255,255,0.12) !important;
        }
body.theme-muted .view-table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255,255,255,0.12) !important;
        }
body.theme-muted .demo-table td, body.theme-muted table td,
        body.theme-muted .view-table td {
            border-color: rgba(255, 255, 255, 0.08) !important;
            color: #f8fafc !important;
        }
body.theme-muted .demo-table tbody tr:hover td, body.theme-muted table tr:hover td {
            background: rgba(56, 189, 248, 0.1) !important;
        }
body.theme-muted .modal-content,
        body.theme-muted .modal-iframe-content,
        body.theme-muted .modal-iframe-header {
            background: #1e293b !important;
            color: #ffffff !important;
            border-color: rgba(255,255,255,0.18) !important;
        }
body.theme-muted .modal-iframe-body { background: #1e293b !important; }
body.theme-muted .tag-bill {
            border-color: rgba(255, 255, 255, 0.15);
        }
body.theme-muted .status-pill-dathu { color: #38bdf8 !important; }
body.theme-muted .status-pill-conno { color: #f472b6 !important; }
body.theme-muted .bill-creator-cell { color: #94a3b8 !important; }
body.theme-muted .modal-view-tabbar {
            border-bottom-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .btn-tab-view-modal {
            background: #1e293b !important;
            color: #94a3b8 !important;
        }
body.theme-muted .btn-tab-view-modal.active {
            background: rgba(0, 174, 239, 0.2) !important;
            color: #38bdf8 !important;
            border-bottom: 2px solid #38bdf8 !important;
        }
body.theme-muted .view-bill-meta-box {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f1f5f9 !important;
        }
body.theme-muted .view-bill-meta-title { color: #ffffff !important; }
body.theme-muted .view-bill-meta-sub { color: #94a3b8 !important; }
body.theme-muted .view-bill-table thead,
        body.theme-muted .view-bill-history-table thead,
        body.theme-muted .view-bill-table thead tr,
        body.theme-muted .view-bill-history-table thead tr {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-muted .view-bill-table th,
        body.theme-muted .view-bill-history-table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .view-bill-table td,
        body.theme-muted .view-bill-history-table td {
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted .view-bill-table td strong { color: #ffffff !important; }
body.theme-muted .view-bill-total-box,
        body.theme-muted .view-bill-history-info {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f8fafc !important;
        }
body.theme-muted .view-bill-total-box b { color: #ffffff !important; }
body.theme-muted .view-bill-empty-history {
            background: rgba(15, 23, 42, 0.4) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #94a3b8 !important;
        }
body.theme-muted .pagination-container {
            background: rgba(30, 41, 59, 0.92) !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        }
body.theme-muted .pag-btn {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #cbd5e1 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .pag-btn:hover:not(:disabled) {
            border-color: var(--cyan) !important;
            background: rgba(0, 174, 239, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .pag-btn.active {
            background: var(--cyan) !important;
            color: #ffffff !important;
            border-color: var(--cyan) !important;
            box-shadow: 0 0 12px rgba(0, 174, 239, 0.4) !important;
        }
body.theme-muted {
            --card-bg: #334155;
            --table-bg: #243247;
            --text-main: #f8fafc;
            --text-muted: #cbd5e1;
            --border-color: rgba(255, 255, 255, 0.14);
            --input-bg: #1e293b;
            --input-border: rgba(255, 255, 255, 0.18);
            background-color: #1e293b !important;
            color: #f8fafc !important;
        }
body.theme-muted .report-view,
        body.theme-muted .content-box {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
        }
body.theme-muted .kpi-card {
            background: rgba(30, 41, 59, 0.85) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .main-table,
        body.theme-muted table {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .main-table td,
        body.theme-muted table td {
            background: #243247 !important;
            color: #f8fafc !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
            border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
body.theme-muted .modal-content {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
            color: #f8fafc !important;
        }
body.theme-muted .modal-content table {
            background: #243247 !important;
        }
body.theme-muted .modal-content td {
            background: #243247 !important;
            color: #f8fafc !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
            border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
body.theme-muted .main-table thead,
body.theme-muted .main-table thead tr {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-muted th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
        }
body.theme-muted .filter-panel-box {
            background: rgba(30, 41, 59, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .btn-qd {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            color: #cbd5e1 !important;
        }
body.theme-muted .cust-code-badge {
            color: #38bdf8 !important;
            background: rgba(56, 189, 248, 0.15) !important;
            border-color: rgba(56, 189, 248, 0.3) !important;
        }
body.theme-muted .cell-stt { color: #cbd5e1 !important; }
body.theme-muted .cust-name { color: #f8fafc !important; }
body.theme-muted .cust-note { color: #cbd5e1 !important; }
body.theme-muted .txt-addr { color: #f1f5f9 !important; }
body.theme-muted .txt-phone-email { color: #cbd5e1 !important; }
body.theme-muted .contact-name { color: #f8fafc !important; }
body.theme-muted .contact-phone { color: #38bdf8 !important; }
body.theme-muted .contact-dept { color: #cbd5e1 !important; }
body.theme-muted {
            --primary: #1e293b;
            --card-bg: #334155;
            --table-bg: #243247;
            --text-main: #f8fafc;
            --text-muted: #cbd5e1;
            --border-color: rgba(255, 255, 255, 0.14);
            --input-bg: #1e293b;
            --input-border: rgba(255, 255, 255, 0.18);
            background-color: #1e293b !important;
            color: #f8fafc !important;
        }
body.theme-muted input:-webkit-autofill,
        body.theme-muted select:-webkit-autofill {
            -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
            -webkit-text-fill-color: #ffffff !important;
            box-shadow: 0 0 0 1000px #1e293b inset !important;
            caret-color: #ffffff !important;
        }
body.theme-muted .header-only-title,
        body.theme-muted .header-bottom,
        body.theme-muted .stat-card,
        body.theme-muted .detail-container,
        body.theme-muted .filter-detail {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .main-table {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .main-table thead {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
        }
body.theme-muted .main-table th {
            border-right: 1px solid rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .main-table td {
            color: #f8fafc !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
            border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
body.theme-muted .main-table tbody tr:hover td {
            background: rgba(56, 189, 248, 0.1) !important;
        }
body.theme-muted .filter-inputs input[type="date"],
        body.theme-muted .search-wrapper input,
        body.theme-muted .filter-detail input[type="date"] {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #f8fafc !important;
        }
body.theme-muted .customer-name { color: #38bdf8 !important; }
body.theme-muted .debt-old { color: #cbd5e1 !important; }
body.theme-muted .debt-advance { color: #fbbf24 !important; }
body.theme-muted .report-view {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .filter-panel-box {
            background: rgba(15, 23, 42, 0.5) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .status-and-kpi-bar {
            background: rgba(15, 23, 42, 0.4) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .kpi-pill {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .detail-sheet-wrap {
            background: #334155 !important;
            color: #f8fafc !important;
        }
body.theme-muted .detail-sheet-table {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .detail-sheet-table thead {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
        }
body.theme-muted .detail-sheet-table td {
            color: #f8fafc !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
        }
body.theme-muted .detail-bill-row {
            background: rgba(56, 189, 248, 0.12) !important;
        }
body.theme-muted .detail-bill-row td {
            border-top-color: rgba(56, 189, 248, 0.35) !important;
        }
body.theme-muted .meta-customer-name { color: #38bdf8 !important; }
body.theme-muted .pagination-container {
            background: rgba(30, 41, 59, 0.95);
            border-color: rgba(148, 163, 184, 0.3);
            color: #f8fafc;
        }
body.theme-muted .pag-btn {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.15);
            color: #f8fafc;
        }
body.theme-muted .pag-btn:hover:not(:disabled) {
            background: rgba(148, 163, 184, 0.3);
            border-color: #94a3b8;
            color: #ffffff;
        }
body.theme-muted .pag-btn.active {
            background: #64748b !important;
            border-color: #94a3b8 !important;
            color: #ffffff !important;
        }
body.theme-muted {
            --bg-body: #1e293b;
            --surface-card: #334155;
            --surface-inner: rgba(30, 41, 59, 0.85);
            --border-subtle: rgba(255, 255, 255, 0.15);
            --text-main: #f8fafc;
            --text-muted: #cbd5e1;
            background-color: #1e293b !important;
            color: #f8fafc !important;
        }
body.theme-muted .kpi-card {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .filter-grid {
            background: rgba(15, 23, 42, 0.5) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted input, 
        body.theme-muted select, 
        body.theme-muted textarea {
            background-color: #1e293b !important;
            color: #f8fafc !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
        }
body.theme-muted .demo-table {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .demo-table thead {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
        }
body.theme-muted .demo-table td {
            color: #f8fafc !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
            border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
        }
body.theme-muted .act-menu {
            background: #1e293b !important;
            border-color: rgba(56, 189, 248, 0.35) !important;
        }
body.theme-muted .stat-item-box {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f8fafc !important;
        }
body.theme-muted #box-bill-no {
            background: rgba(15, 23, 42, 0.8) !important;
            border-color: rgba(56, 189, 248, 0.4) !important;
        }
body.theme-muted #box-tom-tat-thu {
            background: rgba(56, 189, 248, 0.12) !important;
            border-color: rgba(56, 189, 248, 0.35) !important;
        }
body.theme-muted .content-box {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .form-card,
        body.theme-muted .tabs-modern {
            background: rgba(30, 41, 59, 0.85) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .kpi-card {
            background: rgba(30, 41, 59, 0.8) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .form-card input,
        body.theme-muted .form-card select {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
        }
body.theme-muted table thead,
body.theme-muted table thead tr,
body.theme-muted table tr:has(> th) {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-muted table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted table td {
            border-bottom-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted .modal-card {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
        }
body.theme-muted .search-input-vattu {
            background: #1e293b !important;
            color: #f8fafc !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
        }
body.theme-muted .form-card,
        body.theme-muted .panel,
        body.theme-muted .tabs-modern {
            background: rgba(30, 41, 59, 0.85) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted input,
        body.theme-muted select {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted table.data-table thead {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
        }
body.theme-muted table.data-table td {
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted .bottom-bar,
        body.theme-muted .filter-bar,
        body.theme-muted .panel-head {
            background: rgba(30, 41, 59, 0.95) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .detail-card {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted input:-webkit-autofill,
body.theme-muted input:-webkit-autofill:hover, 
body.theme-muted input:-webkit-autofill:focus,
body.theme-muted select:-webkit-autofill,
body.theme-muted textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 0 0 1000px #1e293b inset !important;
    caret-color: #ffffff !important;
}
body.theme-muted {
    --bg: #1e293b;
    --card-bg: #334155;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --input-bg: #1e293b;
    --input-border: rgba(255, 255, 255, 0.15);
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
body.theme-muted .head h1 { color: #ffffff !important; }
body.theme-muted .card h3 { color: #38bdf8 !important; }
body.theme-muted #view-modal .modal-box {
    background: #1e293b !important;
}
body.theme-muted .vat-sheet {
    background: #273549;
    border-color: rgba(255, 255, 255, 0.1);
}
body.theme-muted .badge.NHAP,
body.theme-muted .NHAP { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; border-color: rgba(245, 158, 11, 0.4) !important; }
body.theme-muted .badge.DA_XAC_NHAN,
body.theme-muted .DA_XAC_NHAN { background: rgba(56, 189, 248, 0.2) !important; color: #38bdf8 !important; border-color: rgba(56, 189, 248, 0.4) !important; }
body.theme-muted .badge.DA_PHAT_HANH,
body.theme-muted .DA_PHAT_HANH { background: rgba(16, 185, 129, 0.2) !important; color: #34d399 !important; border-color: rgba(16, 185, 129, 0.4) !important; }
body.theme-muted .badge.DA_HUY,
body.theme-muted .DA_HUY { background: rgba(239, 68, 68, 0.2) !important; color: #f87171 !important; border-color: rgba(239, 68, 68, 0.4) !important; }
body.theme-muted input:-webkit-autofill,
body.theme-muted input:-webkit-autofill:hover, 
body.theme-muted input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 0 0 1000px #1e293b inset !important;
    caret-color: #ffffff !important;
}
body.theme-muted {
    background: #1e293b !important;
    color: #f8fafc !important;
}
body.theme-muted .head p { color: #cbd5e1 !important; }
body.theme-muted .nav, body.theme-muted .panel {
    background: #334155 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    color: #f8fafc !important;
}
body.theme-muted .panel h2 { color: #ffffff !important; }
body.theme-muted .desc { color: #cbd5e1 !important; }
body.theme-muted .field {
    background: rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-muted .field label { color: #ffffff !important; }
body.theme-muted .hint { color: #cbd5e1 !important; }
body.theme-muted input, body.theme-muted select {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.theme-muted .nav button { color: #cbd5e1 !important; }
body.theme-muted .nav button:hover { background: rgba(255, 255, 255, 0.08) !important; color: #ffffff !important; }
body.theme-muted .nav button.active { background: linear-gradient(135deg, #00aeef, #0284c7) !important; color: #ffffff !important; }
body.theme-muted .reset { background: rgba(0, 0, 0, 0.2) !important; color: #cbd5e1 !important; border: 1px solid rgba(255, 255, 255, 0.12) !important; }
body.theme-muted {
            --primary: #1e293b;
            --card-bg: #334155;
            --table-bg: #243247;
            --text-main: #f8fafc;
            --text-muted: #cbd5e1;
            --border-color: rgba(255, 255, 255, 0.14);
            --input-bg: #1e293b;
            background: #1e293b !important;
            color: #f8fafc !important;
        }
body.theme-muted .page-header { border-bottom-color: rgba(255, 255, 255, 0.12); }
body.theme-muted .header-title h1 { color: #ffffff; }
body.theme-muted .header-title p { color: #cbd5e1; }
body.theme-muted .card {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
            box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
        }
body.theme-muted .card-header { border-bottom-color: rgba(255, 255, 255, 0.12); }
body.theme-muted .card-title { color: #ffffff; }
body.theme-muted .admin-nav-tabs { border-bottom-color: rgba(255, 255, 255, 0.14); }
body.theme-muted .tab-btn {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.14);
            color: #cbd5e1;
        }
body.theme-muted .tab-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }
body.theme-muted .tab-btn.active {
            background: linear-gradient(135deg, rgba(0, 174, 239, 0.3), rgba(0, 174, 239, 0.12)) !important;
            border-color: var(--cyan) !important;
            color: #38bdf8 !important;
        }
body.theme-muted .table-search-box {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
        }
body.theme-muted .table-search-box input {
            color: #f8fafc !important;
        }
body.theme-muted .table-filter-select {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
            color: #f8fafc !important;
        }
body.theme-muted .table-filter-select option {
            background: #1e293b !important;
            color: #f8fafc !important;
        }
body.theme-muted .admin-table {
            background: #243247 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .admin-table thead {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
        }
body.theme-muted .admin-table th {
            color: #ffffff !important;
            border-right: 1px solid rgba(255, 255, 255, 0.14) !important;
            background: transparent !important;
        }
body.theme-muted .admin-table td {
            color: #f8fafc !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
            border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
        }
body.theme-muted .admin-table tbody tr:hover td {
            background: rgba(56, 189, 248, 0.1) !important;
        }
body.theme-muted .user-name-txt:not(.locked) { color: #f8fafc !important; }
body.theme-muted .user-log-time { color: #f1f5f9 !important; }
body.theme-muted .user-log-device { color: #94a3b8 !important; }
body.theme-muted .modal-box {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
            color: #f8fafc !important;
        }
body.theme-muted .creator-card,
        body.theme-muted .creator-section-box,
        body.theme-muted .sec-card-box,
        body.theme-muted .perm-group-box {
            background: rgba(15, 23, 42, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .input-group input,
        body.theme-muted .input-group select {
            background: #1e293b !important;
            color: #f8fafc !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
        }
body.theme-muted .mm-role-item {
            background: rgba(15, 23, 42, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .mm-role-item:hover {
            background: rgba(56, 189, 248, 0.1) !important;
            border-color: var(--cyan) !important;
        }
body.theme-muted .mm-role-item.active {
            background: rgba(56, 189, 248, 0.18) !important;
            border-color: var(--cyan) !important;
        }
body.theme-muted .mm-role-title {
            color: #f8fafc !important;
        }
body.theme-muted {
            --bg: #1e293b;
            --panel-bg: #334155;
            --border-c: rgba(255, 255, 255, 0.1);
            --text-main: #f8fafc;
            --text-muted: #cbd5e1;
            --input-bg: #1e293b;
            --input-border: rgba(255, 255, 255, 0.15);
            background-color: #1e293b !important;
            color: #f8fafc !important;
        }
body.theme-muted .executive-title h1 { color: #ffffff !important; }
body.theme-muted .report-section-title { color: #38bdf8 !important; }
body.theme-muted .card-value { color: #ffffff !important; }
body.theme-muted .bill-box {
            background: #334155 !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            color: #ffffff !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
        }
body.theme-muted .kpi-card {
            background: rgba(30, 41, 59, 0.75) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-muted .filter-bar {
            background: rgba(30, 41, 59, 0.85) !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .toolbar-group label { color: #cbd5e1 !important; }
body.theme-muted .select-input,
        body.theme-muted .filter-bar input,
        body.theme-muted .filter-bar select {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted #alert-status {
            background: rgba(56, 189, 248, 0.15) !important;
            border-color: rgba(56, 189, 248, 0.3) !important;
            color: #bae6fd !important;
            border-left: 4px solid #38bdf8 !important;
        }
body.theme-muted table.price-table {
            border-color: rgba(255, 255, 255, 0.15) !important;
            background: #1e293b !important;
        }
body.theme-muted table.price-table thead {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
        }
body.theme-muted table.price-table td {
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted table.price-table tbody tr:nth-child(even) {
            background: rgba(255, 255, 255, 0.03) !important;
        }
body.theme-muted table.price-table tbody tr:hover {
            background: rgba(56, 189, 248, 0.1) !important;
        }
body.theme-muted #row-them-moi td {
            background: #243247 !important;
        }
body.theme-muted #row-them-moi input,
        body.theme-muted #row-them-moi select {
            background: #1e293b !important;
            border-color: rgba(56, 189, 248, 0.4) !important;
            color: #ffffff !important;
        }
body.theme-muted .tier-pill {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #f8fafc !important;
        }
body.theme-muted .modal-content {
            background: #334155 !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
        }
body.theme-muted .modal-content input,
        body.theme-muted .modal-content select {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .modal-content table.price-table {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-muted .modal-content table.price-table td {
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-muted .footer-action {
            border-top-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .form-group input,
        body.theme-muted .form-group select,
        body.theme-muted .filter-bar input,
        body.theme-muted .filter-bar select {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-muted .status-pill.ok {
            background: rgba(16, 185, 129, 0.2) !important;
            border-color: rgba(16, 185, 129, 0.4) !important;
            color: #34d399 !important;
        }
body.theme-muted .status-pill.danger {
            background: rgba(239, 68, 68, 0.2) !important;
            border-color: rgba(239, 68, 68, 0.4) !important;
            color: #f87171 !important;
        }
body.theme-muted .main-stage {
            background: #1e293b !important;
        }
body.theme-muted .top-nav-bar {
            background: #1e293b !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted #current-title {
            color: #ffffff !important;
        }
body.theme-muted .report-view {
            background: #334155 !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35) !important;
        }
body.theme-muted .kpi-card {
            background: #334155 !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .filter-bar {
            background: rgba(15, 23, 42, 0.5) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
body.theme-muted .filter-grid input,
        body.theme-muted .filter-grid select {
            background: #1e293b !important;
            color: #f8fafc !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
        }
body.theme-muted .demo-table {
            background: #243247 !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .demo-table th {
            color: #ffffff !important;
            border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .demo-table tbody tr:hover td {
            background: rgba(56, 189, 248, 0.1) !important;
        }
body.theme-muted .demo-table tfoot tr {
            background: rgba(15, 23, 42, 0.4) !important;
        }
body.theme-muted .tag-bill-cyan { background: rgba(56, 189, 248, 0.15) !important; color: #38bdf8 !important; border-color: rgba(56, 189, 248, 0.35) !important; }
body.theme-muted .tag-bill-amber { background: rgba(245, 158, 11, 0.15) !important; color: #fbbf24 !important; border-color: rgba(245, 158, 11, 0.35) !important; }
body.theme-muted .tag-bill-emerald { background: rgba(16, 185, 129, 0.15) !important; color: #34d399 !important; border-color: rgba(16, 185, 129, 0.35) !important; }
body.theme-muted .tag-bill-magenta { background: rgba(236, 72, 153, 0.15) !important; color: #f472b6 !important; border-color: rgba(236, 72, 153, 0.35) !important; }
body.theme-muted .tag-bill-muted { background: rgba(148, 163, 184, 0.15) !important; color: #94a3b8 !important; border-color: rgba(148, 163, 184, 0.3) !important; }
body.theme-muted .status-badge-emerald { background: rgba(16, 185, 129, 0.18) !important; color: #34d399 !important; border-color: rgba(16, 185, 129, 0.4) !important; }
body.theme-muted .status-badge-amber { background: rgba(245, 158, 11, 0.18) !important; color: #fbbf24 !important; border-color: rgba(245, 158, 11, 0.4) !important; }
body.theme-muted .status-badge-cyan { background: rgba(56, 189, 248, 0.18) !important; color: #38bdf8 !important; border-color: rgba(56, 189, 248, 0.4) !important; }
body.theme-muted .status-badge-magenta { background: rgba(236, 72, 153, 0.18) !important; color: #f472b6 !important; border-color: rgba(236, 72, 153, 0.4) !important; }
body.theme-muted .status-badge-muted { background: rgba(148, 163, 184, 0.18) !important; color: #cbd5e1 !important; border-color: rgba(148, 163, 184, 0.35) !important; }
body.theme-muted .pro-status-bar {
            background: #1e293b !important;
            border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        }
body.theme-muted .shell-pag-btn {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #cbd5e1 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-muted .shell-pag-btn:hover:not(:disabled) {
            border-color: #00aeef !important;
            color: #ffffff !important;
            background: rgba(0, 174, 239, 0.25) !important;
        }
body.theme-muted .shell-pag-btn.active {
            background: #00aeef !important;
            color: #ffffff !important;
            border-color: #00aeef !important;
            box-shadow: 0 0 8px rgba(0, 174, 239, 0.4) !important;
        }
body.theme-muted .shell-pag-info { color: #cbd5e1 !important; }
body.theme-muted .dropdown-panel {
            background: #1e293b !important;
            border-color: rgba(255, 255, 255, 0.18) !important;
        }

/* ==========================================================================
   3. 🌙 GIAO DIỆN DARK TECH (CYBER DARK - ĐẬM CÔNG NGHỆ)
   Đồng bộ 100% chuẩn D:\QuanLyGiaoXu\ManNhi_Print_Tech & demo_menu.html
   ========================================================================== */
body.theme-dark, [data-theme="dark"] {
  --primary: #090e1a;
  --bg: #090e1a;
  --card-bg: #0f172a;
  --card-border: rgba(255, 255, 255, 0.1);
  --table-bg: #0d1527;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --input-bg: rgba(7, 13, 24, 0.85);
  --input-border: rgba(255, 255, 255, 0.14);
  --table-th-bg: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%);
  --table-th-text: #ffffff;
  --table-border: rgba(255, 255, 255, 0.1);
  --table-hover: rgba(0, 174, 239, 0.09);
}

body.theme-dark {
  background-color: #090e1a !important;
  color: #f1f5f9 !important;
}

/* Autofill fix cho Dark Tech */
body.theme-dark input:-webkit-autofill,
body.theme-dark select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #070d18 inset !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  box-shadow: 0 0 0 1000px #070d18 inset !important;
  caret-color: #f1f5f9 !important;
}

/* Khối Cards & Containers chung cho Dark Tech */
body.theme-dark .card,
body.theme-dark .wrap,
body.theme-dark .wrap-card,
body.theme-dark .dashboard,
body.theme-dark .customer-box,
body.theme-dark .debt-box,
body.theme-dark .bill-box,
body.theme-dark .history-box,
body.theme-dark .convert-box,
body.theme-dark .detail-box,
body.theme-dark .filter-box,
body.theme-dark .lock-box,
body.theme-dark .console-box,
body.theme-dark .preview-card,
body.theme-dark .icon-style-card,
body.theme-dark .icon-preview-box,
body.theme-dark .report-view,
body.theme-dark .content-box,
body.theme-dark .input-card,
body.theme-dark .table-container,
body.theme-dark .modal-content,
body.theme-dark .modal-box,
body.theme-dark .modal-iframe-content,
body.theme-dark .box,
body.theme-dark .bill-stats-bar,
body.theme-dark .vattu-card,
body.theme-dark .stats-bar,
body.theme-dark .stats-grid,
body.theme-dark .header-area,
body.theme-dark .history-wrap {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45) !important;
}

/* Headers của trang trong Dark Tech */
body.theme-dark .header-only-title,
body.theme-dark .header-bottom,
body.theme-dark .page-header,
body.theme-dark .header,
body.theme-dark .buyer-info-header,
body.theme-dark .bill-picker-header,
body.theme-dark .top-nav-bar,
body.theme-dark .report-header,
body.theme-dark .history-header {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body.theme-dark .quick-filters {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Headings & Text trong Dark Tech */
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark .main-title,
body.theme-dark .report-title h2 {
  color: #ffffff !important;
}

body.theme-dark label,
body.theme-dark .sub-title,
body.theme-dark .report-title p,
body.theme-dark .filter-summary,
body.theme-dark .quick-filter-label,
body.theme-dark .kpi-label,
body.theme-dark .stat-label,
body.theme-dark .stat-lbl {
  color: #94a3b8 !important;
}

/* Inputs & Form Controls trong Dark Tech */
body.theme-dark input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body.theme-dark select,
body.theme-dark textarea {
  background: rgba(7, 13, 24, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  border-color: #00aeef !important;
  box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.25) !important;
  outline: none !important;
}

/* Bảng biểu trong Dark Tech */
body.theme-dark table,
body.theme-dark .main-table,
body.theme-dark .demo-table,
body.theme-dark .bill-table,
body.theme-dark .history-table,
body.theme-dark .summary-table,
body.theme-dark .stock-table,
body.theme-dark .customer-table,
body.theme-dark .view-table {
  background: #0d1527 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.theme-dark thead,
body.theme-dark thead tr,
body.theme-dark table tr:has(> th),
body.theme-dark .main-table thead,
body.theme-dark .demo-table thead,
body.theme-dark .bill-table thead {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.theme-dark th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.theme-dark td,
body.theme-dark .main-table td,
body.theme-dark .demo-table td,
body.theme-dark .bill-table td,
body.theme-dark .history-table td {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

body.theme-dark tbody tr:hover td,
body.theme-dark .main-table tbody tr:hover td,
body.theme-dark .demo-table tbody tr:hover td {
  background: rgba(0, 174, 239, 0.09) !important;
}

/* KPI / Stat cards trong Dark Tech */
body.theme-dark .kpi-card,
body.theme-dark .stat-card {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

body.theme-dark .kpi-val,
body.theme-dark .stat-value,
body.theme-dark .stat-val,
body.theme-dark .card-value {
  color: #ffffff !important;
}

body.theme-dark .quick-filters button {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
}
body.theme-dark .quick-filters button:hover {
  background: rgba(0, 174, 239, 0.2) !important;
  border-color: #00aeef !important;
  color: #ffffff !important;
}
body.theme-dark .quick-filters button[aria-pressed="true"] {
  background: linear-gradient(135deg, #00aeef, #0284c7) !important;
  border-color: #00aeef !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(0, 174, 239, 0.4) !important;
}
body.theme-dark .status-count {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
}


/* ==========================================================================
   DARK TECH PRO CYBER REFINEMENT (KHẮC PHỤC TRIỆT ĐỂ LỖI ĐỘ TƯƠNG PHẢN & VẾT TRẮNG)
   Chuẩn hóa giao diện High-Tech Cyber Dark siêu sắc nét, rõ ràng và đẳng cấp
   ========================================================================== */

/* 1. KHẮC PHỤC CÁC KHỐI PANEL / REPORT-SECTION BỊ TRẮNG */
body.theme-dark .panel,
body.theme-dark .report-section,
body.theme-dark .checkout-panel,
body.theme-dark .services-panel,
body.theme-dark .source-card,
body.theme-dark .nv-card,
body.theme-dark .filter-box {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45) !important;
}

body.theme-dark .panel-head,
body.theme-dark .report-section h3,
body.theme-dark .customer-bar {
  background: #111a2e !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body.theme-dark .panel-title,
body.theme-dark .report-section h3 {
  color: #38bdf8 !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

body.theme-dark .actions {
  background: #111a2e !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

body.theme-dark .readonly-pill {
  background: rgba(7, 13, 24, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

body.theme-dark .form-nhap {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 5px solid var(--cyan) !important;
}

body.theme-dark .tab-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #94a3b8 !important;
}
body.theme-dark .tab-btn.active {
  background: #0f172a !important;
  color: #38bdf8 !important;
  border-top: 4px solid var(--cyan) !important;
  box-shadow: 0 -2px 10px rgba(0, 174, 239, 0.3) !important;
}

/* 2. KHẮC PHỤC BÁO CÁO TỔNG HỢP (baocao.html) */
body.theme-dark .stat-grid .card {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 4px solid var(--cyan) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}
body.theme-dark .card-label {
  color: #94a3b8 !important;
  font-weight: 700 !important;
}
body.theme-dark .card-value {
  color: #ffffff !important;
  font-weight: 900 !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark .report-section table {
  background: #0d1527 !important;
}
body.theme-dark .report-section thead,
body.theme-dark .report-section thead tr,
body.theme-dark .report-section table tr:has(> th) {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
}
body.theme-dark .report-section th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-dark .report-section th:last-child {
  border-right: none !important;
}
body.theme-dark .report-section td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .report-section tr:hover td {
  background: rgba(0, 174, 239, 0.08) !important;
}
body.theme-dark .detail-row td,
body.theme-dark .detail-box {
  background: #0d1527 !important;
  color: #f1f5f9 !important;
}
body.theme-dark .detail-box table th {
  background: #1e293b !important;
  color: #ffffff !important;
}
body.theme-dark .mini-field span,
body.theme-dark .qty-cell span,
body.theme-dark .result-field span,
body.theme-dark .empty {
  color: #94a3b8 !important;
}
body.theme-dark .stt-cell {
  color: #38bdf8 !important;
}

/* 3. TĂNG CƯỜNG ĐỘ TƯƠNG PHẢN CHO BẢNG 50 BILL & LỊCH SỬ (bill.html) */
body.theme-dark #table-history-main,
body.theme-dark .history-box table {
  background: #0d1527 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.theme-dark #table-history-main thead,
body.theme-dark #table-history-main thead tr,
body.theme-dark .history-box thead,
body.theme-dark .history-box thead tr,
body.theme-dark #table-history-data thead,
body.theme-dark #table-history-data thead tr {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
}
body.theme-dark #table-history-main th,
body.theme-dark .history-box th,
body.theme-dark #table-history-data th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: 0.4px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark #table-history-main th:last-child,
body.theme-dark .history-box th:last-child,
body.theme-dark #table-history-data th:last-child {
  border-right: none !important;
}

body.theme-dark #table-history-main td,
body.theme-dark .history-box td {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

/* Khử triệt để màu chữ tối #333, #555, đỏ tối trên nền đen */
body.theme-dark #table-history-main td [style*="color:#333"],
body.theme-dark #table-history-main td [style*="color: #333"],
body.theme-dark .history-box td [style*="color:#333"],
body.theme-dark .history-box td [style*="color: #333"] {
  color: #34d399 !important; /* Đã thu: Xanh ngọc phát sáng siêu rõ */
  font-weight: 800 !important;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.3) !important;
}

body.theme-dark #table-history-main td [style*="color:var(--magenta)"],
body.theme-dark #table-history-main td [style*="color: var(--magenta)"],
body.theme-dark .history-box td [style*="color:var(--magenta)"],
body.theme-dark .history-box td [style*="color: var(--magenta)"] {
  color: #f472b6 !important; /* Còn nợ: Hồng neon sáng */
  font-weight: 800 !important;
  text-shadow: 0 0 8px rgba(244, 114, 182, 0.3) !important;
}

body.theme-dark #table-history-main td [style*="color:red"],
body.theme-dark #table-history-main td [style*="color: red"],
body.theme-dark .history-box td [style*="color:red"],
body.theme-dark .history-box td [style*="color: red"] {
  color: #fb7185 !important; /* Nợ tiền: Đỏ san hô sáng nổi bật */
  font-weight: 800 !important;
}

body.theme-dark #table-history-main td [style*="color:#555"],
body.theme-dark #table-history-main td [style*="color: #555"],
body.theme-dark .history-box td [style*="color:#555"],
body.theme-dark .history-box td [style*="color: #555"] {
  color: #cbd5e1 !important; /* Tên NV lập: Xám bạc sáng rõ nét */
}

/* Số bill phát sáng công nghệ Cyber Cyan */
body.theme-dark #table-history-main td:nth-child(2) span,
body.theme-dark .history-box td:nth-child(2) span {
  color: #38bdf8 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.45) !important;
}

/* Tên khách hàng & SĐT */
body.theme-dark .history-customer-toggle {
  color: #ffffff !important;
  font-weight: 700 !important;
}
body.theme-dark .history-customer-toggle:hover {
  color: #38bdf8 !important;
}
body.theme-dark #table-history-main small,
body.theme-dark .history-box small {
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

/* Nút thao tác bảng mini & icon */
body.theme-dark .col-actions button,
body.theme-dark .action-group-buttons button,
body.theme-dark .btn-mini,
body.theme-dark .btn-icon {
  filter: brightness(1.15) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}
body.theme-dark .col-actions button:hover,
body.theme-dark .action-group-buttons button:hover,
body.theme-dark .btn-mini:hover,
body.theme-dark .btn-icon:hover {
  transform: scale(1.12) !important;
  filter: brightness(1.3) !important;
}

/* Các quy tắc Dark Tech chuyên biệt trích xuất từ các trang D:\QuanLyGiaoXu\ManNhi_Print_Tech */
body.theme-dark {
            background-color: #090e1a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .bill-box,
        body.theme-dark .history-box {
            background: #0f172a !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45) !important;
        }
body.theme-dark .report-header { border-bottom-color: rgba(255, 255, 255, 0.08) !important; }
body.theme-dark .report-title h2 { color: #ffffff !important; }
body.theme-dark .report-title p { color: #94a3b8 !important; }
body.theme-dark .btn-tool-header {
            background: rgba(255, 255, 255, 0.06) !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .btn-tool-header:hover {
            background: var(--cyan) !important;
            border-color: var(--cyan) !important;
            color: #ffffff !important;
        }
body.theme-dark .kpi-card {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
        }
body.theme-dark .kpi-val { color: #ffffff !important; }
body.theme-dark .kpi-label { color: #94a3b8 !important; }
body.theme-dark .kpi-sub { color: #64748b !important; }
body.theme-dark .info-group label { color: #94a3b8 !important; }
body.theme-dark .info-group input,
        body.theme-dark .info-group select,
        body.theme-dark #bang-san-pham input,
        body.theme-dark #bang-san-pham select,
        body.theme-dark .select-kieu-in,
        body.theme-dark .input-format,
        body.theme-dark #timkiem-50-bill {
            background: rgba(7, 13, 24, 0.85) !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            color: #ffffff !important;
        }
body.theme-dark .info-group input:focus,
        body.theme-dark .info-group select:focus,
        body.theme-dark #bang-san-pham input:focus,
        body.theme-dark #bang-san-pham select:focus,
        body.theme-dark #timkiem-50-bill:focus {
            border-color: var(--cyan) !important;
            box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.25) !important;
        }
body.theme-dark .filter-bar {
            background: rgba(255, 255, 255, 0.03) !important;
            border: 1px solid rgba(255, 255, 255, 0.06) !important;
        }
body.theme-dark .form-field label { color: #94a3b8 !important; }
body.theme-dark .form-field input,
        body.theme-dark .form-field select {
            background: rgba(7, 13, 24, 0.7) !important;
            border: 1px solid rgba(255, 255, 255, 0.14) !important;
            color: #ffffff !important;
        }
body.theme-dark .form-field input[readonly] {
            background: rgba(15, 23, 42, 0.6) !important;
            color: #cbd5e1 !important;
        }
body.theme-dark #sobill { color: #38bdf8 !important; }
body.theme-dark table.demo-table,
        body.theme-dark table.bill-table,
        body.theme-dark table.history-table {
            background: #0d1527 !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-dark table.demo-table thead,
        body.theme-dark table.bill-table thead,
        body.theme-dark table.history-table thead {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
        }
body.theme-dark table.demo-table th,
        body.theme-dark table.bill-table th,
        body.theme-dark table.history-table th {
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            background: transparent !important;
        }
body.theme-dark table.demo-table td,
        body.theme-dark table.bill-table td,
        body.theme-dark table.history-table td {
            background: transparent !important;
            border-color: rgba(255, 255, 255, 0.06) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark table.demo-table tbody tr:hover td,
        body.theme-dark table.bill-table tbody tr:hover td,
        body.theme-dark table.history-table tbody tr:hover td {
            background: rgba(0, 174, 239, 0.08) !important;
        }
body.theme-dark .stt-cell { color: #38bdf8 !important; }
body.theme-dark .thanhtien { color: #38bdf8 !important; }
body.theme-dark .deduct-pill {
            background: rgba(16, 185, 129, 0.15) !important;
            color: #34d399 !important;
            border-color: rgba(16, 185, 129, 0.35) !important;
        }
body.theme-dark .deduct-pill.warning {
            background: rgba(245, 158, 11, 0.15) !important;
            color: #fbbf24 !important;
            border-color: rgba(245, 158, 11, 0.35) !important;
        }
body.theme-dark .btn-row-move { color: #38bdf8 !important; }
body.theme-dark .btn-row-move:hover { color: #7dd3fc !important; }
body.theme-dark .summary-card {
            background: rgba(15, 23, 42, 0.6) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
body.theme-dark .summary-table td:first-child { color: #94a3b8 !important; }
body.theme-dark .summary-table td:nth-child(2) { color: #f1f5f9 !important; }
body.theme-dark .summary-table td:last-child { color: #64748b !important; }
body.theme-dark .summary-divider { border-top-color: rgba(255, 255, 255, 0.15) !important; }
body.theme-dark .magenta-bold { color: #f472b6 !important; }
body.theme-dark .input-tam-ung {
            background: rgba(7, 13, 24, 0.85) !important;
            border: 1px solid rgba(255, 255, 255, 0.14) !important;
            color: #ffffff !important;
        }
body.theme-dark #tien-hang-view { color: #ffffff !important; }
body.theme-dark #tien-thue-view { color: #94a3b8 !important; }
body.theme-dark #conno { color: #f472b6 !important; }
body.theme-dark #muc-vat {
            background: rgba(7, 13, 24, 0.85) !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
            color: #ffffff !important;
        }
body.theme-dark .summary-container { border-top-color: rgba(255, 255, 255, 0.12) !important; }
body.theme-dark .btn-tool-cyan {
            background: rgba(0, 174, 239, 0.15) !important;
            border-color: var(--cyan) !important;
            color: #38bdf8 !important;
        }
body.theme-dark .btn-tool-cyan:hover {
            background: var(--cyan) !important;
            color: #ffffff !important;
        }
body.theme-dark .btn-tool-secondary {
            background: rgba(255, 255, 255, 0.06) !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
            color: #cbd5e1 !important;
        }
body.theme-dark .btn-chip {
            background: rgba(255, 255, 255, 0.08) !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            color: #cbd5e1 !important;
        }
body.theme-dark .history-header h3 { color: #ffffff !important; }
body.theme-dark table.history-table td {
            background: rgba(15, 23, 42, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark table.history-table tr:hover td {
            background: rgba(0, 174, 239, 0.08) !important;
        }
body.theme-dark .bill-so-dathu {
            color: #34d399 !important;
            background: rgba(16, 185, 129, 0.15) !important;
            border-color: rgba(16, 185, 129, 0.35) !important;
        }
body.theme-dark .bill-so-conno {
            color: #f472b6 !important;
            background: rgba(230, 0, 126, 0.15) !important;
            border-color: rgba(230, 0, 126, 0.35) !important;
        }
body.theme-dark .status-pill-dathu { color: #f1f5f9 !important; font-weight: 800; }
body.theme-dark .bill-creator-cell { color: #94a3b8 !important; font-weight: 400 !important; }
body.theme-dark .customer-product-toggle { color: #ffffff !important; border-bottom-color: rgba(255, 255, 255, 0.3) !important; }
body.theme-dark .customer-product-toggle:hover { color: var(--cyan) !important; }
body.theme-dark table.history-table td small { color: #94a3b8 !important; }
body.theme-dark .btn-mini-vip:disabled {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #64748b !important;
        }
body.theme-dark .modal-content,
        body.theme-dark .iframe-container {
            background: #0f172a !important;
            color: #ffffff !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .modal-content h3 { color: #ffffff !important; }
body.theme-dark .modal-content label { color: #cbd5e1 !important; }
body.theme-dark .modal-content input,
        body.theme-dark .modal-content select {
            background: rgba(7, 13, 24, 0.85) !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
            color: #ffffff !important;
        }
body.theme-dark .modal-content div[style*="background:#f8fafc"],
        body.theme-dark .modal-content div[style*="background: #f8fafc"],
        body.theme-dark .modal-content div[style*="background:white"],
        body.theme-dark .modal-content div[style*="background: white"] {
            background: rgba(255, 255, 255, 0.05) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
        }
body.theme-dark .modal-content button[style*="background:white"],
        body.theme-dark .modal-content button[style*="background: white"],
        body.theme-dark .modal-content button[style*="background:#f9f9f9"],
        body.theme-dark .modal-content button[style*="background:#f0f9fd"],
        body.theme-dark .modal-content button[style*="background:#fffcf5"] {
            background: rgba(255, 255, 255, 0.08) !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            color: #ffffff !important;
        }
body.theme-dark .modal-content table th {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-dark .modal-content table td {
            background: transparent !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark #dim-modal-ten { color: #38bdf8 !important; }
body.theme-dark .modal-view-tabbar,
        body.theme-muted .modal-view-tabbar {
            border-bottom-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .btn-tab-view-modal,
        body.theme-muted .btn-tab-view-modal {
            background: #1e293b !important;
            color: #94a3b8 !important;
        }
body.theme-dark .btn-tab-view-modal.active,
        body.theme-muted .btn-tab-view-modal.active {
            background: rgba(0, 174, 239, 0.2) !important;
            color: #38bdf8 !important;
            border-bottom: 2px solid #38bdf8 !important;
        }
body.theme-dark .view-bill-meta-box,
        body.theme-muted .view-bill-meta-box {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-meta-title,
        body.theme-muted .view-bill-meta-title {
            color: #ffffff !important;
        }
body.theme-dark .view-bill-meta-sub,
        body.theme-muted .view-bill-meta-sub {
            color: #94a3b8 !important;
        }
body.theme-dark .view-bill-table thead,
        body.theme-dark .view-bill-history-table thead,
        body.theme-dark .view-bill-table thead tr,
        body.theme-dark .view-bill-history-table thead tr {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-muted .view-bill-table thead,
        body.theme-muted .view-bill-history-table thead,
        body.theme-muted .view-bill-table thead tr,
        body.theme-muted .view-bill-history-table thead tr {
            background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-dark .view-bill-table th,
        body.theme-muted .view-bill-table th,
        body.theme-dark .view-bill-history-table th,
        body.theme-muted .view-bill-history-table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .view-bill-table td,
        body.theme-muted .view-bill-table td,
        body.theme-dark .view-bill-history-table td,
        body.theme-muted .view-bill-history-table td {
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-table td strong,
        body.theme-muted .view-bill-table td strong {
            color: #ffffff !important;
        }
body.theme-dark .view-bill-total-box,
        body.theme-muted .view-bill-total-box,
        body.theme-dark .view-bill-history-info,
        body.theme-muted .view-bill-history-info {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-total-box b,
        body.theme-muted .view-bill-total-box b {
            color: #ffffff !important;
        }
body.theme-dark .view-bill-empty-history,
        body.theme-muted .view-bill-empty-history {
            background: rgba(15, 23, 42, 0.4) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #94a3b8 !important;
        }
body.theme-dark .pagination-container {
            background: rgba(13, 21, 39, 0.88) !important;
            border: 1px solid rgba(0, 174, 239, 0.35) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(0, 174, 239, 0.12) !important;
        }
body.theme-dark .pag-info { color: #94a3b8 !important; }
body.theme-dark .pag-btn {
            background: rgba(255, 255, 255, 0.05) !important;
            color: #cbd5e1 !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-dark .pag-btn:hover:not(:disabled) {
            background: rgba(0, 174, 239, 0.18) !important;
            color: var(--cyan) !important;
            border-color: var(--cyan) !important;
        }
body.theme-dark .pag-btn.active {
            background: var(--cyan) !important;
            color: #0d1527 !important;
            font-weight: 800 !important;
            border-color: var(--cyan) !important;
            box-shadow: 0 0 12px rgba(0, 174, 239, 0.4) !important;
        }
body.theme-dark .btn-row-move {
            color: #38bdf8;
        }
body.theme-dark .btn-row-move:hover {
            color: #7dd3fc;
        }
body.theme-dark .bill-box,
        body.theme-dark .history-box {
            background: #0f172a !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
            box-shadow: 0 15px 35px rgba(0,0,0,0.4) !important;
        }
body.theme-dark .kpi-card {
            background: rgba(15, 23, 42, 0.7) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
body.theme-dark .form-field input,
        body.theme-dark .form-field select,
        body.theme-dark #search {
            background: rgba(7, 13, 24, 0.7) !important;
            border: 1px solid rgba(255, 255, 255, 0.14) !important;
            color: #ffffff !important;
        }
body.theme-dark #search::placeholder {
            color: #94a3b8 !important;
        }
body.theme-dark table.demo-table {
            background: #0d1527 !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-dark table.demo-table thead {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
        }
body.theme-dark table.demo-table th {
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark table.demo-table td {
            border-color: rgba(255, 255, 255, 0.06) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark #bang-san-pham input,
        body.theme-dark #bang-san-pham textarea {
            background: rgba(7, 13, 24, 0.85) !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
            color: #ffffff !important;
        }
body.theme-dark .summary-card {
            background: rgba(15, 23, 42, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-dark .summary-container { border-top-color: rgba(255, 255, 255, 0.08) !important; }
body.theme-dark .compact-products { border-top-color: rgba(255,255,255,0.12) !important; color: #cbd5e1 !important; }
body.theme-dark .compact-product-head { color: #94a3b8 !important; }
body.theme-dark .compact-product-row { border-top-color: rgba(255,255,255,0.08) !important; }
body.theme-dark .compact-product-name { color: #e2e8f0 !important; }
body.theme-dark .customer-product-toggle { color: #f8fafc !important; border-bottom-color: rgba(255,255,255,0.25) !important; }
body.theme-dark .report-view {
            background: #0f172a !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
            box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
        }
body.theme-dark .kpi-card {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
            color: #f8fafc !important;
        }
body.theme-dark .kpi-val, body.theme-dark .card-value { color: #ffffff !important; }
body.theme-dark .filter-bar {
            background: rgba(15, 23, 42, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
        }
body.theme-dark .filter-grid input,
        body.theme-dark #input-admin-pass {
            background: rgba(7, 13, 24, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
            color: #ffffff !important;
        }
body.theme-dark .demo-table, body.theme-dark table {
            background: #0d1527 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-dark .demo-table thead, body.theme-dark table thead,
body.theme-dark .view-table thead, body.theme-dark .view-table thead tr {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
            background-size: 100% 100% !important;
            color: #ffffff !important;
            border-color: rgba(255,255,255,0.15) !important;
        }
body.theme-dark .view-table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255,255,255,0.15) !important;
        }
body.theme-dark .demo-table td, body.theme-dark table td,
        body.theme-dark .view-table td {
            border-color: rgba(255, 255, 255, 0.06) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .demo-table tbody tr:hover td, body.theme-dark table tr:hover td {
            background: rgba(0, 174, 239, 0.09) !important;
        }
body.theme-dark .modal-content,
        body.theme-dark .modal-iframe-content,
        body.theme-dark .modal-iframe-header {
            background: #111a2e !important;
            color: #ffffff !important;
            border-color: rgba(255,255,255,0.15) !important;
        }
body.theme-dark .modal-iframe-body { background: #090e1a !important; }
body.theme-dark .tag-bill {
            border-color: rgba(255, 255, 255, 0.15);
        }
body.theme-dark .status-pill-dathu { color: #34d399 !important; }
body.theme-dark .status-pill-conno { color: #f472b6 !important; }
body.theme-dark .bill-creator-cell { color: #94a3b8 !important; }
body.theme-dark .modal-view-tabbar {
            border-bottom-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .btn-tab-view-modal {
            background: #1e293b !important;
            color: #94a3b8 !important;
        }
body.theme-dark .btn-tab-view-modal.active {
            background: rgba(0, 174, 239, 0.2) !important;
            color: #38bdf8 !important;
            border-bottom: 2px solid #38bdf8 !important;
        }
body.theme-dark .view-bill-meta-box {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-meta-title { color: #ffffff !important; }
body.theme-dark .view-bill-meta-sub { color: #94a3b8 !important; }
body.theme-dark .view-bill-table thead,
        body.theme-dark .view-bill-history-table thead,
        body.theme-dark .view-bill-table thead tr,
        body.theme-dark .view-bill-history-table thead tr {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
            background-size: 100% 100% !important;
        }
body.theme-dark .view-bill-table th,
        body.theme-dark .view-bill-history-table th {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .view-bill-table td,
        body.theme-dark .view-bill-history-table td {
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-table td strong { color: #ffffff !important; }
body.theme-dark .view-bill-total-box,
        body.theme-dark .view-bill-history-info {
            background: rgba(15, 23, 42, 0.7) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .view-bill-total-box b { color: #ffffff !important; }
body.theme-dark .view-bill-empty-history {
            background: rgba(15, 23, 42, 0.4) !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            color: #94a3b8 !important;
        }
body.theme-dark .pagination-container {
            background: rgba(15, 23, 42, 0.9) !important;
            border: 1px solid rgba(0, 174, 239, 0.35) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 174, 239, 0.12) !important;
        }
body.theme-dark .pag-btn {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #cbd5e1 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
        }
body.theme-dark .pag-btn:hover:not(:disabled) {
            border-color: var(--cyan) !important;
            background: rgba(0, 174, 239, 0.2) !important;
            color: #ffffff !important;
        }
body.theme-dark .pag-btn.active {
            background: var(--cyan) !important;
            color: #ffffff !important;
            border-color: var(--cyan) !important;
            box-shadow: 0 0 12px rgba(0, 174, 239, 0.5) !important;
        }
body.theme-dark, body.theme-dark {
            --card-bg: #0f172a;
            --table-bg: #0f172a;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --border-color: rgba(255, 255, 255, 0.08);
            --input-bg: rgba(7, 13, 24, 0.85);
            --input-border: rgba(255, 255, 255, 0.15);
            background-color: #090e1a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .report-view,
        body.theme-dark .content-box,
        body.theme-dark .report-view,
        body.theme-dark .content-box {
            background: #0f172a !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            box-shadow: 0 15px 35px rgba(0,0,0,0.45) !important;
        }
body.theme-dark .main-table,
        body.theme-dark table,
        body.theme-dark .main-table,
        body.theme-dark table {
            background: #0f172a !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
        }
body.theme-dark .main-table td,
        body.theme-dark table td,
        body.theme-dark .main-table td,
        body.theme-dark table td {
            background: #0f172a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .modal-content,
        body.theme-dark .modal-content {
            background: #0f172a !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .modal-content table,
        body.theme-dark .modal-content table {
            background: #0f172a !important;
        }
body.theme-dark .modal-content td,
        body.theme-dark .modal-content td {
            background: #0f172a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark {
            --primary: #090e1a;
            --card-bg: #111a2e;
            --table-bg: #0d1527;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --border-color: rgba(255, 255, 255, 0.08);
            --input-bg: rgba(7, 13, 24, 0.75);
            --input-border: rgba(255, 255, 255, 0.14);
            background-color: #090e1a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .main-table thead {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
        }
body.theme-dark .pagination-container {
            background: rgba(13, 21, 39, 0.95);
            border-color: rgba(0, 174, 239, 0.25);
        }
body.theme-dark {
            --bg-body: #090e1a;
            --surface-card: #111a2e;
            --surface-inner: rgba(15, 23, 42, 0.7);
            --border-subtle: rgba(255, 255, 255, 0.1);
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            background-color: #090e1a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .content-box {
            background: #0f172a !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
body.theme-dark .content-box {
            background: #0d1527 !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
        }
body.theme-dark {
    --bg: #090e1a;
    --card-bg: #0f172a;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --input-bg: #070d18;
    --input-border: rgba(255, 255, 255, 0.14);
    background-color: #090e1a !important;
    color: #f1f5f9 !important;
}
body.theme-dark input, body.theme-dark select, body.theme-dark textarea {
    background-color: #070d18 !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark {
    background: #090e1a !important;
    color: #f1f5f9 !important;
}
body.theme-dark .head h1 { color: #38bdf8 !important; }
body.theme-dark .head p { color: #94a3b8 !important; }
body.theme-dark .nav, body.theme-dark .panel {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    color: #f1f5f9 !important;
}
body.theme-dark .panel h2 { color: #38bdf8 !important; }
body.theme-dark .desc { color: #94a3b8 !important; }
body.theme-dark .field {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.theme-dark .field label { color: #f1f5f9 !important; }
body.theme-dark .hint { color: #94a3b8 !important; }
body.theme-dark input, body.theme-dark select {
    background: #070d18 !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark .nav button { color: #94a3b8 !important; }
body.theme-dark .nav button:hover { background: rgba(0, 174, 239, 0.08) !important; color: #38bdf8 !important; }
body.theme-dark .nav button.active { background: linear-gradient(135deg, #00aeef, #0284c7) !important; color: #ffffff !important; }
body.theme-dark .reset { background: rgba(255, 255, 255, 0.06) !important; color: #94a3b8 !important; border: 1px solid rgba(255, 255, 255, 0.12) !important; }
body.theme-dark {
            --primary: #090e1a;
            --card-bg: #0f172a;
            --table-bg: #0d1527;
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --border-color: rgba(255, 255, 255, 0.08);
            --input-bg: rgba(7, 13, 24, 0.75);
            background: #090e1a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .admin-table thead {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
        }
body.theme-dark {
            --bg: #090e1a;
            --panel-bg: #0f172a;
            --border-c: rgba(255, 255, 255, 0.08);
            --text-main: #f1f5f9;
            --text-muted: #94a3b8;
            --input-bg: #070d18;
            --input-border: rgba(255, 255, 255, 0.14);
            background-color: #090e1a !important;
            color: #f1f5f9 !important;
        }
body.theme-dark .bill-box {
            background: #0f172a !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #f8fafc !important;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45) !important;
        }
body.theme-dark .filter-bar {
            background: rgba(255, 255, 255, 0.03) !important;
            border-color: rgba(255, 255, 255, 0.06) !important;
        }
body.theme-dark .toolbar-group label { color: #94a3b8 !important; }
body.theme-dark .select-input,
        body.theme-dark .filter-bar input,
        body.theme-dark .filter-bar select {
            background: rgba(7, 13, 24, 0.85) !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            color: #ffffff !important;
        }
body.theme-dark .modal-content {
            background: #111a2e !important;
            color: #ffffff !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .main-stage {
            background: #090e1a !important;
        }
body.theme-dark .top-nav-bar {
            background: #0f172a !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
body.theme-dark #current-title {
            color: #38bdf8 !important;
        }
body.theme-dark .report-view {
            background: #0f172a !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
        }
body.theme-dark .kpi-card {
            background: #111a2e !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
        }
body.theme-dark .filter-grid,
[data-theme="dark"] .filter-grid {
    background: #070d18 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-dark .filter-group label,
[data-theme="dark"] .filter-group label {
    color: #38bdf8 !important;
}
body.theme-dark .filter-grid input,
        body.theme-dark .filter-grid select {
            background: rgba(7, 13, 24, 0.7) !important;
            color: #ffffff !important;
            border: 1px solid rgba(255, 255, 255, 0.14) !important;
        }
body.theme-dark .demo-table {
            background: #0d1527 !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
        }
body.theme-dark .demo-table thead {
            background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
        }
body.theme-dark .demo-table th {
            color: #ffffff !important;
            border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
        }
body.theme-dark .demo-table td {
            color: #f1f5f9 !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
            border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
        }
body.theme-dark .demo-table tbody tr:hover td {
            background: rgba(0, 174, 239, 0.09) !important;
        }
body.theme-dark .demo-table tfoot tr,
[data-theme="dark"] .demo-table tfoot tr {
    background: #070d18 !important;
    border-top: 2px solid rgba(0, 174, 239, 0.35) !important;
}
body.theme-dark .demo-table tfoot td,
[data-theme="dark"] .demo-table tfoot td {
    background: #070d18 !important;
    color: #38bdf8 !important;
    font-weight: 800 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-dark .tag-bill-cyan { background: rgba(0, 174, 239, 0.15) !important; color: #38bdf8 !important; border-color: rgba(0, 174, 239, 0.35) !important; }
body.theme-dark .tag-bill-amber { background: rgba(245, 158, 11, 0.15) !important; color: #f59e0b !important; border-color: rgba(245, 158, 11, 0.35) !important; }
body.theme-dark .tag-bill-emerald { background: rgba(16, 185, 129, 0.15) !important; color: #10b981 !important; border-color: rgba(16, 185, 129, 0.35) !important; }
body.theme-dark .tag-bill-magenta { background: rgba(230, 0, 126, 0.15) !important; color: #f472b6 !important; border-color: rgba(230, 0, 126, 0.35) !important; }
body.theme-dark .tag-bill-muted { background: rgba(255, 255, 255, 0.08) !important; color: #94a3b8 !important; border-color: rgba(255, 255, 255, 0.15) !important; }
body.theme-dark .status-badge-emerald { background: rgba(16, 185, 129, 0.15) !important; color: #10b981 !important; border-color: rgba(16, 185, 129, 0.35) !important; }
body.theme-dark .status-badge-amber { background: rgba(245, 158, 11, 0.15) !important; color: #f59e0b !important; border-color: rgba(245, 158, 11, 0.35) !important; }
body.theme-dark .status-badge-cyan { background: rgba(0, 174, 239, 0.15) !important; color: #38bdf8 !important; border-color: rgba(0, 174, 239, 0.35) !important; }
body.theme-dark .status-badge-magenta { background: rgba(230, 0, 126, 0.15) !important; color: #f472b6 !important; border-color: rgba(230, 0, 126, 0.35) !important; }
body.theme-dark .status-badge-muted { background: rgba(255, 255, 255, 0.08) !important; color: #94a3b8 !important; border-color: rgba(255, 255, 255, 0.15) !important; }
body.theme-dark .pro-status-bar {
            background: #080d17 !important;
            border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        }
body.theme-dark .shell-pag-btn {
            background: rgba(255, 255, 255, 0.08) !important;
            color: #cbd5e1 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
body.theme-dark .shell-pag-btn:hover:not(:disabled) {
            border-color: #00aeef !important;
            color: #ffffff !important;
            background: rgba(0, 174, 239, 0.25) !important;
        }
body.theme-dark .shell-pag-btn.active {
            background: #00aeef !important;
            color: #ffffff !important;
            border-color: #00aeef !important;
            box-shadow: 0 0 8px rgba(0, 174, 239, 0.4) !important;
        }
body.theme-dark .shell-pag-info { color: #94a3b8 !important; }


/* ==========================================================================
   EXTRA COMPONENT ENHANCEMENTS FOR DARK TECH & MUTED SOFT
   ========================================================================== */

/* Badges & Pills */
body.theme-dark .badge {
  background: rgba(0, 174, 239, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(0, 174, 239, 0.35) !important;
}
body.theme-muted .badge, body.theme-slate .badge {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

/* Summary totals */
body.theme-dark .summary b {
  color: #f472b6 !important;
  font-weight: 800 !important;
  font-size: 19px !important;
  text-shadow: 0 0 10px rgba(244, 114, 182, 0.35) !important;
}
body.theme-muted .summary b, body.theme-slate .summary b {
  color: #fbbf24 !important;
  font-weight: 800 !important;
  font-size: 19px !important;
}

/* Button variants */
body.theme-dark .btn-dark {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .btn-dark:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}
body.theme-dark .btn-save {
  background: linear-gradient(135deg, #00aeef, #0284c7) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 0 14px rgba(0, 174, 239, 0.4) !important;
}
/* Nút thêm dòng (+ Thêm dòng sản phẩm, + Thêm dòng báo giá, + Thêm linh kiện/dịch vụ,...) trong Dark Tech */
body.theme-dark .btn-add,
body.theme-dark .btn-add-row,
body.theme-dark button.btn-add,
body.theme-dark .btn-add-custom,
body.theme-dark button[onclick*="themDong"],
body.theme-dark button[onclick*="addContractItemRow"],
[data-theme="dark"] .btn-add,
[data-theme="dark"] .btn-add-row,
[data-theme="dark"] button.btn-add,
[data-theme="dark"] .btn-add-custom,
[data-theme="dark"] button[onclick*="themDong"],
[data-theme="dark"] button[onclick*="addContractItemRow"] {
  background: linear-gradient(135deg, #00aeef, #0284c7) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  box-shadow: 0 0 14px rgba(0, 174, 239, 0.4) !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}
body.theme-dark .btn-add:hover,
body.theme-dark .btn-add-row:hover,
body.theme-dark button.btn-add:hover,
body.theme-dark .btn-add-custom:hover,
body.theme-dark button[onclick*="themDong"]:hover,
[data-theme="dark"] .btn-add:hover,
[data-theme="dark"] .btn-add-row:hover,
[data-theme="dark"] button.btn-add:hover,
[data-theme="dark"] .btn-add-custom:hover,
[data-theme="dark"] button[onclick*="themDong"]:hover {
  background: linear-gradient(135deg, #0284c7, #00aeef) !important;
  filter: brightness(1.15) !important;
  box-shadow: 0 0 18px rgba(0, 174, 239, 0.6) !important;
  transform: translateY(-1px) !important;
}

body.theme-dark .btn-save:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-1px) !important;
}

/* History search & toggle */
body.theme-dark #history-search {
  background: rgba(7, 13, 24, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}
body.theme-dark #history-search:focus {
  border-color: #00aeef !important;
  box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.25) !important;
}
body.theme-dark .history-toggle {
  background: linear-gradient(135deg, #00aeef, #0284c7) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 0 10px rgba(0, 174, 239, 0.35) !important;
}

body.theme-dark .header h1 {
  color: #ffffff !important;
}
body.theme-dark .header p, body.theme-dark .header .sub {
  color: #94a3b8 !important;
}


/* ==========================================================================
   CHUẨN HÓA TOÀN BỘ PHẦN MỀM: HIỆU ỨNG RÊ CHUỘT (ROW HOVER) BẢNG BIỂU
   Đồng bộ 100% theo chuẩn Bảng Danh Sách Đơn Hàng (Màu xanh nhẹ, không chói, giữ rõ 100% chữ)
   ========================================================================== */

/* 1. 🌙 DARK TECH (CYBER DARK): Hiệu ứng xanh Cyan nhẹ nhàng như Danh Sách Đơn Hàng */
body.theme-dark table tbody tr:hover,
body.theme-dark tbody tr:hover,
body.theme-dark .main-table tbody tr:hover,
body.theme-dark .demo-table tbody tr:hover,
body.theme-dark .bill-table tbody tr:hover,
body.theme-dark .history-table tbody tr:hover,
body.theme-dark .summary-table tbody tr:hover,
body.theme-dark .stock-table tbody tr:hover,
body.theme-dark .customer-table tbody tr:hover,
body.theme-dark .view-table tbody tr:hover,
body.theme-dark .report-section table tbody tr:hover,
body.theme-dark #table-history-main tbody tr:hover {
  background: rgba(0, 174, 239, 0.09) !important;
  transition: background 0.15s ease !important;
}

body.theme-dark table tbody tr:hover td,
body.theme-dark tbody tr:hover td,
body.theme-dark .main-table tbody tr:hover td,
body.theme-dark .demo-table tbody tr:hover td,
body.theme-dark .bill-table tbody tr:hover td,
body.theme-dark .history-table tbody tr:hover td,
body.theme-dark .summary-table tbody tr:hover td,
body.theme-dark .stock-table tbody tr:hover td,
body.theme-dark .customer-table tbody tr:hover td,
body.theme-dark .view-table tbody tr:hover td,
body.theme-dark .report-section table tbody tr:hover td,
body.theme-dark #table-history-main tbody tr:hover td {
  background: rgba(0, 174, 239, 0.09) !important;
}

/* 2. 🌗 MUTED SOFT (DARK MUTED / SLATE): Xanh Slate dịu mắt */
body.theme-muted table tbody tr:hover, body.theme-slate table tbody tr:hover,
body.theme-muted tbody tr:hover, body.theme-slate tbody tr:hover,
body.theme-muted .main-table tbody tr:hover, body.theme-slate .main-table tbody tr:hover,
body.theme-muted .demo-table tbody tr:hover, body.theme-slate .demo-table tbody tr:hover,
body.theme-muted .bill-table tbody tr:hover, body.theme-slate .bill-table tbody tr:hover,
body.theme-muted .history-table tbody tr:hover, body.theme-slate .history-table tbody tr:hover,
body.theme-muted .summary-table tbody tr:hover, body.theme-slate .summary-table tbody tr:hover,
body.theme-muted .stock-table tbody tr:hover, body.theme-slate .stock-table tbody tr:hover,
body.theme-muted .customer-table tbody tr:hover, body.theme-slate .customer-table tbody tr:hover,
body.theme-muted .view-table tbody tr:hover, body.theme-slate .view-table tbody tr:hover,
body.theme-muted .report-section table tbody tr:hover, body.theme-slate .report-section table tbody tr:hover,
body.theme-muted #table-history-main tbody tr:hover, body.theme-slate #table-history-main tbody tr:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  transition: background 0.15s ease !important;
}

body.theme-muted table tbody tr:hover td, body.theme-slate table tbody tr:hover td,
body.theme-muted tbody tr:hover td, body.theme-slate tbody tr:hover td,
body.theme-muted .main-table tbody tr:hover td, body.theme-slate .main-table tbody tr:hover td,
body.theme-muted .demo-table tbody tr:hover td, body.theme-slate .demo-table tbody tr:hover td,
body.theme-muted .bill-table tbody tr:hover td, body.theme-slate .bill-table tbody tr:hover td,
body.theme-muted .history-table tbody tr:hover td, body.theme-slate .history-table tbody tr:hover td,
body.theme-muted .summary-table tbody tr:hover td, body.theme-slate .summary-table tbody tr:hover td,
body.theme-muted .stock-table tbody tr:hover td, body.theme-slate .stock-table tbody tr:hover td,
body.theme-muted .customer-table tbody tr:hover td, body.theme-slate .customer-table tbody tr:hover td,
body.theme-muted .view-table tbody tr:hover td, body.theme-slate .view-table tbody tr:hover td,
body.theme-muted .report-section table tbody tr:hover td, body.theme-slate .report-section table tbody tr:hover td,
body.theme-muted #table-history-main tbody tr:hover td, body.theme-slate #table-history-main tbody tr:hover td {
  background: rgba(56, 189, 248, 0.1) !important;
}

/* 3. ☀️ SÁNG (LIGHT SOFT): Xanh lam pastel nhạt êm dịu (chỉ áp dụng cho hàng dữ liệu tbody) */
body.theme-light table tbody tr:hover,
body.theme-light tbody tr:hover,
body.theme-light .main-table tbody tr:hover,
body.theme-light .demo-table tbody tr:hover,
body.theme-light .bill-table tbody tr:hover,
body.theme-light .history-table tbody tr:hover,
body.theme-light #table-history-main tbody tr:hover {
  background: #f0f9ff !important;
}
body.theme-light table tbody tr:hover td,
body.theme-light tbody tr:hover td,
body.theme-light .main-table tbody tr:hover td,
body.theme-light .demo-table tbody tr:hover td,
body.theme-light .bill-table tbody tr:hover td,
body.theme-light .history-table tbody tr:hover td,
body.theme-light #table-history-main tbody tr:hover td {
  background: #f0f9ff !important;
}

/* 🔒 KHÓA CỐ ĐỊNH 100% TIÊU ĐỀ BẢNG - TUYỆT ĐỐI KHÔNG ĐỔI MÀU KHI RÊ CHUỘT TRÊN MỌI THEME */
thead:hover,
thead tr:hover,
thead th:hover,
thead td:hover,
table thead tr:hover,
table thead tr:hover th,
table thead tr:hover td,
table tr:has(> th):hover,
table tr:has(> th):hover th,
tr.table-head-row:hover,
tr.table-head-row:hover th,
th:hover {
  cursor: default !important;
}


/* ==========================================================================
   ẨN HOÀN TOÀN CÁC NÚT THAO TÁC HẾT CHỨC NĂNG / BỊ KHÓA PHÂN QUYỀN TOÀN HỆ THỐNG
   ========================================================================== */
.act-btn:disabled,
.act-btn.disabled,
.act-btn[disabled],
.col-actions .act-btn:disabled,
.col-actions .act-btn.disabled,
.col-actions .act-btn[disabled],
.col-actions button:disabled,
.col-actions button[disabled],
.action-group-buttons button:disabled,
.action-group-buttons button[disabled],
table tbody td button:disabled,
table tbody td button[disabled] {
  display: none !important;
}

/* ==========================================================================
   4. SCROLLBAR CÔNG NGHỆ CHO THEME DARK & MUTED SLATE
   ========================================================================== */
body.theme-dark::-webkit-scrollbar,
body.theme-dark *::-webkit-scrollbar,
body.theme-slate::-webkit-scrollbar,
body.theme-slate *::-webkit-scrollbar,
body.theme-muted::-webkit-scrollbar,
body.theme-muted *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

body.theme-dark::-webkit-scrollbar-track,
body.theme-dark *::-webkit-scrollbar-track {
  background: #090e1a;
}

body.theme-dark::-webkit-scrollbar-thumb,
body.theme-dark *::-webkit-scrollbar-thumb {
  background: rgba(0, 174, 239, 0.35);
  border-radius: 4px;
}
body.theme-dark::-webkit-scrollbar-thumb:hover,
body.theme-dark *::-webkit-scrollbar-thumb:hover {
  background: #00aeef;
}

body.theme-muted::-webkit-scrollbar-track,
body.theme-muted *::-webkit-scrollbar-track,
body.theme-slate::-webkit-scrollbar-track,
body.theme-slate *::-webkit-scrollbar-track {
  background: #1e293b;
}

body.theme-muted::-webkit-scrollbar-thumb,
body.theme-muted *::-webkit-scrollbar-thumb,
body.theme-slate::-webkit-scrollbar-thumb,
body.theme-slate *::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}
body.theme-muted::-webkit-scrollbar-thumb:hover,
body.theme-muted *::-webkit-scrollbar-thumb:hover,
body.theme-slate::-webkit-scrollbar-thumb:hover,
body.theme-slate *::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}


/* ==========================================================================
   4.8. ĐỒNG BỘ DARK TECH & MUTED SOFT CHO 3 TRANG:
   - QUẢN LÝ HÓA ĐƠN VAT (hoadonvat.html)
   - HÓA ĐƠN ĐẦU VÀO & CHI PHÍ (hoadondauvao.html)
   - QUẢN LÝ HỢP ĐỒNG & HỒ SƠ PHÁP LÝ (hopdong.html)
   ========================================================================== */

/* -------------------------------------------------------------
   A. DARK TECH (CYBER DARK)
   ------------------------------------------------------------- */

/* --- 1. QUẢN LÝ HÓA ĐƠN VAT (hoadonvat.html) --- */
body.theme-dark .bill-stats-bar {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
body.theme-dark .ratio-badge {
  background: rgba(0, 174, 239, 0.18) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(0, 174, 239, 0.35) !important;
}
body.theme-dark .compact-bill-toolbar input {
  background: #111a2e !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
body.theme-dark .btn-filter-status {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
}
body.theme-dark .btn-filter-status:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}
body.theme-dark .btn-filter-status.active {
  background: var(--cyan) !important;
  color: #04111d !important;
  border-color: var(--cyan) !important;
  font-weight: 800 !important;
}

/* Từng thẻ Bill trong danh sách */
body.theme-dark .bill {
  background: #0d1527 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .bill.bill-done {
  background: #080f1d !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  opacity: 0.88 !important;
}
body.theme-dark .bill-title {
  background: #111e33 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}
body.theme-dark .bill-title-info {
  color: #ffffff !important;
}
body.theme-dark .bill-title-info b {
  color: #38bdf8 !important;
}
body.theme-dark .bill-title-info span {
  color: #cbd5e1 !important;
}
body.theme-dark .line-head {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-dark .line {
  background: #0a1120 !important;
  border-top: 1px dashed rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .line:hover {
  background: rgba(0, 174, 239, 0.09) !important;
}
body.theme-dark .line.line-selected {
  background: rgba(0, 174, 239, 0.22) !important;
  box-shadow: inset 3px 0 0 var(--cyan) !important;
}
body.theme-dark .line.exported {
  background: rgba(255, 255, 255, 0.03) !important;
  opacity: 0.55 !important;
}
body.theme-dark .sp-name {
  color: #f8fafc !important;
  font-weight: 600 !important;
}
body.theme-dark .line .stt-cell {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}
body.theme-dark .line .cell {
  color: #e2e8f0 !important;
}
body.theme-dark .remain-badge {
  background: rgba(2, 132, 199, 0.22) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}
body.theme-dark .exported-label {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
}
body.theme-dark .badge-status-bill.done {
  background: rgba(34, 197, 94, 0.22) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(74, 222, 128, 0.4) !important;
}
body.theme-dark .badge-status-bill.part {
  background: rgba(245, 158, 11, 0.22) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
}
body.theme-dark .badge-status-bill.none {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

/* Bảng Chi tiết xuất hóa đơn & Lịch sử trong hoadonvat */
body.theme-dark #view-create table,
body.theme-dark #view-history table,
body.theme-dark .selected table {
  background: #0d1527 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-dark #view-create thead,
body.theme-dark #view-create thead tr,
body.theme-dark #view-history thead,
body.theme-dark #view-history thead tr,
body.theme-dark .selected thead,
body.theme-dark .selected thead tr {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
}
body.theme-dark #view-create th,
body.theme-dark #view-history th,
body.theme-dark .selected th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark #view-create th:last-child,
body.theme-dark #view-history th:last-child,
body.theme-dark .selected th:last-child {
  border-right: none !important;
}
body.theme-dark #view-create td,
body.theme-dark #view-history td,
body.theme-dark .selected td {
  background: transparent !important;
  color: #f1f5f9 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.theme-dark #view-create tr:hover td,
body.theme-dark #view-history tr:hover td,
body.theme-dark .selected tr:hover td {
  background: rgba(0, 174, 239, 0.08) !important;
}
body.theme-dark .total-row {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}
body.theme-dark .total-row.grand {
  color: var(--cyan) !important;
}
body.theme-dark #search-invoice {
  background: #111a2e !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark .history-filter-pill {
  background: #111a2e !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
body.theme-dark .history-filter-pill.active {
  background: var(--cyan) !important;
  color: #04111d !important;
  border-color: var(--cyan) !important;
  font-weight: 800 !important;
}
body.theme-dark .history-time-btn {
  color: #94a3b8 !important;
}
body.theme-dark .history-time-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
}


/* --- 2. HÓA ĐƠN ĐẦU VÀO (hoadondauvao.html) --- */
body.theme-dark .stats-grid .stat-card {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}
body.theme-dark .stat-label {
  color: #94a3b8 !important;
}
body.theme-dark .stat-value {
  color: #ffffff !important;
}
body.theme-dark .stat-value.pink {
  color: #f472b6 !important;
}
body.theme-dark .stat-value.cyan {
  color: #38bdf8 !important;
}
body.theme-dark .stat-value.green {
  color: #4ade80 !important;
}
body.theme-dark .stat-sub {
  color: #64748b !important;
}

body.theme-dark .filter-bar {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-dark .filter-group span {
  color: #94a3b8 !important;
}
body.theme-dark .filter-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark .filter-btn:hover {
  background: rgba(0, 174, 239, 0.2) !important;
  color: #38bdf8 !important;
  border-color: var(--cyan) !important;
}
body.theme-dark .filter-btn.active {
  background: var(--cyan) !important;
  color: #04111d !important;
  font-weight: 800 !important;
  border-color: var(--cyan) !important;
}

body.theme-dark #body-hoa-don tr,
body.theme-dark #body-gdt-results tr,
body.theme-dark #body-preview tr {
  background: transparent !important;
}
body.theme-dark #body-hoa-don td,
body.theme-dark #body-gdt-results td,
body.theme-dark #body-preview td {
  color: #f1f5f9 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.theme-dark #body-hoa-don tr:hover td {
  background: rgba(0, 174, 239, 0.09) !important;
}

/* Nhà cung cấp bên bán - khử màu chìm nghỉm, nổi bật trên nền tối */
body.theme-dark #body-hoa-don td b[style*="color:var(--dark)"],
body.theme-dark #body-hoa-don td b[style*="color: var(--dark)"],
body.theme-dark #body-hoa-don td .txt-left b {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark #body-hoa-don td [style*="color:#64748b"],
body.theme-dark #body-hoa-don td [style*="color: #64748b"] {
  color: #94a3b8 !important;
}

/* MST bên bán */
body.theme-dark #body-hoa-don td code {
  background: rgba(0, 174, 239, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(0, 174, 239, 0.3) !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  font-family: Consolas, monospace !important;
}

/* Số HĐ & Ký hiệu */
body.theme-dark #body-hoa-don td b[style*="color:var(--pink)"] {
  color: #f472b6 !important;
  text-shadow: 0 0 8px rgba(244, 114, 182, 0.3) !important;
}

/* Tiền thuế & Tổng thanh toán */
body.theme-dark #body-hoa-don td[style*="color:var(--pink)"],
body.theme-dark #body-hoa-don td[style*="color: var(--pink)"] {
  color: #f472b6 !important;
}
body.theme-dark #body-hoa-don td[style*="color:var(--green)"],
body.theme-dark #body-hoa-don td[style*="color: var(--green)"] {
  color: #4ade80 !important;
  font-weight: 800 !important;
}

/* Nút ghost trong hoadondauvao */
body.theme-dark .ghost {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}
body.theme-dark .ghost:hover {
  background: rgba(0, 174, 239, 0.25) !important;
  color: #38bdf8 !important;
  border-color: var(--cyan) !important;
}


/* --- 3. QUẢN LÝ HỢP ĐỒNG & HỒ SƠ (hopdong.html) --- */
body.theme-dark .stats-bar .stat-card {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}
body.theme-dark .stat-val {
  color: #ffffff !important;
  font-weight: 900 !important;
}
body.theme-dark .stat-lbl {
  color: #94a3b8 !important;
}

/* Bảng Hợp đồng */
body.theme-dark #contracts-body tr {
  background: transparent !important;
}
body.theme-dark #contracts-body td {
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.theme-dark #contracts-body tr:hover td {
  background: rgba(0, 174, 239, 0.09) !important;
}

/* Cột Số Hợp Đồng */
body.theme-dark #contracts-body td div[style*="color:#1e293b"],
body.theme-dark #contracts-body td div[style*="color: #1e293b"] {
  color: #38bdf8 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
}

/* Cột Khách Hàng */
body.theme-dark #contracts-body td div[style*="color:#0f172a"],
body.theme-dark #contracts-body td div[style*="color: #0f172a"] {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* Cột MST & Đại diện */
body.theme-dark #contracts-body td div[style*="color:#64748b"],
body.theme-dark #contracts-body td div[style*="color: #64748b"],
body.theme-dark #contracts-body td span[style*="color:#94a3b8"],
body.theme-dark #contracts-body td span[style*="color: #94a3b8"] {
  color: #94a3b8 !important;
}
body.theme-dark #contracts-body td div[style*="color:#64748b"] b {
  color: #38bdf8 !important;
}

/* Cột Tiền */
body.theme-dark #contracts-body td.money div[style*="color:#0f172a"],
body.theme-dark #contracts-body td.money div[style*="color: #0f172a"] {
  color: #4ade80 !important;
  font-weight: 900 !important;
}
body.theme-dark #contracts-body td.money div[style*="color:#64748b"],
body.theme-dark #contracts-body td.money div[style*="color: #64748b"] {
  color: #94a3b8 !important;
}

/* Liên kết đầu ra / Vốn */
body.theme-dark #contracts-body td b[style*="color:#0284c7"] {
  color: #38bdf8 !important;
}
body.theme-dark #contracts-body td b[style*="color:#166534"],
body.theme-dark #contracts-body td b[style*="color:#15803d"] {
  color: #4ade80 !important;
}

/* Nút In chứng từ pháp lý & thao tác trong hopdong.html */
body.theme-dark #contracts-body button.ghost,
body.theme-dark .wrap button.ghost {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
body.theme-dark #contracts-body button.ghost:hover,
body.theme-dark .wrap button.ghost:hover {
  background: rgba(0, 174, 239, 0.25) !important;
  color: #38bdf8 !important;
  border-color: var(--cyan) !important;
  transform: translateY(-1px) !important;
}
body.theme-dark #contracts-body button[style*="background:#f0fdf4"],
body.theme-dark #contracts-body button[style*="background: #f0fdf4"] {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border-color: rgba(74, 222, 128, 0.4) !important;
}

/* Checklist tiến độ */
body.theme-dark .badge-chk.ok {
  background: rgba(34, 197, 94, 0.25) !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4) !important;
}
body.theme-dark .badge-chk.no {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  opacity: 0.45 !important;
}


/* -------------------------------------------------------------
   B. MUTED SOFT (DARK MUTED / SLATE)
   ------------------------------------------------------------- */
body.theme-muted .bill-stats-bar, body.theme-slate .bill-stats-bar,
body.theme-muted .bill, body.theme-slate .bill,
body.theme-muted .stat-card, body.theme-slate .stat-card,
body.theme-muted .filter-bar, body.theme-slate .filter-bar {
  background: #334155 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
}
body.theme-muted .bill.bill-done, body.theme-slate .bill.bill-done {
  background: #243247 !important;
}
body.theme-muted .bill-title, body.theme-slate .bill-title {
  background: #243247 !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}
body.theme-muted .line-head, body.theme-slate .line-head {
  background: #1e293b !important;
  color: #38bdf8 !important;
}
body.theme-muted .line, body.theme-slate .line {
  background: #2b3a4f !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
body.theme-muted .line:hover, body.theme-slate .line:hover {
  background: rgba(56, 189, 248, 0.1) !important;
}
body.theme-muted .sp-name, body.theme-slate .sp-name {
  color: #f8fafc !important;
}
body.theme-muted .btn-filter-status, body.theme-slate .btn-filter-status,
body.theme-muted .filter-btn, body.theme-slate .filter-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #cbd5e1 !important;
}
body.theme-muted .btn-filter-status.active, body.theme-slate .btn-filter-status.active,
body.theme-muted .filter-btn.active, body.theme-slate .filter-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}
body.theme-muted #body-hoa-don td b[style*="color:var(--dark)"],
body.theme-slate #body-hoa-don td b[style*="color:var(--dark)"],
body.theme-muted #contracts-body td div[style*="color:#0f172a"],
body.theme-slate #contracts-body td div[style*="color:#0f172a"] {
  color: #f8fafc !important;
}
body.theme-muted #contracts-body td div[style*="color:#1e293b"],
body.theme-slate #contracts-body td div[style*="color:#1e293b"] {
  color: #38bdf8 !important;
}
body.theme-muted #contracts-body button.ghost,
body.theme-slate #contracts-body button.ghost,
body.theme-muted .ghost,
body.theme-slate .ghost {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}
body.theme-muted #contracts-body button.ghost:hover,
body.theme-slate #contracts-body button.ghost:hover,
body.theme-muted .ghost:hover,
body.theme-slate .ghost:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
}


/* ==========================================================================
   4.9. TỐI ƯU TOÀN DIỆN CHO DARK TECH & MUTED SOFT (UNIVERSAL COMPREHENSIVE OVERRIDES)
   Khử triệt để mọi lỗi:
   - Dòng trắng/vàng chói lóa trong bảng hóa đơn (Ảnh 1)
   - Cột số hóa đơn, tên người mua, MST bị chìm/chói (Ảnh 1)
   - Danh sách thẻ hóa đơn chọn tự động bị trắng tinh trong modal (Ảnh 2)
   - Khung form thông tin khách hàng bị trắng tinh trong modal hợp đồng (Ảnh 3, 4)
   - Toàn bộ bảng Tờ khai thuế 01/GTGT & thanh điều hướng bị lỗi màu (Ảnh 5)
   - Áp dụng triệt để cho TẤT CẢ các bảng biểu trong toàn bộ hệ thống
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. QUY TẮC MẶC ĐỊNH CHO GIAO DIỆN SÁNG (LIGHT SOFT - GIỮ NGUYÊN 100%)
   -------------------------------------------------------------------------- */
.tr-pending-sign { background: #fffcf2; }
.tr-cancelled { background: #f8fafc; opacity: 0.6; }
.vat-picker-item { background: #fff; }
.vat-picker-item:hover { background: #eff6ff; }

/* --------------------------------------------------------------------------
   2. KHỬ TRIỆT ĐỂ CHỮ TỐI & MÀU NỀN TRẮNG CHÓI TRÊN MỌI BẢNG (DARK TECH)
   -------------------------------------------------------------------------- */
body.theme-dark table td [style*="color:var(--dark)"],
body.theme-dark table td [style*="color: var(--dark)"],
body.theme-dark table td [style*="color:#0f172a"],
body.theme-dark table td [style*="color: #0f172a"],
body.theme-dark table td [style*="color:#1e293b"],
body.theme-dark table td [style*="color: #1e293b"],
body.theme-dark table td [style*="color:#243447"],
body.theme-dark table td [style*="color: #243447"],
body.theme-dark table td [style*="color:#263238"],
body.theme-dark table td [style*="color: #263238"],
body.theme-dark table td [style*="color:#334155"],
body.theme-dark table td [style*="color: #334155"] {
  color: #f8fafc !important;
}

body.theme-dark table td [style*="color:#64748b"],
body.theme-dark table td [style*="color: #64748b"],
body.theme-dark table td [style*="color:#475569"],
body.theme-dark table td [style*="color: #475569"],
body.theme-dark table td [style*="color:#7b8794"],
body.theme-dark table td [style*="color: #7b8794"],
body.theme-dark table td [style*="color:#888"],
body.theme-dark table td [style*="color: #888"],
body.theme-dark table td [style*="color:#94a3b8"],
body.theme-dark table td [style*="color: #94a3b8"] {
  color: #cbd5e1 !important;
}

body.theme-dark table td [style*="color:#0284c7"],
body.theme-dark table td [style*="color: #0284c7"],
body.theme-dark table td [style*="color:#0369a1"],
body.theme-dark table td [style*="color: #0369a1"],
body.theme-dark table td [style*="color:#4338ca"],
body.theme-dark table td [style*="color: #4338ca"] {
  color: #38bdf8 !important;
}

body.theme-dark table td.money,
body.theme-dark table td [style*="color:#16a34a"],
body.theme-dark table td [style*="color: #16a34a"],
body.theme-dark table td [style*="color:#15803d"],
body.theme-dark table td [style*="color: #15803d"] {
  color: #4ade80 !important;
}

/* Khử triệt để nền trắng/vàng chói lóa trên mọi hàng tr của table */
body.theme-dark table tr.tr-pending-sign,
body.theme-dark table tr[style*="background:#fffcf2"],
body.theme-dark table tr[style*="background: #fffcf2"],
body.theme-dark table tr[style*="background:#fefce8"],
body.theme-dark table tr[style*="background: #fefce8"],
body.theme-dark table tr[style*="background:#fffbeb"],
body.theme-dark table tr[style*="background: #fffbeb"] {
  background: rgba(245, 158, 11, 0.14) !important;
}

body.theme-dark table tr[style*="background:#f0fdf4"],
body.theme-dark table tr[style*="background: #f0fdf4"] {
  background: rgba(34, 197, 94, 0.12) !important;
}

body.theme-dark table tr[style*="background:#eff6ff"],
body.theme-dark table tr[style*="background: #eff6ff"] {
  background: rgba(0, 174, 239, 0.12) !important;
}

body.theme-dark table tr.tr-cancelled,
body.theme-dark table tr[style*="background:#f8fafc"],
body.theme-dark table tr[style*="background: #f8fafc"],
body.theme-dark table tr[style*="background:#f1f5f9"],
body.theme-dark table tr[style*="background: #f1f5f9"],
body.theme-dark table tr[style*="background:#fff"],
body.theme-dark table tr[style*="background: #fff"],
body.theme-dark table tr[style*="background:#ffffff"],
body.theme-dark table tr[style*="background: #ffffff"] {
  background: transparent !important;
}

/* --------------------------------------------------------------------------
   3. DANH SÁCH HÓA ĐƠN VAT - BẢNG LỊCH SỬ (Ảnh 1)
   -------------------------------------------------------------------------- */
body.theme-dark .so-cell-badge,
body.theme-dark #history-body td div[style*="background:#eff6ff"],
body.theme-dark #history-body td div[style*="background: #eff6ff"] {
  background: #0f1e33 !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
}
body.theme-dark .so-cell-badge small,
body.theme-dark #history-body td div[style*="background:#eff6ff"] small {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}
body.theme-dark .so-cell-badge b,
body.theme-dark #history-body td div[style*="background:#eff6ff"] b {
  color: #ffffff !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
}
body.theme-dark #history-body td span[style*="background:#fef3c7"],
body.theme-dark #history-body td span[style*="background: #fef3c7"] {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}
body.theme-dark #history-body td .badge[style*="background:#dcfce7"] {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border-color: rgba(74, 222, 128, 0.4) !important;
}
body.theme-dark #history-body td .badge[style*="background:#fef3c7"] {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

/* Thanh điều khiển bộ lọc năm, quý, ngày trong lịch sử HĐ VAT */
body.theme-dark #hist-time-year,
body.theme-dark #hist-filter-from,
body.theme-dark #hist-filter-to {
  background: #111a2e !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
body.theme-dark #view-history div[style*="background:#f1f5f9"],
body.theme-dark #view-history div[style*="background: #f1f5f9"] {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-dark #view-history div[style*="background:#e2e8f0"],
body.theme-dark #view-history div[style*="background: #e2e8f0"] {
  background: #162033 !important;
}

/* --------------------------------------------------------------------------
   4. MODAL CHỌN HÓA ĐƠN VAT ĐỂ TẠO HỢP ĐỒNG (Ảnh 2)
   -------------------------------------------------------------------------- */
body.theme-dark .vat-picker-item,
body.theme-dark #vat-picker-list > div {
  background: #111e33 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  color: #f8fafc !important;
}
body.theme-dark .vat-picker-item:hover,
body.theme-dark #vat-picker-list > div:hover {
  background: #162945 !important;
  border-color: var(--cyan) !important;
  box-shadow: 0 0 16px rgba(0, 174, 239, 0.3) !important;
}
body.theme-dark #vat-picker-list b[style*="color:#0284c7"] {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}
body.theme-dark #vat-picker-list div[style*="color:#0f172a"] {
  color: #ffffff !important;
  font-weight: 800 !important;
}
body.theme-dark #vat-picker-list [style*="color:#64748b"] {
  color: #94a3b8 !important;
}

/* --------------------------------------------------------------------------
   5. MODAL TẠO & SỬA HỢP ĐỒNG (Ảnh 3, 4)
   -------------------------------------------------------------------------- */
body.theme-dark .contract-client-box,
body.theme-dark #tab-content-info div[style*="background:#f8fafc"],
body.theme-dark #tab-content-info div[style*="background: #f8fafc"],
body.theme-dark #contract-modal .modal-box div[style*="background:#f8fafc"],
body.theme-dark #contract-modal .modal-box div[style*="background: #f8fafc"] {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
body.theme-dark #lbl-party-a {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}
body.theme-dark #contract-modal select,
body.theme-dark #contract-modal input {
  background: #090e17 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
body.theme-dark #contract-modal input::placeholder {
  color: #64748b !important;
}
body.theme-dark #dots-print-contract-info,
body.theme-dark .dots-print-info-box {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
body.theme-dark #dots-print-contract-info [style*="color:#0f172a"] {
  color: #ffffff !important;
}
body.theme-dark #dots-print-contract-info [style*="color:#475569"] {
  color: #cbd5e1 !important;
}

/* --------------------------------------------------------------------------
   6. BÁO CÁO CÂN ĐỐI THUẾ & TỜ KHAI 01/GTGT (Ảnh 5 - tax-report.js)
   -------------------------------------------------------------------------- */
body.theme-dark #box-tokhai-form {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}
body.theme-dark #box-tokhai-form h3 {
  color: #ffffff !important;
  font-weight: 800 !important;
}
body.theme-dark #box-tokhai-form div[style*="color:#64748b"],
body.theme-dark #box-tokhai-form div[style*="color: #64748b"] {
  color: #94a3b8 !important;
}

/* Thanh banner điều hướng Tờ khai phía trên */
body.theme-dark #tax-report-container div[style*="background:#eff6ff"],
body.theme-dark #tax-report-container div[style*="background: #eff6ff"] {
  background: #111e33 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}
body.theme-dark #tax-report-container b[style*="color:#1e40af"] {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}
body.theme-dark #tax-report-container div[style*="color:#3b82f6"] {
  color: #94a3b8 !important;
}
body.theme-dark #btn-copy-tokhai,
body.theme-dark #btn-toggle-tokhai-detail {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
body.theme-dark #btn-copy-tokhai:hover,
body.theme-dark #btn-toggle-tokhai-detail:hover {
  background: rgba(0, 174, 239, 0.25) !important;
  color: #38bdf8 !important;
  border-color: var(--cyan) !important;
}

/* Bảng chi tiết các chỉ tiêu Tờ khai 01/GTGT */
body.theme-dark #box-tokhai-form table {
  background: #0d1527 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-dark #box-tokhai-form thead,
body.theme-dark #box-tokhai-form thead tr,
body.theme-dark #box-tokhai-form tr:has(> th) {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
}
body.theme-dark #box-tokhai-form th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-dark #box-tokhai-form td {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}
body.theme-dark #box-tokhai-form td[style*="color:#0369a1"] {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}
body.theme-dark #box-tokhai-form td[style*="color:#b45309"] {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}
body.theme-dark #box-tokhai-form td[style*="color:#16a34a"] {
  color: #4ade80 !important;
  font-weight: 800 !important;
}
body.theme-dark #input-ct22 {
  background: #090e17 !important;
  color: #fbbf24 !important;
  border: 1px solid #f59e0b !important;
}
body.theme-dark #tax-report-container details[style*="background:#fffbeb"] {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}
body.theme-dark #tax-report-container details[style*="background:#fffbeb"] summary {
  color: #fbbf24 !important;
}
body.theme-dark #tax-report-container details[style*="background:#fffbeb"] li {
  color: #fde68a !important;
}

/* --------------------------------------------------------------------------
   7. ĐỒNG BỘ MUTED SOFT (DARK MUTED / SLATE)
   -------------------------------------------------------------------------- */
body.theme-muted .so-cell-badge, body.theme-slate .so-cell-badge {
  background: #243247 !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
}
body.theme-muted .contract-client-box, body.theme-slate .contract-client-box,
body.theme-muted #box-tokhai-form, body.theme-slate #box-tokhai-form,
body.theme-muted #dots-print-contract-info, body.theme-slate #dots-print-contract-info {
  background: #334155 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
}
body.theme-muted .vat-picker-item, body.theme-slate .vat-picker-item {
  background: #243247 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
}
body.theme-muted .vat-picker-item:hover, body.theme-slate .vat-picker-item:hover {
  background: #334155 !important;
  border-color: #0284c7 !important;
}
body.theme-muted #box-tokhai-form table, body.theme-slate #box-tokhai-form table {
  background: #243247 !important;
}
body.theme-muted #box-tokhai-form thead, body.theme-slate #box-tokhai-form thead,
body.theme-muted #box-tokhai-form thead tr, body.theme-slate #box-tokhai-form thead tr,
body.theme-muted #box-tokhai-form tr:has(> th), body.theme-slate #box-tokhai-form tr:has(> th) {
  background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
  background-size: 100% 100% !important;
}
body.theme-muted #box-tokhai-form th, body.theme-slate #box-tokhai-form th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-muted #box-tokhai-form td, body.theme-slate #box-tokhai-form td {
  border-color: rgba(255, 255, 255, 0.09) !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   4.10. CHUẨN HÓA ĐỒNG BỘ TIÊU ĐỀ BẢNG THÀNH 1 DÃY DUY NHẤT (SINGLE CONTINUOUS HEADER BAR)
   Đảm bảo dải màu gradient trải dài liên tục từ cột đầu tiên sang cột cuối cùng (không bị chia nhỏ từng ô)
   ========================================================================== */

/* DARK TECH: Dải màu trải dài mượt mà trên toàn bộ hàng tiêu đề */
body.theme-dark thead,
body.theme-dark thead tr,
body.theme-dark table tr:has(> th),
body.theme-dark tr.table-head-row,
body.theme-dark .main-table thead,
body.theme-dark .main-table thead tr,
body.theme-dark .demo-table thead,
body.theme-dark .demo-table thead tr,
body.theme-dark .bill-table thead,
body.theme-dark .bill-table thead tr,
body.theme-dark .history-box thead,
body.theme-dark .history-box thead tr,
body.theme-dark .history-table thead,
body.theme-dark .history-table thead tr,
body.theme-dark .report-section thead,
body.theme-dark .report-section thead tr,
body.theme-dark .report-section table tr:has(> th),
body.theme-dark .view-table thead,
body.theme-dark .view-table thead tr,
body.theme-dark .view-bill-table thead,
body.theme-dark .view-bill-table thead tr,
body.theme-dark .view-bill-history-table thead,
body.theme-dark .view-bill-history-table thead tr,
body.theme-dark #table-history-main thead,
body.theme-dark #table-history-main thead tr,
body.theme-dark #table-history-data thead,
body.theme-dark #table-history-data thead tr,
body.theme-dark #view-create thead,
body.theme-dark #view-create thead tr,
body.theme-dark #view-history thead,
body.theme-dark #view-history thead tr,
body.theme-dark .selected thead,
body.theme-dark .selected thead tr,
body.theme-dark #box-tokhai-form thead,
body.theme-dark #box-tokhai-form thead tr,
body.theme-dark #box-tokhai-form tr:has(> th) {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}

/* DARK TECH: Khử triệt để nền riêng ở từng ô th con, tạo vách ngăn tinh tế */
body.theme-dark th,
body.theme-dark thead th,
body.theme-dark table th,
body.theme-dark table tr:has(> th) th,
body.theme-dark .main-table th,
body.theme-dark .demo-table th,
body.theme-dark .bill-table th,
body.theme-dark .history-box th,
body.theme-dark .history-table th,
body.theme-dark .report-section th,
body.theme-dark .view-table th,
body.theme-dark .view-bill-table th,
body.theme-dark .view-bill-history-table th,
body.theme-dark #table-history-main th,
body.theme-dark #table-history-data th,
body.theme-dark #view-create th,
body.theme-dark #view-history th,
body.theme-dark .selected th,
body.theme-dark #box-tokhai-form th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: none !important;
  text-shadow: none !important;
}
body.theme-dark th:last-child,
body.theme-dark thead th:last-child,
body.theme-dark table tr:has(> th) th:last-child {
  border-right: none !important;
}

/* MUTED SOFT / SLATE: Dải màu trải dài mượt mà trên toàn bộ hàng tiêu đề */
body.theme-muted thead, body.theme-slate thead,
body.theme-muted thead tr, body.theme-slate thead tr,
body.theme-muted table tr:has(> th), body.theme-slate table tr:has(> th),
body.theme-muted tr.table-head-row, body.theme-slate tr.table-head-row,
body.theme-muted .main-table thead, body.theme-slate .main-table thead,
body.theme-muted .main-table thead tr, body.theme-slate .main-table thead tr,
body.theme-muted .demo-table thead, body.theme-slate .demo-table thead,
body.theme-muted .demo-table thead tr, body.theme-slate .demo-table thead tr,
body.theme-muted .bill-table thead, body.theme-slate .bill-table thead,
body.theme-muted .bill-table thead tr, body.theme-slate .bill-table thead tr,
body.theme-muted .history-box thead, body.theme-slate .history-box thead,
body.theme-muted .history-box thead tr, body.theme-slate .history-box thead tr,
body.theme-muted .history-table thead, body.theme-slate .history-table thead,
body.theme-muted .history-table thead tr, body.theme-slate .history-table thead tr,
body.theme-muted .report-section thead, body.theme-slate .report-section thead,
body.theme-muted .report-section thead tr, body.theme-slate .report-section thead tr,
body.theme-muted .report-section table tr:has(> th), body.theme-slate .report-section table tr:has(> th),
body.theme-muted .view-table thead, body.theme-slate .view-table thead,
body.theme-muted .view-table thead tr, body.theme-slate .view-table thead tr,
body.theme-muted .view-bill-table thead, body.theme-slate .view-bill-table thead,
body.theme-muted .view-bill-table thead tr, body.theme-slate .view-bill-table thead tr,
body.theme-muted .view-bill-history-table thead, body.theme-slate .view-bill-history-table thead,
body.theme-muted .view-bill-history-table thead tr, body.theme-slate .view-bill-history-table thead tr,
body.theme-muted #table-history-main thead, body.theme-slate #table-history-main thead,
body.theme-muted #table-history-main thead tr, body.theme-slate #table-history-main thead tr,
body.theme-muted #table-history-data thead, body.theme-slate #table-history-data thead,
body.theme-muted #table-history-data thead tr, body.theme-slate #table-history-data thead tr,
body.theme-muted #view-create thead, body.theme-slate #view-create thead,
body.theme-muted #view-create thead tr, body.theme-slate #view-create thead tr,
body.theme-muted #view-history thead, body.theme-slate #view-history thead,
body.theme-muted #view-history thead tr, body.theme-slate #view-history thead tr,
body.theme-muted .selected thead, body.theme-slate .selected thead,
body.theme-muted .selected thead tr, body.theme-slate .selected thead tr,
body.theme-muted #box-tokhai-form thead, body.theme-slate #box-tokhai-form thead,
body.theme-muted #box-tokhai-form thead tr, body.theme-slate #box-tokhai-form thead tr,
body.theme-muted #box-tokhai-form tr:has(> th), body.theme-slate #box-tokhai-form tr:has(> th) {
  background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}

/* MUTED SOFT / SLATE: Khử triệt để nền riêng ở từng ô th con */
body.theme-muted th, body.theme-slate th,
body.theme-muted thead th, body.theme-slate thead th,
body.theme-muted table th, body.theme-slate table th,
body.theme-muted table tr:has(> th) th, body.theme-slate table tr:has(> th) th,
body.theme-muted .main-table th, body.theme-slate .main-table th,
body.theme-muted .demo-table th, body.theme-slate .demo-table th,
body.theme-muted .bill-table th, body.theme-slate .bill-table th,
body.theme-muted .history-box th, body.theme-slate .history-box th,
body.theme-muted .history-table th, body.theme-slate .history-table th,
body.theme-muted .report-section th, body.theme-slate .report-section th,
body.theme-muted .view-table th, body.theme-slate .view-table th,
body.theme-muted .view-bill-table th, body.theme-slate .view-bill-table th,
body.theme-muted .view-bill-history-table th, body.theme-slate .view-bill-history-table th,
body.theme-muted #table-history-main th, body.theme-slate #table-history-main th,
body.theme-muted #table-history-data th, body.theme-slate #table-history-data th,
body.theme-muted #view-create th, body.theme-slate #view-create th,
body.theme-muted #view-history th, body.theme-slate #view-history th,
body.theme-muted .selected th, body.theme-slate .selected th,
body.theme-muted #box-tokhai-form th, body.theme-slate #box-tokhai-form th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: none !important;
  text-shadow: none !important;
}
body.theme-muted th:last-child, body.theme-slate th:last-child,
body.theme-muted thead th:last-child, body.theme-slate thead th:last-child,
body.theme-muted table tr:has(> th) th:last-child, body.theme-slate table tr:has(> th) th:last-child {
  border-right: none !important;
}

/* LIGHT SOFT: Dải màu trải dài mượt mà trên toàn bộ hàng tiêu đề */
body.theme-light thead,
body.theme-light thead tr,
body.theme-light table tr:has(> th),
body.theme-light tr.table-head-row,
body.theme-light .main-table thead,
body.theme-light .main-table thead tr,
body.theme-light .demo-table thead,
body.theme-light .demo-table thead tr,
body.theme-light .bill-table thead,
body.theme-light .bill-table thead tr,
body.theme-light .history-box thead,
body.theme-light .history-box thead tr,
body.theme-light .history-table thead,
body.theme-light .history-table thead tr,
body.theme-light .report-section thead,
body.theme-light .report-section thead tr,
body.theme-light .report-section table tr:has(> th),
body.theme-light .view-table thead,
body.theme-light .view-table thead tr,
body.theme-light .view-bill-table thead,
body.theme-light .view-bill-table thead tr,
body.theme-light .view-bill-history-table thead,
body.theme-light .view-bill-history-table thead tr,
body.theme-light #table-history-main thead,
body.theme-light #table-history-main thead tr,
body.theme-light #table-history-data thead,
body.theme-light #table-history-data thead tr,
body.theme-light #view-create thead,
body.theme-light #view-create thead tr,
body.theme-light #view-history thead,
body.theme-light #view-history thead tr,
body.theme-light .selected thead,
body.theme-light .selected thead tr,
body.theme-light #box-tokhai-form thead,
body.theme-light #box-tokhai-form thead tr,
body.theme-light #box-tokhai-form tr:has(> th) {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}

/* LIGHT SOFT: Khử triệt để nền riêng ở từng ô th con */
body.theme-light th,
body.theme-light thead th,
body.theme-light table th,
body.theme-light table tr:has(> th) th,
body.theme-light .main-table th,
body.theme-light .demo-table th,
body.theme-light .bill-table th,
body.theme-light .history-box th,
body.theme-light .history-table th,
body.theme-light .report-section th,
body.theme-light .view-table th,
body.theme-light .view-bill-table th,
body.theme-light .view-bill-history-table th,
body.theme-light #table-history-main th,
body.theme-light #table-history-data th,
body.theme-light #view-create th,
body.theme-light #view-history th,
body.theme-light .selected th,
body.theme-light #box-tokhai-form th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: none !important;
  text-shadow: none !important;
}
body.theme-light th:last-child,
body.theme-light thead th:last-child,
body.theme-light table tr:has(> th) th:last-child {
  border-right: none !important;
}

/* 🔒 CỐ ĐỊNH 100% TIÊU ĐỀ KHI HOVER (CHỐNG ĐỔI MÀU TUYỆT ĐỐI) TRÊN CẢ 3 THEME */
body.theme-light thead:hover,
body.theme-light thead tr:hover,
body.theme-light table thead tr:hover,
body.theme-light table tr:has(> th):hover,
body.theme-light tr.table-head-row:hover,
body.theme-light .main-table thead:hover,
body.theme-light .main-table thead tr:hover,
body.theme-light .demo-table thead:hover,
body.theme-light .demo-table thead tr:hover,
body.theme-light .bill-table thead:hover,
body.theme-light .bill-table thead tr:hover,
body.theme-light .history-table thead:hover,
body.theme-light .history-table thead tr:hover,
body.theme-light #table-history-main thead:hover,
body.theme-light #table-history-main thead tr:hover {
  background: linear-gradient(90deg, #10375c 0%, #0d5c8a 35%, #0077b6 70%, #00a8e8 100%) !important;
  background-size: 100% 100% !important;
  cursor: default !important;
}

body.theme-dark thead:hover,
body.theme-dark thead tr:hover,
body.theme-dark table thead tr:hover,
body.theme-dark table tr:has(> th):hover,
body.theme-dark tr.table-head-row:hover,
body.theme-dark .main-table thead:hover,
body.theme-dark .main-table thead tr:hover,
body.theme-dark .demo-table thead:hover,
body.theme-dark .demo-table thead tr:hover,
body.theme-dark .bill-table thead:hover,
body.theme-dark .bill-table thead tr:hover,
body.theme-dark .history-table thead:hover,
body.theme-dark .history-table thead tr:hover,
body.theme-dark #table-history-main thead:hover,
body.theme-dark #table-history-main thead tr:hover {
  background: linear-gradient(90deg, #090e1a 0%, #003853 50%, #005a87 100%) !important;
  background-size: 100% 100% !important;
  cursor: default !important;
}

body.theme-muted thead:hover, body.theme-slate thead:hover,
body.theme-muted thead tr:hover, body.theme-slate thead tr:hover,
body.theme-muted table thead tr:hover, body.theme-slate table thead tr:hover,
body.theme-muted table tr:has(> th):hover, body.theme-slate table tr:has(> th):hover,
body.theme-muted tr.table-head-row:hover, body.theme-slate tr.table-head-row:hover,
body.theme-muted .main-table thead:hover, body.theme-slate .main-table thead:hover,
body.theme-muted .main-table thead tr:hover, body.theme-slate .main-table thead tr:hover,
body.theme-muted .demo-table thead:hover, body.theme-slate .demo-table thead:hover,
body.theme-muted .demo-table thead tr:hover, body.theme-slate .demo-table thead tr:hover,
body.theme-muted .bill-table thead:hover, body.theme-slate .bill-table thead:hover,
body.theme-muted .bill-table thead tr:hover, body.theme-slate .bill-table thead tr:hover,
body.theme-muted .history-table thead:hover, body.theme-slate .history-table thead:hover,
body.theme-muted .history-table thead tr:hover, body.theme-slate .history-table thead tr:hover,
body.theme-muted #table-history-main thead:hover, body.theme-slate #table-history-main thead:hover,
body.theme-muted #table-history-main thead tr:hover, body.theme-slate #table-history-main thead tr:hover {
  background: linear-gradient(90deg, #1e293b 0%, #0369a1 100%) !important;
  background-size: 100% 100% !important;
  cursor: default !important;
}

body.theme-light th:hover,
body.theme-light thead th:hover,
body.theme-light table th:hover,
body.theme-light thead tr:hover th,
body.theme-light table tr:has(> th):hover th,
body.theme-dark th:hover,
body.theme-dark thead th:hover,
body.theme-dark table th:hover,
body.theme-dark thead tr:hover th,
body.theme-dark table tr:has(> th):hover th,
body.theme-muted th:hover, body.theme-slate th:hover,
body.theme-muted thead th:hover, body.theme-slate thead th:hover,
body.theme-muted table th:hover, body.theme-slate table th:hover,
body.theme-muted thead tr:hover th, body.theme-slate thead tr:hover th,
body.theme-muted table tr:has(> th):hover th, body.theme-slate table tr:has(> th):hover th {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
  cursor: default !important;
}


/* ==========================================================================
   4.10.B. CHUẨN HÓA ĐỒNG BỘ CHIỀU CAO TIÊU ĐỀ BẢNG (TABLE HEADER STANDARDIZATION)
   Chuẩn mực 100% lấy từ Bảng "50 BÁO GIÁ GẦN NHẤT" (baogia.html):
   - Chiều cao chuẩn hàng tiêu đề: 38px
   - Padding trên/dưới ô th: 8px !important; trái/phải: 6px !important
   - Font chữ: 13.5px !important; line-height: 1.35 !important; căn giữa theo chiều dọc
   - Tự động áp dụng đồng nhất toàn dự án: Danh Sách Đơn Hàng, 50 Đơn Hàng Gần Nhất,
     Tổng Hợp Công Nợ, Vật Tư, Hóa Đơn Đầu Vào, Quản Trị, Xuất Kho...
   ========================================================================== */
thead tr,
table thead tr,
table tr:has(> th),
tr.table-head-row {
  height: 38px;
}

thead th,
table thead th,
table th,
.main-table th,
.demo-table th,
.bill-table th,
.history-table th,
#table-history-main th,
.view-table th,
.report-section th,
.stock-table th,
.customer-table th,
table tr:has(> th) th {
  height: 38px;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

@media (min-width: 2000px) {
  thead tr, table thead tr, table tr:has(> th), tr.table-head-row {
    height: 42px;
  }
  thead th, table thead th, table th, .main-table th, .demo-table th, .bill-table th, .history-table th, #table-history-main th, table tr:has(> th) th {
    height: 42px;
    font-size: 14px !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@media (min-width: 2600px) {
  thead tr, table thead tr, table tr:has(> th), tr.table-head-row {
    height: 48px;
  }
  thead th, table thead th, table th, .main-table th, .demo-table th, .bill-table th, .history-table th, #table-history-main th, table tr:has(> th) th {
    height: 48px;
    font-size: 15px !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* ==========================================================================
   4.11. TỐI ƯU CÁC THẺ TRẠNG THÁI, NÚT THAO TÁC & HUY HIỆU TRONG DARK TECH & MUTED SOFT
   Khử các khối nền trắng/pastel chói mắt, tạo phong cách Cyber Dark hiện đại & đồng bộ
   ========================================================================== */

/* 1. Huy hiệu Hóa đơn VAT (.vat-bill-badge) */
body.theme-dark .vat-bill-badge {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #4ade80 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15) !important;
}
body.theme-dark .vat-bill-badge small {
  color: #86efac !important;
}

body.theme-muted .vat-bill-badge,
body.theme-slate .vat-bill-badge {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}
body.theme-muted .vat-bill-badge small,
body.theme-slate .vat-bill-badge small {
  color: #6ee7b7 !important;
}

body.theme-dark .vat-bill-badge.vat-bill-badge-draft {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15) !important;
}
body.theme-dark .vat-bill-badge.vat-bill-badge-draft small {
  color: #fcd34d !important;
}

body.theme-muted .vat-bill-badge.vat-bill-badge-draft,
body.theme-slate .vat-bill-badge.vat-bill-badge-draft {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}
body.theme-muted .vat-bill-badge.vat-bill-badge-draft small,
body.theme-slate .vat-bill-badge.vat-bill-badge-draft small {
  color: #fcd34d !important;
}

/* 2. Huy hiệu Loại phiếu thu (Tạm ứng, Thu nhanh, Thu tay) */
body.theme-dark .badge-phieu-thu.badge-tam-ung,
body.theme-dark .badge-tam-ung {
  background: rgba(236, 72, 153, 0.18) !important;
  border: 1px solid rgba(236, 72, 153, 0.45) !important;
  color: #f472b6 !important;
}
body.theme-dark .badge-phieu-thu.badge-thu-nhanh,
body.theme-dark .badge-thu-nhanh {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}
body.theme-dark .badge-phieu-thu.badge-thu-tay,
body.theme-dark .badge-thu-tay {
  background: rgba(56, 189, 248, 0.18) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
}
body.theme-dark #body-phieuthu td small,
body.theme-dark #body-phieuthu-huy td small {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}
body.theme-dark #body-phieuthu-huy tr {
  background: rgba(239, 68, 68, 0.08) !important;
}
body.theme-dark #body-phieuthu-huy td {
  color: #f1f5f9 !important;
}

body.theme-muted .badge-phieu-thu.badge-tam-ung,
body.theme-slate .badge-phieu-thu.badge-tam-ung,
body.theme-muted .badge-tam-ung,
body.theme-slate .badge-tam-ung {
  background: rgba(236, 72, 153, 0.14) !important;
  border: 1px solid rgba(236, 72, 153, 0.35) !important;
  color: #f472b6 !important;
}
body.theme-muted .badge-phieu-thu.badge-thu-nhanh,
body.theme-slate .badge-phieu-thu.badge-thu-nhanh,
body.theme-muted .badge-thu-nhanh,
body.theme-slate .badge-thu-nhanh {
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}
body.theme-muted .badge-phieu-thu.badge-thu-tay,
body.theme-slate .badge-phieu-thu.badge-thu-tay,
body.theme-muted .badge-thu-tay,
body.theme-slate .badge-thu-tay {
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}
body.theme-muted #body-phieuthu td small,
body.theme-slate #body-phieuthu td small {
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}
body.theme-muted #body-phieuthu-huy tr,
body.theme-slate #body-phieuthu-huy tr {
  background: rgba(239, 68, 68, 0.06) !important;
}

/* 3. Nút bấm thao tác (.act-btn) phong cách Cyber Dark & Muted Soft */
body.theme-dark .act-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
}
body.theme-dark .act-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

body.theme-dark .act-btn-edit {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(245, 158, 11, 0.42) !important;
  color: #fbbf24 !important;
}
body.theme-dark .act-btn-edit:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.28) !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
  color: #fef3c7 !important;
}

body.theme-dark .act-btn-pay,
body.theme-dark .act-btn-check {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.42) !important;
  color: #34d399 !important;
}
body.theme-dark .act-btn-pay:hover:not(:disabled),
body.theme-dark .act-btn-check:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.28) !important;
  border-color: rgba(16, 185, 129, 0.65) !important;
  color: #a7f3d0 !important;
}

body.theme-dark .act-btn-print,
body.theme-dark .act-btn-view {
  background: rgba(0, 174, 239, 0.16) !important;
  border-color: rgba(0, 174, 239, 0.42) !important;
  color: #38bdf8 !important;
}
body.theme-dark .act-btn-print:hover:not(:disabled),
body.theme-dark .act-btn-view:hover:not(:disabled) {
  background: rgba(0, 174, 239, 0.28) !important;
  border-color: rgba(0, 174, 239, 0.65) !important;
  color: #e0f2fe !important;
}

body.theme-dark .act-btn-vat {
  background: rgba(14, 165, 233, 0.16) !important;
  border-color: rgba(14, 165, 233, 0.42) !important;
  color: #38bdf8 !important;
}
body.theme-dark .act-btn-vat:hover:not(:disabled) {
  background: rgba(14, 165, 233, 0.28) !important;
  border-color: rgba(14, 165, 233, 0.65) !important;
  color: #bae6fd !important;
}

body.theme-dark .act-btn-delete,
body.theme-dark .act-btn-cancel {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.42) !important;
  color: #f87171 !important;
}
body.theme-dark .act-btn-delete:hover:not(:disabled),
body.theme-dark .act-btn-cancel:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: rgba(239, 68, 68, 0.65) !important;
  color: #fecaca !important;
}

body.theme-dark .act-btn-copy,
body.theme-dark .act-btn-package,
body.theme-dark .act-btn-cart {
  background: rgba(168, 85, 247, 0.16) !important;
  border-color: rgba(168, 85, 247, 0.42) !important;
  color: #c084fc !important;
}
body.theme-dark .act-btn-copy:hover:not(:disabled),
body.theme-dark .act-btn-package:hover:not(:disabled),
body.theme-dark .act-btn-cart:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.28) !important;
  border-color: rgba(168, 85, 247, 0.65) !important;
  color: #f3e8ff !important;
}

/* Nút bấm thao tác trong Muted Soft / Slate */
body.theme-muted .act-btn,
body.theme-slate .act-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
}
body.theme-muted .act-btn:hover:not(:disabled),
body.theme-slate .act-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}
body.theme-muted .act-btn-edit, body.theme-slate .act-btn-edit {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}
body.theme-muted .act-btn-pay, body.theme-slate .act-btn-pay,
body.theme-muted .act-btn-check, body.theme-slate .act-btn-check {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}
body.theme-muted .act-btn-print, body.theme-slate .act-btn-print,
body.theme-muted .act-btn-view, body.theme-slate .act-btn-view {
  background: rgba(14, 165, 233, 0.14) !important;
  border-color: rgba(14, 165, 233, 0.35) !important;
  color: #38bdf8 !important;
}
body.theme-muted .act-btn-vat, body.theme-slate .act-btn-vat {
  background: rgba(56, 189, 248, 0.14) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}
body.theme-muted .act-btn-delete, body.theme-slate .act-btn-delete {
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
}
body.theme-muted .act-btn-copy, body.theme-slate .act-btn-copy,
body.theme-muted .act-btn-package, body.theme-slate .act-btn-package,
body.theme-muted .act-btn-cart, body.theme-slate .act-btn-cart {
  background: rgba(168, 85, 247, 0.14) !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
  color: #c084fc !important;
}

/* ==========================================================================
   5. BẢO VỆ CHẾ ĐỘ IN ẤN (PRINT MODE PROTECTION)
   Không để chế độ tối/slate ảnh hưởng khi in hóa đơn, hợp đồng, báo giá ra giấy
   ========================================================================== */
@media print {
  body, html, .card, .container, .wrap, table, th, td, .bill, .bill-title {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border-color: #cbd5e1 !important;
    text-shadow: none !important;
  }
  .theme-switcher-pill, .theme-switcher-group, .top-bar-right-zone {
    display: none !important;
  }
}

/* ==========================================================================
   🌙 CHẾ ĐỘ DARK TECH & MUTED ĐỒNG BỘ CHO MODAL MẪN NHI AI
   ========================================================================== */
body.theme-dark #modalAIManNhi .modal-content,
[data-theme="dark"] #modalAIManNhi .modal-content {
    background: #0b1324 !important;
    border: 1.5px solid rgba(0, 174, 239, 0.45) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 174, 239, 0.25) !important;
    color: #f8fafc !important;
}
body.theme-dark #modalAIManNhi .mn-modal-header,
[data-theme="dark"] #modalAIManNhi .mn-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-dark #modalAIManNhi .mn-modal-title,
body.theme-dark #modalAIManNhi .mn-modal-title span:first-child,
[data-theme="dark"] #modalAIManNhi .mn-modal-title,
[data-theme="dark"] #modalAIManNhi .mn-modal-title span:first-child {
    color: #ffffff !important;
}
body.theme-dark #modalAIManNhi .btn-mn-modal-close,
[data-theme="dark"] #modalAIManNhi .btn-mn-modal-close {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #94a3b8 !important;
}
body.theme-dark #modalAIManNhi .btn-mn-modal-close:hover,
[data-theme="dark"] #modalAIManNhi .btn-mn-modal-close:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    color: #f87171 !important;
}
body.theme-dark #modalAIManNhi .mn-modal-body,
[data-theme="dark"] #modalAIManNhi .mn-modal-body {
    background: #0b1324 !important;
}
body.theme-dark #modalAIManNhi #mn-modal-input-container,
[data-theme="dark"] #modalAIManNhi #mn-modal-input-container {
    background: #070d18 !important;
    border: 1.5px solid rgba(0, 174, 239, 0.45) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) inset !important;
}
body.theme-dark #modalAIManNhi #mn-modal-input-container:focus-within,
[data-theme="dark"] #modalAIManNhi #mn-modal-input-container:focus-within {
    border-color: #00aeef !important;
    box-shadow: 0 0 16px rgba(0, 174, 239, 0.35) !important;
}
body.theme-dark #modalAIManNhi #ai-modal-input-text,
[data-theme="dark"] #modalAIManNhi #ai-modal-input-text {
    background: transparent !important;
    color: #ffffff !important;
}
body.theme-dark #modalAIManNhi #ai-modal-input-text::placeholder,
[data-theme="dark"] #modalAIManNhi #ai-modal-input-text::placeholder {
    color: #64748b !important;
}
body.theme-dark #modalAIManNhi .mn-input-actions-bar,
[data-theme="dark"] #modalAIManNhi .mn-input-actions-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.theme-dark #modalAIManNhi .btn-mn-tool,
[data-theme="dark"] #modalAIManNhi .btn-mn-tool {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}
body.theme-dark #modalAIManNhi .btn-mn-tool:hover,
[data-theme="dark"] #modalAIManNhi .btn-mn-tool:hover {
    background: rgba(0, 174, 239, 0.18) !important;
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
}
body.theme-dark #modalAIManNhi .mn-quick-pill,
[data-theme="dark"] #modalAIManNhi .mn-quick-pill {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}
body.theme-dark #modalAIManNhi .mn-quick-pill:hover,
[data-theme="dark"] #modalAIManNhi .mn-quick-pill:hover {
    background: linear-gradient(135deg, rgba(0, 174, 239, 0.3) 0%, rgba(230, 0, 126, 0.3) 100%) !important;
    border-color: #00aeef !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(0, 174, 239, 0.4) !important;
    transform: translateY(-1.5px) !important;
}
body.theme-dark #modalAIManNhi #ai-modal-preview-box,
[data-theme="dark"] #modalAIManNhi #ai-modal-preview-box {
    background: #070d18 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}
body.theme-dark #modalAIManNhi #ai-modal-preview-box div[style*="background:#fff"],
body.theme-dark #modalAIManNhi #ai-modal-preview-box div[style*="background: #fff"],
body.theme-dark #modalAIManNhi #ai-modal-preview-box div[style*="background:white"],
body.theme-dark #modalAIManNhi #ai-modal-preview-box div[style*="background: white"],
body.theme-dark #modalAIManNhi #ai-modal-preview-box div[style*="background:#f8fafc"],
body.theme-dark #modalAIManNhi #ai-modal-preview-box div[style*="background: #f8fafc"],
body.theme-dark #modalAIManNhi #ai-modal-preview-box div[style*="background:#fff1f2"] {
    background: rgba(15, 23, 42, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}
body.theme-dark #modalAIManNhi #ai-modal-preview-box p,
body.theme-dark #modalAIManNhi #ai-modal-preview-box span,
body.theme-dark #modalAIManNhi #ai-modal-preview-box li {
    color: #cbd5e1 !important;
}
body.theme-dark #modalAIManNhi #ai-modal-preview-box strong,
body.theme-dark #modalAIManNhi #ai-modal-preview-box b,
body.theme-dark #modalAIManNhi #ai-modal-preview-box h1,
body.theme-dark #modalAIManNhi #ai-modal-preview-box h2,
body.theme-dark #modalAIManNhi #ai-modal-preview-box h3 {
    color: #ffffff !important;
}
body.theme-dark #modalAIManNhi #ai-modal-preview-box button[style*="background:#fff"],
body.theme-dark #modalAIManNhi #ai-modal-preview-box button[style*="background: #fff"] {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}
body.theme-dark #modalAIManNhi #ai-modal-preview-box button[style*="background:#fff"]:hover,
body.theme-dark #modalAIManNhi #ai-modal-preview-box button[style*="background: #fff"]:hover {
    background: rgba(0, 174, 239, 0.25) !important;
    border-color: #00aeef !important;
    color: #ffffff !important;
}

/* ==========================================================================
   AI STUDIO - DARK TECH & CYBER THEME (theme_system.css)
   ========================================================================== */
body.theme-dark .hero-showcase,
[data-theme="dark"] .hero-showcase {
    background: radial-gradient(circle at 82% 22%, rgba(0, 174, 239, 0.18) 0%, transparent 50%),
                radial-gradient(circle at 12% 85%, rgba(230, 0, 126, 0.22) 0%, transparent 50%),
                linear-gradient(135deg, #090f1d 0%, #0d1527 50%, #111a2e 100%) !important;
    border: 1.5px solid rgba(0, 174, 239, 0.35) !important;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 174, 239, 0.15) !important;
}
body.theme-dark .hero-title-wrap h1, [data-theme="dark"] .hero-title-wrap h1 { color: #ffffff !important; }
body.theme-dark .hero-title-wrap p, [data-theme="dark"] .hero-title-wrap p { color: #cbd5e1 !important; }
body.theme-dark .hero-slider-chips, [data-theme="dark"] .hero-slider-chips {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
body.theme-dark .hero-chip, [data-theme="dark"] .hero-chip { color: #94a3b8 !important; }
body.theme-dark .hero-chip:hover, [data-theme="dark"] .hero-chip:hover { color: #ffffff !important; background: rgba(255, 255, 255, 0.12) !important; }
body.theme-dark .hero-status-line, [data-theme="dark"] .hero-status-line { color: #e2e8f0 !important; }
body.theme-dark .hero-dialog-box, [data-theme="dark"] .hero-dialog-box {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(236, 72, 153, 0.45) !important;
    color: #e2e8f0 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}
body.theme-dark .hero-dialog-box::before, [data-theme="dark"] .hero-dialog-box::before {
    background: #0f172a !important;
    border-top: 1.5px solid rgba(236, 72, 153, 0.45) !important;
    border-left: 1.5px solid rgba(236, 72, 153, 0.45) !important;
}
body.theme-dark .hero-dialog-box strong, [data-theme="dark"] .hero-dialog-box strong { color: #f472b6 !important; }
body.theme-dark .btn-hero-outline, [data-theme="dark"] .btn-hero-outline {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
}
body.theme-dark #tab-thoi-quen > div:first-child,
[data-theme="dark"] #tab-thoi-quen > div:first-child {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(14, 34, 61, 0.9) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}
body.theme-dark #tab-thoi-quen h3, [data-theme="dark"] #tab-thoi-quen h3 { color: #38bdf8 !important; }
body.theme-dark #tab-thoi-quen p, [data-theme="dark"] #tab-thoi-quen p { color: #94a3b8 !important; }
body.theme-dark #tab-thoi-quen label, [data-theme="dark"] #tab-thoi-quen label { color: #f1f5f9 !important; }
body.theme-dark #thoi-quen-nv, [data-theme="dark"] #thoi-quen-nv {
    background: #070d18 !important;
    color: #38bdf8 !important;
    border: 1.5px solid #00aeef !important;
}
body.theme-dark #box-thoi-quen-detail, [data-theme="dark"] #box-thoi-quen-detail {
    background: #070d18 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}
body.theme-dark #hq-shorthand, body.theme-dark #hq-dvt,
[data-theme="dark"] #hq-shorthand, [data-theme="dark"] #hq-dvt {
    background: #030712 !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}
body.theme-dark #hq-notes, [data-theme="dark"] #hq-notes {
    background: #030712 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.theme-dark #hq-warranty, [data-theme="dark"] #hq-warranty {
    background: #070d18 !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.theme-dark .k-card, [data-theme="dark"] .k-card {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
}
body.theme-dark .k-card div[style*="background:#ffffff"],
body.theme-dark .k-card div[style*="background: #ffffff"],
body.theme-dark .k-card div[style*="background:white"],
body.theme-dark .k-card div[style*="background: white"],
[data-theme="dark"] .k-card div[style*="background:#ffffff"],
[data-theme="dark"] .k-card div[style*="background: #ffffff"] {
    background: #070d18 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

/* ==========================================================================
   QUY CHUẨN ĐỒNG BỘ KÍCH THƯỚC CHIỀU RỘNG TOÀN BỘ PHẦN MỀM (THEME SYSTEM LAYOUT)
   Chuẩn hóa 100% kích thước đồng đều theo Báo Giá In Ấn (baogia.html) và Lập Bill (bill.html)
   ========================================================================== */
.container, .wrap, .edit-container, .main-container {
    width: 84%;
    max-width: 1480px;
    margin: 18px auto;
    box-sizing: border-box;
}

/* Màn hình nhỏ (Laptop 14", 15" hoặc dưới 1200px): Bung tối đa, không cần hở lề */
@media (max-width: 1200px) {
    .container, .wrap, .edit-container, .main-container {
        width: 98% !important;
        max-width: 100% !important;
        margin: 6px auto !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}

/* Màn hình lớn 2K / 27" (2000px - 2599px): Mở rộng tới 1850px, độ hở thoáng ~20% */
@media (min-width: 2000px) {
    .container, .wrap, .edit-container, .main-container {
        width: 78% !important;
        max-width: 1850px !important;
        margin: 22px auto !important;
    }
}

/* Màn hình cực lớn 4K / 32" (>= 2600px): Mở rộng tới 2100px, giữ độ hở sang trọng ~25% */
@media (min-width: 2600px) {
    .container, .wrap, .edit-container, .main-container {
        width: 75% !important;
        max-width: 2100px !important;
        margin: 28px auto !important;
    }
}


/* ==========================================================================
   BỔ SUNG ĐỒNG BỘ DARK TECH & MUTED CHO CÀI ĐẶT HỆ THỐNG VÀ CHI TIẾT CÔNG NỢ
   ========================================================================== */

/* 1. CÀI ĐẶT HỆ THỐNG (caidat.html) */
body.theme-dark .ai-palette, [data-theme="dark"] .ai-palette {
    background: #070d18 !important;
    border: 1px solid rgba(0, 174, 239, 0.35) !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.08) !important;
}
body.theme-dark .ai-palette b, [data-theme="dark"] .ai-palette b {
    color: #38bdf8 !important;
}
body.theme-dark .ai-palette .hint, [data-theme="dark"] .ai-palette .hint {
    color: #94a3b8 !important;
}

body.theme-dark .backup-hero, [data-theme="dark"] .backup-hero {
    background: #070d18 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
}
body.theme-dark .backup-state, [data-theme="dark"] .backup-state {
    color: #f8fafc !important;
}
body.theme-dark .backup-meta, [data-theme="dark"] .backup-meta {
    color: #94a3b8 !important;
}
body.theme-dark .backup-drive, [data-theme="dark"] .backup-drive {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
}
body.theme-dark .backup-drive:hover, [data-theme="dark"] .backup-drive:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

body.theme-dark .field.full[style*="background:#fffaf0"],
body.theme-dark .field.full[style*="background: #fffaf0"],
[data-theme="dark"] .field.full[style*="background:#fffaf0"],
[data-theme="dark"] .field.full[style*="background: #fffaf0"] {
    background: #111a2e !important;
    border-color: rgba(240, 180, 41, 0.4) !important;
    color: #f8fafc !important;
}
body.theme-dark .field.full[style*="background:#fffaf0"] label,
body.theme-dark .field.full[style*="background: #fffaf0"] label,
[data-theme="dark"] .field.full[style*="background:#fffaf0"] label,
[data-theme="dark"] .field.full[style*="background: #fffaf0"] label {
    color: #fbbf24 !important;
}

body.theme-dark .field.full[style*="background:#f3e8ff"],
body.theme-dark .field.full[style*="background: #f3e8ff"],
[data-theme="dark"] .field.full[style*="background:#f3e8ff"],
[data-theme="dark"] .field.full[style*="background: #f3e8ff"] {
    background: #181028 !important;
    border-color: rgba(216, 180, 254, 0.35) !important;
    color: #f8fafc !important;
}
body.theme-dark .field.full[style*="background:#f3e8ff"] label,
body.theme-dark .field.full[style*="background: #f3e8ff"] label,
[data-theme="dark"] .field.full[style*="background:#f3e8ff"] label,
[data-theme="dark"] .field.full[style*="background: #f3e8ff"] label {
    color: #d8b4fe !important;
}
body.theme-dark .field.full[style*="background:#f3e8ff"] .hint,
body.theme-dark .field.full[style*="background: #f3e8ff"] .hint,
[data-theme="dark"] .field.full[style*="background:#f3e8ff"] .hint,
[data-theme="dark"] .field.full[style*="background: #f3e8ff"] .hint {
    color: #c084fc !important;
}

body.theme-dark .field.full[style*="background:#f8fafc"],
body.theme-dark .field.full[style*="background: #f8fafc"],
body.theme-dark .field.full[style*="background:#f7fafc"],
body.theme-dark .field.full[style*="background: #f7fafc"],
body.theme-dark .field.full[style*="background:#fff7fb"],
body.theme-dark .field.full[style*="background: #fff7fb"],
[data-theme="dark"] .field.full[style*="background:#f8fafc"],
[data-theme="dark"] .field.full[style*="background: #f8fafc"],
[data-theme="dark"] .field.full[style*="background:#f7fafc"],
[data-theme="dark"] .field.full[style*="background: #f7fafc"],
[data-theme="dark"] .field.full[style*="background:#fff7fb"],
[data-theme="dark"] .field.full[style*="background: #fff7fb"] {
    background: rgba(15, 23, 42, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

body.theme-dark .icon-style-card, [data-theme="dark"] .icon-style-card {
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}
body.theme-dark .icon-style-card:hover, [data-theme="dark"] .icon-style-card:hover {
    border-color: #38bdf8 !important;
}
body.theme-dark .icon-style-card.active, [data-theme="dark"] .icon-style-card.active {
    border-color: var(--cyan, #00aeef) !important;
    background: rgba(0, 174, 239, 0.1) !important;
}
body.theme-dark .icon-style-card label, [data-theme="dark"] .icon-style-card label {
    color: #f8fafc !important;
}
body.theme-dark .icon-preview-box, [data-theme="dark"] .icon-preview-box {
    background: #070d18 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 2. MODAL CHI TIẾT CÔNG NỢ (tonghopcongno.html) */
body.theme-dark #tab-chi-tiet .detail-container,
body.theme-muted #tab-chi-tiet .detail-container,
[data-theme="dark"] #tab-chi-tiet .detail-container,
[data-theme="muted"] #tab-chi-tiet .detail-container {
    background: #0b1324 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

body.theme-dark #tab-chi-tiet .filter-detail,
body.theme-muted #tab-chi-tiet .filter-detail,
[data-theme="dark"] #tab-chi-tiet .filter-detail,
[data-theme="muted"] #tab-chi-tiet .filter-detail {
    background: #070d18 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

body.theme-dark #tab-chi-tiet .filter-detail b,
body.theme-muted #tab-chi-tiet .filter-detail b,
[data-theme="dark"] #tab-chi-tiet .filter-detail b,
[data-theme="muted"] #tab-chi-tiet .filter-detail b {
    color: #38bdf8 !important;
}

body.theme-dark #tab-chi-tiet input[type="date"],
body.theme-muted #tab-chi-tiet input[type="date"],
[data-theme="dark"] #tab-chi-tiet input[type="date"],
[data-theme="muted"] #tab-chi-tiet input[type="date"] {
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color-scheme: dark;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape),
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape),
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape),
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) {
    background: #070d18 !important;
    color: #f8fafc !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) > div,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) > div,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) > div,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) > div {
    background: #070d18 !important;
    color: #f8fafc !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) h2,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) h2,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) h2,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) h2 {
    color: #38bdf8 !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) div,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) div,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) div,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) div {
    color: #cbd5e1;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) b,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) b,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) b,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) b {
    color: #ffffff !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) thead tr,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) thead tr,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) thead tr,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) thead tr {
    background: linear-gradient(90deg, #10375c 0%, #0077b6 100%) !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) th,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) th,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) th,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) th {
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) td,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) td,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) td,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) td {
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: transparent !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tbody tr:hover,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tbody tr:hover,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tbody tr:hover,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tbody tr:hover {
    background: rgba(0, 174, 239, 0.1) !important;
}

body.theme-dark #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tfoot tr,
body.theme-muted #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tfoot tr,
[data-theme="dark"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tfoot tr,
[data-theme="muted"] #tab-chi-tiet #vung-ve-pdf:not(.pdf-a4-landscape) tfoot tr {
    background: #0f172a !important;
}


/* ====================================================================
 * ĐỒNG BỘ THANH TIÊU ĐỀ ĐỈNH (TOP BAR TICKER & THEME CHUẨN MỰC)
 * ==================================================================== */
.top-bar-ticker {
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 0 10px;
    box-sizing: border-box;
    user-select: none;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.ticker-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.12);
    padding: 2px 7px;
    border-radius: 10px;
    margin-right: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.ticker-marquee {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
.ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: topBarMarquee 35s linear infinite;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    will-change: transform;
}
.top-bar-ticker:hover .ticker-text {
    animation-play-state: paused;
    cursor: pointer;
}
@keyframes topBarMarquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

body.theme-muted .top-bar-ticker,
body.theme-slate .top-bar-ticker,
[data-theme="muted"] .top-bar-ticker {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(71, 85, 105, 0.6) !important;
}
body.theme-muted .ticker-badge,
body.theme-slate .ticker-badge,
[data-theme="muted"] .ticker-badge {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.15) !important;
}
body.theme-muted .ticker-text,
body.theme-slate .ticker-text,
[data-theme="muted"] .ticker-text {
    color: #e2e8f0 !important;
}

body.theme-dark .top-bar-ticker,
[data-theme="dark"] .top-bar-ticker {
    background: rgba(0, 174, 239, 0.08) !important;
    border-color: rgba(0, 174, 239, 0.35) !important;
    box-shadow: 0 0 10px rgba(0, 174, 239, 0.12) !important;
}
body.theme-dark .ticker-badge,
[data-theme="dark"] .ticker-badge {
    color: #00aeef !important;
    background: rgba(0, 174, 239, 0.2) !important;
}
body.theme-dark .ticker-text,
[data-theme="dark"] .ticker-text {
    color: #38bdf8 !important;
}

@media (max-width: 950px) {
    .top-bar-ticker { display: none !important; }
}
