.p06-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.p06-month {
  font-weight: 700;
  min-width: 190px;
}
.p06-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.p06-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.p06-kpis .card {
  min-width: 0;
}
.p06-kpis .stat-number {
  font-size: 1.6rem;
  overflow-wrap: anywhere;
}
.p06-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
}
.p06-table {
  font-size: 0.82rem;
  white-space: nowrap;
  margin: 0;
}
.p06-table th,
.p06-table td {
  padding: 0.7rem;
}
.p06-row-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.p06-table td:nth-child(14) {
  color: #132746;
  font-weight: 700;
}
@media (max-width: 1100px) {
  .p06-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 0.75rem;
  }
  .p06-head > * {
    min-width: 0;
  }
  .p06-month {
    width: min(100%, 380px);
    min-width: 0;
  }
  .p06-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .p06-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .p06-table,
  .p06-table tbody {
    display: block;
  }
  .p06-table thead {
    display: none;
  }
  .p06-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e1e7f0;
    border-radius: 16px;
    background: #fff;
  }
  .p06-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    white-space: normal;
    min-width: 0;
    padding: 0.25rem 0;
    border: 0;
    text-align: right;
  }
  .p06-table td:before {
    content: attr(data-label);
    color: #697991;
    text-align: left;
    flex-shrink: 0;
  }
  .p06-table td:nth-child(19) {
    align-items: flex-start;
  }
  .p06-table td:nth-child(19) .badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    flex: none;
    width: max-content;
    max-width: 100%;
    min-height: 0;
    height: auto;
    white-space: nowrap;
  }
  .p06-table td:nth-child(2),
  .p06-table td:nth-child(14),
  .p06-table td:nth-child(15),
  .p06-table td:nth-child(16) {
    grid-column: 1/-1;
  }
  .p06-table td:nth-child(16) {
    display: block;
  }
  .p06-table td:nth-child(16):before {
    display: block;
    margin-bottom: 0.4rem;
  }
  .p06-row-actions {
    flex-wrap: wrap;
  }
  .p06-row-actions > * {
    flex: 1;
  }
}
@media (max-width: 420px) {
  .p06-month {
    width: 100%;
  }
  .p06-kpis {
    gap: 0.5rem;
  }
  .p06-kpis .stat-number {
    font-size: 1.25rem;
  }
  .p06-table tr {
    grid-template-columns: 1fr;
  }
  .p06-table td {
    grid-column: 1/-1 !important;
  }
  .p06-head {
    align-items: stretch;
  }
  .p06-month {
    width: 100%;
  }
}

/* Payroll detail modal */
.p06-modal-body {
  padding: 0 !important;
  background: #f5f7fb;
}
#p06-detail .modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e1e7f0;
  background: #fff;
}
#p06-detail .modal-title {
  font-weight: 700;
  color: #17253a;
}
.p06-detail {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  color: #24334a;
}
.p06-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  background: #fff;
}
.p06-detail-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.p06-detail-code {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff3d5;
  color: #946300;
  font-size: 14px;
  font-weight: 800;
}
.p06-detail-identity h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  color: #17253a;
}
.p06-detail-identity p {
  margin: 0.25rem 0 0;
  color: #718096;
  font-size: 0.9rem;
}
.p06-detail-period {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dce5f1;
  border-radius: 9px;
  background: #f8fafc;
  color: #405878;
  font-size: 0.9rem;
  font-weight: 700;
}
.p06-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}
.p06-detail-stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e1e7f0;
  border-radius: 12px;
  background: #fff;
}
.p06-detail-stat > span {
  color: #718096;
  font-size: 0.78rem;
  font-weight: 600;
}
.p06-detail-stat strong {
  color: #24334a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.p06-detail-stat small {
  color: #718096;
  font-size: 0.75rem;
  font-weight: 500;
}
.p06-detail-warning {
  padding: 0.75rem 1rem;
  border: 1px solid #f2d58e;
  border-radius: 12px;
  background: #fff7df;
  color: #705000;
}
.p06-detail-warning > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.p06-detail-warning > summary::-webkit-details-marker {
  display: none;
}
.p06-detail-warning > summary > span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.p06-detail-warning > summary small {
  color: #80651d;
}
.p06-detail-warning .p06-warning-chevron {
  transition: transform 0.18s ease;
}
.p06-detail-warning[open] .p06-warning-chevron {
  transform: rotate(180deg);
}
.p06-detail-warning ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}
.p06-detail-warning li + li {
  margin-top: 0.18rem;
}
.p06-detail-section,
.p06-detail-finance-card,
.p06-detail-rate {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  background: #fff;
}
.p06-detail-section-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}
.p06-detail-section-title h4 {
  margin: 0;
  color: #1f2f46;
  font-size: 0.98rem;
  font-weight: 700;
}
.p06-detail-section-title p {
  margin: 0.2rem 0 0;
  color: #718096;
  font-size: 0.8rem;
}
.p06-detail-section-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #edf3fc;
  color: #426a9e;
}
.p06-detail-table-wrap {
  overflow: auto;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}
