/* === Print Stylesheet === */
@media print {
  /* Ukryj elementy nawigacyjne i interaktywne */
  .sidebar,
  .sidebar-overlay,
  .sidebar-toggle,
  .top-bar,
  .login-overlay,
  .rozliczenie-tabs,
  .tab-btn,
  .btn-primary,
  .btn-edytuj,
  .btn-zapisz,
  .btn-anuluj,
  .btn-usun,
  .btn-workflow,
  .btn-pokaz-haslo,
  .btn-dodaj-klucz,
  .am,
  .toast-container,
  .custom-select-dropdown,
  #btn-dodaj-opak,
  #btn-dodaj-wynagrodzenie,
  #btn-wyczysc-filtr,
  #btn-batch-workflow,
  #btn-reset-dane,
  #btn-zapisz-ustawienia,
  .alert-dropdown,
  .nav-separator,
  .sort-icon {
    display: none !important;
  }

  /* Wyłącz animacje */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Reset layoutu */
  body {
    display: block;
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.4;
  }

  .content {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .content-inner {
    padding: 0 !important;
    animation: none !important;
  }

  /* Nagłówek widoku */
  .view-header {
    border-bottom: 2px solid #000;
    padding-bottom: 8pt;
    margin-bottom: 12pt;
  }

  .view-header h2 {
    font-size: 16pt;
    color: #000;
  }

  .view-info {
    font-size: 10pt;
    color: #333;
  }

  /* Karty KPI */
  .rozliczenie-podsumowanie {
    display: flex;
    gap: 8pt;
    margin-bottom: 10pt;
    page-break-inside: avoid;
  }

  .pods-card {
    border: 1px solid #ccc;
    padding: 6pt 10pt;
    flex: 1;
    box-shadow: none;
    animation: none !important;
  }

  .pods-label {
    color: #666;
    font-size: 8pt;
  }

  .pods-value {
    color: #000 !important;
    font-size: 14pt;
  }

  .pods-detail {
    color: #666;
    font-size: 8pt;
  }

  .pods-value--accent { color: #0891B2 !important; }
  .pods-value--success { color: #059669 !important; }
  .pods-value--danger { color: #DC2626 !important; }
  .pods-value--warn { color: #D97706 !important; }

  /* Tabele */
  .rozliczenie-table-wrapper {
    box-shadow: none;
    border: 1px solid #ccc;
    border-radius: 0;
    overflow: visible;
    page-break-inside: auto;
  }

  .rozliczenie-table {
    font-size: 9pt;
  }

  .rozliczenie-table th,
  .rozliczenie-table td {
    border: 1px solid #ddd;
    padding: 3pt 6pt;
    color: #000;
    background: #fff !important;
  }

  .rozliczenie-table thead th {
    background: #f0f0f0 !important;
    color: #000;
    font-weight: 700;
  }

  .thead-grupy th {
    background: #e0e0e0 !important;
  }

  .row-sumy td {
    background: #f5f5f5 !important;
    font-weight: 700;
  }

  /* Rola kolory - w druku plain */
  .rola-manager, .rola-auto, .rola-biuro, .rola-manager-biuro, .rola-zablokowane {
    background: #fff !important;
    color: #000;
  }

  /* Niezapłacone wiersze — podkreśl */
  .row-niezaplacona td {
    background: #fff !important;
    font-style: italic;
  }

  /* Sekcje KPI */
  .kpi-section-title {
    font-size: 12pt;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4pt;
    margin-top: 12pt;
    page-break-after: avoid;
    color: #000;
  }

  /* Wykres - zachowaj kolory na wydruku */
  .rozliczenie-table-wrapper div[style*="height:26px"] {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Łamanie stron */
  h2, h3 {
    page-break-after: avoid;
  }

  .rozliczenie-table tr {
    page-break-inside: avoid;
  }

  /* Statusy */
  .status-ok, .status-danger, .status-warn, .status-draft {
    color: #000 !important;
    border: 1px solid #999;
    background: transparent !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Kategoria badge */
  .kategoria-badge {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 1px solid #ccc;
  }

  /* Formularze — ukryj */
  .rozliczenie-table-wrapper[style*="border:2px solid"] {
    display: none !important;
  }

  /* Linki */
  a {
    color: #000;
    text-decoration: none;
  }

  /* Stopka wydruku */
  @page {
    margin: 1.5cm;
    size: A4 landscape;
  }
}
