/* Podgląd projektu i pracownika — karta tożsamości + zakładki bez tła
   Content padding=0 (full height); inset 12/16 na shellu = jak .content / #calendar */

.content:has(#tab-project.profil-page:not(.hidden)),
.content:has(#tab-employee.profil-page:not(.hidden)),
.content:has(#tab-contract.profil-page:not(.hidden)),
.content:has(#tab-aneks.profil-page:not(.hidden)),
.content:has(#tab-invoice.profil-page:not(.hidden)),
.content:has(#tab-fk-faktura.profil-page:not(.hidden)),
.content:has(#tab-fk-koszt.profil-page:not(.hidden)) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--header-h) 0 0;
}
#tab-project.profil-page:not(.hidden),
#tab-employee.profil-page:not(.hidden),
#tab-contract.profil-page:not(.hidden),
#tab-aneks.profil-page:not(.hidden),
#tab-invoice.profil-page:not(.hidden),
#tab-fk-faktura.profil-page:not(.hidden),
#tab-fk-koszt.profil-page:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0;
  max-width: none;
}

#projektProfil,
#pracownikProfil,
#umowaProfil,
#aneksProfil,
#fakturaProfil,
#fkFakturaProfil,
#fkKosztProfil {
  --prp-accent: #3148a8;
  font-size: 10pt;
  color: var(--text);
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px 8px;
}
#projektProfil *,
#pracownikProfil *,
#umowaProfil *,
#aneksProfil *,
#fakturaProfil *,
#fkFakturaProfil *,
#fkKosztProfil * { box-sizing: border-box; }

.prp-page-title,
.pp-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.prp-view-head {
  align-items: flex-start;
  margin: 0 0 12px;
}
.prp-page-title.sbm-view-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  max-width: min(920px, 100%);
}
.prp-top,
.pp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  flex: 0 0 auto;
}
.prp-doc-actions {
  justify-content: flex-end;
  margin: 0 0 8px;
}
.prp-doc-split {
  justify-content: space-between;
}
.prp-top[hidden] { display: none !important; }
.prp-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 10px;
  flex: 0 0 auto;
}
.prp-area {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--page);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.prp-area:hover {
  border-color: var(--line);
  background: rgba(78, 115, 223, 0.06);
}
.prp-area.is-active {
  background: rgba(78, 115, 223, 0.12);
  border-color: rgba(78, 115, 223, 0.35);
  box-shadow: none;
}
.prp-area[data-prp-area="finanse"].is-active {
  background: rgba(78, 115, 223, 0.16);
  border-color: rgba(78, 115, 223, 0.4);
}
.prp-area-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #3148a8 center/20px no-repeat;
}
.prp-area-ico-fin {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7'%3E%3Cpath d='M4 10h16v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8z'/%3E%3Cpath d='M8 10V8a4 4 0 0 1 8 0v2'/%3E%3Ccircle cx='12' cy='15' r='1.2' fill='%23fff' stroke='none'/%3E%3C/svg%3E");
}
.prp-area-ico-plan {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3Cpath d='M8 14h4M8 17h8'/%3E%3C/svg%3E");
}
.prp-meta-strip-host { margin: 0 0 12px; }
.prp-meta-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
.prp-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.prp-meta-cell > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.prp-meta-cell > b {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.prp-meta-strip.has-stage {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(88px, 0.7fr) minmax(88px, 0.7fr) minmax(130px, 0.95fr) minmax(180px, 1.45fr) minmax(72px, 0.55fr);
}
.prp-stage-field { position: relative; min-width: 0; }
.prp-stage-btn {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 26px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prp-stage-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 320px;
  max-width: min(420px, 70vw);
  max-height: 320px;
  overflow: auto;
  padding: 4px;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.prp-stage-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.prp-stage-menu button:hover,
.prp-stage-menu button.is-on { background: #eef3ff; }
.prp-stage-menu .prp-stage-pct { color: var(--muted); font-weight: 650; white-space: nowrap; }
.prp-stage-menu .muted { margin: 8px; }
.prp-ov-info .prp-stage-btn { font-weight: 650; }
@media (max-width: 1100px) {
  .prp-meta-strip.has-stage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .prp-meta-strip,
  .prp-meta-strip.has-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.prp-edit-ico {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.prp-team-gear {
  width: 28px;
  height: 28px;
  padding: 0 !important;
  border-radius: 6px;
  background: #eef0f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e6278' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E") center/16px no-repeat !important;
  color: transparent !important;
}
.prp-area-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: var(--text);
}
.prp-area-text strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.prp-area-text small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
@media (max-width: 800px) {
  .prp-areas { grid-template-columns: 1fr; }
}
.prp-main-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin: 2px 0 0;
  padding: 0;
  border-bottom: 1px solid #e5e7eb;
  flex: 0 0 auto;
  overflow-x: auto;
}
.prp-main-tab {
  appearance: none;
  border: 0;
  background: transparent;
  height: 40px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.prp-main-tab:hover { color: #1e3a8a; }
.prp-main-tab.is-active {
  color: #1e3a5f;
  font-weight: 700;
  border-bottom-color: #2563eb;
}
#prpTabs[hidden] { display: none !important; }
#projektProfil .prp-tabs {
  border-bottom: 0;
  gap: 6px;
  margin: 8px 0 10px;
  padding: 0;
}
#projektProfil .prp-tabs .prp-tab {
  height: 32px;
  border-radius: 8px;
  border-bottom: 0;
  margin-bottom: 0;
}
#projektProfil .prp-tabs .prp-tab.is-active,
#projektProfil .prp-tabs .prp-tab.on {
  background: #e8eefc;
  color: #2563eb;
  border-bottom: 0;
  font-weight: 600;
}
.prp-status-select {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 2px;
  max-width: 100%;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%233f4254'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}
.prp-status-select.prp-pill-run { background-color: #dbeafe; color: #1e40af; }
.prp-status-select.prp-pill-done { background-color: #d1fae5; color: #047857; }
.prp-status-select.prp-pill-hold { background-color: #fef3c7; color: #92400e; }
.prp-status-select.prp-pill-rej { background-color: #fee2e2; color: #b91c1c; }
.prp-status-select.prp-pill-prep { background-color: #e5e7eb; color: #374151; }
.prp-top-actions,
.pp-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prp-id,
.pp-id {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 12px;
  flex: 0 0 auto;
  color: var(--text);
}
.prp-id-av,
.pp-id-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 56px;
  text-align: center;
  flex: 0 0 auto;
  overflow: hidden;
}
img.pp-id-av { object-fit: cover; display: block; background: #eef0f4; }
.prp-id-main,
.pp-id-main { min-width: 0; flex: 1; }
.prp-id-name,
.pp-id-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 4px;
}
.prp-id-name strong,
.pp-id-name strong {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.pp-id-mail { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.prp-id-grid,
.pp-id-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  margin-top: 8px;
}
.prp-id-grid > span,
.prp-id-grid > div,
.pp-id-grid > span,
.pp-id-grid > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.prp-id-grid small,
.pp-id-grid small,
.prp-id-grid > div > span,
.pp-id-grid > div > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.2;
}
.prp-id-grid b,
.pp-id-grid b {
  font-weight: 500;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}
.prp-id-actions,
.pp-id-actions { flex: 0 0 auto; }
#umIdentity .prp-id-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.prp-status-pill,
.pp-status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #eef0f4;
  color: #3f4254;
}
.prp-pill-prep, .pp-pill-prep { background: #e5e7eb; color: #374151; }
.prp-pill-run, .pp-pill-run { background: #dbeafe; color: #1e40af; }
.prp-pill-done, .pp-pill-done { background: #d1fae5; color: #047857; }
.prp-pill-hold, .pp-pill-hold { background: #fef3c7; color: #92400e; }
.prp-pill-rej, .pp-pill-rej { background: #fee2e2; color: #b91c1c; }

#projektProfil .prp-tabs,
#kontrahentProfil .prp-tabs,
#pracownikProfil .pp-tabs,
#pracownikProfil .prp-tabs,
#umowaProfil .prp-tabs,
#aneksProfil .prp-tabs,
#fakturaProfil .prp-tabs,
#fkFakturaProfil .prp-tabs,
#fkKosztProfil .prp-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  border-bottom: 1px solid #e5e7eb;
  margin: 0 0 10px;
  padding: 4px 0 0;
  flex: 0 0 auto;
  overflow-x: auto;
  background: transparent;
}
#projektProfil .prp-tab,
#kontrahentProfil .prp-tab,
#pracownikProfil .pp-tab,
#pracownikProfil .prp-tab,
#umowaProfil .prp-tab,
#aneksProfil .prp-tab,
#fakturaProfil .prp-tab,
#fkFakturaProfil .prp-tab,
#fkKosztProfil .prp-tab {
  appearance: none;
  border: 0;
  background: transparent;
  height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
  box-sizing: border-box;
}
#projektProfil .prp-tab:hover,
#kontrahentProfil .prp-tab:hover,
#pracownikProfil .prp-tab:hover,
#pracownikProfil .pp-tab:hover,
#umowaProfil .prp-tab:hover,
#aneksProfil .prp-tab:hover,
#fakturaProfil .prp-tab:hover,
#fkFakturaProfil .prp-tab:hover,
#fkKosztProfil .prp-tab:hover {
  color: #3148a8;
  background: rgba(49, 72, 168, 0.06);
}
/* Aktywna zakładka: jasnoniebieskie tło + niebieski tekst + linia na dole */
#projektProfil .prp-tab.is-active,
#projektProfil .prp-tab.on,
#kontrahentProfil .prp-tab.is-active,
#kontrahentProfil .prp-tab.on,
#pracownikProfil .prp-tab.is-active,
#pracownikProfil .prp-tab.on,
#pracownikProfil .pp-tab.is-active,
#pracownikProfil .pp-tab.on,
#umowaProfil .prp-tab.is-active,
#umowaProfil .prp-tab.on,
#aneksProfil .prp-tab.is-active,
#aneksProfil .prp-tab.on,
#fakturaProfil .prp-tab.is-active,
#fakturaProfil .prp-tab.on,
#fkFakturaProfil .prp-tab.is-active,
#fkFakturaProfil .prp-tab.on,
#fkKosztProfil .prp-tab.is-active,
#fkKosztProfil .prp-tab.on {
  color: #3148a8;
  background: #e8f0fe;
  border-bottom-color: #3148a8;
  font-weight: 600;
  box-shadow: none;
}
/* Budżet: zaznaczony widok jak aktywna zakładka — jasnoniebieskie tło i niebieska obwódka */
#prpMpkViewTabs .um-view-btn.on,
#prpMpkKosztTabs .um-view-btn.on {
  color: #3148a8;
  background: #e8f0fe;
  box-shadow: inset 0 0 0 0.5px #3148a8;
}
#projektProfil .prp-tab.is-active:hover,
#projektProfil .prp-tab.on:hover,
#kontrahentProfil .prp-tab.is-active:hover,
#kontrahentProfil .prp-tab.on:hover,
#pracownikProfil .prp-tab.is-active:hover,
#pracownikProfil .prp-tab.on:hover,
#pracownikProfil .pp-tab.is-active:hover,
#pracownikProfil .pp-tab.on:hover,
#umowaProfil .prp-tab.is-active:hover,
#umowaProfil .prp-tab.on:hover,
#aneksProfil .prp-tab.is-active:hover,
#aneksProfil .prp-tab.on:hover,
#fakturaProfil .prp-tab.is-active:hover,
#fakturaProfil .prp-tab.on:hover,
#fkFakturaProfil .prp-tab.is-active:hover,
#fkFakturaProfil .prp-tab.on:hover,
#fkKosztProfil .prp-tab.is-active:hover,
#fkKosztProfil .prp-tab.on:hover {
  color: #3148a8;
  background: #dde8fc;
  border-bottom-color: #3148a8;
}

.prp-scroll,
.pp-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}

/* Faktura kosztowa: formularz + podgląd po prawej */
#fkFakturaProfil .fk-inv-work {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
  gap: 14px;
  align-items: stretch;
}
#fkFakturaProfil .fk-inv-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#fkFakturaProfil .fk-inv-main .prp-tabs {
  flex: 0 0 auto;
}
#fkFakturaProfil .fk-inv-main .prp-scroll {
  flex: 1 1 auto;
}
/* Combo projektu/MPK musi wychodzić poza scroll — inaczej wybór „nie działa” */
#fkFakturaProfil .fk-inv-main:has(.um-combo.is-open),
#fkFakturaProfil .fk-inv-main .prp-scroll:has(.um-combo.is-open),
#fkFakturaProfil #fkInvBody:has(.um-combo.is-open) {
  overflow: visible;
}
/* Umowa: MPK w transzowaniu / podziale — lista ponad kartę i scroll */
#umowaProfil .prp-scroll:has(.um-combo.is-open),
#umowaProfil #umBody:has(.um-combo.is-open),
#umowaProfil .prp-table-wrap:has(.um-combo.is-open),
#umowaProfil .um-draft:has(.um-combo.is-open),
#umowaProfil .um-draft-card:has(.um-combo.is-open) {
  overflow: visible;
}
#umowaProfil .um-draft-card:has(.um-combo.is-open),
#umowaProfil .um-tr-list-draft tr:has(.um-combo.is-open),
#umowaProfil .um-tr-list-draft td:has(.um-combo.is-open) {
  position: relative;
  z-index: 200;
}
#umowaProfil .um-combo.is-open {
  z-index: 220;
}
#umowaProfil .um-combo.is-open .um-combo-list {
  z-index: 230;
}
#fkFakturaProfil .fk-inv-preview-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #e4e6ef;
  border-radius: 10px;
  background: #f6f7fb;
  overflow: hidden;
}
#fkFakturaProfil .fk-inv-preview-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e4e6ef;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #181c32;
}
#fkFakturaProfil .fk-inv-preview-src {
  font-weight: 500;
  font-size: 11px;
  color: #7e8299;
}
#fkFakturaProfil .fk-inv-preview-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
#fkFakturaProfil .fk-inv-preview-pdf {
  display: block;
  width: 100%;
  min-height: 520px;
  height: calc(100vh - 220px);
  max-height: 900px;
  border: 0;
  border-radius: 4px;
  background: #fff;
}
#fkFakturaProfil .fk-doc {
  background: #fff;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  padding: 18px 16px 20px;
  box-shadow: 0 1px 2px rgba(24, 28, 50, 0.04);
  color: #181c32;
  font-size: 12px;
  line-height: 1.45;
}
#fkFakturaProfil .fk-doc-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef0f4;
}
#fkFakturaProfil .fk-doc-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}
#fkFakturaProfil .fk-doc-meta {
  color: #5e6278;
  font-size: 11px;
}
#fkFakturaProfil .fk-doc-ksef {
  text-align: right;
  font-size: 11px;
  color: #3f4254;
  max-width: 48%;
  word-break: break-all;
}
#fkFakturaProfil .fk-doc-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
#fkFakturaProfil .fk-doc-party h4 {
  margin: 0 0 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a1a5b7;
  font-weight: 600;
}
#fkFakturaProfil .fk-doc-party b {
  display: block;
  margin-bottom: 2px;
}
#fkFakturaProfil .fk-doc-party span {
  display: block;
  color: #5e6278;
  font-size: 11px;
}
#fkFakturaProfil .fk-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px;
  font-size: 11px;
}
#fkFakturaProfil .fk-doc th,
#fkFakturaProfil .fk-doc td {
  border-bottom: 1px solid #eef0f4;
  padding: 6px 4px;
  text-align: left;
  vertical-align: top;
}
#fkFakturaProfil .fk-doc th {
  color: #7e8299;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
}
#fkFakturaProfil .fk-doc td.num,
#fkFakturaProfil .fk-doc th.num {
  text-align: right;
  white-space: nowrap;
}
#fkFakturaProfil .fk-doc-totals {
  margin-left: auto;
  width: min(220px, 100%);
}
#fkFakturaProfil .fk-doc-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
#fkFakturaProfil .fk-doc-totals .fk-doc-gross {
  font-weight: 700;
  border-top: 1px solid #e4e6ef;
  margin-top: 4px;
  padding-top: 6px;
}
#fkFakturaProfil .fk-doc-empty {
  color: #7e8299;
  font-size: 12px;
  padding: 24px 8px;
  text-align: center;
}
@media (max-width: 1100px) {
  #fkFakturaProfil .fk-inv-work {
    grid-template-columns: 1fr;
  }
  #fkFakturaProfil .fk-inv-preview-pane {
    max-height: 420px;
  }
}

