    /* Override card max-width for wider table */
    .card { max-width: 100%; }
    #main-content { max-width: 1400px; }

    .filters-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      align-items: center;
      margin-bottom: 1.25rem;
    }

    .filters-bar input[type="text"],
    .filters-bar select {
      padding: 0.5rem 0.75rem;
      border: 1px solid #ccd5e0;
      border-radius: 6px;
      font-size: 0.9rem;
      background: #fff;
      color: #1a1a2e;
    }

    .filters-bar input[type="text"] {
      min-width: 220px;
    }

    .filters-bar input[type="text"]:focus,
    .filters-bar select:focus {
      outline: none;
      border-color: #1565c0;
      box-shadow: 0 0 0 2px rgba(21,101,192,0.15);
    }

    #invoices-table th {
      cursor: pointer;
      user-select: none;
      white-space: nowrap;
    }

    #invoices-table th:hover {
      background: #e3ecfa;
    }

    #invoices-table th .sort-arrow {
      margin-left: 0.3rem;
      font-size: 0.7rem;
      opacity: 0.4;
    }

    #invoices-table th.sorted .sort-arrow {
      opacity: 1;
    }

    /* Source badges (page-specific) */
    .badge-email { background: #e8f5e9; color: #2e7d32; }
    .badge-web   { background: #e3f2fd; color: #1565c0; }
    .badge-watch { background: #fff3e0; color: #e65100; }
    .badge-default { background: #f0f0f0; color: #555; }

    /* Status badges */
    .badge-ontvangen   { background: #e3f2fd; color: #1565c0; }
    .badge-goedgekeurd { background: #fff3e0; color: #e65100; }
    .badge-betaald     { background: #e8f5e9; color: #2e7d32; }
    .badge-betwist     { background: #ffebee; color: #c62828; }
    .badge-nietig      { background: #f0f0f0; color: #777; }

    /* Overdue row highlight */
    tr.overdue td { background: #fff5f5 !important; }
    .due-date-overdue { color: #c62828; font-weight: 600; }

    /* Status action dropdown */
    .status-dropdown { position: relative; display: inline-block; }
    .status-dropdown-menu {
      display: none; position: absolute; top: 100%; left: 0; z-index: 100;
      background: #fff; border: 1px solid #ccd5e0; border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 0.25rem 0; min-width: 200px;
    }
    .status-dropdown-menu.open { display: block; }
    .status-dropdown-item {
      display: flex; align-items: center; gap: 0.5rem;
      padding: 0.4rem 0.75rem; cursor: pointer; font-size: 0.85rem; color: #333;
    }
    .status-dropdown-item:hover { background: #f0f4fb; }

    /* Status change modal overlay */
    .status-modal-overlay {
      display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.4); z-index: 500; justify-content: center; align-items: center;
    }
    .status-modal-overlay.open { display: flex; }
    .status-modal {
      background: #fff; border-radius: 12px; padding: 1.5rem;
      min-width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    }
    .status-modal h3 { margin-bottom: 1rem; color: #0d47a1; }
    .status-modal label { display: block; margin-bottom: 0.25rem; font-weight: 600; font-size: 0.85rem; }
    .status-modal input, .status-modal textarea {
      width: 100%; padding: 0.5rem; border: 1px solid #ccd5e0;
      border-radius: 6px; font-size: 0.9rem; margin-bottom: 0.75rem;
    }
    .status-modal .btn-row { display: flex; gap: 0.5rem; justify-content: flex-end; }
    .status-modal button {
      padding: 0.5rem 1rem; border-radius: 6px; border: none;
      cursor: pointer; font-size: 0.9rem; font-weight: 600;
    }
    .status-modal .btn-primary { background: #0d47a1; color: #fff; }
    .status-modal .btn-cancel { background: #e0e0e0; color: #333; }

    .invoice-count {
      color: #555;
      font-size: 0.9rem;
      margin-bottom: 1rem;
    }

    .no-results {
      text-align: center;
      padding: 2rem;
      color: #888;
      font-size: 0.95rem;
    }

    /* Category pills */
    .cat-pill {
      display: inline-block;
      padding: 0.15rem 0.6rem;
      border-radius: 12px;
      font-size: 0.75rem;
      font-weight: 600;
      color: #fff;
      white-space: nowrap;
    }
    .cat-pill.cat-empty {
      background: #e0e0e0;
      color: #888;
      font-weight: 400;
      font-style: italic;
    }

    /* Status tabs — page-specific overrides */
    .status-tabs { overflow-x: auto; }
    .status-tab .tab-count {
      font-weight: 400;
      color: #999;
      margin-left: 0.25rem;
      font-size: 0.82rem;
    }
    .status-tab.active .tab-count { color: #1565c0; }

    /* Bulk action bar */
    .bulk-bar {
      display: none;
      align-items: center;
      gap: 1rem;
      background: #1565c0;
      color: #fff;
      padding: 0.6rem 1rem;
      border-radius: 8px;
      margin-bottom: 0.75rem;
      font-size: 0.9rem;
      font-weight: 500;
    }
    .bulk-bar.visible { display: flex; }
    .bulk-bar button {
      padding: 0.35rem 0.8rem;
      border-radius: 6px;
      border: 1.5px solid rgba(255,255,255,0.5);
      background: transparent;
      color: #fff;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
    }
    .bulk-bar button:hover { background: rgba(255,255,255,0.2); }
    .bulk-bar button.btn-danger { border-color: #ff8a80; color: #ff8a80; }
    .bulk-bar button.btn-danger:hover { background: rgba(255,138,128,0.2); }

    /* Checkbox column */
    #invoices-table th.chk-col,
    #invoices-table td.chk-col {
      width: 36px;
      text-align: center;
      cursor: default;
    }
    #invoices-table th.chk-col { cursor: pointer; }
    #invoices-table th.source-col,
    #invoices-table td.source-col {
      width: 36px;
      text-align: center;
      padding: 4px 6px;
    }
    .source-icon { display: inline-flex; align-items: center; justify-content: center; }
    #invoices-table input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
      accent-color: #1565c0;
    }

    /* Export dropdown */
    .export-dropdown { position: relative; display: inline-block; margin-left: auto; }
    .export-dropdown .btn-export {
      padding: 0.45rem 0.9rem;
      border: 1px solid #ccd5e0;
      border-radius: 6px;
      background: #fff;
      color: #1a1a2e;
      font-size: 0.9rem;
      cursor: pointer;
      font-weight: 600;
    }
    .export-dropdown .btn-export:hover { background: #f0f4fb; border-color: #1565c0; }
    .export-dropdown-menu {
      display: none; position: absolute; top: 100%; right: 0; z-index: 100;
      background: #fff; border: 1px solid #ccd5e0; border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 0.25rem 0; min-width: 200px;
      margin-top: 0.25rem;
    }
    .export-dropdown-menu.open { display: block; }
    .export-dropdown-menu a {
      display: block; padding: 0.5rem 0.75rem; font-size: 0.85rem;
      color: #333; text-decoration: none; cursor: pointer;
    }
    .export-dropdown-menu a:hover { background: #f0f4fb; }

    /* BTW modal overlay */
    .btw-modal-overlay {
      display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.4); z-index: 500; justify-content: center; align-items: center;
    }
    .btw-modal-overlay.open { display: flex; }
    .btw-modal {
      background: #fff; border-radius: 12px; padding: 1.5rem;
      min-width: 340px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    }
    .btw-modal h3 { margin-bottom: 1rem; color: #0d47a1; }
    .btw-modal label { display: block; margin-bottom: 0.25rem; font-weight: 600; font-size: 0.85rem; }
    .btw-modal select {
      width: 100%; padding: 0.5rem; border: 1px solid #ccd5e0;
      border-radius: 6px; font-size: 0.9rem; margin-bottom: 0.75rem;
    }
    .btw-modal .btn-row { display: flex; gap: 0.5rem; justify-content: flex-end; }
    .btw-modal button {
      padding: 0.5rem 1rem; border-radius: 6px; border: none;
      cursor: pointer; font-size: 0.9rem; font-weight: 600;
    }
    .btw-modal .btn-primary { background: #0d47a1; color: #fff; }
    .btw-modal .btn-cancel { background: #e0e0e0; color: #333; }

    /* Totaal footer */
    .totaal-footer {
      background: #f5f6fa;
      padding: 0.75rem 1rem;
      border-top: 2px solid #e0e0e0;
      font-size: 0.92rem;
      font-weight: 600;
      color: #333;
      position: sticky;
      bottom: 0;
    }

    .kpi-period-toggle {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      font-size: 10px;
      color: #6B7280;
      cursor: pointer;
      user-select: none;
      margin-left: 4px;
    }
    .kpi-period-toggle:hover { color: #1565c0; }
    .kpi-period-menu {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      background: #fff;
      border: 1px solid #ccd5e0;
      border-radius: 6px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      z-index: 50;
      min-width: 120px;
      padding: 4px 0;
    }
    .kpi-period-menu.open { display: block; }
    .kpi-period-menu div {
      padding: 6px 12px;
      font-size: 11px;
      cursor: pointer;
      color: #333;
    }
    .kpi-period-menu div:hover { background: #f0f4fb; }
    .kpi-period-menu div.active { font-weight: 700; color: #1565c0; }
