.crm-clients {display:flex;flex-direction:column;gap:16px;min-width:0;min-height:0;height:100%;padding:20px 24px;overflow-y:auto;overflow-x:hidden;background:var(--bg);color:var(--txt);box-sizing:border-box;}
.crm-header,.crm-record-heading {display:flex;justify-content:space-between;align-items:center;gap:14px;min-width:0;}
.crm-header h2,.crm-record-heading h2 {margin:0;color:var(--txt-hi);font-size:20px;overflow-wrap:anywhere;}
.crm-header p,.crm-record-heading p {margin:6px 0 0;color:var(--txt-lo);font-size:12px;}
.crm-clients>.pc-segmented {align-self:flex-start;}
.crm-columns {display:grid;grid-template-columns:minmax(0,1fr);gap:20px;min-width:0;min-height:0;}
.crm-columns:has(.crm-record-editor) {grid-template-columns:minmax(240px,.65fr) minmax(0,1.35fr);}
.crm-list-pane {min-width:0;}
.crm-search {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;}
.crm-search input {flex:1 1 180px;width:100%;min-width:0;}
.crm-search select {max-width:100%;min-width:0;}
.crm-record-list,.crm-related ul {list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;}
.crm-record {display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;width:100%;min-width:0;padding:14px;border:1px solid var(--steel);border-radius:8px;background:var(--bg2);color:var(--txt);overflow-wrap:anywhere;}
.crm-record:hover,.crm-record.selected {border-color:var(--gold-lo);background:var(--accent-soft);}
.crm-record strong {font-size:14px;color:var(--txt-hi);}
.crm-record span {font-size:12px;color:var(--txt-lo);white-space:pre-wrap;}
.crm-record small {font-size:11px;color:var(--gold-hi);}
.crm-pagination {display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;margin-top:14px;font-size:12px;color:var(--txt-lo);}
.crm-pagination>span:first-child {margin-right:auto;}
.crm-record-editor {min-width:0;border:1px solid var(--steel-hi);border-radius:9px;background:var(--bg2);padding:18px;align-self:start;}
.crm-record-editor fieldset {margin:0;padding:0;border:0;min-width:0;}
.crm-record-editor .pc-field :is(input,select,textarea),.crm-client-picker input {width:100%;min-width:0;max-width:100%;min-inline-size:0;box-sizing:border-box;}
.crm-record-editor textarea {resize:vertical;}
.crm-record-actions {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0;}
.crm-client-picker {min-width:0;}
.crm-client-picker .pc-field {margin-bottom:8px;}
.crm-related,.crm-history {border-top:1px solid var(--steel);margin-top:22px;padding-top:16px;}
.crm-related h3,.crm-project-client h3 {margin:0;font-size:14px;color:var(--txt-hi);}
.crm-related .crm-record-heading {margin-bottom:12px;flex-wrap:wrap;}
.crm-order-link {display:flex;flex-direction:column;gap:6px;width:100%;padding:11px 0;text-align:left;border-bottom:1px solid var(--steel);color:var(--txt);overflow-wrap:anywhere;}
.crm-order-link span {font-size:11px;color:var(--txt-lo);}
.crm-history summary {cursor:pointer;font-size:12px;color:var(--txt-lo);padding:6px 0;}
.crm-history ol {padding:0;list-style:none;font-size:11px;color:var(--txt-lo);}
.crm-history li {display:flex;gap:12px;justify-content:space-between;padding:7px 0;}
.crm-empty {padding:28px 16px;border:1px dashed var(--steel-hi);border-radius:8px;line-height:1.6;}
.crm-empty h3 {margin:0 0 7px;color:var(--txt-hi);font-size:15px;}
.crm-empty p {margin:0;color:var(--txt-lo);font-size:13px;}
.crm-project-client {padding:16px;margin:18px 0;border:1px solid var(--steel);border-radius:8px;background:var(--bg2);min-width:0;}
.crm-contact-summary {display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere;margin-top:12px;font-size:13px;}
.crm-contact-summary span,.crm-contact-summary small {color:var(--txt-lo);}
.crm-contact-summary p {white-space:pre-wrap;margin:0;}
@media(max-width:1000px) {.crm-columns:has(.crm-record-editor) {grid-template-columns:minmax(0,1fr);} .crm-list-pane.has-selection {display:none;}}
@media(max-width:600px) {.crm-clients {padding:14px 12px;gap:12px;} .crm-header {align-items:flex-start;flex-wrap:wrap;} .crm-header h2,.crm-record-heading h2 {font-size:18px;} .crm-record-editor {padding:13px;} .crm-record-editor .pc-fields {grid-template-columns:minmax(0,1fr);} .crm-record-editor .pc-wide {grid-column:auto;} .crm-project-client {padding:12px;} .crm-record-heading {flex-wrap:wrap;} .crm-history li {flex-direction:column;gap:3px;} .crm-record-actions .po-button {flex:1 1 auto;}}