.p06-detail-days {
  min-width: 1180px;
  margin: 0;
  font-size: 0.82rem;
  white-space: nowrap;
}
.p06-detail-days thead th {
  padding: 0.7rem 0.75rem;
  background: #f5f7fb;
  color: #61718a;
  font-weight: 700;
  white-space: nowrap;
}
.p06-detail-days tbody td {
  padding: 0.65rem 0.75rem;
  border-color: #edf0f5;
  vertical-align: middle;
  white-space: nowrap;
}
.p06-detail-rate {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  color: #475569;
  font-size: 0.88rem;
}
.p06-detail-rate > strong {
  color: #1f2f46;
}
.p06-detail-finances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.p06-detail-finance-card h4 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #edf0f5;
  color: #1f2f46;
  font-size: 0.98rem;
  font-weight: 700;
}
.p06-detail-finance-card h4 .bi {
  color: #46896b;
}
.p06-detail-finance-card.is-deduction h4 .bi {
  color: #ba6c55;
}
.p06-detail-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f2f6;
  font-size: 0.9rem;
}
.p06-detail-line span {
  color: #53647b;
}
.p06-detail-line strong {
  flex: none;
  color: #24334a;
  font-variant-numeric: tabular-nums;
}
.p06-detail-note {
  margin: 0.7rem 0 0;
  color: #718096;
  font-size: 0.78rem;
  line-height: 1.55;
}
.p06-detail-request-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  color: #315d9d;
  font-size: 0.84rem;
  text-decoration: none;
}
.p06-detail-request-link:hover {
  text-decoration: underline;
}
.p06-detail-request-link.is-pending {
  color: #946300;
}
.p06-detail-net {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #c9d9ef;
  border-radius: 13px;
  background: #fff;
}
.p06-detail-net > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-right: 1px solid #e5ebf3;
}
.p06-detail-net > div:last-child {
  border-right: 0;
}
.p06-detail-net span {
  color: #61718a;
  font-size: 0.88rem;
}
.p06-detail-net strong {
  color: #24334a;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.p06-detail-net .is-net {
  background: #eaf2ff;
}
.p06-detail-net .is-net span,
.p06-detail-net .is-net strong {
  color: #174a8b;
  font-weight: 750;
}
.p06-detail-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.2rem;
}
@media (max-width: 767px) {
  .p06-detail {
    gap: 0.75rem;
    padding: 0.85rem;
  }
  .p06-detail-header {
    align-items: flex-start;
    padding: 0.85rem;
  }
  .p06-detail-code {
    width: 42px;
    height: 42px;
  }
  .p06-detail-identity h3 {
    font-size: 1rem;
  }
  .p06-detail-period {
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
  }
  .p06-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .p06-detail-stat {
    padding: 0.65rem 0.75rem;
  }
  .p06-detail-finances {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .p06-detail-net {
    grid-template-columns: 1fr;
  }
  .p06-detail-net > div {
    border-right: 0;
    border-bottom: 1px solid #e5ebf3;
    padding: 0.75rem 0.9rem;
  }
  .p06-detail-net > div:last-child {
    border-bottom: 0;
  }
  .p06-detail-actions {
    justify-content: stretch;
  }
  .p06-detail-actions > * {
    flex: 1 1 auto;
  }
  .p06-detail-warning {
    font-size: 0.88rem;
  }
}
