.customer-filters{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(170px,.7fr) minmax(170px,.7fr);
  gap:14px;
  margin-bottom:14px;
}
.customer-filters label{min-width:0}
.customer-search-filter{grid-column:auto}
.customer-filter-input{position:relative;display:block}
.customer-filter-input>.material-symbols-rounded{position:absolute;left:12px;top:50%;translate:0 -50%;color:var(--muted);font-size:19px;pointer-events:none}
.customer-filter-input input{width:100%;padding-left:40px}
.customer-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 13px}
.customer-list-toolbar p{margin:0}
.customer-card-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;min-width:0}
.customer-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;width:100%;min-width:0;padding:16px;border:1px solid var(--line);border-radius:17px;background:var(--panel);color:var(--text);box-shadow:var(--shadow);text-align:left;cursor:pointer}
.customer-card:hover{border-color:#9fc9d0;translate:0 -1px}
.customer-card:focus-visible,.customer-link-result:focus-visible,.customer-review-card button:focus-visible{outline:3px solid rgba(20,184,166,.36);outline-offset:2px}
.customer-card-icon{width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:#e8f7f5;color:#0f766e}
.customer-card-copy{min-width:0}
.customer-card-copy strong,.customer-card-copy small{display:block;overflow-wrap:anywhere}
.customer-card-copy strong{font-size:15px;color:var(--navy)}
.customer-card-copy small{margin-top:3px;color:var(--muted);font-size:11px;line-height:1.4}
.customer-card-meta{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin-top:8px}
.customer-card-arrow{color:var(--muted)}
.customer-empty{grid-column:1/-1;display:grid;justify-items:center;gap:7px;padding:42px 18px;border:1px dashed var(--line);border-radius:18px;background:var(--panel);color:var(--muted);text-align:center}
.customer-empty>.material-symbols-rounded{font-size:35px;color:#0f766e}
.customer-empty h2,.customer-empty p{margin:0}.customer-empty h2{color:var(--navy);font-size:18px}.customer-empty p{max-width:520px;line-height:1.5}
.customers-pagination{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:18px}
.customers-pagination .btn[aria-current="page"]{background:var(--navy);color:#fff;border-color:var(--navy)}
.customer-detail{min-width:0}
.customer-detail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.customer-detail-heading{display:flex;align-items:flex-start;gap:13px;min-width:0}
.customer-detail-heading>.customer-card-icon{flex:0 0 auto}
.customer-detail-heading h1,.customer-detail-heading p{margin:0;overflow-wrap:anywhere}.customer-detail-heading h1{font-size:28px}.customer-detail-heading p{margin-top:5px;color:var(--muted)}
.customer-detail-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.customer-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.48fr);gap:16px;align-items:start}
.customer-detail-layout .panel{min-width:0}
.customer-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.customer-contact-item{padding:12px;border:1px solid var(--line);border-radius:13px;background:#f8fafc;min-width:0}
.customer-contact-item span,.customer-contact-item strong{display:block;overflow-wrap:anywhere}.customer-contact-item span{color:var(--muted);font-size:11px}.customer-contact-item strong{margin-top:4px;font-size:13px}
.customer-notes{margin:14px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}
.customer-record-dates{margin:14px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
.customer-identifier-list,.customer-job-history{display:grid;gap:9px}
.customer-history-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:12px}
.customer-history-counts span{display:grid;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#f8fafc;color:var(--muted);font-size:11px}
.customer-history-counts strong{color:var(--text);font-size:15px}
.customer-identifier{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:11px;border:1px solid var(--line);border-radius:12px}.customer-identifier strong,.customer-identifier small{display:block}.customer-identifier small{margin-top:3px;color:var(--muted)}
.customer-job-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:13px}.customer-job-row strong,.customer-job-row small{display:block;overflow-wrap:anywhere}.customer-job-row small{margin-top:3px;color:var(--muted);font-size:11px}
.customer-activity-list{display:grid}.customer-activity-item{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding-bottom:14px}.customer-activity-item:not(:last-child)::before{content:"";position:absolute;left:16px;top:32px;bottom:0;width:1px;background:var(--line)}.customer-activity-item>.material-symbols-rounded{z-index:1;width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--panel);color:#0f766e;font-size:17px}.customer-activity-item strong,.customer-activity-item small{display:block}.customer-activity-item small{margin-top:2px;color:var(--muted);font-size:10px}.customer-activity-item p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.customer-review-panel{margin:0 0 16px;padding:16px;border:1px solid #efd89b;border-radius:17px;background:#fff9e8}
.customer-review-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:11px}.customer-review-head h2,.customer-review-head p{margin:0}.customer-review-head p{margin-top:4px;color:#72551d;font-size:12px}.customer-review-list{display:grid;gap:10px}
.customer-review-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:12px;border:1px solid #ead7a6;border-radius:13px;background:var(--panel)}
.customer-review-card h3,.customer-review-card p{margin:0}.customer-review-card h3{font-size:14px}.customer-review-card p{margin-top:3px;color:var(--muted);font-size:11px}.customer-review-candidates{grid-column:1/-1;display:grid;gap:7px}.customer-review-candidate{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px;border-radius:10px;background:#f8fafc}.customer-review-candidate span{min-width:0;overflow-wrap:anywhere}.customer-review-candidate small{display:block;margin-top:2px;color:var(--muted)}.customer-review-candidate-actions{display:flex;justify-content:flex-end;gap:7px;flex:0 0 auto}.customer-review-actions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap}
.customer-form-modal,.customer-picker-modal{width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 28px);overflow:auto;overscroll-behavior:contain}
.customer-form-modal .choice-head p,.customer-picker-modal .choice-head p{margin:5px 0 0;color:var(--muted);line-height:1.45}
.customer-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:0}
.customer-form-grid label{min-width:0}.customer-form-grid .customer-form-wide{grid-column:1/-1}.customer-form-grid textarea{resize:vertical}
.customer-kind-fields{display:contents}
.customer-form-help{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
.customer-duplicate-warnings{display:grid;gap:9px;margin-top:10px}.customer-duplicate-warnings section{padding:10px;border:1px solid var(--line);border-radius:11px;background:#f8fafc}.customer-duplicate-warnings section>strong{display:block;margin-bottom:7px;color:var(--navy);font-size:12px}.customer-duplicate-warnings section>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid var(--line)}.customer-duplicate-warnings section>div>span:first-child{min-width:0;overflow-wrap:anywhere}.customer-duplicate-actions{display:flex;gap:6px;flex:0 0 auto}
.customer-picker-search{margin-bottom:12px}.customer-picker-results{display:grid;gap:8px;max-height:330px;overflow:auto;overscroll-behavior:contain}
.customer-link-result{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;padding:11px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);text-align:left;cursor:pointer}.customer-link-result strong,.customer-link-result small{display:block;overflow-wrap:anywhere}.customer-link-result small{margin-top:2px;color:var(--muted)}
.job-customer-card .job-section-head{align-items:flex-start}.job-customer-card-body{display:grid;gap:9px}.job-customer-identity{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px;background:#f4faf9}.job-customer-identity>.material-symbols-rounded{color:#0f766e}.job-customer-identity strong,.job-customer-identity small{display:block;overflow-wrap:anywhere}.job-customer-identity small{margin-top:2px;color:var(--muted)}
.job-customer-actions{display:flex;gap:7px;flex-wrap:wrap}.job-customer-actions .btn{flex:1;min-width:118px}
.job-customer-match{padding:10px;border:1px solid #ead7a6;border-radius:12px;background:#fff9e8}.job-customer-match strong,.job-customer-match p{margin:0}.job-customer-match p{margin-top:3px;color:#72551d;font-size:11px;line-height:1.45}
.job-customer-match-summary{display:flex;align-items:center;gap:6px;margin:0;color:#0f766e;font-size:11px;line-height:1.45}.job-customer-match-summary>.material-symbols-rounded{font-size:17px}
.job-customer-match-candidate{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px;margin-top:8px;padding:8px;border-radius:9px;background:rgba(255,255,255,.72)}.job-customer-match-candidate>span{min-width:0;overflow-wrap:anywhere}.job-customer-match-candidate>span:last-child{display:flex;gap:6px}
body.theme-dark .customer-card-icon{background:#123934;color:#7adbd2}
body.theme-dark .customer-contact-item,body.theme-dark .customer-review-candidate,body.theme-dark .customer-link-result,body.theme-dark .job-customer-identity{background:#101f35}
body.theme-dark .customer-history-counts span{background:#101f35}
body.theme-dark .customer-review-panel,body.theme-dark .job-customer-match{background:#332817;border-color:#6b5430;color:#f4d7a5}
body.theme-dark .job-customer-match-candidate{background:#241f18}
body.theme-dark .customer-review-head p,body.theme-dark .job-customer-match p{color:#e7c985}

@media(max-width:1100px){
  .customer-card-list{grid-template-columns:1fr}
  .customer-detail-layout{grid-template-columns:1fr}
}
@media(max-width:760px){
  .customer-filters{grid-template-columns:1fr}
  .customer-list-toolbar,.customer-detail-top{align-items:stretch;display:grid}
  .customer-list-toolbar .btn,.customer-detail-actions .btn{min-height:44px}
  .customer-detail-actions{display:grid;grid-template-columns:1fr 1fr}
  .customer-contact-grid,.customer-form-grid{grid-template-columns:1fr}
  .customer-history-counts{grid-template-columns:1fr}
  .customer-form-grid .customer-form-wide{grid-column:auto}
  .customer-review-card{grid-template-columns:1fr}.customer-review-actions{justify-content:stretch}.customer-review-actions .btn{flex:1;min-height:44px}
  .job-customer-match-candidate{grid-template-columns:1fr}.job-customer-match-candidate>span:last-child{display:grid;grid-template-columns:1fr 1fr}.job-customer-match-candidate .btn{min-height:44px}
  .customer-form-modal,.customer-picker-modal{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);padding:17px}
}
@media(max-width:480px){
  .customer-card{grid-template-columns:auto minmax(0,1fr);padding:13px}.customer-card-arrow{display:none}
  .customer-detail-actions{grid-template-columns:1fr}
  .customer-job-row,.customer-review-candidate,.customer-link-result{grid-template-columns:1fr;display:grid;align-items:start}
  .customer-review-candidate-actions{display:grid;grid-template-columns:1fr;width:100%}
  .customer-job-row .btn,.customer-review-candidate .btn,.customer-link-result .btn{width:100%;min-height:44px}
  .customers-pagination{flex-wrap:wrap}
  .customer-picker-results{max-height:260px}
  .customer-duplicate-warnings section>div{display:grid}.customer-duplicate-actions{display:grid;grid-template-columns:1fr;width:100%}.customer-duplicate-actions .btn{width:100%;min-height:44px}
}