/* Gantt w profilu projektu — pełna wysokość jak w WWW */
#projektProfil.prp-gantt-on .prp-scroll {
  overflow: hidden;
  padding-bottom: 0;
}
#projektProfil.prp-gantt-on #prpGanttHost,
#projektProfil.prp-gantt-on #prpGanttPrognozaHost,
#projektProfil.prp-gantt-on #gantt_page_projekt,
#projektProfil.prp-gantt-on #gantt_shell_projekt,
#projektProfil.prp-gantt-on #gantt_page_projekt_prognoza,
#projektProfil.prp-gantt-on #gantt_shell_projekt_prognoza {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
#projektProfil.prp-gantt-on #gantt_shell_projekt,
#projektProfil.prp-gantt-on #gantt_shell_projekt_prognoza {
  padding: 0;
}
#projektProfil.prp-gantt-on #gantt_here_projekt,
#projektProfil.prp-gantt-on #gantt_here_projekt_prognoza {
  flex: 1 1 auto;
  min-height: 280px;
}
#projektProfil.prp-gantt-on .flt-row:has(#ganttFltProjects) {
  display: none !important;
}

.prp-panel { display: none; }
.prp-panel.is-active { display: block; }
#projektProfil .prp-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#projektProfil [data-prp-panel="czas"].is-active,
#projektProfil [data-prp-panel="harmonogram"].is-active,
#projektProfil [data-prp-panel="zadania"].is-active,
#projektProfil [data-prp-panel="oblozenie"].is-active,
#projektProfil [data-prp-panel="gantt"].is-active,
#projektProfil [data-prp-panel="gantt-prognoza"].is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
}
#projektProfil [data-prp-panel="czas"] .cp-projekt,
#projektProfil #embZadania {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
#projektProfil.prp-embz-filters-open #embZadania {
  overflow: visible;
}
#projektProfil.prp-embz-filters-open.prp-harm-on .prp-scroll {
  overflow: visible;
}
#projektProfil [data-prp-panel="czas"] .cp-projekt .cp-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
#projektProfil.prp-czas-on .prp-scroll,
#projektProfil.prp-zadania-on .prp-scroll,
#projektProfil.prp-occ-on .prp-scroll,
#projektProfil.prp-harm-on .prp-scroll {
  overflow: hidden;
  padding-bottom: 0;
}
#projektProfil #prpZadaniaHost,
#projektProfil #prpOccHost {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#projektProfil #prpZadaniaHost #zadaniaMoje,
#projektProfil #prpOccHost .obl-page {
  flex: 1 1 auto;
  min-height: 480px;
  width: 100%;
}
#projektProfil #prpGanttHost {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.prp-section-head,
.pp-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.prp-section-head h2,
.pp-section-head h2 {
  margin: 0 auto 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #181c32;
}
.prp-section-head.prp-section-tools-only,
.pp-section-head.pp-section-tools-only {
  justify-content: flex-end;
  margin-bottom: 12px;
}
.prp-section-head.prp-section-tools-only .prp-tab-tools,
.pp-section-head.pp-section-tools-only .pp-tab-tools {
  margin-left: 0;
}
.prp-section-head.prp-section-tools-left,
.pp-section-head.pp-section-tools-left {
  justify-content: flex-start;
}
.prp-section-head.prp-section-tools-left .prp-tab-tools,
.pp-section-head.pp-section-tools-left .pp-tab-tools {
  margin-left: 0;
  margin-right: auto;
  flex-wrap: wrap;
}
.pp-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.prp-tab-tools,
.pp-tab-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.prp-search {
  height: 32px;
  width: 180px;
  padding: 0 10px;
  border: 1px solid #e4e6ef;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  color: #3f4254;
}

