#manage-customers #customerBusinessPanel .customer-card-v2 .customer-actions button{width:auto;flex:0 0 auto;min-width:36px}
.ca-button{font-family:inherit;font-size:13px;font-weight:700;line-height:normal;color:#222;background:#fff;border:1px solid #333;border-radius:6px;padding:8px 14px;min-height:36px;cursor:pointer;white-space:nowrap}
.ca-button:disabled{opacity:.45;cursor:default}
.ca-primary{background:#222;color:#fff}
.ca-toolbar,.ca-actions,.ca-pager{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ca-toolbar input{flex:1;min-width:170px}.ca-toolbar input,.ca-toolbar select,.ca-link-dialog input:not([type=checkbox]),.ca-link-dialog select,.ca-link-dialog textarea{font:inherit;border:1px solid #d8dce2;border-radius:8px;padding:10px;background:#fff;color:#222;box-sizing:border-box;max-width:100%}
.ca-account-card{border:1px solid #d8dfe8;background:#fff;border-radius:12px;padding:14px;margin:10px 0}
.ca-account-head{display:flex;justify-content:space-between;gap:14px;align-items:center}.ca-account-head h3{margin:5px 0 8px;font-size:14px;font-weight:700;overflow-wrap:anywhere}.ca-account-head small{color:#7a8795}.ca-account-facts{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px;margin-top:12px;font-size:13px}.ca-account-facts p{margin:3px 0;overflow-wrap:anywhere}
.ca-badge{display:inline-block;padding:3px 8px;border-radius:5px;background:#f1f4f8;color:#576678;font-size:12px}.ca-badge.linked{background:#edf6ef;color:#346e45}.ca-badge.conflict{background:#fff1e6;color:#9c4a1c}
.ca-warning{font-size:13px;color:#92542c;line-height:1.7;overflow-wrap:anywhere}.ca-muted,.ca-empty{font-size:13px;color:#768191;line-height:1.8}.ca-pager{justify-content:center;margin:16px 0}
.ca-link-dialog{width:740px;max-width:calc(100vw - 24px);max-height:88vh;overflow:auto;box-sizing:border-box;border:1px solid #ccc;border-radius:14px;padding:24px;color:#222;background:#fff}.ca-link-dialog::backdrop{background:#0006}.ca-link-dialog h3{margin:0 0 12px}.ca-link-inputs,.ca-review-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ca-link-inputs label{display:flex;flex-direction:column;gap:8px;font-size:14px}.ca-link-inputs select{width:100%}.ca-review-grid section{min-width:0;border:1px solid #e0e4e9;border-radius:8px;padding:12px}.ca-review-grid h4,.ca-review-grid p{overflow-wrap:anywhere}.ca-review{padding:12px;border-radius:8px;background:#f6f7f9;margin:12px 0}.ca-review label{display:flex;align-items:flex-start;gap:8px;line-height:1.7;font-size:14px}.ca-review textarea{width:100%;min-height:78px;margin-top:10px;resize:vertical}.ca-link-dialog [role=status]{color:#94502c;font-size:13px}
#customerBusinessPanel[hidden],#customerMiniPanel[hidden],#customerAudienceTabs[hidden],.ca-review[hidden]{display:none!important}
@media(max-width:600px){.ca-account-head{align-items:flex-start;flex-direction:column}.ca-account-facts,.ca-link-inputs,.ca-review-grid{grid-template-columns:1fr}.ca-link-dialog{padding:16px}.ca-toolbar select{flex:1}.ca-account-card{padding:14px}.ca-actions{gap:6px}}
@media(max-width:760px){#manage-customers #customerBusinessPanel .customer-card-v2{grid-template-columns:minmax(0,1fr);grid-template-areas:"person" "metrics" "actions" "meta"}#manage-customers #customerBusinessPanel .customer-card-v2 .customer-actions{justify-content:flex-start;max-width:none}}

/* Share the existing customer navigation and keep every metric inside its cell. */
#manage-customers[data-customer-audience=mini] #customerDuplicateView > :not(.customer-duplicate-tabs){display:none}
#manage-customers #customerAudienceTabs button[hidden]{display:none!important}
#manage-customers #customerBusinessPanel .customer-card-v2{grid-template-columns:minmax(140px,1fr) minmax(380px,3fr) 190px}
#manage-customers #customerBusinessPanel .customer-actions{width:190px;max-width:190px;display:flex;flex-wrap:wrap}
#manage-customers #customerBusinessPanel .customer-main.customer-wallet-columns{grid-template-columns:minmax(0,.8fr) minmax(118px,1.35fr) minmax(0,1.1fr) minmax(0,1fr)}
#manage-customers #customerBusinessPanel .customer-wallet-value{flex-wrap:wrap;gap:4px 6px}
#manage-customers #customerBusinessPanel .customer-wallet-open{margin-left:0}
#manage-customers #customerBusinessPanel .customer-cell strong{overflow-wrap:anywhere;white-space:normal}
#manage-customers #customerBusinessPanel .customer-cell span{white-space:normal}
@media(max-width:800px){#manage-customers #customerBusinessPanel .customer-card-v2{grid-template-columns:minmax(0,1fr);grid-template-areas:"person" "metrics" "actions" "meta";gap:8px}#manage-customers #customerBusinessPanel .customer-actions{width:auto;max-width:none;justify-content:flex-start}#manage-customers #customerBusinessPanel .customer-main.customer-wallet-columns{grid-template-columns:repeat(2,minmax(0,1fr))}#manage-customers #customerBusinessPanel .customer-cell{padding:6px 8px}#manage-customers #customerBusinessPanel .customer-cell:nth-child(2){border-right:0}#manage-customers #customerBusinessPanel .customer-cell:nth-child(n+3){border-top:1px solid #edf0f3}}

/* Mini customer directory follows the main program's control and card scale. */
#manage-customers[data-customer-audience=mini] > .customer-toolbar,#manage-customers[data-customer-audience=mini] > .customer-summary{display:none}
#customerMiniPanel{font-family:inherit;font-size:13px;color:#222}
#manage-customers .customer-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:8px;align-items:center}
#manage-customers .customer-toolbar>.btn-add{justify-self:end;min-height:36px}
#manage-customers .customer-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
#manage-customers .ca-mini-header .ca-toolbar-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-width:0}
#manage-customers .ca-mini-header .customer-search{min-width:0}
#manage-customers .ca-mini-header select{height:36px;min-width:0;font-family:inherit;font-size:13px;padding:0 8px;border:1px solid #ddd;border-radius:6px;background:#fff;color:#222}
#manage-customers .ca-mini-header .ca-button{height:36px}
#customerMiniPanel .ca-account-card:first-child{margin-top:0}
#customerMiniPanel .ca-list-status{font-size:12px;color:#888;line-height:1.5;margin:10px 0}
#customerMiniPanel .ca-empty{border:1px solid #dce0e6;border-radius:10px;background:#fff;padding:28px 16px;text-align:center;margin:0}
#customerMiniPanel .ca-empty strong{display:block;font-size:14px;font-weight:700;color:#333;line-height:1.5}
#customerMiniPanel .ca-empty p{font-size:12px;line-height:1.7;color:#888;margin:8px auto 0;max-width:440px}
#customerMiniPanel .ca-boundary-note{font-size:11px;line-height:1.7;color:#888;margin:12px 0;overflow-wrap:anywhere}
#customerMiniPanel .ca-pager{font-size:12px;margin:12px 0}
#customerMiniPanel .ca-pager[hidden]{display:none!important}
#customerMiniPanel .ca-account-card{border-radius:10px;padding:12px 14px}
#customerMiniPanel .ca-account-head small{font-size:10px;color:#969ba4}
#customerMiniPanel .ca-account-head h3{font-size:14px;margin:3px 0 5px;line-height:1.4}
#customerMiniPanel .ca-account-facts{font-size:12px;gap:4px 16px;margin-top:10px;border-top:1px solid #f0f2f5;padding-top:8px;line-height:1.6}
#customerMiniPanel .ca-badge{font-size:10px;padding:1px 5px}
.ca-link-dialog{inset:0;margin:auto}
.ca-order-merge .ca-merge-search{width:100%;height:36px;margin:8px 0}
.ca-order-merge .ca-merge-choices,.ca-order-merge .ca-merge-orders{max-height:180px;overflow:auto;border:1px solid #ddd;border-radius:8px;margin:6px 0 12px;padding:4px 10px}
.ca-order-merge .ca-merge-choices label{display:flex;align-items:center;gap:8px;padding:7px 0;font-size:13px;overflow-wrap:anywhere}
.ca-order-merge .ca-merge-choices label+label,.ca-order-merge .ca-merge-orders section+section{border-top:1px solid #eee}
.ca-order-merge .ca-merge-target{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;font-size:13px;margin-bottom:10px}
.ca-order-merge .ca-merge-target select{width:100%;height:36px;padding:0 8px}
.ca-order-merge .ca-merge-review-title{font-size:14px;font-weight:700;margin-top:8px;overflow-wrap:anywhere}
.ca-order-merge .ca-merge-orders section{padding:8px 0;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.ca-order-merge .ca-actions{justify-content:flex-end;margin-top:12px}
#customerAudienceTabs{flex-wrap:wrap}
@media(max-width:600px){#manage-customers .customer-toolbar{grid-template-columns:minmax(0,1fr)}#manage-customers .customer-toolbar>.btn-add{justify-self:stretch;width:100%;height:36px}#manage-customers .customer-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#customerMiniPanel .ca-empty{padding:24px 14px}}
