/* PC3 客户与销售：紧凑的业务布局，共享表面与主题 token。 */
.customer-filter-panel { border-radius:18px; padding:16px 18px 12px; margin-bottom:18px; min-width:0; container-type:inline-size; }
.customer-filter-panel .store-tabs { flex-wrap:wrap; min-width:0; }
.customer-filters { display:grid; gap:12px; margin-top:13px; }
.customer-sales-filters { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:13px; }
.customer-filters :is(.input,.select,.btn),.customer-sales-filters :is(.input,.select,.btn) { box-sizing:border-box; height:38px; min-height:38px; border-radius:10px; }
.customer-filters .select { width:100%; max-width:none; min-width:0; }
.customer-filter-main { display:grid; grid-template-columns:minmax(180px,1fr) auto; align-items:center; gap:8px; min-width:0; }
.customer-filter-main > * { min-width:0; }
.customer-search { grid-column:1; grid-row:1; min-width:0; }
.customer-search .input { width:100%; }
.customer-filter-regions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; grid-column:1 / -1; grid-row:2; min-width:0; }
.customer-filter-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; grid-column:2; grid-row:1; }
.customer-filters.has-owner .customer-filter-main { grid-template-columns:minmax(180px,1fr) 132px 100px auto; }
.customer-owner-filter { grid-column:2; grid-row:1; }
.customer-archive-filter { grid-column:3; grid-row:1; }
.has-owner .customer-filter-actions { grid-column:4; }
.customer-more-filters > .ico:last-child { transition:transform .15s; }
.customer-more-filters[aria-expanded="true"] > .ico:last-child { transform:rotate(180deg); }
.customer-more-filters.has-filters { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
.customer-filter-count { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 4px; border-radius:6px; font-size:11px; background:var(--accent-soft); font-variant-numeric:tabular-nums; }
.customer-secondary-filters { display:grid; grid-template-columns:repeat(3,minmax(0,175px)); gap:12px; padding-top:12px; border-top:1px solid var(--line); }
.customer-secondary-field { display:grid; min-width:0; gap:7px; }
.customer-secondary-field > span { font-size:12px; color:var(--ink-2); }
.customer-secondary-filters[hidden],.customer-secondary-field[hidden],.customer-filter-count[hidden] { display:none; }
.customer-filters.is-pool .customer-filter-main { grid-template-columns:minmax(180px,380px) auto; justify-content:start; }
.group-toolbar-actions .btn { height:38px; min-height:38px; border-radius:10px; padding-inline:12px; font-size:13px; }
.group-toolbar-actions .btn .ico { width:15px; height:15px; }
@container (min-width:900px) {
  .customer-filters:not(.has-owner):not(.is-pool):not(.is-partner) .customer-filter-main { grid-template-columns:minmax(180px,1fr) minmax(400px,2.5fr) auto; }
  .customer-filters:not(.has-owner):not(.is-pool):not(.is-partner) .customer-filter-regions { grid-column:2; grid-row:1; }
  .customer-filters:not(.has-owner):not(.is-pool):not(.is-partner) .customer-filter-actions { grid-column:3; }
}
@container (min-width:1100px) {
  .customer-filters.has-owner .customer-filter-main { grid-template-columns:minmax(180px,1fr) 132px minmax(400px,2.5fr) 100px auto; }
  .customer-filters.has-owner .customer-filter-regions { grid-column:3; grid-row:1; }
  .customer-filters.has-owner .customer-archive-filter { grid-column:4; }
  .customer-filters.has-owner .customer-filter-actions { grid-column:5; }
}
@container (max-width:700px) {
  .customer-filters .customer-filter-main,.customer-filters.has-owner .customer-filter-main { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-search { grid-column:1 / -1; }
  .customer-owner-filter { grid-column:1; grid-row:2; }
  .customer-archive-filter { grid-column:2; grid-row:2; }
  .customer-filter-regions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-filters.has-owner .customer-filter-regions { grid-row:3; }
  .customer-filters .customer-filter-actions { grid-column:1 / -1; grid-row:3; }
  .customer-filters.has-owner .customer-filter-actions { grid-row:4; }
  .customer-filters.is-pool .customer-filter-main { grid-template-columns:minmax(0,1fr) auto; }
  .customer-filters.is-pool .customer-search { grid-column:1; }
  .customer-filters.is-pool .customer-filter-actions { grid-column:2; grid-row:1; }
  .customer-secondary-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-secondary-field:last-child { grid-column:1 / -1; }
}
/* Brand and source keep compact widths; only the region group moves on smaller desktops. */
.customer-filters.is-partner .customer-filter-main { grid-template-columns:minmax(180px,1fr) 140px 120px auto; }
.customer-filters.is-partner #store-brand { grid-column:2; grid-row:1; }
.customer-filters.is-partner #store-source { grid-column:3; grid-row:1; }
.customer-filters.is-partner .customer-filter-regions { grid-column:1 / -1; grid-row:2; }
.customer-filters.is-partner .customer-filter-actions { grid-column:4; grid-row:1; }
@container(min-width:1180px) {
  .customer-filters.is-partner .customer-filter-main { grid-template-columns:minmax(180px,1.15fr) 140px 120px minmax(400px,2.5fr) auto; }
  .customer-filters.is-partner .customer-filter-regions { grid-column:4; grid-row:1; }
  .customer-filters.is-partner .customer-filter-actions { grid-column:5; }
}
@container(max-width:700px) {
  .customer-filters.is-partner .customer-filter-main { display:flex; flex-wrap:wrap; }
  .customer-filters.is-partner .customer-search { flex:1 0 100%; }
  .customer-filters.is-partner #store-brand { flex:1 1 120px; max-width:140px; }
  .customer-filters.is-partner #store-source { flex:1 1 110px; max-width:120px; }
  .customer-filters.is-partner .customer-filter-regions { flex:1 0 100%; }
  .customer-filters.is-partner .customer-filter-actions { flex:1 0 100%; }
}
@media(prefers-reduced-motion:reduce) { .customer-more-filters > .ico:last-child { transition:none; } }
.customer-filters .btn,.customer-sales-filters .btn { padding-inline:11px; white-space:nowrap; }
.customer-scope-note { margin:10px 0 0; color:var(--ink-2,var(--text-secondary,#59647f)); font-size:12px; line-height:1.7; }
.customer-filter-panel .customer-scope-note { margin-top:12px; }
.customer-result-summary { padding:0 18px 10px; color:var(--ink-2,#59647f); font-size:13px; }
.customer-code { display:block; margin-top:4px; color:var(--ink-2,#59647f); font-size:11.5px; line-height:1.5; font-weight:400; }
.customer-pool-grid { padding:0 16px 16px; }
.customer-pool-grid .pool-card { min-width:0; }
.customer-pool-grid h3 { overflow-wrap:anywhere; }
.customer-region-row,.customer-reminder-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.customer-contact-row,.customer-status-row,.customer-attribute-row { display:grid; align-items:start; gap:12px; min-width:0; }
.customer-contact-row { grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1.2fr); }
.customer-duplicate-check:not([hidden]) { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin:8px 0; padding:7px 10px; color:var(--ink); background:var(--surface-solid); border:1px solid var(--line-2); border-inline-start:3px solid var(--amber); border-radius:var(--radius-sm); font-size:13px; }
.customer-duplicate-check[data-kind="error"] { border-inline-start-color:var(--rose); }
.customer-duplicate-check > strong { min-width:0; font-weight:600; }
.customer-duplicate-links { display:flex; min-width:0; flex-wrap:wrap; gap:5px; }
.customer-duplicate-links > button { min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-status-row { grid-template-columns:repeat(4,minmax(0,1fr)); }
.customer-attribute-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
.customer-status-row,.customer-location-grid { margin-top:12px; }
.customer-edit-form .form-grid { gap:12px; }
.customer-edit-form .field { min-width:0; }
.customer-edit-form .form-grid .field > label { font-size:var(--pc3-text-control,13px); color:var(--ink-2); }
.customer-edit-form .customer-location-grid > .full { grid-column:1 / -1; }
.customer-edit-form .customer-status-row .customer-fixed-field { display:block; height:var(--control-h,34px); min-height:var(--control-h,34px); padding:0 11px; line-height:calc(var(--control-h,34px) - 2px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-edit-form .customer-owner-hint { margin:8px 0 0; }
.customer-edit-form .customer-region-row { margin:14px 0 12px; }
.customer-edit-section { border-top:1px solid var(--line,rgba(112,122,161,.16)); margin-top:16px; padding-top:13px; }
.customer-edit-section > summary { cursor:pointer; font-size:13px; font-weight:650; margin-bottom:12px; }
.customer-reminder-grid .input { width:100%; }
.customer-pending-check,.customer-import-flags { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin:14px 0; font-size:12px; line-height:1.6; color:var(--ink-2,#59647f); }
.customer-pending-check input,.customer-import-flags input { flex:none; }
.customer-import-flags label { display:inline-flex; align-items:center; gap:6px; }
.customer-import-flags { gap:16px; }
.customer-group-controls { display:grid; grid-template-columns:minmax(180px,1fr) minmax(160px,1fr) 140px; align-items:end; gap:12px; }
.customer-region-picker { margin:14px 0; border:1px solid var(--line,rgba(112,122,161,.16)); border-radius:14px; padding:12px; }
.customer-region-picker > summary { cursor:pointer; display:list-item; font-size:13px; font-weight:650; }
.customer-region-picker > summary span { color:var(--ink-2,#59647f); font-weight:400; margin-left:8px; font-size:12px; }
.customer-region-columns { display:grid; grid-template-columns:.9fr 1.1fr 1fr; gap:10px; margin-top:14px; }
.customer-region-columns section { min-width:0; border-right:1px solid var(--line,rgba(112,122,161,.12)); padding-right:10px; }
.customer-region-columns section:last-child { border:0; }
.customer-region-columns h3 { margin:0 0 9px; font-size:12px; color:var(--ink-2,#59647f); }
.customer-region-columns section > div { height:210px; overflow:auto; }
.customer-region-option,.customer-region-choice { display:flex; align-items:center; gap:7px; padding:7px 8px; margin:2px 0; border-radius:8px; font-size:12px; }
button.customer-region-option { justify-content:space-between; width:100%; border:0; background:transparent; text-align:left; color:inherit; }
.customer-region-choice { justify-content:space-between; }
.customer-region-choice label { display:flex; align-items:center; gap:7px; cursor:pointer; min-width:0; }
.customer-region-option.is-active,.customer-region-choice.is-active { background:var(--accent-soft,rgba(108,138,255,.12)); }
.customer-region-option:hover,.customer-region-choice:hover { background:var(--accent-soft,rgba(108,138,255,.09)); }
.customer-picker-foot,.customer-group-preview-actions,.customer-picker-toolbar,.customer-sales-topline { display:flex; align-items:center; justify-content:space-between; gap:9px; flex-wrap:wrap; }
.customer-picker-foot { margin:10px 0; font-size:12px; color:var(--ink-2,#59647f); }
.customer-group-preview-actions { margin:12px 0; font-size:12px; }
.customer-picker-toolbar { margin-bottom:12px; }
.customer-picker-toolbar .input { flex:1 1 220px; min-width:0; }
.customer-picker-table { max-height:310px; }
.customer-preview-table { max-height:350px; }
.customer-history-row { padding:13px 0; border-bottom:1px solid var(--line,rgba(112,122,161,.13)); }
.customer-history-row > div { display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:12px; }
.customer-history-row time { margin-left:auto; color:var(--ink-2,#59647f); font-size:11.5px; }
.customer-history-row p { font-size:13px; line-height:1.7; margin:8px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.customer-sales-topline { align-items:center; }
.customer-content-topline { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.customer-content-topline.has-scope-stats { display:grid; grid-template-columns:auto minmax(0,1fr) auto; }
.customer-scope-stats { display:flex; align-items:center; justify-content:center; gap:0; min-width:0; min-height:34px; }
.customer-scope-stat { display:flex; align-items:baseline; gap:6px; padding:0 14px; white-space:nowrap; color:var(--ink-2); font-size:12px; line-height:1.4; }
.customer-scope-stat + .customer-scope-stat { border-left:1px solid var(--line-2); }
.customer-scope-stat strong { font-size:17px; font-weight:650; color:var(--ink); font-variant-numeric:tabular-nums; }
.customer-scope-stat small { color:var(--ink-2); font-size:11px; font-variant-numeric:tabular-nums; }
.customer-scope-stats-error { color:var(--ink-2); font-size:12px; }
@container(max-width:900px) {
  .customer-content-topline.has-scope-stats { grid-template-columns:minmax(0,1fr) auto; }
  .customer-content-topline.has-scope-stats > .customer-scope-stats { grid-column:1 / -1; grid-row:2; justify-content:flex-start; border-top:1px solid var(--line); padding-top:8px; }
  .customer-scope-stat:first-child { padding-left:0; }
}
@container(max-width:480px) {
  .customer-content-topline.has-scope-stats > .customer-scope-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 0; }
  .customer-scope-stat { padding-inline:10px; }
  .customer-scope-stat:nth-child(odd) { padding-left:0; border-left:0; }
  .customer-scope-stat strong { font-size:16px; }
}
.customer-content-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.customer-content-topline > .store-tabs,.customer-sales-topline > .store-tabs { flex:0 1 auto; width:auto; }
.customer-content-topline .store-tab,.customer-sales-topline .store-tab { height:32px; font-size:12px; padding-inline:13px; }
.customer-sales-filters .input[type=search] { flex:1 1 230px; max-width:330px; }
.customer-sales-filters .input[name=store_id] { width:165px; }
.customer-sales-filters .input[type=date] { width:145px; }
.customer-sales-filters .select { width:auto; max-width:220px; }
.customer-sales-tabs { margin-top:15px; border-top:1px solid var(--line,rgba(112,122,161,.15)); padding-top:11px; }
.customer-sales-note { padding:12px 18px; margin:0; font-size:12px; line-height:1.7; color:var(--ink-2,#59647f); overflow-wrap:anywhere; }
.customer-sales-stats .ms-body strong { font-size:24px; }
.customer-source-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:16px; }
.customer-source-card { padding:18px; min-width:0; }
.customer-source-card h3 { margin:0 0 6px; font-size:16px; }
.customer-source-card > p { font-size:12px; color:var(--ink-2,#59647f); margin:0 0 12px; }
.customer-comparison-form { display:flex; align-items:end; flex-wrap:wrap; gap:10px; margin:16px 0; }
.customer-comparison-form .field { flex:1 1 150px; max-width:250px; }
.customer-match-card { border:1px solid var(--line,rgba(112,122,161,.15)); padding:12px; border-radius:12px; margin:10px 0; }
.customer-match-card > strong { font-size:13px; }
.customer-match-controls { display:grid; grid-template-columns:minmax(0,1.2fr) auto minmax(0,1fr); gap:8px; margin-top:9px; }
.customer-fixed-field { display:flex; align-items:center; min-height:38px; padding:8px 11px; border-radius:10px; border:1px solid var(--line); color:var(--ink); background:var(--surface,rgba(255,255,255,.28)); }
.customer-record-summary,.customer-pool-batch { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.customer-record-summary > span:last-child { color:var(--ink-2); font-size:12px; }
.customer-record-content { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.8; margin:18px 0; }
.customer-record-photos { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:16px; }
.customer-record-photo { display:block; min-width:0; aspect-ratio:4/3; border:1px solid var(--line); border-radius:12px; overflow:hidden; padding:0; background:var(--surface,rgba(255,255,255,.22)); }
.customer-record-photo img { display:block; width:100%; height:100%; object-fit:cover; font-size:12px; }
.customer-photo-full { display:block; max-width:100%; max-height:72vh; object-fit:contain; margin:0 auto; border-radius:12px; }
.customer-sales-summary > summary { cursor:pointer; font-size:13px; font-weight:650; }
.customer-sales-line { display:grid; gap:5px; padding:12px 0; border-bottom:1px solid var(--line); font-size:13px; }
.customer-sales-line small { color:var(--ink-2); }
.customer-history-row > .btn { margin-top:8px; }
/* Customer facts stay available without pushing sales and history several screens down. */
.customer-detail-drawer .drawer-head { padding:18px 24px 15px; }
.customer-detail-content { container-type:inline-size; min-width:0; }
.customer-detail-drawer .store-identity { margin-bottom:8px; }
.customer-detail-drawer .store-identity .store-avatar.lg { width:42px; height:42px; }
.customer-detail-keyline { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 14px; margin:0 0 10px; }
.customer-detail-keyline > div { display:grid; grid-template-columns:52px minmax(0,1fr); align-items:baseline; gap:8px; min-width:0; }
.customer-detail-keyline dt { color:var(--ink-2); font-size:13px; }
.customer-detail-keyline dd { min-width:0; margin:0; font-size:14px; color:var(--ink); overflow-wrap:anywhere; }
.customer-detail-drawer .store-kpis { padding:8px 3px; margin:0 0 12px; background:var(--accent-soft); border-color:var(--line); }
.customer-detail-drawer .store-kpis strong { font-size:20px; line-height:1.3; }
.customer-detail-drawer .store-kpis small { margin-top:2px; }
.customer-detail-drawer .store-kpis .customer-visit-caption { line-height:1.4; }
.customer-detail-disclosures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:8px; margin-bottom:14px; }
.customer-detail-fold { min-width:0; border:1px solid var(--line); border-radius:10px; background:var(--glass-soft); }
.customer-detail-fold[open] { grid-column:1 / -1; }
.customer-detail-fold > summary { display:flex; align-items:center; gap:8px; min-width:0; min-height:38px; padding:8px 10px; color:var(--ink); font-size:14px; font-weight:650; cursor:pointer; list-style:none; }
.customer-detail-fold > summary::-webkit-details-marker { display:none; }
.customer-detail-fold > summary > small { color:var(--ink-2); font-size:12px; font-weight:400; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-detail-fold > summary > .ico:last-child { flex:none; margin-left:auto; color:var(--ink-2); }
.customer-detail-fold[open] > summary > .ico:last-child { transform:rotate(180deg); }
.customer-detail-fold > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:9px; }
.customer-detail-fold-body { padding:0 10px 10px; }
.customer-detail-code { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin:0 0 8px; color:var(--ink-2); font-size:12px; }
.customer-detail-drawer .customer-detail-info { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.customer-detail-drawer .customer-detail-info > div { grid-template-columns:70px minmax(0,1fr); min-width:0; gap:8px; padding:8px 10px; }
.customer-detail-drawer .customer-detail-info > .customer-detail-full { grid-column:1 / -1; }
.customer-detail-notes { white-space:pre-wrap; }
.customer-detail-drawer .customer-detail-fold .form-hint { margin:7px 1px 0; }
.customer-detail-drawer .drawer-section { margin-bottom:16px; }
.customer-detail-drawer .customer-sales-summary > summary { margin-bottom:8px; }
.customer-detail-drawer .customer-detail-history .ds-head { margin-bottom:8px; }
.customer-detail-drawer .brand-sales .bs-summary-tools { gap:8px; margin-bottom:6px; align-items:center; }
.customer-detail-drawer .brand-sales .bs-summary-tools .bs-field { flex-direction:row; align-items:center; gap:8px; min-width:0; }
.customer-detail-drawer .brand-sales .bs-summary-tools .bs-field > span { flex:none; }
.customer-detail-drawer .brand-sales .bs-summary-tools .bs-field > select,
.customer-detail-drawer .brand-sales .bs-summary-tools .select-trigger { min-height:30px; height:30px; padding:4px 9px; }
.customer-detail-drawer .brand-sales .bs-summary-tools .select-control { min-width:0; flex:1; }
.customer-detail-drawer .brand-sales .bs-summary-tools .bs-btn { min-height:30px; padding:4px 10px; }
.customer-detail-drawer .brand-sales .bs-total { padding:7px 10px; gap:6px 10px; margin-bottom:6px; }
.customer-detail-drawer .brand-sales .bs-total strong { font-size:19px; }
.customer-detail-drawer .brand-sales .bs-brand-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.customer-detail-drawer .brand-sales .bs-brand-card { padding:7px 10px; border-radius:10px; }
.customer-detail-drawer .brand-sales .bs-brand-card > div:first-child { gap:5px; }
.customer-detail-drawer .brand-sales .bs-brand-card h4 { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.customer-detail-drawer .brand-sales .bs-brand-card :is(.bs-grade,.bs-tag) { padding:1px 5px; line-height:18px; }
.customer-detail-drawer .brand-sales .bs-summary-value { margin:2px 0; gap:5px 8px; }
.customer-detail-drawer .brand-sales .bs-summary-value .bs-summary-amount { font-size:19px; line-height:1.5; }
.customer-detail-drawer .brand-sales .bs-summary-value .bs-comparison { flex:0 1 auto; }
.customer-detail-drawer .brand-sales .bs-brand-card > p { margin:2px 0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.customer-detail-drawer .brand-sales .bs-brand-card dl { grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 10px; margin:4px 0; }
.customer-detail-drawer .brand-sales .bs-brand-card dl > div { justify-content:flex-start; gap:5px; min-width:0; font-size:12px; line-height:1.5; }
.customer-detail-drawer .brand-sales .bs-brand-card dt { flex:none; }
.customer-detail-drawer .brand-sales .bs-brand-card dd { min-width:0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.customer-detail-drawer .brand-sales > .bs-note { margin:7px 0 0; font-size:12px; line-height:1.6; }
.customer-detail-drawer .brand-sales .bs-comparison-detail { min-width:0; max-width:100%; }
.customer-detail-drawer .customer-sales-summary,
.customer-detail-drawer .customer-detail-history { border-top:1px solid var(--line); padding-top:13px; margin-top:13px; }
.customer-detail-drawer .customer-sales-summary > summary { display:flex; align-items:center; gap:10px; margin:0 0 8px; min-height:32px; font-size:15px; list-style:none; }
.customer-detail-drawer .customer-sales-summary > summary::-webkit-details-marker { display:none; }
.customer-detail-drawer .customer-sales-summary > summary::marker { content:''; }
.customer-detail-drawer .customer-sales-summary > summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:6px; }
.customer-detail-drawer .customer-sales-summary > summary > span:first-child { flex:none; }
.customer-sales-control-row { display:flex; align-items:center; min-width:0; flex:1; }
.customer-sales-control-row:empty { display:none; }
.customer-sales-disclosure-icon { display:inline-flex; align-items:center; justify-content:center; flex:0 0 24px; width:24px; height:24px; margin-left:auto; align-self:center; color:var(--ink-2); line-height:0; border-radius:6px; background:var(--accent-soft); }
.customer-sales-disclosure-icon > svg { display:block; flex:none; width:16px; height:16px; transform-origin:50% 50%; }
.customer-sales-summary[open] > summary .customer-sales-disclosure-icon > svg { transform:rotate(180deg); }
.customer-brand-sales-meta { display:flex; align-items:baseline; justify-content:flex-start; flex-wrap:wrap; gap:5px 12px; min-width:0; margin:0 0 8px; color:var(--ink-2); font-size:12px; font-weight:400; text-align:left; }
.customer-brand-sales-meta:empty { display:none; }
.customer-brand-sales-meta > strong { color:var(--accent); font-size:15px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.customer-brand-sales-meta > strong small { margin-left:3px; color:var(--ink-2); font-size:11px; font-weight:400; }
.customer-brand-sales-meta .customer-sales-total-grade { white-space:nowrap; }
.customer-brand-sales-meta .customer-sales-source { color:var(--accent); font-weight:600; white-space:nowrap; }
.customer-brand-sales-meta .bs-grade { margin-left:3px; font-size:11px; line-height:17px; padding:0 4px; }
.customer-detail-drawer .brand-sales .bs-summary-tools.is-customer-summary { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:0; width:100%; }
.customer-detail-drawer .brand-sales .bs-summary-tools.is-customer-summary .bs-field { flex:0 1 160px; min-width:120px; max-width:190px; }
.customer-detail-drawer .brand-sales .bs-summary-tools.is-customer-summary .bs-field > select { width:100%; }
.customer-detail-drawer .brand-sales .bs-summary-tools.is-customer-summary .bs-source-tabs { align-self:center; }
.customer-detail-drawer .brand-sales .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.customer-detail-drawer .brand-sales .bs-brand-card-head { min-height:24px; }
.customer-detail-drawer .brand-sales .bs-brand-rank { display:inline-flex; flex:none; align-items:center; justify-content:center; width:20px; height:20px; border-radius:6px; background:var(--accent-soft); color:var(--accent); font-size:11px; font-weight:650; font-variant-numeric:tabular-nums; }
.customer-detail-drawer .brand-sales .bs-brand-card.is-new-customer { background:color-mix(in srgb,var(--mint) 8%,var(--bs-paper)); border-color:color-mix(in srgb,var(--mint) 22%,var(--line)); }
.customer-detail-drawer .brand-sales .bs-brand-card.is-repurchase-due { background:color-mix(in srgb,var(--amber) 10%,var(--bs-paper)); border-color:color-mix(in srgb,var(--amber) 27%,var(--line)); }
.customer-detail-drawer .brand-sales .bs-repurchase-note { margin-left:auto; color:var(--comparison-warn,#8e641e); font-size:11px; font-weight:600; white-space:nowrap; }
.customer-detail-drawer .customer-history-toolbar.is-heading { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:7px; margin:0 0 8px; }
.customer-detail-drawer .customer-history-toolbar.is-heading h3 { flex:none; margin:0; font-size:15px; line-height:1.5; }
.customer-detail-drawer .customer-history-toolbar.is-heading .store-tabs { flex:none; gap:2px; padding:2px; }
.customer-detail-drawer .customer-history-toolbar.is-heading .store-tab { min-height:25px; height:25px; padding:2px 9px; font-size:11px; line-height:19px; }
.customer-history-count { display:inline-flex; align-items:baseline; gap:4px; margin-left:auto; color:var(--ink-2); font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.customer-history-count strong { color:var(--ink); font-size:14px; font-weight:650; }
@container(max-width:450px) {
  .customer-detail-drawer .customer-sales-summary > summary { align-items:center; flex-wrap:wrap; }
  .customer-sales-control-row { order:3; flex-basis:100%; }
  .customer-brand-sales-meta { flex-basis:100%; justify-content:flex-start; margin-left:0; text-align:left; }
  .customer-detail-keyline,.customer-detail-disclosures,.customer-detail-drawer .customer-detail-info { grid-template-columns:minmax(0,1fr); }
  .customer-detail-fold[open],.customer-detail-drawer .customer-detail-info > .customer-detail-full { grid-column:auto; }
  .customer-detail-drawer .brand-sales .bs-brand-cards { grid-template-columns:minmax(0,1fr); }
  .customer-detail-drawer .brand-sales .bs-summary-tools .bs-field { flex-basis:100%; }
}
.drawer-foot:has([data-store-transfer]) { flex-wrap:wrap; }
@media(max-width:760px) { .customer-record-photos { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:1180px) { .customer-reminder-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { .customer-filter-panel { border-radius:18px; padding:13px; } .customer-group-controls { grid-template-columns:1fr; } .customer-region-row,.customer-source-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .customer-source-grid { grid-template-columns:1fr; } .customer-region-columns { gap:5px; } .customer-region-columns section { padding-right:5px; } .customer-region-option,.customer-region-choice { padding:6px 2px; font-size:11.5px; } .customer-region-choice .icon-btn { width:20px; } .customer-sales-filters .input[type=search] { flex-basis:100%; max-width:none; } .customer-sales-filters :is(.select,.input[name=store_id]) { flex:1 1 calc(50% - 8px); max-width:none; width:140px; } .customer-sales-stats .ms-body strong { font-size:21px; } .customer-match-controls { grid-template-columns:minmax(0,1fr) auto; } .customer-match-controls .input:last-child { grid-column:1 / -1; } }
@media(max-width:760px){#stores-content .table-toolbar{flex-wrap:wrap;gap:10px}#stores-content .table-toolbar>.tt-left{flex:1 0 100%;white-space:normal;min-width:0}#stores-content .table-toolbar>.tt-right{flex:1 1 100%;flex-wrap:wrap;justify-content:flex-start;min-width:0;gap:6px}#stores-content .table-toolbar .btn{white-space:nowrap}#stores-content .tt-left>strong{flex:none;white-space:nowrap}}
@media(max-width:760px) {
  .customer-contact-row,.customer-status-row,.customer-attribute-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-contact-row > .field:first-child { grid-column:1 / -1; }
}
@media(max-width:480px) {
  .customer-contact-row,.customer-status-row,.customer-attribute-row { grid-template-columns:minmax(0,1fr); }
}

.customer-pool-reference-filters{display:flex;flex-wrap:wrap;align-items:end;gap:8px;padding:0 16px 12px}.customer-pool-reference-filters .field{min-width:100px;flex:1;margin:0}.customer-pool-reference-filters .select{height:34px;min-height:34px}.customer-pool-reference{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12px;color:var(--text-secondary);margin:6px 0}.customer-pool-reference-brands{display:grid;gap:8px;margin-top:14px}.customer-pool-reference-brands article{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:12px;border-radius:8px;background:var(--bg-input)}.customer-pool-reference-brands article small{grid-column:1/-1;color:var(--text-secondary)}
.customer-filter-regions:has(.customer-group-filter){grid-template-columns:repeat(5,minmax(0,1fr))}.customer-pool-scope{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:13px 0 0}.customer-pool-scope>span{font-size:12px;color:var(--ink-2)}.customer-group-help{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 4px;color:var(--ink-2);font-size:12px}.customer-group-help p{flex:1 0 100%;margin:0}.group-area-summary{font-size:12px;color:var(--ink-2);line-height:1.7;min-height:22px;margin:10px 0;overflow-wrap:anywhere}.group-card-actions{flex-wrap:wrap}
@container(min-width:1100px){.customer-filters.has-owner .customer-filter-main{grid-template-columns:minmax(150px,1fr) 120px minmax(500px,3fr) 90px auto}}
@container(max-width:700px){.customer-filter-regions:has(.customer-group-filter){grid-template-columns:repeat(2,minmax(0,1fr))}.customer-group-filter{grid-column:1 / -1}}

.store-tool-actions { --tool-color:var(--accent); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.store-tool-actions .btn { width:100%; min-width:0; height:33px; justify-content:center; color:var(--tool-color); border-color:color-mix(in srgb,var(--tool-color) 20%,var(--line)); background:color-mix(in srgb,var(--tool-color) 5%,transparent); white-space:nowrap; }
.store-tool-actions .btn:hover { background:color-mix(in srgb,var(--tool-color) 13%,transparent); }
.store-tool-actions .btn:focus-visible { outline:2px solid var(--tool-color); outline-offset:2px; }
.store-template-batch-file { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.store-template-batch-file .file-input { flex:1 1 180px; min-width:0; max-width:100%; }
.store-template-batch-result:not([hidden]) { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; padding:9px 12px; border:1px solid var(--line-2); border-radius:var(--radius-sm); background:var(--accent-soft); }
.store-template-batch-result > p { margin:0; color:var(--ink-2); font-size:13px; }
.store-review-trigger .ico-file-review { color:var(--accent); }
.store-review-trigger .ico-chevron-right { opacity:.6; }
.pool-policy-summary { color:var(--ink-2); font-size:12px; white-space:nowrap; }
.pool-allocation-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px 10px; margin:0 16px 14px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--accent-soft); font-size:12px; }
.pool-allocation-bar > label { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.pool-allocation-bar > span { color:var(--ink-2); white-space:nowrap; }
.pool-allocation-bar .select { width:155px; height:32px; min-height:32px; margin-left:auto; }
.pool-store-code { margin-left:auto; color:var(--ink-3); font-size:11px; }
.customer-pool-grid .pool-card { min-width:0; }
.customer-pool-grid .pool-card h3 { overflow-wrap:anywhere; }
.customer-pool-grid .pool-card.is-selected { border-color:var(--accent); }
.customer-pool-grid .pool-foot { flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.customer-pool-grid .pool-foot > button:first-child { margin-right:auto; }
@media(max-width:760px) { .pool-allocation-bar .select { margin-left:0; flex:1 1 130px; } }
.assign-preview-summary { margin:8px 0; color:var(--ink-2); font-size:12px; }
@media(max-width:480px) { .store-tool-actions { gap:5px; } .store-tool-actions .btn { padding-inline:6px; font-size:11px; gap:4px; } }

.group-page .group-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.group-page .group-card { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:17px; min-width:0; border:1px solid var(--line); }
.group-page .group-card.is-selected { border-color:var(--accent); background:var(--surface); box-shadow:inset 0 0 0 1px var(--accent-soft); }
.group-page .group-card-head { display:flex; align-items:center; gap:10px; width:100%; flex:none; }
.group-card-select { display:flex; align-items:center; gap:8px; flex:none; cursor:pointer; }
.group-card-select input { width:14px; height:14px; margin:0; accent-color:var(--accent); }
.group-page .group-card-title { flex:1; min-width:0; }
.group-page .group-card-title strong { font-size:14px; color:var(--ink); overflow-wrap:anywhere; white-space:normal; line-height:1.5; }
.group-page .group-card-head > .group-card-count { display:flex; align-items:baseline; gap:4px; flex:0 0 auto; text-align:right; }
.group-page .group-card-count strong { font-size:24px; line-height:1.2; color:var(--ink); font-variant-numeric:tabular-nums; font-weight:650; }
.group-card-count > span { font-size:11px; color:var(--ink-2); white-space:nowrap; }
.group-card-statistics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:0 0 8px; padding:7px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.group-card-statistics > div { display:flex; align-items:baseline; gap:5px; min-width:0; line-height:1.4; }
.group-card-statistics dt { margin:0; color:var(--ink-2); font-size:11px; white-space:nowrap; }
.group-card-statistics dd { margin:0; color:var(--ink); font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
.group-card-sales { display:flex; align-items:baseline; gap:8px; min-width:0; margin:0 0 9px; padding:7px 8px; border:1px solid var(--line); border-radius:8px; background:var(--accent-soft); }
.group-card-sales-title { flex:none; color:var(--ink-2); font-size:11px; line-height:1.4; }
.group-card-sales-values { display:flex; flex:1; align-items:baseline; justify-content:space-between; gap:5px 8px; min-width:0; flex-wrap:wrap; font-variant-numeric:tabular-nums; }
.group-card-sales-values > strong { color:var(--ink); font-size:17px; line-height:1.4; font-weight:650; overflow-wrap:anywhere; }
.group-card-sales-values > span { color:var(--ink-2); font-size:11px; line-height:1.4; white-space:nowrap; }
.group-card-sales-values > .is-up { color:#247b67; }
.group-card-sales-values > .is-down { color:#b24d6a; }
[data-theme="dark"] .group-card-sales-values > .is-up { color:#8bd5bd; }
[data-theme="dark"] .group-card-sales-values > .is-down { color:#f0a5b8; }
.group-card-areas { display:flex; flex-wrap:wrap; align-content:flex-start; gap:6px; margin:13px 0; min-height:26px; }
.group-card-areas > span { padding:4px 7px; border-radius:5px; color:var(--ink-2); background:var(--accent-soft); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.group-owners { margin:0 0 14px; }
.group-owners-label { display:block; margin-bottom:6px; color:var(--ink-2); font-size:11px; }
.group-owner-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 12px; }
.group-page .group-owner { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; border:0; border-radius:5px; background:transparent; color:var(--ink); min-height:30px; padding:4px 6px; font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.group-page .group-owner:hover { background:var(--accent-soft); color:var(--accent); }
.group-owner-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.group-owner-count { flex:none; font-variant-numeric:tabular-nums; color:var(--accent); font-weight:600; }
.group-owner-count small { margin-left:3px; color:var(--ink-2); font-size:10px; font-weight:400; }
.group-owner.is-unassigned .group-owner-name { color:var(--ink-2); }
.group-owners-empty { color:var(--ink-2); font-size:12px; line-height:30px; }
.group-page .group-card-actions { display:flex; align-items:center; width:100%; margin:auto 0 0; padding-top:8px; border-top:1px solid var(--line); gap:7px; }
.group-page .group-card-actions .btn { height:30px; font-size:12px; padding-inline:9px; }
.group-page .group-card-actions .danger { margin-left:auto; }
.group-page .group-toolbar > div:first-child > span { font-size:12px; color:var(--ink-2); line-height:1.6; }
.group-page .group-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),360px)); align-content:start; gap:10px; }
.group-page .group-card { padding:11px 12px; }
.group-page .group-card-head { gap:8px; }
.group-page .group-card-count strong { font-size:20px; }
.group-page .group-card-areas { margin:7px 0; min-height:0; }
.group-page .group-card-areas > span { padding:3px 6px; font-size:11px; line-height:1.4; }
.group-page .group-owners { margin-bottom:8px; }
.group-page .group-owners-label { margin-bottom:4px; line-height:1.4; }
.group-page .group-owner-list { gap:1px; border:1px solid var(--line); border-radius:7px; overflow:hidden; background:var(--line); }
.group-page .group-owner { min-height:29px; padding:4px 8px; border:0; border-radius:0; background:var(--surface-solid); }
.group-page .group-owner-list:has(> .group-owner:last-child:nth-child(odd))::after { content:""; min-height:29px; background:var(--surface-solid); }
.group-page .group-owners-empty { grid-column:1 / -1; padding-inline:8px; background:var(--surface-solid); }
.group-page .group-owner:hover { background:var(--accent-soft); }
.customer-filters.is-pool .customer-filter-main { grid-template-columns:minmax(200px,1fr) minmax(448px,2.1fr) auto; justify-content:stretch; }
.customer-filters.is-pool .customer-search { grid-column:1; grid-row:1; }
.customer-filters.is-pool .customer-filter-actions { grid-column:3; grid-row:1; }
.customer-pool-filters { grid-column:2; grid-row:1; min-width:0; }
.customer-pool-reference-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; gap:8px; padding:0; }
.customer-pool-reference-filters .field { min-width:0; margin:0; }
.customer-pool-reference-filters .select { width:100%; }
@container(max-width:760px) {
  .customer-filters.is-pool .customer-filter-main { grid-template-columns:minmax(0,1fr) auto; }
  .customer-filters.is-pool .customer-filter-actions { grid-column:2; }
  .customer-pool-filters { grid-column:1 / -1; grid-row:2; }
}
@container(max-width:480px) {
  .customer-pool-reference-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.pool-workspace-toolbar { flex:none; }
.pool-claims-pager { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:12px; color:var(--ink-2); font-size:12px; }
.pool-claims-pager > div { display:flex; gap:7px; }
.pool-claims-modal .table-wrap { max-height:min(60dvh,620px); overflow:auto; }
@media(min-width:761px) {
  .main:has(> #view > .page > #stores-content > [data-pool-workspace]),
  .main:has(> #view > .page > #stores-content > [data-group-workspace]) { height:100dvh; min-height:100dvh; box-sizing:border-box; grid-template-rows:var(--topbar-h) auto minmax(0,1fr); align-content:stretch; padding-bottom:14px; }
  #stores-content:has(> [data-pool-workspace]),#stores-content:has(> [data-group-workspace]) { display:flex; flex-direction:column; min-height:0; }
  #stores-content > [data-pool-workspace],#stores-content > [data-group-workspace] { flex:1; min-height:0; margin-bottom:0; }
  #stores-content > [data-pool-workspace] { display:flex; flex-direction:column; overflow:hidden; }
  #stores-content > [data-pool-workspace] > .customer-pool-grid { flex:1; min-height:0; overflow:auto; align-content:start; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); }
  #stores-content > [data-pool-workspace] > .empty { flex:1; }
  #stores-content > [data-group-workspace] { display:flex; flex-direction:column; overflow:hidden; }
  #stores-content > [data-group-workspace] > .group-grid { flex:1; min-height:0; overflow:auto; align-content:start; }
  #stores-content > [data-group-workspace] > .group-empty { flex:1; }
  #stores-content > [data-group-workspace] > .customer-group-help { flex:none; }
}
.group-page .group-batch-bar { display:flex; min-height:58px; font-size:12px; padding:10px 13px; gap:12px; border-color:var(--line); background:var(--surface); color:var(--ink-2); }
.group-page .group-batch-bar.has-selection { border-color:var(--accent); background:var(--accent-soft); }
.group-select-all { display:flex; align-items:center; gap:6px; flex:none; white-space:nowrap; cursor:pointer; }
.group-select-all input { width:14px; height:14px; margin:0; accent-color:var(--accent); }
.group-selection-summary { flex:1; min-width:190px; }
.group-selection-hint { display:inline; margin-left:12px; font-size:11px; color:var(--ink-2); }
.group-batch-controls { display:flex; align-items:center; gap:7px; flex:none; }
.group-page .group-batch-bar .select { min-width:150px; max-width:210px; font-size:12px; }
.group-page .group-batch-bar .btn { font-size:12px; }
.group-assignment-target { display:flex; align-items:center; gap:12px; padding:14px; background:var(--accent-soft); border-radius:11px; margin:0 0 16px; }
.group-assignment-target > .group-icon { display:grid; place-items:center; color:var(--accent); width:34px; height:34px; flex:none; }
.group-assignment-target > div { display:grid; gap:4px; }
.group-assignment-target small,.group-assignment-source { color:var(--ink-2); font-size:12px; line-height:1.6; }
.group-assignment-target strong { font-size:16px; color:var(--ink); }
.group-assignment-source { margin-left:auto; max-width:50%; overflow-wrap:anywhere; text-align:right; }
.group-assignment-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid var(--line); border-radius:10px; margin-bottom:14px; padding:13px 0; }
.group-assignment-summary > div { display:grid; gap:5px; text-align:center; border-right:1px solid var(--line); }
.group-assignment-summary > div:last-child { border:0; }
.group-assignment-summary strong { font-size:22px; font-variant-numeric:tabular-nums; color:var(--ink); }
.group-assignment-summary span { color:var(--ink-2); font-size:12px; }
.group-assignment-impact { color:var(--ink-2); font-size:12px; line-height:1.7; margin:0 0 12px; }
.group-assignment-body .assign-preview { max-height:240px; overflow:auto; }
.group-assignment-body .assign-preview > div { padding:7px 3px; }
@media(max-width:760px) { .group-page .group-grid { grid-template-columns:minmax(0,1fr); } .group-page .group-card { padding:14px; } .group-page .group-toolbar { align-items:flex-start; } .group-selection-summary { min-width:0; } .group-selection-hint { display:block; margin:3px 0 0; } .group-batch-controls { width:100%; flex-wrap:wrap; } .group-page .group-batch-bar .select { min-width:100px; flex:1; } .group-page .group-batch-controls .btn { padding-inline:8px; } .group-assignment-target { flex-wrap:wrap; } .group-assignment-source { max-width:100%; flex:1 0 100%; text-align:left; margin-left:0; } .customer-pool-reference-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
