  /* ── Page Layout ── */
  .tax-page { width: 100%; max-width: 960px; }

  /* ── Page Header with Year Selector (extends .page-header) ── */
  .tax-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .year-selector {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .year-selector label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
  }
  .year-selector select {
    padding: 8px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-700);
    background: var(--white);
    cursor: pointer;
    min-width: 100px;
  }
  .year-selector select:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.1);
  }

  /* ── KPI Row overrides (base from design-system.css) ── */
  .tax-kpi-row {
    grid-template-columns: repeat(6, 1fr);
  }
  @media (max-width: 1200px) { .tax-kpi-row { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 768px)  { .tax-kpi-row { grid-template-columns: repeat(2, 1fr); } }

  .tax-kpi-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .tax-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  }
  .tax-kpi-value {
    font-variant-numeric: tabular-nums;
  }
  .tax-kpi-value.positive { color: var(--danger); }
  .tax-kpi-value.negative { color: var(--success); }
  .tax-kpi-value.deadline-text {
    font-size: 16px;
    line-height: 1.3;
  }

  /* ── Section Headers ── */
  .section-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--navy-700);
    display: inline-block;
  }

  /* ── Tax Calendar ── */
  .tax-calendar {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .cal-month-header {
    background: var(--navy-50);
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy-700);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--gray-200);
    border-top: 1px solid var(--gray-200);
  }
  .cal-month-header:first-child { border-top: none; }

  .cal-item {
    display: grid;
    grid-template-columns: 28px 70px 1fr 120px 100px 180px;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray-100);
    border-left: 4px solid transparent;
    transition: background 0.1s;
    gap: 8px;
  }
  .cal-item:last-child { border-bottom: none; }
  .cal-item:hover { background: var(--gray-50); }

  /* Status-based left borders */
  .cal-item.status-paid     { border-left-color: var(--success); }
  .cal-item.status-filed    { border-left-color: #3b82f6; }
  .cal-item.status-overdue  { border-left-color: var(--danger); }
  .cal-item.status-warning  { border-left-color: var(--warning); }

  .cal-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-700);
    white-space: nowrap;
  }
  .cal-desc {
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
  }
  .cal-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-700);
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .cal-status { text-align: center; }
  .cal-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
  }

  /* ── Calendar Drawer ── */
  .cal-drawer {
    display: none;
    padding: 16px 20px 16px 90px;
    background: var(--gray-50, #f9fafb);
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    color: var(--gray-700);
    overflow: hidden;
  }
  .cal-drawer.open {
    display: block;
    animation: slideDown 0.2s ease-out;
  }
  @keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
  }
  .cal-drawer table {
    width: 100%;
    max-width: 500px;
    border-collapse: collapse;
  }
  .cal-drawer table td {
    padding: 4px 12px 4px 0;
    font-size: 12px;
  }
  .cal-drawer table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }
  .cal-drawer .drawer-total {
    border-top: 1px solid var(--gray-300);
    font-weight: 700;
  }
  .cal-drawer .drawer-total td {
    padding-top: 6px;
  }
  .cal-drawer .btw-terugkrijgen { color: var(--success, #16a34a); font-weight: 600; }
  .cal-drawer .btw-betalen { color: var(--danger, #dc2626); font-weight: 600; }
  .cal-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: var(--gray-400);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1;
  }
  .cal-expand-btn:hover { background: var(--gray-100); color: var(--navy-700); }
  .cal-item.has-drawer { cursor: pointer; }
  .cal-item.has-drawer:hover { background: var(--navy-50); }

  /* Monthly BTW rows */
  .cal-item-monthly {
    background: var(--gray-50, #f9fafb);
    border-left-color: var(--gold-400, #d4b96a) !important;
    border-left-width: 3px !important;
    cursor: pointer;
  }
  .cal-item-monthly:hover {
    background: var(--navy-50, #f0f4fa);
  }
  .cal-item-monthly .cal-desc {
    font-size: 13px;
  }

  /* Calendar badges */
  .badge-betaald   { background: var(--success-bg); color: var(--success); }
  .badge-ingediend { background: #EFF6FF; color: #3b82f6; }
  .badge-open      { background: var(--gray-100); color: var(--gray-500); }
  .badge-open-warn { background: var(--warning-bg); color: var(--warning); }
  .badge-overdue   { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
  .badge-gepland   { background: var(--gray-100); color: var(--gray-500); }
  .badge-niet-ingesteld { background: var(--warning-bg); color: var(--warning); font-style: italic; }

  /* Small action buttons */
  .btn-sm {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    transition: all 0.15s;
    white-space: nowrap;
  }
  .btn-sm:hover {
    background: var(--navy-50);
    border-color: var(--navy-500);
    color: var(--navy-700);
  }
  .btn-sm.btn-sm-success {
    border-color: var(--success);
    color: var(--success);
  }
  .btn-sm.btn-sm-success:hover {
    background: var(--success-bg);
  }
  .btn-sm.btn-sm-revert {
    border-color: var(--gray-300);
    color: var(--gray-500);
    font-size: 11px;
  }
  .btn-sm.btn-sm-revert:hover {
    background: var(--warning-bg);
    border-color: var(--warning);
    color: var(--warning);
  }

  /* ── Detail Tabs ── */
  .tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid var(--gray-200);
  }
  .tab-btn {
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .tab-btn:hover {
    color: var(--navy-700);
    background: var(--navy-50);
  }
  .tab-btn.active {
    color: var(--navy-700);
    border-bottom-color: var(--gold-500);
  }
  .tab-panel {
    display: none;
    padding: 24px;
  }
  .tab-panel.active { display: block; }
  .detail-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  /* ── Period Selectors inside tabs ── */
  .period-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
  }
  .period-selector label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
  }
  .period-selector select {
    padding: 6px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-700);
    background: var(--white);
    cursor: pointer;
  }
  .period-selector select:focus {
    outline: none;
    border-color: var(--navy-500);
  }
  .period-nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .period-nav-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: var(--white);
    color: var(--navy-700);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
  }
  .period-nav-btn:hover {
    background: var(--gray-100);
  }

  /* ── Rubriek Tables ── */
  .rubriek-section-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 0 6px;
    margin-top: 16px;
    border-bottom: 1px solid var(--gray-200);
  }
  .rubriek-section-header:first-child { margin-top: 0; }

  .rubriek-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  .rubriek-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
    color: var(--gray-700);
  }
  .rubriek-table tr:last-child td { border-bottom: none; }
  .rubriek-table .rt-code {
    width: 40px;
    font-weight: 600;
    color: var(--navy-600);
    font-size: 13px;
  }
  .rubriek-table .rt-desc { font-weight: 400; }
  .rubriek-table .rt-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    width: 120px;
  }
  .rubriek-table .rt-vat {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    width: 120px;
  }

  /* Totals row */
  .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-top: 2px solid var(--navy-700);
    margin-top: 8px;
  }
  .total-row .total-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy-700);
    text-transform: uppercase;
  }
  .total-row .total-value {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .total-row .total-value.betalen { color: var(--navy-700); }
  .total-row .total-value.terugkrijgen { color: var(--success); }

  /* ── Action buttons row ── */
  .action-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
  }

  /* ── Salary / LH detail lines ── */
  .detail-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
  }
  .detail-line:last-child { border-bottom: none; }
  .detail-line .dl-label { color: var(--gray-700); }
  .detail-line .dl-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--navy-700);
  }
  .detail-line .dl-value.negative { color: var(--success); }
  .detail-line.dl-total {
    border-top: 2px solid var(--navy-700);
    border-bottom: none;
    margin-top: 4px;
    padding-top: 10px;
  }
  .detail-line.dl-total .dl-label {
    font-weight: 700;
    color: var(--navy-700);
    text-transform: uppercase;
  }
  .detail-line.dl-total .dl-value {
    font-size: 18px;
    font-weight: 700;
  }
  .detail-section-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 0 6px;
    margin-top: 12px;
  }
  .detail-section-header:first-child { margin-top: 0; }

  /* ── VPB prognose note ── */
  .prognose-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--warning-bg);
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--warning);
    font-weight: 500;
  }

  /* ── Dividend table ── */
  .dividend-table {
    width: 100%;
    border-collapse: collapse;
  }
  .dividend-table th {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
    padding: 10px 12px;
    text-align: left;
  }
  .dividend-table th.text-right { text-align: right; }
  .dividend-table td {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
  }
  .dividend-table td.text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
  }
  .dividend-table tr:last-child td { border-bottom: none; }
  .dividend-table tr:hover td { background: var(--navy-50); }

  /* empty-state: base from design-system.css */

  /* ── Modal ── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.5);
    z-index: 500;
    align-items: center;
    justify-content: center;
  }
  .modal-overlay.open { display: flex; }
  .modal {
    background: var(--white);
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
  }
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--navy-50);
  }
  .modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-700);
    margin: 0;
  }
  .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0 4px;
  }
  .modal-close:hover { color: var(--danger); }
  .modal-body { padding: 24px; }
  .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  .form-group {
    margin-bottom: 16px;
  }
  .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
  }
  .form-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-900);
    background: var(--white);
    font-family: inherit;
  }
  .form-group input:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.1);
  }

  /* Preview calc in modal */
  .calc-preview {
    background: var(--navy-50);
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 8px;
  }
  .calc-preview .cp-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
    color: var(--gray-700);
  }
  .calc-preview .cp-row.cp-total {
    border-top: 1px solid var(--gray-300);
    margin-top: 6px;
    padding-top: 8px;
    font-weight: 700;
    color: var(--navy-700);
  }

  /* ── Copy feedback ── */
  .copy-feedback {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .copy-feedback.show { opacity: 1; }

  /* ── Status period badge inline ── */
  .period-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
  }

  /* Loading */
  .loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
    font-size: 14px;
  }

  /* ── Responsive calendar ── */
  @media (max-width: 768px) {
    .cal-item {
      grid-template-columns: 28px 1fr 1fr;
      gap: 4px 12px;
    }
    .cal-expand-btn { grid-column: 1; grid-row: 1; }
    .cal-date { grid-column: 2; }
    .cal-desc { grid-column: 3; }
    .cal-amount { grid-column: 2; }
    .cal-status { grid-column: 3; text-align: left; }
    .cal-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .cal-drawer { padding-left: 40px; }
  }

  /* ── Tax detail drawer ── */
  .tax-drawer-overlay {
      display: none;
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.3);
      z-index: 900;
      transition: opacity 0.3s;
  }
  .tax-drawer-overlay.open { display: block; }

  .tax-drawer {
      position: fixed;
      top: 0;
      right: -520px;
      bottom: 0;
      width: 520px;
      background: #fff;
      box-shadow: -4px 0 24px rgba(0,0,0,0.15);
      z-index: 901;
      transition: right 0.3s ease;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
  }
  .tax-drawer.open { right: 0; }

  .tax-drawer-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 24px;
      border-bottom: 1px solid var(--gray-200);
      position: sticky;
      top: 0;
      background: #fff;
      z-index: 1;
  }
  .tax-drawer-header h3 {
      font-size: 16px;
      font-weight: 700;
      color: var(--navy-700);
      margin: 0;
  }
  .tax-drawer-close {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: var(--gray-500);
      padding: 4px;
      line-height: 1;
  }
  .tax-drawer-close:hover { color: var(--navy-700); }

  .tax-drawer-body {
      padding: 24px;
      flex: 1;
  }

  .tax-drawer-tabs {
      display: flex;
      gap: 0;
      border-bottom: 2px solid var(--gray-200);
      padding: 0 24px;
      background: var(--gray-50);
  }
  .tax-drawer-tab {
      padding: 10px 16px;
      font-size: 12px;
      font-weight: 600;
      color: var(--gray-500);
      background: transparent;
      border: none;
      cursor: pointer;
      border-bottom: 2px solid transparent;
      margin-bottom: -2px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
  }
  .tax-drawer-tab:hover { color: var(--navy-700); }
  .tax-drawer-tab.active {
      color: var(--navy-700);
      border-bottom-color: var(--gold-500);
  }

  @media (max-width: 600px) {
      .tax-drawer { width: 100%; right: -100%; }
  }

  /* ── Period Closure Grid ── */
  .period-closure-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
  }
  @media (max-width: 600px) {
    .period-closure-grid { grid-template-columns: repeat(2, 1fr); }
  }
  .pc-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.15s;
  }
  .pc-card.closed {
    background: var(--gray-50);
    border-color: var(--gray-300);
  }
  .pc-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: 4px;
  }
  .pc-card-sub {
    font-size: 11px;
    color: var(--gray-400);
    margin-bottom: 12px;
  }
  .pc-card .pc-icon {
    font-size: 24px;
    margin-bottom: 8px;
  }
  .pc-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--navy-700);
    transition: all 0.15s;
  }
  .pc-btn:hover {
    background: var(--navy-50);
    border-color: var(--navy-500);
  }
  .pc-btn-reopen {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-500);
    font-size: 11px;
    padding: 4px 12px;
  }
  .pc-btn-reopen:hover {
    border-color: var(--danger);
    color: var(--danger);
  }
