.clients-list,.client-editor {min-width:0}
.clients-filters {display:grid;grid-template-columns:minmax(12rem,1.45fr) minmax(8rem,.85fr);gap:.75rem 1rem;max-width:53rem;margin:1rem 0 1.25rem}
.clients-filters label,.client-editor label {min-width:0}
.clients-filters input,.clients-filters select {width:100%;min-height:2.5rem}
.clients-table {min-width:35rem}
.clients-table thead th,.clients-table thead th:first-child {color:var(--ink);background:var(--panel)}
.clients-table tbody {background:var(--panel)}
.clients-table tbody tr {transition:background-color .12s}
.clients-table tbody tr:hover,.clients-table tbody tr:focus-within {background:var(--shade)}
.clients-table tbody td:first-child {position:static;background:transparent}
.clients-table .client-country-cell {max-width:18rem;white-space:normal;overflow-wrap:anywhere}
.clients-table :is(th,td):nth-child(n+3) {text-align:end;font-variant-numeric:tabular-nums}
.client-name-link,a.client-staff .client-staff-name {text-decoration:underline var(--link-underline);text-underline-offset:.19em}
.client-name-link {display:inline-block;padding:.2rem 0;overflow-wrap:anywhere;font-weight:550}
a.client-staff {display:inline-flex;align-items:center;gap:.65rem;max-width:100%;color:var(--ink);text-decoration:none}
.client-staff .team-avatar {height:2.2rem;width:2.2rem}
.client-staff-details {min-width:0;display:grid;line-height:1.35;text-align:start}
.client-staff-name,.client-staff-position {overflow-wrap:anywhere}
.client-staff-position {color:var(--muted);font-size:.8rem}
.client-staff.client-staff-former {color:var(--muted)}
.client-staff-former .employee-avatar {filter:grayscale(1) brightness(.8) contrast(.8)}
.client-editor .field-label {margin-bottom:.2rem}
.client-contacts-editor {margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--line)}
.client-contacts-editor h3 {margin:0;font-size:1.05rem;font-weight:550}
.client-contacts-editor .employee-action {font-size:.87rem}
.client-editor-contact-list {list-style:none;padding:0;margin:0}
.client-editor-contact {display:flex;align-items:center;gap:.6rem;padding:.55rem 0;border-bottom:1px solid var(--line)}
.client-editor-contact .team-avatar {width:2rem;height:2rem;flex:none}
.client-editor-contact-name {display:grid;gap:.12rem;min-width:0;flex:1;overflow-wrap:anywhere}
.client-editor-contact-name strong {font-weight:540}
.client-editor-contact.pending-removal .client-editor-contact-name {color:var(--muted);text-decoration:line-through}
.client-editor-contact-draft {min-width:0;margin:1rem 0 0;padding:1rem 0 0;border:0;border-top:1px solid var(--line);display:grid;gap:.8rem}
.client-editor-contact-draft legend {padding:0 .6rem 0 0;font-size:.94rem;font-weight:550}
.client-editor-contact-draft>.employee-action {justify-self:start}
.client-editor .form-footer {flex-wrap:wrap}
.client-editor .form-footer .error {margin-inline-end:auto}
.client-assigned-contacts {grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.45rem 1rem}
.client-assigned-contacts[hidden] {display:none}
.client-assigned-contact {display:inline-flex;gap:.5rem;align-items:center;min-width:0;padding:.3rem .45rem .3rem 0;border-bottom:1px solid var(--line)}
.client-assigned-contact .team-avatar {height:1.8rem;width:1.8rem}
.client-staff-picker {min-width:0}
.client-staff-picker select {display:block;min-width:0;width:100%}
.client-staff-picker .client-assigned-contacts {margin-top:.25rem}
.client-country-field {min-width:0}
.client-country-entry {display:flex;align-items:flex-end;gap:.6rem}
.client-country-entry label {flex:1;min-width:0}
.client-country-entry button {flex:none;align-self:end;font-size:.85rem;min-height:2.4rem;white-space:nowrap}
.client-country-field .client-assigned-contact {max-width:100%;overflow-wrap:anywhere}
.client-remove-contact {flex:none;padding:.15rem .4rem;border:0;background:transparent;color:var(--muted);font-size:1.2rem}
@media(max-width:760px){
  .clients-filters {grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
  .clients-table {min-width:33rem}
}
@media(max-width:580px){
  .clients-filters {grid-template-columns:1fr}
  .clients-table {table-layout:fixed;min-width:0}
  .clients-table :is(th,td) {padding:.65rem .3rem;overflow-wrap:anywhere;white-space:normal}
  .clients-table th:first-child {width:31%}
  .clients-table th:nth-child(2) {width:25%}
}
@media (prefers-reduced-motion:reduce){.clients-table tbody tr {transition:none}}
.client-geo-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;grid-column:1/-1}
.client-geo-fields select {max-width:100%;width:100%}
@media(max-width:580px){.client-geo-fields{grid-template-columns:1fr}}

.client-contact-field-heading {display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:.32em}
.client-contact-field-heading label {display:inline-flex;align-items:center;gap:.35rem}
.client-contact-field-heading .nav-icon {width:1rem;height:1rem;stroke-width:1.8}
button.client-name-unknown {padding:0 .1em;border:0;background:transparent;color:color-mix(in srgb,var(--muted) 78%,var(--panel));font-size:inherit;line-height:1.5}
button.client-name-unknown:hover,button.client-name-unknown:focus-visible {color:var(--ink);text-decoration:underline var(--link-underline);text-underline-offset:.18em}
.client-primary-badge {display:inline-flex;align-items:center;flex:none;vertical-align:middle}
.client-primary-mark {display:inline-grid;place-items:center;min-width:1.65rem;min-height:1.65rem;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);line-height:1}
.client-primary-mark>span {display:grid;place-items:center;box-sizing:border-box;width:1.08rem;height:1.08rem;border:1px solid currentColor;border-radius:50%;font-size:.77rem;font-weight:650}
.client-primary-mark.is-primary {color:var(--accent)}
.client-primary-mark.is-primary>span {background:var(--accent);border-color:var(--accent);color:var(--panel)}
button.client-primary-mark:hover,.client-primary-mark:focus-visible {background:var(--shade)}
.client-primary-tip[popover] {position:fixed;inset:auto;margin:0;box-sizing:border-box;width:max-content;max-width:min(18rem,calc(100vw - 1rem));border:1px solid var(--line);border-radius:.45rem;padding:.55rem .7rem;background:var(--panel);color:var(--ink);font-size:.82rem;line-height:1.4;text-align:start;white-space:normal;overflow-wrap:anywhere;box-shadow:0 .2rem .9rem #0002;pointer-events:none}
