/* Performance-only presentation. No DOM, reporting, or financial dependencies. */
.performance-card .perf-table {
  --perf-transfer: #fbf8f1;
  --perf-transfer-head: #f1eadb;
  --perf-hours: #f2f5f8;
  --perf-hours-head: #e5ebf1;
  --perf-total: #e5e7eb;
  font-variant-numeric: tabular-nums lining-nums;
}
.performance-card .perf-table th,
.performance-card .perf-table td {
  border-right: 1px solid #c8cbd0;
  vertical-align: middle;
}
.performance-card .perf-table th { overflow-wrap: anywhere; }
.performance-card .perf-table .rep-name { font-weight: 700; }
.performance-card .perf-table thead tr:first-child th { background: #e8e9ec; }
.performance-card .perf-table th.numeric[class*="day-group-"]:not(.day-hours) {
  background: var(--perf-transfer-head);
  color: #29251f;
  font-weight: 750;
  border-right-width: 0;
}
.performance-card .perf-table th.day-hours {
  background: var(--perf-hours-head);
  color: #303b49;
  font-weight: 650;
}
.performance-card .perf-table tbody tr:not(.total-row) td[class*="day-group-"]:not(.day-hours) {
  background: var(--perf-transfer);
  color: #29251f;
  font-weight: 650;
}
.performance-card .perf-table td[class*="day-group-"]:not(.day-hours) { border-right-width: 0; }
.performance-card .perf-table tbody tr:not(.total-row) td.day-hours {
  background: var(--perf-hours);
  color: #374151;
  font-weight: 500;
}
/* One metric divider, two-pixel day boundaries, three-pixel totals boundary. */
.performance-card .perf-table .day-hours { border-left: 1px solid #c2c8cf; }
.performance-card .perf-table .day-last { border-right: 2px solid #9299a2 !important; }
.performance-card .perf-table .week-total-start { border-left: 3px solid #626973 !important; }
.performance-card .perf-table .total-col {
  background: var(--perf-total) !important;
  color: #18181b;
  font-weight: 750;
}
.performance-card .perf-table thead th.numeric:nth-last-child(3),
.performance-card .perf-table tbody tr:not(.total-row) td.total-col:nth-last-child(3) {
  background: #e9e5dc !important;
}
.performance-card .perf-table thead th.numeric:nth-last-child(3) { border-left: 3px solid #626973 !important; }
.performance-card .perf-table thead th.numeric:nth-last-child(2),
.performance-card .perf-table tbody tr:not(.total-row) td.total-col:nth-last-child(2) {
  background: #e0e6ed !important;
}
.performance-card .perf-table thead th.week-total-start[colspan] {
  background: #d9dce2;
  font-weight: 800;
  letter-spacing: .045em;
}
.performance-card .perf-table tbody tr:not(.total-row):hover td[class*="day-group-"]:not(.day-hours) { background: #f4efe3; }
.performance-card .perf-table tbody tr:not(.total-row):hover td.day-hours { background: #e9eef4; }

/* Every total cell, including the sticky representative cell, is opaque charcoal. */
.performance-card .perf-table tbody tr.total-row td {
  background: #27272a !important;
  color: #fafafa !important;
  border-top: 3px solid #09090b !important;
  border-bottom: 1px solid #52525b;
  border-right-color: #52525b;
  font-weight: 750;
}
.performance-card .perf-table tbody tr.total-row .rep-name { color: #fafafa; font-weight: 800; }
.performance-card .perf-table tbody tr.total-row .day-hours { border-left-color: #52525b; }
.performance-card .perf-table tbody tr.total-row .day-last { border-right-color: #71717a !important; }
.performance-card .perf-table tbody tr.total-row .week-total-start { border-left-color: #a1a1aa !important; }
.performance-card .perf-table tbody tr.total-row td.total-col { font-weight: 850; font-size: 14px; }
.performance-card .perf-table tbody tr.total-row .tph-badge { transform: none; }

/* Preserve semantic score classes and N/A warnings; improve text contrast only. */
.performance-card .perf-table .tph-badge.tph-low { color: #991b1b !important; }
.performance-card .perf-table .tph-badge.tph-mid,
.performance-card .perf-table .tph-badge.tph-warn { color: #92400e !important; }
.performance-card .perf-table .tph-badge.tph-high { color: #166534 !important; }
.performance-card .perf-table .tph-badge.tph-neutral:not(.tph-warn) { color: #3f3f46 !important; }

/* Existing capture clone uses the same table classes; no separate report markup. */
#performanceCaptureContent .performance-card .perf-table th { font-size: 10px; line-height: 1.4; }
#performanceCaptureContent .performance-card .perf-table td.numeric { white-space: nowrap; }
#performanceCaptureContent .performance-card .perf-table tbody tr.total-row td.total-col { font-size: 12px; }
@media screen and (max-width: 1100px) {
  #performanceCaptureContent .performance-card .perf-table th {
    font-size: 9px;
    padding-inline: 2px;
    letter-spacing: 0;
  }
  #performanceCaptureContent .performance-card .perf-table .rep-cell { width: 120px; }
}
@media print {
  /* The legacy print reset hides body descendants, including the modal itself. */
  body.print-grid #performanceCaptureDialog {
    visibility: visible !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .performance-card .perf-table {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .performance-card .perf-table thead th,
  .performance-card .perf-table tbody td { position: static !important; }
  .performance-card .perf-table tr { break-inside: avoid; }
  #performanceCaptureContent .performance-card .perf-table th { font-size: 9px; }
  #performanceCaptureContent .performance-card .perf-table tbody tr.total-row td.total-col { font-size: 10px; }
}
