/* PERFECT BUD – v0.16.0 / spójny panel rozliczeń handlowych */
.pb-p-shell {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0 0 22px;
  min-width: 0;
}
.pb-p-panel {
  background: #fff;
  border: 1px solid #dce5ed;
  border-radius: 15px;
  padding: 22px;
  box-shadow: 0 3px 13px #142b430a;
  min-width: 0;
}
.pb-p-panel h2 {
  font-size: 20px;
  margin: 0 0 5px;
  color: #133049;
}
.pb-p-panel h3 {
  font-size: 17px;
  margin: 0 0 6px;
  color: #133049;
}
.pb-p-panel h4 {
  font-size: 14px;
  color: #18384e;
  margin: 18px 0 12px;
}
.pb-p-panel p {
  line-height: 1.5;
}
.pb-p-sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  flex-wrap: wrap;
}
.pb-p-sectionhead p {
  font-size: 13px;
  color: #5b6f82;
  margin: 5px 0 12px;
  max-width: 720px;
}
.pb-p-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 14px;
}
.pb-p-panel label {
  font-size: 12px;
  font-weight: 650;
  color: #2b445b;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pb-p-panel label input:not([type='checkbox']),
.pb-p-panel label select,
.pb-p-panel textarea {
  border: 1px solid #ccdbe6;
  border-radius: 8px;
  background: white;
  padding: 10px;
  min-height: 39px;
  width: 100%;
  color: #17354b;
  font: inherit;
  box-sizing: border-box;
}
.pb-p-panel label input:focus,
.pb-p-panel label textarea:focus,
.pb-p-panel label select:focus {
  outline: 3px solid var(--pb-focus);
  border-color: #09a79c;
}
.pb-p-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.pb-p-actions label {
  min-width: 105px;
}
.pb-p-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  margin: 14px 0;
}
.pb-p-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
  margin: 13px 0;
}
.pb-p-kpi > div {
  padding: 15px;
  border-radius: 10px;
  background: #f2f7f9;
  border: 1px solid #e0eaf0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.pb-p-kpi small {
  font-size: 11px;
  color: #5b7084;
}
.pb-p-kpi strong {
  font-size: 18px;
  color: #102e48;
  word-break: break-word;
}
.pb-p-kpi .pb-p-danger {
  color: #bb2637;
}
.pb-p-calculation {
  background: #f7fafc;
  border: 1px solid #e1eaf1;
  border-radius: 11px;
  padding: 14px;
  margin: 12px 0;
}
.pb-p-warnings {
  border-left: 3px solid #e4a12d;
  background: #fff8e7;
  padding: 12px 16px;
  border-radius: 6px;
  color: #7c4f00;
}
.pb-p-warnings p {
  font-size: 12px;
  margin: 6px 0;
}
.pb-p-alert {
  color: #a54119;
  font-size: 12px;
  font-weight: 650;
}
.pb-p-ok {
  background: #e0f7eb;
  color: #087444;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}
.pb-p-preview {
  background: #fff0cf;
  color: #8d5900;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}
.pb-p-coach {
  border: 1px solid #b1e2d4;
  background: #effbf5;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}
.pb-p-coach strong {
  color: #08735b;
}
.pb-p-coach p {
  margin: 9px 0;
  color: #224b43;
  font-size: 14px;
}
.pb-p-coach small {
  color: #517368;
  font-size: 11px;
}
.pb-p-period {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  margin: 14px 0;
}
.pb-p-period button {
  background: #f3f7fa;
  border: 1px solid #d5e2ea;
  border-radius: 7px;
  padding: 8px 2px;
  cursor: pointer;
  font-size: 12px;
  color: #29435b;
}
.pb-p-period button.selected {
  background: #04837a;
  color: white;
  border-color: #059e93;
  font-weight: 700;
}
.pb-p-approved {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  background: #f1faf5;
  border: 1px solid #d8ebdf;
  border-radius: 11px;
  padding: 14px 16px;
  margin-top: 13px;
  flex-wrap: wrap;
}
.pb-p-approved small {
  display: block;
  color: #597462;
}
.pb-p-approved strong {
  font-size: 24px;
  color: #087449;
}
.pb-p-approved p {
  font-size: 11px;
  color: #5b7365;
  margin: 5px 0;
}
.pb-p-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pb-p-cards > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce6ee;
  border-radius: 9px;
  flex-wrap: wrap;
}
.pb-p-cards span {
  color: #45647a;
}
.pb-p-empty,
.pb-p-hint {
  padding: 15px;
  color: #5f7284;
  border-radius: 10px;
  background: #f5f9fb;
}
.pb-p-empty {
  margin: 12px 0;
}
.pb-p-annual-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.pb-p-annual-list button {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid #d8e5ed;
  padding: 12px;
  background: #f8fafb;
  border-radius: 10px;
  text-align: left;
  color: #18384d;
  cursor: pointer;
}
.pb-p-annual-list button.selected {
  border-color: #089f94;
  background: #e8f8f3;
}
.pb-p-annual-list span {
  font-size: 12px;
}
.pb-p-annual-list small {
  color: #5f707c;
}
.pb-p-approval {
  border: 1px solid #cae0db;
  background: #f4fbf7;
  border-radius: 10px;
  padding: 14px;
  margin-top: 15px;
}
.pb-p-tablewrap {
  overflow: auto;
  max-width: 100%;
}
.pb-p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.pb-p-table th {
  padding: 10px;
  background: #e9f0f5;
  text-align: left;
}
.pb-p-table td {
  padding: 6px;
  border-bottom: 1px solid #e6edf2;
}
.pb-p-table input {
  min-width: 90px;
}
.pb-p-settings > summary {
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.pb-p-settings > summary small {
  color: #5d6f84;
}
@media (max-width: 880px) {
  .pb-p-fields {
    grid-template-columns: 1fr;
  }
  .pb-p-period {
    grid-template-columns: repeat(6, 1fr);
  }
  .pb-p-panel {
    padding: 15px;
  }
  .pb-p-approved {
    align-items: stretch;
  }
  .pb-p-annual-list {
    grid-template-columns: 1fr;
  }
  .pb-p-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pb-p-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.pb-p-steps > div {
  background: #f4f9fb;
  border: 1px solid #dce9ed;
  border-radius: 9px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pb-p-steps strong {
  color: #0b7a70;
}
.pb-p-steps span {
  font-size: 12px;
  color: #36566b;
}
.pb-p-annual-target {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #eaf9f5;
  border-radius: 9px;
  padding: 12px 15px;
  color: #1b6a60;
  font-size: 13px;
}
/* 0.16.1: piątkowe raporty, prognoza wypłaty i edytowalne koszty */
.pb-p-projection {
  margin: 17px 0;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid #b9ded8;
  background: linear-gradient(110deg, #eefbf5, #f6fafb);
}
.pb-p-projection-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.pb-p-projection-head > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pb-p-projection-head small {
  font-size: 12px;
  color: #43766b;
}
.pb-p-projection-head strong {
  font-size: 30px;
  letter-spacing: -0.8px;
  color: #06694d;
}
.pb-p-projection-head span {
  font-size: 12px;
  color: #4c6d67;
}
.pb-p-projection .pb-p-goal {
  padding: 13px 18px;
  border-radius: 12px;
  background: white;
  border: 1px solid #cfe8e2;
  min-width: 190px;
}
.pb-p-projection .pb-p-goal strong {
  font-size: 22px;
}
.pb-p-progress {
  width: 100%;
  height: 11px;
  border-radius: 20px;
  background: #d9eae6;
  overflow: hidden;
  margin: 16px 0 10px;
}
.pb-p-progress > span {
  display: block;
  height: 100%;
  background: #139f85;
  border-radius: 20px;
  transition: width 0.2s ease;
}
.pb-p-breakdown {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid #e0e9ee;
  background: white;
  border-radius: 9px;
  margin-top: 10px;
}
.pb-p-breakdown span {
  font-size: 12px;
  color: #3f596d;
}
.pb-p-month-targets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.pb-p-span {
  grid-column: 1/-1;
}
.pb-p-week-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 9px;
  margin: 8px 0 14px;
}
.pb-p-week-list button {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 5px;
  background: #f8fafb;
  border: 1px solid #dae5ec;
  border-radius: 10px;
  padding: 13px;
  color: #213d51;
  cursor: pointer;
}
.pb-p-week-list button.selected,
.pb-p-week-list button:hover {
  background: #eaf8f4;
  border-color: #0d9e91;
}
.pb-p-week-list button small {
  font-size: 11px;
  color: #526f82;
}
.pb-p-quarter {
  padding: 8px 0 14px;
  border-bottom: 1px solid #e1eaf0;
}
.pb-p-quarter .pb-p-table input {
  min-width: 75px;
  max-width: 180px;
}
.pb-p-settings summary {
  font-size: 14px;
  align-items: center;
}
.pb-p-settings[open] summary {
  margin-bottom: 17px;
}
.pb-p-panel details summary {
  cursor: pointer;
}
.pb-p-panel input:disabled,
.pb-p-panel button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 850px) {
  .pb-p-month-targets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pb-p-projection-head strong {
    font-size: 25px;
  }
}
