
/* Zusatzarbeiten: keep financial columns and row actions visible at any width. */
.work-list-panel {
  container: work-list / inline-size;
  min-width: 0;
}

.work-list-panel > .panel-heading {
  flex-wrap: wrap;
  gap: .65rem 1rem;
}

.work-list-panel [data-slot="table-container"] {
  overflow: visible;
}

.work-list-panel table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.work-list-panel [data-slot="table"] :is(th, td) {
  min-width: 0;
  box-sizing: border-box;
  padding: .8rem clamp(.45rem, 1.1vw, .9rem) !important;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  border-color: var(--border);
}

.work-list-panel th {
  height: auto;
  color: var(--muted-foreground);
  background: var(--muted);
  font-size: .8em;
  font-weight: 650;
}

.work-list-panel tr {
  border-color: var(--border);
}

.work-list-panel th:first-child { width: 34%; }
.work-list-panel th:nth-child(2) { width: 12%; }
.work-list-panel th:nth-child(3) { width: 12%; }
.work-list-panel th:nth-child(4) { width: 12%; }
.work-list-panel th:nth-child(5) { width: 13%; }
.work-list-panel th:nth-child(6) { width: 17%; }
.work-list-panel--record th:first-child { width: 42%; }
.work-list-panel--record th:nth-child(2) { width: 12%; }
.work-list-panel--record th:nth-child(3) { width: 13%; }
.work-list-panel--record th:nth-child(4) { width: 15%; }
.work-list-panel--record th:nth-child(5) { width: 18%; }

.work-list-panel td:first-child { overflow-wrap: anywhere; }

.work-list-panel .row-meta {
  margin-top: .22rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.work-list-panel .badge {
  max-width: 100%;
  white-space: normal;
}

.work-list-panel td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

.work-list-panel .work-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  gap: .45rem;
}

@container work-list (max-width: 52rem) {
  .work-list-panel table,
  .work-list-panel tbody {
    display: block;
  }

  .work-list-panel thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    clip-path: inset(50%);
    overflow: hidden;
  }

  .work-list-panel tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: .65rem 1rem;
    padding: .9rem 1rem;
  }

  .work-list-panel [data-slot="table"] tbody td {
    display: block;
    padding: 0 !important;
    border: 0;
  }

  .work-list-panel td:first-child,
  .work-list-panel td:last-child {
    grid-column: 1 / -1;
  }

  .work-list-panel td:last-child:empty,
  .work-list-panel td:last-child:not(:has(button, a)) {
    display: none;
  }

  .work-list-panel td:not(:first-child, :last-child)::before {
    content: attr(data-work-label);
    display: block;
    margin-bottom: .18rem;
    color: var(--muted-foreground);
    font-size: .78em;
    font-weight: 650;
  }

  .work-list-panel .work-row-actions { margin-top: .12rem; }
}

@container work-list (max-width: 28rem) {
  .work-list-panel tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
