    :root {
      --bg-main: #0b0f19;
      --bg-card: #111827;
      --bg-card-alt: #161f30;
      --border-color: rgba(255, 255, 255, 0.08);
      --accent-cyan: #06b6d4;
      --accent-blue: #3b82f6;
      --accent-green: #10b981;
      --accent-amber: #f59e0b;
      --accent-rose: #f43f5e;
      --accent-purple: #8b5cf6;
    }

    body {
      background-color: var(--bg-main);
      color: #f8fafc;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      margin: 0;
      padding: 0;
      min-height: 100vh;
    }

    .page-container {
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 16px 20px 60px 20px;
      box-sizing: border-box;
    }

    /* KPI Grid - Sleek High Density */
    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 12px;
      margin-bottom: 14px;
    }

    .kpi-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      padding: 12px 16px;
      position: relative;
      overflow: hidden;
      transition: transform 0.2s, border-color 0.2s;
    }

    .kpi-card:hover {
      transform: translateY(-2px);
      border-color: rgba(6, 182, 212, 0.4);
    }

    .kpi-card__icon {
      position: absolute;
      top: 10px;
      right: 12px;
      font-size: 1.5rem;
      opacity: 0.15;
    }

    .kpi-card__label {
      font-size: 0.72rem;
      color: #94a3b8;
      text-transform: uppercase;
      font-weight: 600;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }

    .kpi-card__value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.3rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 2px;
      line-height: 1.2;
    }

    .kpi-card__subtext {
      font-size: 0.72rem;
      color: #64748b;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    /* Content Card */
    .content-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 14px 18px;
      margin-bottom: 16px;
    }

    /* Filters Bar */
    .filter-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 14px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border-color);
    }

    .filter-tabs {
      display: flex;
      align-items: center;
      gap: 4px;
      background: rgba(0, 0, 0, 0.3);
      padding: 3px;
      border-radius: 8px;
      border: 1px solid var(--border-color);
    }

    .filter-tab {
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 0.78rem;
      font-weight: 600;
      color: #94a3b8;
      background: transparent;
      border: none;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .filter-tab.active {
      background: #1e293b;
      color: #06b6d4;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    /* Master Filter Toolbar - Enterprise 2-Row Balanced Layout */
    .filter-master-bar {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 14px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border-color);
    }

    .filter-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
    }

    .filter-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .filter-capsule {
      display: inline-flex;
      align-items: center;
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 3px 6px;
      gap: 4px;
    }

    .filter-preset-btn {
      background: transparent;
      border: 1px solid transparent;
      color: #94a3b8;
      padding: 3px 8px;
      border-radius: 5px;
      font-size: 0.75rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .filter-preset-btn:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.06);
    }

    .filter-preset-btn.active {
      color: #06b6d4;
      background: rgba(6, 182, 212, 0.15);
      border-color: rgba(6, 182, 212, 0.3);
      font-weight: 600;
    }

    .search-input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      min-width: 280px;
      flex: 1;
      max-width: 380px;
    }

    .search-input-wrapper .search-icon {
      position: absolute;
      left: 10px;
      color: #64748b;
      font-size: 0.85rem;
      pointer-events: none;
    }

    .search-input-wrapper .search-input {
      width: 100%;
      padding: 6px 12px 6px 30px;
      font-size: 0.78rem;
      background: #0f172a;
      border: 1px solid var(--border-color);
      border-radius: 6px;
      color: #fff;
      outline: none;
      transition: all 0.2s ease;
    }

    .search-input-wrapper .search-input:focus {
      border-color: #06b6d4;
      box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15);
    }

    /* Data Table & Resizable Columns - High-Density Enterprise Layout */
    .table-container {
      overflow-x: auto;
      border-radius: 8px;
      border: 1px solid var(--border-color);
      position: relative;
      background: #0f172a;
    }

    .data-table {
      width: 100%;
      min-width: 1500px;
      border-collapse: separate;
      border-spacing: 0;
      font-size: 0.76rem;
      text-align: left;
      table-layout: fixed;
    }

    .data-table th {
      position: relative;
      background: #0b1120;
      color: #94a3b8;
      padding: 7px 8px;
      font-weight: 700;
      text-transform: uppercase;
      font-size: 0.68rem;
      letter-spacing: 0.04em;
      border-bottom: 1px solid var(--border-color);
      border-right: 1px solid rgba(255, 255, 255, 0.08);
      white-space: nowrap;
      user-select: none;
      box-sizing: border-box;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .data-table th:hover {
      border-right-color: rgba(6, 182, 212, 0.35);
    }

    /* Column Resizer Handle */
    .data-table th .resizer {
      position: absolute;
      top: 0;
      right: 0;
      width: 8px;
      cursor: col-resize;
      user-select: none;
      height: 100%;
      z-index: 50;
      transition: all 0.15s ease;
      border-right: 2px solid transparent;
    }

    .data-table th:hover .resizer {
      border-right: 2px solid rgba(6, 182, 212, 0.4);
    }

    .data-table th .resizer:hover,
    .data-table th .resizer.resizing {
      background: rgba(6, 182, 212, 0.25) !important;
      border-right: 2px solid #06b6d4 !important;
      box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
    }

    .data-table td {
      padding: 6px 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      border-right: 1px solid rgba(255, 255, 255, 0.04);
      color: #e2e8f0;
      box-sizing: border-box;
      overflow: hidden;
      text-overflow: ellipsis;
      vertical-align: middle;
    }

    /* Sticky Columns: Freeze Col 0 (Loại) & Col 1 (Số Hóa Đơn) */
    .data-table th.col-sticky-1,
    .data-table td.col-sticky-1 {
      position: sticky;
      left: 0;
      z-index: 10;
      background: #0b1120 !important;
      border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    .data-table td.col-sticky-1 {
      background: #0f172a !important;
    }
    .data-table tr.invoice-row-clickable:hover td.col-sticky-1 {
      background: #131d2e !important;
    }

    .data-table th.col-sticky-2,
    .data-table td.col-sticky-2 {
      position: sticky;
      left: 70px;
      z-index: 10;
      background: #0b1120 !important;
      box-shadow: 3px 0 6px -1px rgba(0, 0, 0, 0.5);
      border-right: 1px solid rgba(6, 182, 212, 0.3) !important;
    }
    .data-table td.col-sticky-2 {
      background: #0f172a !important;
    }
    .data-table tr.invoice-row-clickable:hover td.col-sticky-2 {
      background: #131d2e !important;
    }

    /* Direct Clickable Invoice Number Link */
    .inv-number-link {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      color: #38bdf8 !important;
      font-family: 'JetBrains Mono', monospace;
      font-weight: 700;
      font-size: 0.8rem;
      text-decoration: none;
      padding: 2px 5px;
      border-radius: 4px;
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.25);
      transition: all 0.15s ease;
      cursor: pointer;
    }

    .inv-number-link:hover {
      color: #ffffff !important;
      background: #0284c7;
      border-color: #38bdf8;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
      text-decoration: none;
    }

    .inv-number-link .inv-view-icon {
      font-size: 0.7rem;
      opacity: 0.85;
      transition: transform 0.15s ease;
    }

    .inv-number-link:hover .inv-view-icon {
      transform: scale(1.15);
      opacity: 1;
    }

    .data-table tr.invoice-row-clickable {
      cursor: pointer;
      transition: background-color 0.12s ease;
    }

    .data-table tr.invoice-row-clickable:hover td {
      background: rgba(6, 182, 212, 0.08) !important;
    }

    .data-table tr.invoice-row-clickable:hover .inv-number-link {
      border-color: #38bdf8;
      box-shadow: 0 0 6px rgba(56, 189, 248, 0.3);
    }

    .data-table th.sortable-th {
      cursor: pointer;
      transition: background-color 0.15s ease, color 0.15s ease;
    }

    .data-table th.sortable-th:hover {
      background: #1e293b;
      color: #38bdf8;
    }

    .sort-icon {
      display: inline-block;
      margin-left: 4px;
      font-size: 0.68rem;
      opacity: 0.4;
      vertical-align: middle;
      transition: all 0.15s ease;
    }

    .sort-icon.active {
      opacity: 1;
      color: #06b6d4;
      font-weight: bold;
      transform: scale(1.1);
    }

    .adv-filter-box {
      background: rgba(15, 23, 42, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 8px;
      padding: 8px 12px;
      margin-top: 6px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    /* Badges */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 2px 6px;
      border-radius: 4px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.68rem;
      font-weight: 600;
      white-space: nowrap;
    }

    .badge-input {
      background: rgba(59, 130, 246, 0.15);
      color: #60a5fa;
      border: 1px solid rgba(59, 130, 246, 0.3);
    }

    .badge-output {
      background: rgba(16, 185, 129, 0.15);
      color: #34d399;
      border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .badge-verified {
      background: rgba(16, 185, 129, 0.15);
      color: #10b981;
      border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .badge-unreconciled {
      background: rgba(245, 158, 11, 0.15);
      color: #fbbf24;
      border: 1px solid rgba(245, 158, 11, 0.3);
    }

    .badge-matched {
      background: rgba(139, 92, 246, 0.15);
      color: #c084fc;
      border: 1px solid rgba(139, 92, 246, 0.3);
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      border-radius: 8px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: all 0.2s;
      text-decoration: none;
    }

    .btn-primary {
      background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
      color: #fff;
    }

    .btn-primary:hover {
      box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    }

    .btn-secondary {
      background: #1e293b;
      border: 1px solid var(--border-color);
      color: #fff;
    }

    .btn-secondary:hover {
      background: #334155;
    }

    .btn-config {
      background: rgba(139, 92, 246, 0.15);
      border: 1px solid rgba(139, 92, 246, 0.4);
      color: #c084fc;
    }

    .btn-config:hover {
      background: rgba(139, 92, 246, 0.25);
    }

    .btn-sm {
      padding: 4px 10px;
      font-size: 0.76rem;
      border-radius: 6px;
    }

    .preset-tag {
      background: #1e293b;
      border: 1px solid var(--border-color);
      color: #94a3b8;
      font-size: 0.75rem;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .preset-tag:hover {
      background: #334155;
      color: #fff;
    }

    .preset-tag.active {
      background: rgba(6, 182, 212, 0.15);
      border-color: #06b6d4;
      color: #38bdf8;
    }

    /* Modal */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      padding: 20px;
    }

    .modal-overlay.active {
      display: flex;
    }

    .modal-content {
      background: #111827;
      border: 1px solid var(--border-color);
      border-radius: 16px;
      width: 100%;
      max-width: 1180px;
      max-height: 92vh;
      overflow-y: auto;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
      padding: 24px;
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border-color);
      margin-bottom: 20px;
    }

    .modal-title {
      font-size: 1.2rem;
      font-weight: 700;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .modal-close {
      background: transparent;
      border: none;
      color: #94a3b8;
      font-size: 1.4rem;
      cursor: pointer;
    }

    /* Dropzone */
    .dropzone {
      border: 2px dashed rgba(6, 182, 212, 0.4);
      border-radius: 12px;
      padding: 36px 20px;
      text-align: center;
      background: rgba(6, 182, 212, 0.03);
      cursor: pointer;
      transition: all 0.2s;
    }

    .dropzone:hover,
    .dropzone.dragover {
      border-color: #06b6d4;
      background: rgba(6, 182, 212, 0.08);
    }

    /* Form Styles */
    .form-group {
      margin-bottom: 14px;
    }

    .form-label {
      display: block;
      font-size: 0.8rem;
      font-weight: 600;
      color: #94a3b8;
      margin-bottom: 4px;
    }

    .form-input {
      width: 100%;
      background: #0f172a;
      border: 1px solid var(--border-color);
      color: #fff;
      padding: 8px 12px;
      border-radius: 8px;
      font-size: 0.85rem;
      outline: none;
      box-sizing: border-box;
    }

    .form-input:focus {
      border-color: #06b6d4;
    }

    /* E-Invoice Layout View */
    .invoice-paper {
      background: #0f172a;
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 20px;
    }

    .invoice-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 18px;
      font-size: 0.85rem;
    }

    /* Resizable Table in Detail Modal */
    .modal-items-table {
      width: 100%;
      table-layout: fixed;
      border-collapse: collapse;
      font-size: 0.82rem;
      margin: 0;
    }

    .modal-items-table th {
      position: relative;
      background: #161f30;
      color: #94a3b8;
      font-weight: 700;
      text-transform: uppercase;
      font-size: 0.72rem;
      letter-spacing: 0.04em;
      padding: 10px 12px;
      border-bottom: 1px solid var(--border-color);
      border-right: 1px solid rgba(255, 255, 255, 0.06);
      user-select: none;
      box-sizing: border-box;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .modal-items-table th:last-child {
      border-right: none;
    }

    .modal-items-table th .col-resizer {
      position: absolute;
      top: 0;
      right: 0;
      width: 6px;
      height: 100%;
      cursor: col-resize;
      z-index: 20;
      background: transparent;
      transition: background-color 0.15s ease;
    }

    .modal-items-table th .col-resizer:hover,
    .modal-items-table th .col-resizer.resizing {
      background: #06b6d4 !important;
      box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
    }

    .modal-items-table td {
      padding: 10px 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      border-right: 1px solid rgba(255, 255, 255, 0.03);
      color: #e2e8f0;
      box-sizing: border-box;
      vertical-align: middle;
      white-space: normal !important;
      word-break: break-word !important;
      overflow-wrap: anywhere !important;
      line-height: 1.45;
    }

    .modal-items-table td:last-child {
      border-right: none;
    }

    .modal-items-table tr:hover td {
      background: rgba(6, 182, 212, 0.04);
    }
    /* KPI Grid - 5 Cards Responsive */
    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 12px;
      margin-bottom: 14px;
    }

    .filter-cat-pill {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #94a3b8;
      transition: all 0.15s ease;
      cursor: pointer;
    }
    .filter-cat-pill:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #fff;
      border-color: rgba(255, 255, 255, 0.2);
    }
    .filter-cat-pill.active {
      background: rgba(6, 182, 212, 0.18) !important;
      border-color: #06b6d4 !important;
      color: #06b6d4 !important;
      font-weight: 700;
    }
    .filter-cat-pill.active#cat-pill-machinery {
      background: rgba(245, 158, 11, 0.2) !important;
      border-color: #fbbf24 !important;
      color: #fbbf24 !important;
    }
