.billing-hours-table {
  display: block;
  position: relative;
  width: 100%;
  border: 0;
  border-collapse: collapse;
  margin: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.billing-hours-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.billing-hours-table tbody {
  display: block;
  width: 100%;
}
.billing-hours-table tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content 44px;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  min-width: 0;
}
.billing-hours-table :is(th, td) {
  display: block;
  padding: 0;
  border: 0;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.billing-hours-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.billing-hours-table tbody tr {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.billing-activity-identity {
  grid-column: 1;
  grid-row: 1;
  line-height: 18px;
}
.billing-activity-date {
  grid-column: 1;
  grid-row: 2;
  font-size: 11px;
  line-height: 16px;
  color: var(--muted);
}
.billing-activity-work {
  grid-column: 2/4;
  grid-row: 1;
  justify-self: end;
  line-height: 18px;
}
.billing-activity-travel {
  grid-column: 2/4;
  grid-row: 2;
  justify-self: end;
  line-height: 16px;
}
.billing-activity-role {
  grid-column: 1/3;
  grid-row: 3;
}
.billing-activity-action {
  grid-column: 3;
  grid-row: 3;
}
.billing-hour-label {
  font-size: 11px;
  color: var(--muted);
}
.billing-activity-choice {
  display: block;
  margin: 0;
  min-width: 0;
}
.billing-hours-table .billing-activity-choice select {
  min-height: 44px;
  margin: 0;
}
.billing-copy-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 11px;
  margin-left: auto;
}
.billing-copy-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
@media (max-width: 760px) {
  .preview-billing-card .billing-order-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .billing-order-actions > [data-batch-settlement] {
    grid-column: 1/-1;
    width: 100%;
  }
  .billing-order-actions > .billing-pdf-action {
    grid-column: 2;
    justify-self: end;
  }
}
.billing-batch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.billing-batch-actions > button {
  min-height: 44px;
  font-size: 12px;
}
#batchSettlementForm .preview-modal-body {
  display: grid;
  gap: 14px;
}
#batchSettlementForm .preview-modal-body > p {
  margin: 0;
}
.batch-settlement-totals {
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.batch-settlement-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(260px, 28dvh);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.batch-settlement-list:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.batch-settlement-list > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.batch-settlement-list > li:last-child {
  border-bottom: 0;
}
.batch-settlement-list small {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .billing-batch-actions {
    flex-direction: column;
  }
  .billing-batch-actions > button {
    width: 100%;
  }
  .batch-settlement-list > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}
.billing-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.billing-summary-section {
  min-width: 0;
}
.billing-summary-section > h3 {
  margin: 0 0 8px;
  font-size: 13px;
}
.billing-summary-section > .muted {
  font-size: 12px;
}
@container billing-cards (min-width:600px) {
  .billing-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
  }
  .billing-summary-section:first-child {
    grid-column: 1/-1;
  }
  .billing-hours-table tr {
    grid-template-columns: minmax(100px, 1fr) minmax(180px, 1.4fr) 64px 64px 44px;
    row-gap: 2px;
  }
  .billing-activity-role {
    grid-column: 2;
    grid-row: 1/3;
  }
  .billing-activity-work {
    grid-column: 3;
    grid-row: 1/3;
    justify-self: end;
    line-height: 18px;
  }
  .billing-activity-travel {
    grid-column: 4;
    grid-row: 1/3;
    justify-self: end;
    line-height: 18px;
  }
  .billing-activity-action {
    grid-column: 5;
    grid-row: 1/3;
  }
  .billing-hour-label {
    display: block;
    font-size: 10px;
  }
}
@container billing-cards (min-width:960px) {
  .billing-identity-heading {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .billing-reference-line {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .billing-card-head {
    align-items: center;
    gap: 16px;
  }
  .billing-rapport-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 210px) auto;
    align-items: center;
    gap: 16px;
  }
  .billing-summary-grid {
    gap: 16px 24px;
  }
  .billing-hours-table thead {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
  .billing-hours-table thead tr {
    min-height: 28px;
    border-bottom: 1px solid var(--line);
  }
  .billing-hours-table tr {
    grid-template-columns: 102px minmax(130px, 1.25fr) minmax(190px, 1.4fr) 76px 76px 52px;
    column-gap: 12px;
  }
  .billing-hours-table td {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
  }
  .billing-activity-date {
    font-size: 12px;
    color: var(--ink);
  }
  .billing-hours-table :is(th:nth-child(4), th:nth-child(5), .billing-activity-hours) {
    text-align: right;
  }
  .billing-hour-label {
    display: none;
  }
}
body[data-preview-view='abrechnung'] #content > .notice {
  margin: 0;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .billing-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}
@container billing-cards (max-width:600px) {
  .billing-card-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .billing-card-totals dd {
    font-size: 16px;
  }
}
@container billing-cards (max-width:420px) {
  .preview-billing-card .billing-rapport {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .billing-rapport > [data-review],
  .billing-card-actions > button {
    width: 100%;
  }
}
@media (max-width: 760px) {
  body[data-preview-view='abrechnung'] .order-filtered-list > .preview-billing-card {
    padding: 16px;
  }
  .billing-controls {
    padding: 12px;
  }
  .billing-controls > .billing-tabs button {
    font-size: 11px;
    padding: 8px 4px;
  }
  .billing-archive-summary .billing-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
  }
  .billing-archive-summary .billing-table th,
  .billing-archive-summary .billing-table td {
    padding: 8px 4px;
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    letter-spacing: normal;
  }
  .billing-archive-summary .billing-table th:first-child {
    width: 40%;
  }
  .billing-archive-summary .billing-table th:not(:first-child) {
    width: 20%;
  }
}
