
.phWorkspace{width:100%;min-width:0;display:grid;gap:15px;color:var(--text)}
.phTop{display:flex;align-items:center;justify-content:space-between;gap:14px}.phTop h2{margin:0;font-size:19px;letter-spacing:-.35px}.phTop p{margin:4px 0 0;color:var(--muted);font-size:12px}.phSync{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px;white-space:nowrap}.phSync button{padding:7px 11px!important;min-height:30px!important;font-size:11px}
.phTabs{display:flex;gap:4px;width:fit-content;background:var(--surface-alt);border:1px solid var(--border);border-radius:7px;padding:4px}.phTabs button{display:flex;align-items:center;gap:8px;border:0!important;padding:8px 13px!important;min-height:32px!important;border-radius:5px!important;background:transparent;color:var(--muted);font-size:12px;font-weight:650}.phTabs button[aria-selected=true]{background:var(--primary)!important;color:var(--primary-contrast)!important}.phTabs button>span{display:inline-flex;align-items:center;justify-content:center;min-width:20px;padding:1px 5px;border-radius:4px;background:var(--surface);color:var(--primary);font-size:10px}.phHistory,.phDebt{min-width:0}.phHistory[hidden],.phDebt[hidden]{display:none!important}
.phHistory{display:grid;gap:15px}.phMetrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.phMetric{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;padding:15px;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:0 1px 2px var(--shadow)}.phMetric>span:first-child{font-size:10px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.3px}.phMetric strong{font-size:23px;line-height:1.15;font-weight:700;font-variant-numeric:tabular-nums;color:var(--primary)}.phMetric small{color:var(--muted);font-size:10px}.phMetric.phDebtMetric strong{color:var(--warning-text)}.phTotals{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.phMetric .phTotals{align-items:flex-start}.phTotals small{display:block;font-size:10px;font-weight:400;color:var(--muted)}
.phToolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0}.phFilters{display:flex;gap:5px;flex-wrap:wrap}.phFilters button{display:flex;gap:6px;align-items:center;padding:6px 10px!important;min-height:29px!important;border:1px solid var(--border)!important;border-radius:20px!important;background:var(--surface);color:var(--muted);font-size:11px;white-space:nowrap}.phFilters button[aria-pressed=true]{background:var(--primary-soft)!important;color:var(--primary);border-color:var(--primary)!important}.phFilters span{font-size:10px;opacity:.85}.phSearch{flex:1;min-width:190px;margin-left:auto}.phSearch input{width:100%;min-height:34px!important;font-size:12px;padding:7px 11px!important;background:var(--surface)}.phToolbar select{width:auto!important;min-width:165px;min-height:34px!important;padding:7px 25px 7px 10px!important;font-size:11px}.phHint{margin:0;font-size:11px;line-height:1.5;color:var(--muted)}
.phDay{border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--surface);min-width:0}.phDay>header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 16px;background:var(--surface-alt);border-bottom:1px solid var(--border)}.phDay h3{display:inline;margin:0 9px 0 0;font-size:15px;line-height:1.4;text-transform:capitalize}.phDay time{font-size:11px;color:var(--muted);white-space:nowrap}.phDayCount{display:block;margin-top:4px;font-size:10px;color:var(--muted)}.phDay>header .phTotals strong{color:var(--primary);font-size:16px;font-variant-numeric:tabular-nums;white-space:nowrap}.phTableScroll{max-width:100%;overflow-x:auto}.phDay table{width:100%;border-collapse:collapse;table-layout:fixed;text-align:left;border-spacing:0}.phDay th{padding:9px 16px;color:var(--muted);font-size:9px;letter-spacing:.3px;text-transform:uppercase;font-weight:650;border-bottom:1px solid var(--border);background:var(--surface)}.phDay th:first-child{width:43%}.phDay th:nth-child(2){width:20%}.phDay th:nth-child(3){width:19%}.phDay th:nth-child(4){width:18%}.phDay td{padding:13px 16px;vertical-align:top;font-size:12px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}.phDay tr:last-child td{border-bottom:0}.phDay td>strong{display:block;font-weight:650;line-height:1.4}.phDay td small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.phDay .phAmount{color:var(--primary);font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}.phDay .phRemaining{white-space:nowrap;font-variant-numeric:tabular-nums}.phBadge{display:inline-block;max-width:100%;padding:4px 6px;border-radius:4px;font-size:10px;line-height:1.25;font-weight:550}.phBadge.isPaid{background:var(--primary-soft);color:var(--primary)}.phBadge.isPartial{background:var(--surface-alt);color:var(--warning-text)}.phDay details{margin-top:8px;font-size:10px;color:var(--muted)}.phDay summary{cursor:pointer;list-style-position:inside;color:var(--muted);font-weight:400}.phDay details p{white-space:pre-line;line-height:1.5;margin:6px 0;overflow-wrap:anywhere}.phEmpty{text-align:center;background:var(--surface);border:1px dashed var(--border);border-radius:8px;padding:36px 16px;color:var(--muted);font-size:12px}.phEmpty strong{font-size:14px;color:var(--text)}.phEmpty p{margin-bottom:0}.phError{border:1px solid var(--danger);border-radius:6px;background:var(--danger-soft);color:var(--danger);padding:10px 13px;font-size:12px}.phFooter{font-size:11px;color:var(--muted);padding:0 2px}
@media(max-width:1100px){.phMetrics{gap:8px}.phMetric{padding:12px}.phMetric strong{font-size:20px}.phDay td,.phDay th{padding-left:12px;padding-right:12px}.phSync{font-size:10px}}
@media(max-width:760px){.phTop{align-items:flex-start;flex-direction:column;gap:10px}.phTop h2{font-size:18px}.phTop p{font-size:11px}.phSync{width:100%;justify-content:space-between;gap:8px;white-space:normal}.phMetrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.phMetric{gap:8px;padding:12px}.phMetric strong{font-size:20px}.phMetric>span:first-child{font-size:9px}.phTabs{max-width:100%;width:100%}.phTabs button{padding:8px!important;font-size:11px;justify-content:center;flex:1}.phToolbar{gap:8px}.phSearch{min-width:160px;margin:0}.phFilters{width:100%;gap:4px}.phFilters button{font-size:10px;padding:5px 8px!important}.phToolbar select{min-width:135px;max-width:145px;font-size:10px}.phDay>header{padding:11px 12px}.phDay h3{font-size:13px}.phDay>header .phTotals strong{font-size:14px}.phDay table{min-width:610px}.phHint{font-size:10px}.phDay td{font-size:11px}}

.phDay h3{text-transform:none}

/* Current counterparty balance is independent of the invoice remaining amount. */
.phDay th:first-child{width:35%}.phDay th:nth-child(2){width:16%}.phDay th:nth-child(3){width:16%}.phDay th:nth-child(4){width:18%}.phDay th:nth-child(5){width:15%}
.phDay .phClientBalance{white-space:nowrap;font-variant-numeric:tabular-nums}.phDay .phClientBalance.hasDebt{color:var(--danger);font-weight:600}
@media(max-width:760px){.phDay table{min-width:780px}}
