.customer-grid{display:grid;gap:.7rem;max-width:1120px;margin:0 auto 3rem}.customer-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto auto;align-items:center;gap:1rem;padding:.85rem 1rem;background:#fff;border:1px solid #e0e9e7;border-radius:14px}.customer-avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#e8f7f3;color:var(--tenant-primary,#0f766e);font-weight:850}.customer-info strong,.customer-info small{display:block}.customer-info strong{color:#102a43}.customer-info small{margin-top:.2rem;color:#718096;font-size:.7rem}.customer-info span{display:inline-block;margin-left:.5rem;padding:.18rem .4rem;border-radius:999px;background:#fff4dc;color:#9a5b10;font-size:.58rem}.customer-balance{text-align:right}.customer-balance small,.customer-balance strong{display:block}.customer-balance small{color:#718096;font-size:.62rem}.customer-balance strong{color:#0f766e}.customer-balance strong.due{color:#b45309}.customer-card>a{color:var(--tenant-primary,#0f766e);font-size:.75rem;font-weight:800;text-decoration:none}.customer-form{display:grid;gap:1rem;max-width:900px;margin:0 auto 3rem}.customer-form textarea{width:100%;border:1px solid #ccd9d6;border-radius:10px;padding:.7rem}.customer-form .field small{display:block;color:#718096;font-size:.65rem;margin-top:.25rem}@media(max-width:600px){.customer-card{grid-template-columns:42px 1fr auto}.customer-balance{grid-column:2;text-align:left}.customer-card>a{grid-column:3;grid-row:1/3}.customer-form .setup-fields{grid-template-columns:1fr}.customer-form .setup-fields .full{grid-column:auto}}
.distribution-customer-filter{display:grid;grid-template-columns:minmax(13rem,1fr) repeat(4,minmax(8rem,.55fr)) auto}.distribution-customer-filter select{min-width:0;height:36px;border:1px solid #cddbd8;border-radius:9px;padding:.3rem .45rem;font-size:.76rem;background:#fff}.distribution-customer-defaults .setup-fields{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:900px){.distribution-customer-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.distribution-customer-filter input{grid-column:1/-1}.distribution-customer-defaults .setup-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.distribution-customer-filter,.distribution-customer-defaults .setup-fields{grid-template-columns:1fr}.distribution-customer-filter input{grid-column:auto}}

/* Customer create/edit: use the full work area and keep related controls on one row. */
.customer-form{width:100%;max-width:none;margin:0 0 1rem;gap:.55rem}
.customer-form .setup-card{padding:.62rem .78rem;margin-bottom:0}
.customer-form .setup-card-title{margin-bottom:.42rem;padding-bottom:.38rem}
.customer-form .setup-card-title>span{width:29px;height:29px}
.customer-form .setup-card-title h2{font-size:.94rem}
.customer-form .setup-card-title p{font-size:.68rem}
.customer-form .setup-fields{grid-template-columns:repeat(4,minmax(0,1fr));gap:.38rem .58rem;align-items:start}
.customer-form .setup-fields>.field{min-width:0}
.customer-form .setup-fields>.field.full{grid-column:1/-1}
.customer-form .setup-fields label{margin-bottom:.12rem;font-size:.68rem}
.customer-form .setup-fields input,.customer-form .setup-fields select{height:34px;min-height:34px;padding:.25rem .48rem;font-size:.78rem}
.customer-form textarea{min-height:42px;padding:.35rem .48rem;border-radius:8px;font-size:.78rem}
.customer-form .field small{margin-top:.12rem;font-size:.6rem}
.customer-form .switch-row{min-height:34px;padding:.32rem .48rem;gap:.4rem;border-radius:8px}
.customer-form .switch-row input{width:16px;height:16px}
.customer-form .switch-row strong{font-size:.7rem}
.customer-form .inline-action{display:flex;align-items:center;gap:.3rem;min-width:0}
.customer-form .inline-action input{min-width:5rem;flex:1}
.customer-form .inline-action .btn{min-height:34px;padding:.28rem .55rem;font-size:.72rem;white-space:nowrap}
.customer-form .setup-actions{justify-content:flex-end;gap:.4rem;margin-top:0}
.customer-form .setup-actions .btn{min-height:34px;padding:.35rem .7rem;font-size:.78rem}
.customer-form .gps-capture{min-height:32px;margin-top:.35rem;padding:.28rem .55rem;font-size:.72rem}
.customer-form .validation-summary:empty{display:none}
@media(max-width:1050px){.customer-form .setup-fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.customer-form .setup-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.customer-form .setup-fields{grid-template-columns:1fr}.customer-form .setup-fields>.field.full{grid-column:auto}.customer-form .inline-action{flex-wrap:wrap}.customer-form .inline-action input{flex-basis:100%}.customer-form .setup-actions{justify-content:stretch}.customer-form .setup-actions .btn{flex:1}}
.customer-form .inline-master-status{margin-top:.3rem;color:#087f70;font-size:.72rem;font-weight:700}
.customer-form .inline-master-status:empty{display:none}
.customer-form [data-master-error]{display:block;min-height:0;color:#b42318;font-size:.68rem}
.customer-form [data-master-error]:empty{display:none}
.customer-classification-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.58rem}
.customer-classification-fields>.field{min-width:0}
.customer-classification-fields label{display:block;margin-bottom:.12rem;font-size:.68rem}
.customer-master-control{display:flex;align-items:stretch;gap:.35rem;min-width:0}
.customer-master-control select{flex:1;min-width:0;height:34px;min-height:34px;padding:.25rem .48rem;font-size:.78rem}
.customer-master-control .btn{flex:none;min-height:34px;padding:.3rem .65rem;font-size:.72rem}
.customer-master-dialog{width:min(38rem,calc(100vw - 1.25rem));max-height:min(78vh,42rem);padding:0;border:1px solid #cbded9;border-radius:14px;background:#fff;color:#102a43;box-shadow:0 24px 70px #102a4340}
.customer-master-dialog::backdrop{background:#092a37a8}
.customer-master-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.72rem .85rem;border-bottom:1px solid #dce9e5}
.customer-master-dialog-head h2{margin:0;font-size:1rem}
.customer-master-dialog-head button{width:28px;height:28px;border:0;border-radius:7px;background:#edf6f3;color:#153d4c;font-size:1.25rem;line-height:1;cursor:pointer}
.customer-master-dialog-body{display:grid;gap:.55rem;padding:.7rem .85rem}
.customer-master-entry{display:flex;align-items:end;gap:.4rem;min-width:0}
.customer-master-entry label{flex:1;min-width:0;font-size:.68rem;font-weight:700}
.customer-master-entry input,.customer-master-filter{display:block;width:100%;height:35px;margin-top:.16rem;padding:.38rem .55rem;border:1px solid #bcd4ce;border-radius:8px;background:#fff;color:#102a43;font-size:.78rem}
.customer-master-entry .btn{height:35px;min-height:35px;padding:.35rem .7rem;font-size:.74rem;white-space:nowrap}
.customer-master-feedback{color:#087f70;font-size:.72rem;font-weight:700}
.customer-master-feedback:empty{display:none}
.customer-master-feedback.error{color:#b42318}
.customer-master-filter{margin-top:0}
.customer-master-list{min-height:4rem;max-height:48vh;overflow:auto;border:1px solid #dce9e5;border-radius:9px}
.customer-master-list-row{display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-height:37px;padding:.3rem .58rem;border-bottom:1px solid #e8f0ed;font-size:.77rem}
.customer-master-list-row:last-child{border-bottom:0}
.customer-master-list-row>span{min-width:0;overflow-wrap:anywhere}
.customer-master-list-actions{display:flex;align-items:center;gap:.35rem;flex:none}
.customer-master-list-actions small{color:#9a5b10;font-size:.66rem}
.customer-master-list-actions button{padding:.27rem .5rem;border:1px solid #bcd4ce;border-radius:7px;background:#f6fbf9;color:#075d58;font-size:.7rem;font-weight:700;cursor:pointer}
.customer-master-list-actions button:hover{background:#e3f4ee}
.customer-master-empty{margin:1rem;text-align:center;color:#718096;font-size:.76rem}
@media(max-width:650px){.customer-classification-fields{grid-template-columns:1fr}.customer-master-dialog-body{padding:.6rem}.customer-master-entry{flex-wrap:wrap}.customer-master-entry label{flex-basis:100%}}