.prp-table-wrap,
.pp-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
/* Tabela budżetu / zestawienia w projekcie wypełnia resztę panelu i przewija się sama,
   żeby wiersz z opisem kolumn został u góry. */
#projektProfil .prp-scroll > .prp-panel.is-active:has(.prp-table-wrap) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
#projektProfil .prp-panel.is-active .prp-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
/* Faktury przychodowe: pasek filtrów zostaje, lista dokumentów przewija się w panelu. */
#projektProfil [data-prp-panel="faktury"].is-active #prpFakturyHost {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#projektProfil #prpFakturyHost > .prp-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.prp-table-wrap .table,
.pp-table-wrap .table,
.prp-table,
.pp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  font-size: 13px;
  color: var(--text);
}
.prp-table-wrap th,
.pp-table-wrap th,
.prp-table thead th,
.pp-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
  white-space: nowrap;
  vertical-align: middle;
}
#projektProfil .prp-scroll .prp-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: var(--page, #f5f8fa);
  box-shadow: inset 0 -1px 0 var(--line, #e4e6ef);
}
#projektProfil .prp-scroll .prp-table thead tr:nth-child(2) th {
  top: 38px;
  z-index: 3;
}
.prp-table-wrap td,
.pp-table-wrap td,
.prp-table tbody td,
.pp-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  line-height: 1.35;
}
.prp-table-wrap tbody tr:hover td,
.pp-table-wrap tbody tr:hover td { background: rgba(78, 115, 223, 0.08); }

