.clients-page { max-width: none; }
.client-views { margin-bottom: 20px; }
.client-view-count { display: inline-grid; place-items: center; min-width: 20px; padding: 1px 5px; border-radius: var(--radius-control); background: var(--paper-deep); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.client-views [aria-current] .client-view-count { color: var(--accent); background: var(--accent-wash); }
.client-sheet-tools { display: flex; align-items: center; margin-bottom: 18px; }
.client-sheet-search { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 660px; }
.client-sheet-search .text-input { flex: 1; width: 100%; min-width: 0; }
.client-sheet-search .text-link { font-size: 13px; white-space: nowrap; }
.client-sheet-scroll { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.client-sheet-table { width: 100%; min-width: 1020px; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.client-sheet-table > thead > tr > th { padding: 15px 16px; background: var(--table-header); border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 500; font-size: 12px; text-align: left; white-space: nowrap; }
.client-sheet-table > thead > tr > th:first-child { width: 280px; position: sticky; left: 0; z-index: 2; }
.client-sheet-table > thead > tr > th:nth-child(2) { width: 86px; }
.client-sheet-table > thead > tr > th:nth-child(3) { width: 125px; }
.client-sheet-table > thead > tr > th:nth-child(4) { width: 150px; }
.client-sheet-table > thead > tr > th:nth-child(5), .client-sheet-table > thead > tr > th:nth-child(6) { width: 140px; }
.client-sheet-table > thead > tr > th:last-child { width: 190px; }
.client-column-sort { display: flex; align-items: center; gap: 10px; min-height: 38px; margin: -8px -12px; padding: 8px 12px; color: inherit; text-decoration: none; }
.client-column-sort:not([aria-disabled="true"]):hover { color: var(--accent-hover); }
.client-column-sort:not([aria-disabled="true"]):active { color: var(--accent-active); }
.client-column-sort:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
th[aria-sort] .client-column-sort { color: var(--accent); }
.client-column-sort span { color: var(--accent); }
.client-sheet-row > td { padding: 6px 16px; height: 48px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-soft); vertical-align: middle; }
.client-sheet-row:last-child > td { border-bottom: 0; }
.client-sheet-row > .client-sheet-identity { padding: 0; position: sticky; left: 0; z-index: 1; background: var(--surface); }
.client-sheet-name { display: flex; align-items: stretch; width: 100%; min-height: 48px; }
.client-sheet-name > strong { min-width: 0; flex: 1; align-self: center; padding: 10px 16px; font-weight: 500; overflow-wrap: anywhere; }
.client-name-input { min-width: 0; width: 100%; padding: 10px 16px; color: var(--ink); font: 500 13px/1.5 var(--sans); text-overflow: ellipsis; border: 0; border-radius: var(--radius-input); outline: none; background: transparent; }
.client-name-input:not(:disabled):not([aria-invalid="true"]):hover { background: var(--accent-wash); }
.client-name-input:not(:disabled):not([aria-invalid="true"]):active { background: var(--accent-wash-hover); }
.client-name-input:focus { background: var(--surface); box-shadow: inset 0 0 0 2px var(--focus-ring); text-overflow: clip; }
.client-name-input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.client-name-input:disabled { color: var(--muted); cursor: not-allowed; }
.client-name-input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--red); background: var(--red-wash); }
.client-name-input[aria-invalid="true"]:focus-visible { outline-color: var(--red); }
.client-open { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 11px; text-decoration: none; }
.client-open:not([aria-disabled="true"]):hover { color: var(--accent-hover); background: var(--accent-wash); }
.client-open:not([aria-disabled="true"]):active { color: var(--accent-active); background: var(--accent-wash-hover); }
.client-open:focus-visible, .client-waiting:focus-visible, .client-order-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.client-sheet-number, .client-sheet-date { font-variant-numeric: tabular-nums; }
.client-sheet-date { white-space: nowrap; }
.client-sheet-date--overdue { color: var(--red); }
.client-date-hint { display: block; margin-top: 2px; font-size: 10px; }
.client-cell-muted { color: var(--muted); font-size: 12px; }
.client-waiting { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; min-height: 32px; background: var(--red-wash); color: var(--red); border: 0; border-radius: var(--radius-control); font-size: 12px; text-decoration: none; }
.client-waiting::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.client-waiting:not([aria-disabled="true"]):hover { text-decoration: underline; text-underline-offset: 3px; box-shadow: inset 0 0 0 1px var(--red-line); }
.client-waiting:not([aria-disabled="true"]):active { box-shadow: inset 0 0 0 1px var(--red); }
.client-sheet-finishes { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-profile-heading { margin-bottom: 32px; padding-right: 32px; }
.client-profile-heading h1 { font-size: 25px; font-weight: 500; overflow-wrap: anywhere; }
.client-profile-heading p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.client-profile-section { margin-bottom: 32px; }
.client-profile-section h2 { font-size: 15px; font-weight: 500; }
.client-profile-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.client-profile-section-heading a { font-size: 12px; white-space: nowrap; }
.client-order-list { list-style: none; padding: 0; margin: 0; }
.client-order-list li { border-bottom: 1px solid var(--line); }
.client-order-link { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-inline: -12px; padding: 16px 12px; color: var(--ink); text-decoration: none; }
.client-order-link:not([aria-disabled="true"]):hover { color: var(--accent-hover); background: var(--accent-wash); }
.client-order-link:not([aria-disabled="true"]):active { color: var(--accent-active); background: var(--accent-wash-hover); }
.client-open[aria-disabled="true"], .client-waiting[aria-disabled="true"], .client-order-link[aria-disabled="true"], .client-column-sort[aria-disabled="true"] { color: var(--muted); opacity: .55; cursor: not-allowed; }
.client-order-identity { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.client-order-identity strong { font-size: 14px; font-weight: 500; }
.client-order-identity > span, .client-order-meta > span:last-child { color: var(--muted); font-size: 12px; }
.client-order-meta { display: grid; justify-items: end; gap: 7px; flex-shrink: 0; }
.client-reference { padding: 16px 0; border-top: 1px solid var(--line); }
.client-reference summary { min-height: 40px; margin: -8px -12px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.client-reference summary:hover { color: var(--accent-hover); }
.client-reference summary:active { color: var(--accent-active); }
.client-reference summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.client-reference-list, .client-approval-list { list-style: none; padding: 0; margin: 10px 0 0; }
.client-reference-list li, .client-approval-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.client-reference-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.client-approval-list a { text-underline-offset: 3px; }
.client-approval-list p { margin: 8px 0; line-height: 1.5; }
@media (max-width: 760px) {
  .clients-page .client-views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .clients-page .client-views a { font-size: 12px; gap: 6px; line-height: 1.35; }
  .client-sheet-tools { margin-bottom: 8px; }
  .client-sheet-search .text-input, .client-name-input { font-size: 16px; }
  .client-sheet-table > thead > tr > th:first-child { width: 250px; }
  .client-sheet-table { min-width: 990px; }
  .client-profile-heading h1 { font-size: 23px; }
  .client-order-link { align-items: flex-start; gap: 12px; }
  .client-order-meta { max-width: 44%; }
  .client-order-meta .stage-pill { white-space: normal; text-align: right; }
}