.prp-info-table { min-width: 0; background: var(--card); }
.prp-info-table th,
.prp-info-table td { padding: 12px 20px; }
.prp-info-table th {
  width: 32%;
  font-weight: 500;
  color: var(--muted);
  background: var(--card);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.prp-info-table td {
  font-weight: 600;
  color: var(--text);
  background: var(--card);
}
.prp-info-table tbody tr:hover td { background: rgba(78, 115, 223, 0.08); }

.prp-btn[hidden],
.pp-btn[hidden] { display: none !important; }
.prp-btn,
.pp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--ctrl-border, #e4e6ef);
  border-radius: 6px;
  background: var(--card, #fff);
  color: var(--text, #3f4254);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.prp-btn:hover,
.pp-btn:hover { background: var(--hover, #f9f9f9); border-color: var(--ctrl-border, #b5b5c3); }
.prp-btn-primary,
.pp-btn-primary {
  background: #4e73df;
  border-color: #4e73df;
  color: #fff;
  font-weight: 500;
}
.prp-btn-primary:hover,
.pp-btn-primary:hover {
  background: #3b5cc9;
  border-color: #3b5cc9;
  color: #fff;
}
.prp-btn-danger {
  background: #fff;
  border-color: #f1416c;
  color: #f1416c;
}
.prp-btn-danger:hover {
  background: #fff5f8;
  border-color: #f1416c;
  color: #d9214e;
}

.prp-overview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 2px 0 16px;
}
.prp-overview-fin { gap: 16px; }
.prp-fin-kpi-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.prp-fin-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e6f8f4;
  color: #1bc5bd;
}
.prp-fin-ico svg { width: 18px; height: 18px; display: block; }
.prp-overview-fin .prp-fin-kpi {
  background: #fff;
  border-color: #e6eaf2;
  border-top: 3px solid #cbd5e1;
}
.prp-overview-fin .prp-fin-kpi-przychod { border-top-color: #527dbb; }
.prp-overview-fin .prp-fin-kpi-przychod .prp-fin-ico { background: #e8f0f8; color: #527dbb; }
.prp-overview-fin .prp-fin-kpi-rbh,
.prp-overview-fin .prp-fin-kpi-fk,
.prp-overview-fin .prp-fin-kpi-kw { border-top-color: #7b8492; }
.prp-overview-fin .prp-fin-kpi-rbh .prp-fin-ico,
.prp-overview-fin .prp-fin-kpi-fk .prp-fin-ico,
.prp-overview-fin .prp-fin-kpi-kw .prp-fin-ico { background: #f0f1f3; color: #7b8492; }
.prp-overview-fin .prp-fin-kpi-wynik { border-top-color: #239653; }
.prp-overview-fin .prp-fin-kpi-wynik.is-neg { border-top-color: #d23737; }
.prp-overview-fin .prp-fin-kpi-wynik .prp-fin-ico { background: #e7f6ee; color: #239653; }
.prp-overview-fin .prp-fin-kpi-wynik.is-neg .prp-fin-ico { background: #fdeeee; color: #d23737; }
.prp-fin-lab {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
}
.prp-fin-val {
  margin-top: 2px;
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.prp-fin-val.is-neg { color: #d23737; }
.prp-fin-kpi-wynik .prp-fin-val { color: #239653; }
.prp-fin-kpi-wynik .prp-fin-val.is-neg { color: #d23737; }
#projektProfil .prp-ov-card-wynik.prp-fin-kpi {
  background: #fff;
  border-color: #e6eaf2;
  border-top: 3px solid #239653;
}
#projektProfil .prp-ov-card-wynik.prp-fin-kpi.is-neg {
  border-top-color: #d23737;
}
.prp-fin-meter {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 14px;
  margin-top: 12px;
  border-radius: 99px;
  background: transparent;
  overflow: visible;
  color: #475569;
}
.prp-fin-meter-budget {
  position: relative;
  height: 14px;
  border-radius: 99px;
  background: #e7eef8;
  overflow: hidden;
  flex: 0 0 auto;
}
.prp-fin-meter.is-over .prp-fin-meter-budget {
  border-radius: 99px 0 0 99px;
}
.prp-fin-meter-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 99px 0 0 99px;
  background: #7b8492;
}
.prp-overview-fin .prp-fin-kpi-przychod .prp-fin-meter-fill { background: #527dbb; }
.prp-overview-fin .prp-fin-kpi-wynik .prp-fin-meter-fill { background: #239653; }
.prp-fin-meter-fill.is-neg { background: #d23737; }
.prp-fin-meter-over {
  height: 14px;
  background: #d23737;
  border-radius: 0 99px 99px 0;
  flex: 0 0 auto;
  box-shadow: -2px 0 0 #fff;
}
.prp-fin-meter-pct {
  position: absolute;
  top: 50%;
  transform: translate(-100%, -50%);
  padding-right: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  z-index: 1;
}
.prp-fin-meter.is-narrow .prp-fin-meter-pct {
  transform: translate(6px, -50%);
  padding-right: 0;
  color: #475569;
}
.prp-fin-meter-pct.is-over-pct {
  left: auto;
  right: 6px;
  transform: translate(0, -50%);
  padding-right: 0;
  color: #fff;
}
.prp-fin-sub {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}
.prp-fin-sub-marza { color: #239653; font-weight: 650; }
.prp-fin-sub-marza.is-neg { color: #d23737; }
.prp-fin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
  gap: 14px;
  align-items: start;
}
.prp-fin-panel .prp-card-head-row h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.prp-fin-panel .prp-fin-ico {
  background: #e8f4ff;
  color: #3699ff;
  width: 36px;
  height: 36px;
}
.prp-fin-panel .prp-fin-ico svg { width: 18px; height: 18px; }
.prp-fin-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: -4px 0 12px;
  font-size: 12px;
  color: #64748b;
}
.prp-fin-leg { display: inline-flex; align-items: center; gap: 6px; }
.prp-fin-leg::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.prp-fin-leg-przychod::before { background: #527dbb; }
.prp-fin-leg-koszt::before { background: #7b8492; }
.prp-fin-leg-wynik::before { background: #239653; }
.prp-fin-leg-over::before { background: #d23737; }
.prp-fin-vs {
  display: grid;
  grid-template-columns: minmax(96px, 18%) minmax(64px, 1fr) auto auto auto auto auto;
  gap: 10px 10px;
  align-items: center;
}
.prp-fin-vs-head {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  text-align: right;
  color: #64748b;
}
.prp-fin-vs-row {
  display: contents;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.prp-fin-vs-lab { font-size: 13px; font-weight: 600; color: var(--text); }
.prp-fin-vs-row:hover .prp-fin-vs-lab { color: #527dbb; }
.prp-fin-vs-track {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 28px;
  background: transparent;
}
.prp-fin-bar {
  display: flex;
  height: 12px;
  border-radius: 4px;
  overflow: hidden;
  background: #e6e8eb;
}
.prp-fin-vs-row.is-przychod .prp-fin-bar { background: #d9e4f2; }
.prp-fin-vs-row.is-koszt .prp-fin-bar { background: #e6e8eb; }
.prp-fin-vs-row.is-wynik .prp-fin-bar { background: #d7f0e2; }
.prp-fin-prog-track {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: #eef0f2;
  overflow: hidden;
}
.prp-fin-vs-row.is-przychod .prp-fin-prog-track { background: #e7eef6; }
.prp-fin-vs-row.is-wynik .prp-fin-prog-track { background: #e8f6ee; }
.prp-fin-prog-track .prp-fin-bar {
  height: 100%;
  background: #7b8492;
}
.prp-fin-vs-row.is-przychod .prp-fin-bar-prog { background: #527dbb; }
.prp-fin-vs-row.is-koszt .prp-fin-bar-prog { background: #7b8492; }
.prp-fin-vs-row.is-wynik .prp-fin-bar-prog { background: #239653; }
.prp-fin-bar.is-neg,
.prp-fin-vs-row.is-neg .prp-fin-bar,
.prp-fin-vs-row.is-neg .prp-fin-bar-prog { background: #f8d6d6; }
.prp-fin-seg { display: block; height: 100%; min-width: 0; }
.prp-fin-seg-done { background: #7b8492; }
.prp-fin-vs-row.is-przychod .prp-fin-seg-done { background: #527dbb; }
.prp-fin-vs-row.is-wynik .prp-fin-seg-done { background: #239653; }
.prp-fin-seg-rest { background: rgba(123, 132, 146, 0.55); }
.prp-fin-vs-row.is-przychod .prp-fin-seg-rest { background: rgba(82, 125, 187, 0.55); }
.prp-fin-vs-row.is-wynik .prp-fin-seg-rest { background: rgba(35, 150, 83, 0.55); }
.prp-fin-seg-over { background: #d23737; }
.prp-fin-vs-row.is-neg .prp-fin-seg-done,
.prp-fin-vs-row.is-neg .prp-fin-seg-rest,
.prp-fin-vs-row.is-neg .prp-fin-seg-over,
.prp-fin-vs-row.is-neg .prp-fin-bar-prog { background: #d23737; }
.prp-fin-vs-vals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 84px;
}
.prp-fin-vs-vals b {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.prp-fin-vs-vals b.is-neg { color: #d23737; }
.prp-fin-odch.is-good { color: #239653; }
.prp-fin-odch.is-bad { color: #d23737; }
.prp-fin-vs-vals span { font-size: 12px; color: #64748b; }
.prp-fin-axis-row { display: contents; }
.prp-fin-axis {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}
.prp-fin-mail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.prp-fin-mail li {
  display: grid;
  grid-template-columns: 10px minmax(108px, 150px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f8;
  cursor: pointer;
}
.prp-fin-mail li:last-child { border-bottom: 0; }
.prp-fin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}
.prp-fin-dot.is-new { background: #3b82f6; }
.prp-fin-who {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prp-fin-topic {
  font-size: 13px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prp-fin-mail li[data-open-task] .prp-fin-topic { color: #2563eb; }
.prp-fin-mail li[data-open-task]:hover .prp-fin-topic { text-decoration: underline; }
.prp-fin-when {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .prp-fin-split { grid-template-columns: 1fr; }
}
.prp-ov-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.prp-ov-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px 12px;
  min-width: 0;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text);
}
.prp-ov-card:hover { border-color: #c9cdd8; }
.prp-overview-fin .prp-fin-kpi:hover {
  border-right-color: #c9cdd8;
  border-bottom-color: #c9cdd8;
  border-left-color: #c9cdd8;
}
.prp-overview-fin .prp-fin-kpi-przychod:hover { border-top-color: #527dbb; }
.prp-overview-fin .prp-fin-kpi-rbh:hover,
.prp-overview-fin .prp-fin-kpi-fk:hover,
.prp-overview-fin .prp-fin-kpi-kw:hover { border-top-color: #7b8492; }
.prp-overview-fin .prp-fin-kpi-wynik:hover { border-top-color: #239653; }
.prp-overview-fin .prp-fin-kpi-wynik.is-neg:hover { border-top-color: #d23737; }
.prp-ov-card-bar {
  display: flex;
  height: 5px;
  margin-top: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: #eef0f4;
}
.prp-ov-seg { display: block; height: 100%; min-width: 0; }
.prp-ov-seg-plan { background: #3b82f6; position: absolute; opacity: 0.18; }
.prp-ov-seg-done { background: #22c55e; }
.prp-ov-seg-rest { background: #f59e0b; }
.prp-ov-seg-over { background: #ef4444; }
.prp-ov-card-przychod .prp-ov-card-bar { background: #dbeafe; }
.prp-ov-card-rbh .prp-ov-card-bar { background: #ede9fe; }
.prp-ov-card-fk .prp-ov-card-bar { background: #fee2e2; }
.prp-ov-card-kw .prp-ov-card-bar { background: #ffedd5; }
.prp-ov-card-wynik .prp-ov-card-bar { background: #d1fae5; }
.prp-ov-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.9fr) 280px;
  gap: 14px;
  align-items: start;
}
.prp-ov-mail-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}
.prp-ov-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 11px;
  color: #7e8299;
}
.prp-ov-leg { display: inline-flex; align-items: center; gap: 6px; }
.prp-ov-leg::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #94a3b8;
}
.prp-ov-leg-plan::before { background: #3b82f6; }
.prp-ov-leg-done::before { background: #22c55e; }
.prp-ov-leg-rest::before { background: #f59e0b; }
.prp-ov-leg-over::before { background: #ef4444; }
.prp-ov-vs-rows { display: flex; flex-direction: column; gap: 10px; }
.prp-ov-vs-row {
  display: grid;
  grid-template-columns: minmax(140px, 28%) minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  width: 100%;
  padding: 6px 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.prp-ov-vs-lab { font-size: 13px; font-weight: 600; color: var(--text); }
.prp-ov-vs-track {
  position: relative;
  display: flex;
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  background: #bfdbfe; /* budżet = niebieski tor */
}
.prp-ov-vs-vals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 96px;
}
.prp-ov-vs-wyk { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.prp-ov-vs-pct { font-size: 11px; color: var(--muted); }
.prp-ov-mail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prp-ov-mail-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.prp-ov-mail-av {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}
.prp-ov-mail-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prp-ov-mail-body b { font-size: 13px; color: var(--text); }
.prp-ov-mail-body span { font-size: 13px; color: var(--text); line-height: 1.35; }
.prp-ov-mail-body small { font-size: 11px; color: var(--muted); }
.prp-ov-team { position: sticky; top: 0; }
.prp-ov-team-list { display: flex; flex-direction: column; gap: 14px; }
.prp-ov-team-row { display: flex; flex-direction: column; gap: 6px; }
.prp-ov-team-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7e8299;
}
.prp-ov-team-person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prp-ov-team-chev {
  margin-left: auto;
  width: 10px;
  height: 10px;
  background: #a1a5b7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.prp-ov-team-person b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.prp-ov-team-person small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.prp-ov-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 10px;
}
.prp-ov-panel { min-width: 0; }
.prp-ov-panel .prp-card-head-row h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.prp-ov-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #3699ff;
  background: #e8f4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.prp-ov-ico svg { width: 18px; height: 18px; display: block; }
.prp-ov-ico.is-blue { background: #e8f4ff; color: #3699ff; }
.prp-ov-ico.is-teal { background: #e6f8f4; color: #1bc5bd; }
.prp-ov-ico.is-violet { background: #f3e8ff; color: #8950fc; }
.prp-ov-ico.is-orange { background: #fff4e6; color: #ff9f1a; }
.prp-ov-info {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px 28px;
  margin: 0;
}
.prp-ov-info > div dt {
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.prp-ov-info > div dd {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
}
.prp-ov-info > div.is-desc dd { font-weight: 450; }
.prp-ov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.prp-ov-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--line);
}
.prp-ov-table td {
  padding: 9px 8px 9px 0;
  border-bottom: 1px solid #f1f3f8;
  vertical-align: middle;
  color: var(--text);
}
.prp-ov-table tr:last-child td { border-bottom: 0; }
.prp-ov-table a { color: #3148a8; text-decoration: none; }
.prp-ov-table a:hover { text-decoration: underline; }
.prp-ov-segs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 4px;
  overflow-x: auto;
}
.prp-ov-segbtn {
  border: 0;
  background: transparent;
  padding: 8px 0 9px;
  margin-bottom: -1px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.prp-ov-segbtn.is-on {
  color: #3148a8;
  font-weight: 650;
  border-bottom-color: #3148a8;
}
.prp-ov-more {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.prp-ov-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
@media (max-width: 1100px) {
  .prp-ov-home { grid-template-columns: 1fr; }
}
@media (max-width: 1280px) {
  .prp-ov-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prp-ov-main { grid-template-columns: minmax(0, 1fr) 280px; }
  .prp-ov-mail { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .prp-ov-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prp-ov-main { grid-template-columns: 1fr; }
  .prp-ov-team { position: static; }
  .prp-ov-mail { grid-column: auto; }
  .prp-ov-vs-row { grid-template-columns: 1fr; gap: 6px; }
  .prp-ov-vs-vals { flex-direction: row; justify-content: space-between; width: 100%; }
}
.prp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.prp-kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
  color: var(--text);
}
.prp-kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.prp-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.prp-kpi-hint { margin-top: 4px; font-size: 12px; color: var(--muted); }
.prp-kpi-btn,
.prp-fin-card,
.prp-sum,
.prp-bar-btn,
.prp-doc-item,
.prp-signal {
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.prp-kpi-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
  width: 100%;
  color: var(--text);
}
.prp-kpi-btn:hover { border-color: #c9cdd8; }
.prp-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prp-signal {
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: #f9f9fb;
  color: #3f4254;
}
.prp-signal-ok { background: #e8fff3; border-color: #c9f7e3; color: #0bb783; cursor: default; }
.prp-signal-warn { background: #fff8dd; border-color: #ffeeba; color: #b78103; }
.prp-signal-danger { background: #fff5f8; border-color: #ffc6d3; color: #f1416c; }
.prp-signal-info { background: #f1faff; border-color: #cce4ff; color: #009ef7; }
.prp-fin-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.prp-fin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  width: 100%;
  color: var(--text);
}
.prp-fin-card:hover { border-color: #c9cdd8; }
.prp-card-head-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.prp-ov-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.prp-card-head-row h3 { margin: 0 !important; }
.prp-link-btn {
  border: 0;
  background: transparent;
  color: #009ef7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.prp-link-btn:hover { text-decoration: underline; }
.prp-ov-mpk-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.prp-team-list { display: flex; flex-direction: column; gap: 8px; }
.prp-team-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
}
.prp-team-name { font-size: 13px; color: var(--text); }
.prp-team-rbh { font-size: 12px; color: #7e8299; font-variant-numeric: tabular-nums; }
.prp-doc-list,
.prp-act-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prp-doc-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1f1f4;
  background: transparent;
  padding: 8px 0;
  color: inherit;
}
.prp-doc-item:hover .prp-doc-main b { color: #009ef7; }
.prp-doc-main,
.prp-act-main { font-size: 13px; color: var(--text); }
.prp-doc-meta,
.prp-act-meta { font-size: 12px; color: #a1a5b7; }
.prp-act-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f1f4;
}
.prp-bar-btn {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
}
.prp-bar-btn:hover .prp-bar-lab { color: #009ef7; }
.prp-bar-fill.prp-bud-plus { background: #0bb783; }
.prp-bar-fill.prp-bud-minus { background: #f1416c; }
.prp-bar-val.prp-bud-plus { color: #0bb783; font-weight: 600; }
.prp-bar-val.prp-bud-minus { color: #f1416c; font-weight: 600; }
.prp-chk-col { width: 28px; text-align: center; }
.prp-summary-row .prp-sum {
  border: 1px solid #eef0f4;
  background: #f9f9fb;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.prp-summary-row .prp-sum:hover { border-color: #d6d9e4; }
.prp-dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}
.prp-dash-docs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#projektProfil .prp-card,
#kontrahentProfil .prp-card,
#pracownikProfil .pp-card,
#umowaProfil .prp-card,
#fakturaProfil .prp-card,
#fkFakturaProfil .prp-card,
#fkKosztProfil .prp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  overflow: visible;
  box-shadow: none;
  color: var(--text);
}
#kontrahentProfil .kh-contact-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}
#kontrahentProfil .prp-meta-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
#kontrahentProfil .um-block {
  margin-bottom: 12px;
}
#projektProfil .prp-card-head,
#pracownikProfil .pp-card-head,
#umowaProfil .prp-card-head,
#fakturaProfil .prp-card-head,
#fkFakturaProfil .prp-card-head,
#fkKosztProfil .prp-card-head {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
}
#projektProfil .prp-card-head h3,
#pracownikProfil .pp-card-head h3,
#umowaProfil .prp-card-head h3,
#fakturaProfil .prp-card-head h3,
#fkFakturaProfil .prp-card-head h3,
#fkKosztProfil .prp-card-head h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
#umowaProfil .um-stack,
#fkFakturaProfil .um-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#umowaProfil .um-card-head,
#fkFakturaProfil .um-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
#umowaProfil .um-card-head h3,
#fkFakturaProfil .um-card-head h3 { margin: 0; }
#umowaProfil .prp-kpis { margin-bottom: 12px; }
#umowaProfil .umowa-form label,
#aneksProfil .umowa-form label,
#fakturaProfil .umowa-form label,
#fkFakturaProfil .umowa-form label,
#fkKosztProfil .umowa-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
#umowaProfil .umowa-form .chk,
#aneksProfil .umowa-form .chk,
#fakturaProfil .umowa-form .chk,
#fkFakturaProfil .umowa-form .chk,
#fkKosztProfil .umowa-form .chk {
  font-weight: 500;
  color: var(--text);
}
#fakturaProfil .prp-card-body,
#fkFakturaProfil .prp-card-body { padding-top: 0; }
#fakturaProfil .um-cols,
#fkFakturaProfil .um-cols,
#fkKosztProfil .um-cols {
  gap: 24px 40px;
  padding: 20px 22px 28px;
}
#fakturaProfil .um-cols .um-col,
#fkFakturaProfil .um-cols .um-col,
#fkKosztProfil .um-cols .um-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#fakturaProfil .um-field > label,
#fkFakturaProfil .um-field > label,
#fkKosztProfil .um-field > label { margin-bottom: 6px; }
#fakturaProfil .um-field input,
#fakturaProfil .um-field select,
#fkFakturaProfil .um-field input,
#fkFakturaProfil .um-field select,
#fkKosztProfil .um-field input,
#fkKosztProfil .um-field select { margin-top: 0; }
#fakturaProfil .um-field.kh-flags,
#fkFakturaProfil .um-field.kh-flags { gap: 10px; }
#fakturaProfil .kh-preview,
#fkFakturaProfil .kh-preview { margin-top: 8px; }
#fakturaProfil .inv-vat-wrap { margin-top: 18px; }
#fakturaProfil .inv-vat-wrap.hidden { display: none; }
#fakturaProfil .inv-vat-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #181c32;
}
#fakturaProfil .inv-pos-total td {
  font-weight: 700;
  background: #f9fafb;
  border-top: 2px solid #e4e6ef;
}
#fakturaProfil .inv-zal-pick { flex-wrap: wrap; }
#fakturaProfil .z-num-lab { font-size: 11px; margin-top: 4px; }
.prp-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.prp-sum {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 12px;
}
.prp-sum span { display: block; font-size: 12px; color: #7e8299; margin-bottom: 4px; }
.prp-sum b { font-size: 20px; color: var(--text); }
.prp-sum-active { background: #eef6ff; }
.prp-sum-active b { color: #1e40af; }
.prp-sum-done { background: #ecfdf5; }
.prp-sum-done b { color: #047857; }
.prp-sum-over { background: #fff7ed; }
.prp-sum-over b { color: #c2410c; }
.prp-sum-yet { background: #f5f3ff; }
.prp-sum-yet b { color: #6d28d9; }
.prp-progress {
  margin-top: 12px;
  height: 8px;
  background: #eef0f4;
  border-radius: 99px;
  overflow: hidden;
}
.prp-progress-bar { height: 100%; background: #c5d4f7; border-radius: 99px; }
.prp-team { display: flex; flex-wrap: wrap; gap: 6px; }
.prp-team-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 36px;
  text-align: center;
}
.prp-team-names { margin-top: 10px; font-size: 13px; color: #5e6278; line-height: 1.45; }
.prp-bars { display: flex; flex-direction: column; gap: 8px; }
.prp-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 72px;
  gap: 10px;
  align-items: center;
}
.prp-bar-lab {
  font-size: 12px;
  color: #3f4254;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prp-bar-track { height: 8px; background: #eef0f4; border-radius: 99px; overflow: hidden; }
.prp-bar-fill { height: 100%; background: #50cd89; border-radius: 99px; }
.prp-bar-val { font-size: 12px; color: #7e8299; text-align: right; }
.prp-placeholder,
.pp-placeholder {
  color: #a1a5b7;
  font-size: 13px;
  padding: 24px 8px;
  text-align: center;
}
.prp-list-wrap .item {
  border: 0;
  border-bottom: 1px solid #eef0f4;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 14px;
}

@media (max-width: 900px) {
  .prp-kpis,
  .prp-fin-row,
  .prp-dash-grid,
  .prp-dash-docs,
  .prp-summary-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .prp-kpis,
  .prp-fin-row,
  .prp-dash-grid,
  .prp-dash-docs,
  .prp-summary-row { grid-template-columns: 1fr; }
}

/* Profil pracownika — narzędzia, filtry, miesiąc, modal (jak WWW) */
#pracownikProfil { --pp-accent: #3148a8; }
#pracownikProfil .pp-tab.is-active {
  color: var(--pp-accent);
  border-bottom-color: var(--pp-accent);
  font-weight: 600;
}
#pracownikProfil .pp-tab:hover {
  color: var(--text, #3f4254);
  background: transparent;
}
.pp-status {
  color: #a1a5b7;
  min-height: 0;
  margin: 0;
  flex: 0 0 auto;
  font-size: 13px;
}
.pp-status:not(:empty) { min-height: 18px; margin: 0 0 6px; }
.pp-status.is-error { color: #f1416c; }
.pp-panel { display: none; }
.pp-panel.is-active { display: block; }
.pp-search {
  flex: 0 0 200px;
  width: 200px;
  min-width: 140px;
  max-width: 240px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--ctrl-border, #e4e6ef);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text, #3f4254);
  background: var(--card, #fff);
}
.pp-search:focus {
  outline: none;
  border-color: var(--pp-accent);
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.18);
}
.pp-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  margin: 0;
  height: 32px;
  box-sizing: border-box;
  padding: 0 10px 0 6px;
  border-radius: 6px;
  background: var(--card, #fff);
  border: 1px solid var(--ctrl-border, #e4e6ef);
}
.pp-switch-input { position: absolute; opacity: 0; width: 0; height: 0; }
.pp-switch-track {
  width: 32px;
  height: 18px;
  border-radius: 99px;
  background: #e4e6ef;
  position: relative;
  flex: 0 0 auto;
}
.pp-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.pp-switch-input:checked + .pp-switch-track { background: #93c5fd; }
.pp-switch-input:checked + .pp-switch-track::after { left: 16px; }
.pp-switch-label { font-size: 13px; color: var(--text, #3f4254); font-weight: 500; }
.pp-switch-input:checked ~ .pp-switch-label { color: var(--primary, #1e3a8a); }
.pp-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted, #5e6278);
  white-space: nowrap;
}
.pp-select {
  height: 32px;
  border: 1px solid var(--ctrl-border, #e4e6ef);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text, #3f4254);
  background: var(--card, #fff);
}
.pp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text, #374151);
  font-weight: 500;
}
.pp-filters-wrap { position: relative; z-index: 60; }
.pp-btn.has-filters,
.flt-btn.has-filters {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}
.pp-filter-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 5h18l-7 8v5l-4 2v-7L3 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 5h18l-7 8v5l-4 2v-7L3 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pp-filters-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 640px;
  max-width: min(640px, 96vw);
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  padding: 16px 18px;
  box-sizing: border-box;
  z-index: 120;
  color: var(--text);
}
.pp-filters-narrow { width: 320px; max-width: min(320px, 96vw); }
.pp-filters-narrow .pp-switch { width: 100%; margin-top: 4px; }
.pp-filters-popover[hidden] { display: none !important; }
.pp-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text, #111827);
}
.pp-link-btn {
  border: 0;
  background: transparent;
  color: #4e73df;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}
.pp-link-btn:hover { text-decoration: underline; }
.pp-group-row td {
  background: var(--panel-2, #f8f9fb);
  font-weight: 600;
  color: var(--text, #181c32);
  cursor: pointer;
  user-select: none;
  padding: 0;
  border-bottom: 1px solid var(--line, #eef0f4);
  vertical-align: middle;
}
.pp-group-row:hover td { background: var(--hover, #f4f6fa); }
.pp-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 14px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.pp-group-row.is-collapsed .um-group-chevron svg { transform: rotate(90deg); }
.pp-group-row:not(.is-collapsed) .um-group-chevron svg { transform: rotate(180deg); }
.pp-group-chevron {
  display: none;
}
.pp-table tbody td.pp-empty {
  text-align: center;
  color: #a1a5b7;
  cursor: default;
  padding: 48px 16px;
}
#ppHoursTable, #ppTasksTable, #ppPayTable, #ppOblTable { min-width: 860px; }
.pp-info-table { min-width: 640px; }
.pp-info-table th {
  width: 280px;
  max-width: 46%;
  font-weight: 500;
  color: var(--text, #3f4254);
  background: var(--card, #fff);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.pp-info-table td {
  font-weight: 600;
  color: var(--text, #181c32);
}
[data-pp-panel="uprawnienia"] .pp-table-wrap { margin: 0; }
[data-pp-panel="uprawnienia"] .pp-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #7e8299;
  line-height: 1.45;
}
.pp-perm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0 0 10px;
  align-items: flex-end;
}
.pp-perm-toolbar .pp-field { margin: 0; min-width: 200px; }
.pp-perm-toolbar .pp-field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5e6278;
  margin-bottom: 4px;
}
.pp-perm-toolbar select {
  min-width: 220px;
  height: 36px;
  border: 1px solid #e1e3ea;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.pp-perm-table-wrap { max-height: 62vh; overflow: auto; }
.pp-perm-grid { width: 100%; border-collapse: collapse; }
.pp-perm-grid thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #5e6278;
  text-transform: none;
  letter-spacing: 0;
}
.pp-perm-grid th.pp-perm-col-screen,
.pp-perm-grid td.pp-perm-col-screen { text-align: left; }
.pp-perm-grid td { text-align: center; font-weight: 500; }
.pp-perm-grid tr.is-mod-off { opacity: 0.48; background: #f4f5f8; }
.pp-perm-grid tr.is-mod-off td { color: #6b7280; }
.pp-perm-sec-row th {
  background: #eef2ff;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 8px 12px;
  color: #1e3a8a;
  text-align: left;
}
.pp-perm-sec-hint td {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
  text-align: left;
  background: #f8fafc;
}
.pp-perm-na { color: #c4c9d4; }
.pp-perm-grid.is-role-full { display: none; }
.pp-doc-view-box {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 4px;
}
.pp-doc-view-box .pp-field { display: block; margin: 0; }
.pp-doc-view-box .pp-field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5e6278;
  margin-bottom: 6px;
}
.pp-doc-view-box .mpick { width: 100%; }
#ppDocViewStatus { margin: 8px 0 0; min-height: 1.2em; }
.pp-scroll .pp-section-head:not(:first-child) { margin-top: 16px; }
.pp-month-nav { display: inline-flex; align-items: center; gap: 6px; }
.pp-month-label {
  min-width: 140px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #181c32);
}
.pp-btn-icon { width: 32px; padding: 0; font-size: 18px; line-height: 1; }
.pp-month-cal {
  background: var(--card, #fff);
  border: 1px solid var(--line, #eef0f4);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.pp-month-week, .pp-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.pp-month-week {
  margin-bottom: 6px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}
.pp-month-week span:nth-child(6),
.pp-month-week span:nth-child(7) { color: #2c3f8f; font-weight: 600; }
.pp-month-empty { min-height: 44px; }
.pp-month-day {
  min-height: 52px;
  border-radius: 8px;
  padding: 6px;
  background: var(--panel-2, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pp-month-num { font-size: 12px; color: var(--muted, #5e6278); font-weight: 600; }
.pp-month-mark { font-size: 11px; font-weight: 700; color: #1e3a8a; }
.pp-month-day.is-today { box-shadow: inset 0 0 0 1px var(--pp-accent); }
.pp-month-day.has-items { background: #eff6ff; }
.pp-month-cal-hours .pp-month-day.is-low { background: #dbeafe; }
.pp-month-cal-hours .pp-month-day.is-mid { background: #93c5fd; }
.pp-month-cal-hours .pp-month-day.is-mid .pp-month-mark { color: #1e3a8a; }
.pp-month-cal-hours .pp-month-day.is-full { background: #3b82f6; }
.pp-month-cal-hours .pp-month-day.is-full .pp-month-num,
.pp-month-cal-hours .pp-month-day.is-full .pp-month-mark { color: #fff; }
#ppPayTable tbody tr, #ppBonusTable tbody tr { cursor: pointer; }
#ppTasksTbody tr[data-open-task],
#ppOrgTbody tr[data-open-task],
#ppOblTbody tr[data-open-task] { cursor: pointer; }
.pp-perm-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.pp-perm-matrix { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.pp-perm-group { margin: 14px 0 4px; font-size: 13px; font-weight: 700; color: #1f2937; }
.pp-perm-group .muted { font-weight: 500; font-size: 12px; color: #6b7280; }
.pp-perm-hint { margin: 0 0 8px; }
.pp-perm-sec { margin: 10px 0 2px; font-size: 12px; font-weight: 600; color: #5e6278; }
.pp-perm-switch {
  width: 100%;
  height: auto;
  min-height: 36px;
  padding: 8px 10px;
  justify-content: flex-start;
}
.pp-modal-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 24px;
  overflow: auto;
}
.pp-modal {
  width: 640px;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  padding: 20px 22px 18px;
  position: relative;
}
.pp-modal h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #1e3a5f;
}
.pp-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 22px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
}
.pp-modal-close:hover { background: #f3f4f6; }
.pp-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.pp-row[hidden],
.pp-row.is-off,
.pp-bonus-period-row.is-off {
  display: none !important;
}
.pp-row > span:first-child {
  color: #1e3a5f;
  font-weight: 600;
  font-size: 13px;
}
.pp-row input, .pp-row select {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  color: #1f2937;
  background: #fff;
}
.pp-modal .pp-hint { margin: -4px 0 12px 182px; font-size: 12px; color: #7e8299; }
.pp-modal .pp-row .pp-switch { width: auto; justify-self: start; }
.pp-modal .pp-row .pp-switch-input {
  position: absolute;
  width: 0;
  height: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
}
.pp-modal-status { min-height: 18px; margin: 4px 0 10px; font-size: 13px; color: #5e6278; }
.pp-modal-status.is-err { color: #f1416c; }
.pp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.pp-modal-bonus { width: 720px; }
.pp-bonus-emp {
  margin: 0 0 14px;
  font-size: 13px;
  color: #5e6278;
}
.pp-row-top { align-items: start; }
.pp-photo-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.pp-photo-preview-wrap {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 1px dashed #cdd2de;
  background: #f9fafb;
  overflow: hidden;
}
.pp-photo-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
}
.pp-photo-preview.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #a1a5b7;
}
.pp-photo-hint { margin: 0 !important; }
.pp-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-photo-box input[type="url"] { width: 100%; }
.pp-row-top textarea {
  display: block;
  width: 100%;
  min-height: 56px;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.pp-bonus-ms {
  margin: 8px 0 12px;
  padding-top: 8px;
  border-top: 1px solid #eef0f4;
}
.pp-bonus-ms-head {
  font-size: 12px;
  font-weight: 700;
  color: #475467;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pp-bonus-ms-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.pp-bonus-ms-cell {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
}
.pp-bonus-ms-cell span {
  display: block;
  font-size: 10px;
  color: #98a2b3;
  margin-bottom: 2px;
}
.pp-bonus-ms-cell strong {
  font-size: 12px;
  color: #344054;
  font-weight: 600;
}
@media (max-width: 720px) {
  .pp-bonus-ms-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* —— Budżet: Plan budżetu (grupy kolumn + menu + MPK) —— */
/* Kod wąski (nr + wcięcie), Opis główny — klasy, nie nth-child (Plan MPK ma checkbox/Wid.) */
#prpMpkTable th.prp-mpk-col-kod,
#prpMpkTable td.prp-kod,
#prpMpkTable td.prp-mpk-col-kod {
  width: 1%;
  white-space: nowrap;
}
/* Plan MPK: Widoczne i Kod tylko na treść (width:1px + nowrap), reszta w Opisie */
#prpMpkTable.prp-mpk-view-plan-all th.prp-mpk-col-vis,
#prpMpkTable.prp-mpk-view-plan-all td.prp-mpk-col-vis,
#prpMpkTable.prp-mpk-view-plan-all th.prp-mpk-col-kod,
#prpMpkTable.prp-mpk-view-plan-all td.prp-mpk-col-kod {
  width: 1px;
  max-width: none;
  white-space: nowrap;
}
#prpMpkTable.prp-mpk-view-plan-all th.prp-mpk-col-vis,
#prpMpkTable.prp-mpk-view-plan-all td.prp-mpk-col-vis {
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}
#prpMpkTable.prp-mpk-view-plan-all th.prp-mpk-col-kod,
#prpMpkTable.prp-mpk-view-plan-all td.prp-mpk-col-kod {
  padding-right: 8px;
}
#prpMpkTable.prp-mpk-view-plan-all th.prp-mpk-col-opis,
#prpMpkTable.prp-mpk-view-plan-all td.prp-mpk-col-opis {
  width: 100%;
  min-width: 0;
}
#prpMpkTable:not(.prp-mpk-view-plan-all) th.prp-mpk-col-opis,
#prpMpkTable:not(.prp-mpk-view-plan-all) td.prp-mpk-col-opis,
#prpMpkTable:not(.prp-mpk-view-plan-all) td.prp-kod + td {
  min-width: 220px;
  width: 28%;
}
/* Plan budżetu bez klas na th — pierwszy = Kod */
#prpMpkTable:not(.prp-mpk-view-plan-all) thead tr:first-child th:first-child {
  width: 88px;
  max-width: 110px;
  white-space: nowrap;
}
#prpMpkTable:not(.prp-mpk-view-plan-all) thead tr:first-child th:nth-child(2) {
  min-width: 220px;
  width: 28%;
}
#prpMpkTable .prp-mpk-zad {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
#prpMpkTable .prp-mpk-inp {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--ctrl-border, #e4e6ef);
  border-radius: 6px;
  background: var(--card, #fff);
  color: var(--text, #3f4254);
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
}
#prpMpkTable .prp-mpk-inp:focus {
  outline: none;
  border-color: #009ef7;
  box-shadow: 0 0 0 2px rgba(0, 158, 247, 0.12);
}
#prpMpkTable .prp-mpk-inp-num,
#prpMpkTable td.num .prp-mpk-inp {
  text-align: right;
}
#prpMpkTable .prp-mpk-zad .prp-mpk-inp {
  flex: 0 1 96px;
  width: 96px;
  max-width: 110px;
  min-width: 56px;
  text-align: left;
}
#prpMpkTable td.prp-kod + td .prp-mpk-inp {
  width: 100%;
  min-width: 180px;
  max-width: none;
}
html[data-color-scheme="dark"] #prpMpkTable .prp-mpk-inp {
  background: var(--input-bg, #151c27);
  color: var(--text);
  border-color: #334155;
}
.prp-section-head.prp-section-tools-left .prp-mpk-ops {
  margin-left: 8px !important;
  margin-right: 0 !important;
}
.prp-section-head.prp-section-tools-left .prp-mpk-right {
  margin-left: auto !important;
  margin-right: 0 !important;
}
#prpMpkTable td.prp-mpk-src-cell {
  white-space: nowrap;
  width: 1%;
}
#prpMpkTable .prp-mpk-src-btn {
  font-size: 12px;
  padding: 4px 8px;
}
.prp-przychod-src-menu {
  min-width: 200px;
  max-height: 280px;
  overflow: auto;
}
.prp-przychod-src-menu .prp-src-group {
  padding: 6px 10px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #5e6278);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-grid input.prp-mpk-ro[readonly] {
  background: #f4f5f8;
  color: #5e6278;
  cursor: default;
}
.form-grid input.prp-mpk-ro-laczne[readonly] {
  background: #eef1f6;
  color: #3f4254;
  font-weight: 600;
}
html[data-color-scheme="dark"] .form-grid input.prp-mpk-ro[readonly] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted, #94a3b8);
}
html[data-color-scheme="dark"] .form-grid input.prp-mpk-ro-laczne[readonly] {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text, #e8edf7);
}
.prp-dd {
  position: relative;
  display: inline-flex;
}
.prp-dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  padding: 4px;
  z-index: 40;
}
.prp-dd-menu.hidden { display: none !important; }
.prp-dd-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  color: var(--text, #181c32);
  cursor: pointer;
}
.prp-dd-menu button:hover {
  background: rgba(78, 115, 223, 0.1);
}
#prpMpkTable .prp-mpk-grp-koszty {
  background-color: #e7ebef;
  color: #475569;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
}
#prpMpkTable .prp-mpk-grp-plan {
  background-color: #e3eefc;
  color: #1d4ed8;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
}
#prpMpkTable th.prp-mpk-sub-koszty {
  background-color: #f0f3f6;
}
#prpMpkTable th.prp-mpk-sub-plan {
  background-color: #f4f8fe;
}
#prpMpkTable th.prp-mpk-sub-laczne {
  background-color: #e7ebef;
  font-weight: 600;
}
#prpMpkTable th.prp-mpk-wyn-strong,
#prpMpkTable td.prp-mpk-wyn-strong {
  font-weight: 800;
}
#prpMpkTable td.prp-mpk-laczne,
#prpWynikTable td.prp-mpk-laczne {
  font-weight: 700;
  background: rgba(100, 116, 139, 0.04);
}
#prpWynikTable th.prp-mpk-sub-laczne,
#prpProgTable th.prp-mpk-sub-laczne {
  font-weight: 700;
  background: rgba(100, 116, 139, 0.1);
}
#prpProgTable th.prp-mpk-sub-plan {
  background: rgba(59, 130, 246, 0.06);
}
#prpProgTable th.prp-mpk-sub-koszty {
  background: rgba(100, 116, 139, 0.05);
}
#prpProgTable td.prp-mpk-laczne {
  font-weight: 700;
  background: rgba(100, 116, 139, 0.04);
}
#prpProgTable td.prp-mpk-laczne.prp-prog-zak-cell,
#prpProgTable td.prp-prog-zak-cell {
  background: rgb(209, 250, 229);
}
#prpProgTable td.prp-mpk-plan {
  color: #1d4ed8;
}
#prpProgTable .prp-prog-zak-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #047857;
  background: rgba(16, 185, 129, 0.15);
  vertical-align: middle;
}
#prpProgTable tr.prp-prog-zak-row .prp-mpk-kod-txt.is-zakonczone {
  color: #047857;
}
html:not([data-color-scheme="dark"]) #prpProgZakOff {
  background: rgb(232, 247, 239);
  color: rgb(22, 131, 74);
  border-color: rgb(187, 222, 201);
}
html:not([data-color-scheme="dark"]) #prpProgZakOff:hover,
html:not([data-color-scheme="dark"]) #prpProgZakOff:active,
html:not([data-color-scheme="dark"]) #prpProgZakOff:focus-visible {
  background: rgb(216, 242, 228);
  color: rgb(22, 131, 74);
  border-color: rgb(167, 214, 186);
}
html:not([data-color-scheme="dark"]) #prpProgZakOn {
  background: rgb(242, 244, 247);
  color: rgb(102, 112, 133);
  border-color: rgb(228, 231, 236);
}
html:not([data-color-scheme="dark"]) #prpProgZakOn:hover,
html:not([data-color-scheme="dark"]) #prpProgZakOn:active,
html:not([data-color-scheme="dark"]) #prpProgZakOn:focus-visible {
  background: rgb(234, 243, 255);
  color: rgb(18, 100, 216);
  border-color: #93c5fd;
}
html[data-color-scheme="dark"] #prpProgZakOn {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}
html[data-color-scheme="dark"] #prpProgZakOff {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.3);
}
#prpMpkTable td.prp-mpk-plan {
  color: #1d4ed8;
}
#prpMpkTable td.prp-mpk-ok {
  color: #047857;
  font-weight: 600;
}
#prpMpkTable td.prp-mpk-bad {
  color: #dc2626;
  font-weight: 600;
}
#prpMpkTable td.prp-mpk-warn {
  color: #d97706;
  font-weight: 600;
}
#prpMpkTable tr.prp-mpk-razem-row td {
  font-weight: 600;
  border-top: 2px solid var(--line, #e5e7eb);
  background: rgba(59, 130, 246, 0.06);
}
html[data-color-scheme="dark"] #prpMpkTable .prp-mpk-grp-koszty {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}
html[data-color-scheme="dark"] #prpMpkTable .prp-mpk-grp-plan {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
html[data-color-scheme="dark"] #prpMpkTable th.prp-mpk-sub-koszty {
  background: rgba(148, 163, 184, 0.06);
}
html[data-color-scheme="dark"] #prpMpkTable th.prp-mpk-sub-laczne {
  background: rgba(148, 163, 184, 0.12);
}
html[data-color-scheme="dark"] #prpMpkTable th.prp-mpk-sub-plan {
  background: rgba(59, 130, 246, 0.1);
}
html[data-color-scheme="dark"] #prpMpkTable td.prp-mpk-laczne,
html[data-color-scheme="dark"] #prpWynikTable td.prp-mpk-laczne,
html[data-color-scheme="dark"] #prpProgTable td.prp-mpk-laczne {
  background: rgba(148, 163, 184, 0.06);
}
html[data-color-scheme="dark"] #prpProgTable td.prp-mpk-laczne.prp-prog-zak-cell,
html[data-color-scheme="dark"] #prpProgTable td.prp-prog-zak-cell {
  background: rgba(16, 185, 129, 0.28);
}
html[data-color-scheme="dark"] #prpWynikTable th.prp-mpk-sub-laczne,
html[data-color-scheme="dark"] #prpProgTable th.prp-mpk-sub-laczne {
  background: rgba(148, 163, 184, 0.12);
}
html[data-color-scheme="dark"] #prpProgTable th.prp-mpk-sub-plan {
  background: rgba(59, 130, 246, 0.1);
}
html[data-color-scheme="dark"] #prpProgTable th.prp-mpk-sub-koszty {
  background: rgba(148, 163, 184, 0.06);
}
html[data-color-scheme="dark"] #prpProgTable td.prp-mpk-plan {
  color: #93c5fd;
}
html[data-color-scheme="dark"] #prpProgTable .prp-prog-zak-badge {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
}
html[data-color-scheme="dark"] #prpProgTable tr.prp-prog-zak-row .prp-mpk-kod-txt.is-zakonczone {
  color: #6ee7b7;
}
html[data-color-scheme="dark"] #prpMpkTable td.prp-mpk-plan {
  color: #93c5fd;
}
html[data-color-scheme="dark"] #prpMpkTable td.prp-mpk-ok {
  color: #6ee7b7;
}
html[data-color-scheme="dark"] #prpMpkTable td.prp-mpk-bad {
  color: #f87171;
}
html[data-color-scheme="dark"] #prpMpkTable td.prp-mpk-warn {
  color: #fbbf24;
}
html[data-color-scheme="dark"] .prp-dd-menu {
  background: var(--card, #1e293b);
  border-color: var(--line, rgba(255, 255, 255, 0.12));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
html[data-color-scheme="dark"] .prp-dd-menu button {
  color: var(--text, #e8edf7);
}
html[data-color-scheme="dark"] .prp-dd-menu button:hover {
  background: rgba(59, 130, 246, 0.18);
}

/* Planowanie → Przegląd */
.pln-ov { display: flex; flex-direction: column; gap: 16px; }
.pln-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.pln-kpi, .pln-util, .pln-card {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pln-kpi { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pln-kpi span { font-size: 13px; color: #6b7280; }
.pln-kpi b { font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.pln-kpi em { font-style: normal; font-size: 12px; font-weight: 600; }
.pln-kpi-plan { color: #2563eb; }
.pln-kpi-real { color: #16a34a; }
.pln-kpi-bad { color: #dc2626; }
.pln-kpi-good { color: #16a34a; }
.pln-util { padding: 14px 18px 12px; }
.pln-util-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.pln-util-top span { font-size: 14px; color: #374151; }
.pln-util-top b { color: #16a34a; font-size: 14px; }
.pln-util-bar { height: 10px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.pln-util-bar i { display: block; height: 100%; background: #22c55e; border-radius: 999px; }
.pln-util-foot { margin-top: 8px; text-align: right; color: #6b7280; font-size: 13px; }
.pln-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 16px; align-items: start; }
.pln-card { padding: 8px 8px 12px; }
.pln-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 10px; }
.pln-card-h h3 { margin: 0; font-size: 16px; font-weight: 700; }
.pln-seg { display: inline-flex; background: #f3f4f6; border-radius: 999px; padding: 3px; }
.pln-seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 5px 12px;
  font: inherit; font-size: 13px; color: #4b5563; cursor: pointer;
}
.pln-seg button.on { background: #2563eb; color: #fff; }
.pln-alert { display: flex; align-items: center; gap: 12px; padding: 10px 10px; }
.pln-ico {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px;
}
.pln-ico svg { width: 18px; height: 18px; }
.pln-ico-risk { background: #fff4e6; color: #ff9f1a; }
.pln-ico-szac { background: #e8f4ff; color: #3699ff; }
.pln-ico-over { background: #ffe8ee; color: #f1416c; }
.pln-alert-txt {
  flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit;
}
.pln-alert-txt b { display: block; font-size: 14px; }
.pln-alert-txt small { display: block; color: #6b7280; font-size: 12px; margin-top: 2px; }
.pln-scope { display: inline-flex; align-items: center; gap: 6px; color: #9ca3af; font-size: 13px; white-space: nowrap; }
.pln-scope button { border: 0; background: transparent; padding: 0; font: inherit; color: #6b7280; cursor: pointer; }
.pln-scope button.on { color: #2563eb; font-weight: 650; }
.pln-badge {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.pln-badge-risk { background: #ffedd5; color: #c2410c; }
.pln-badge-szac { background: #dbeafe; color: #1d4ed8; }
.pln-badge-over { background: #fee2e2; color: #b91c1c; }
.pln-sub, .pln-people, .pln-mail { list-style: none; margin: 0; padding: 0 8px 4px; }
.pln-sub li, .pln-people li, .pln-mail li {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid #f1f3f6; cursor: pointer;
}
.pln-sub li b, .pln-mail-body span { font-weight: 500; }
.pln-sub li span, .pln-people small, .pln-mail time { margin-left: auto; color: #6b7280; font-size: 12px; white-space: nowrap; }
.pln-people li span { display: flex; flex-direction: column; min-width: 0; }
.pln-people li em { margin-left: auto; font-style: normal; font-weight: 700; color: #2563eb; }
.pln-dot { width: 10px; height: 10px; border-radius: 999px; flex: 0 0 10px; }
.pln-mail-body { display: flex; flex-direction: column; min-width: 0; }
.pln-mail-body span { color: #4b5563; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pln-lista, .pln-mail-more {
  border: 0; background: #f3f4f6; color: #374151; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
.pln-mail-more { display: block; margin: 8px 12px 4px auto; background: transparent; color: #2563eb; }
.pln-empty { margin: 8px 12px 12px; color: #6b7280; }
@media (max-width: 1100px) {
  .pln-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pln-grid { grid-template-columns: 1fr; }
}
