/* Customer assets P0 only. Scope prevents changing overview, AI, and legacy tables. */
.customer-assets { --customer-idle: #c3cad4; --customer-active: #5e82c7; --customer-done: #449477; --customer-error: #ce606b; }
.customer-filters { padding: 24px; background: #fff; border: 1px solid #e8edf4; border-radius: 16px; box-shadow: var(--card-shadow); }
.customer-filter-primary { display: grid; grid-template-columns: minmax(240px,2fr) repeat(3,minmax(120px,1fr)) auto; gap: 16px; align-items: end; }
.customer-assets label { margin: 0; color: #5d6b7e; font-size: 12px; font-weight: 500; }
.customer-assets input, .customer-assets select { min-height: 38px; height: 38px; margin-top: 8px; padding: 8px 12px; font-size: 13px; background: #f6f8fb; border: 1px solid transparent; border-radius: 8px; }
.customer-assets input:focus, .customer-assets select:focus { outline: 2px solid #a4b9e6; outline-offset: 1px; }
.customer-search>span { display: flex; gap: 8px; align-items: center; border: 1px solid #e5e7eb; border-radius: 8px; margin-top: 8px; padding-left: 12px; background: #fff; }
.customer-assets .customer-search input { margin: 0; width: 100%; min-width: 0; background: #fff; }
.customer-search:focus-within { outline: 2px solid #a4b9e6; }
.customer-assets .customer-search input:focus { outline: none; }
.customer-advanced-toggle { height: 38px; }
.customer-filter-advanced { display: grid; grid-template-columns: minmax(160px,1fr) repeat(2,minmax(180px,1fr)) minmax(160px,1fr); gap: 16px; align-items: end; padding-top: 20px; }
.customer-filter-advanced[hidden] { display: none; }
.customer-filter-advanced p { font-size: 12px; line-height: 1.6; color: #788598; margin: 0 0 8px; }
.customer-filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; border-top: 1px solid #eff2f6; padding-top: 16px; }
.customer-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #788598; }
.customer-filter-chips button { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; overflow-wrap: anywhere; border: 1px solid #e1e9f6; background: #f1f5fc; color: #536d9d; padding: 5px 10px; border-radius: 6px; font-size: 12px; }
.customer-filter-summary>.text-button { white-space: nowrap; }
.customer-rules { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: #637389; font-size: 12px; margin: 20px 0; }
.customer-rules strong { color: #45546a; font-weight: 600; }
.customer-results { min-width: 0; }
.customer-result-heading { display: flex; align-items: end; gap: 12px; margin-bottom: 12px; }
.customer-result-heading>div { flex: 1; }
.customer-result-heading h2 { font-size: 17px; color: #334155; font-weight: 600; }
.customer-result-heading h2>span { margin-left: 12px; font-weight: 400; font-size: 12px; color: #728096; }
.customer-result-heading p { font-size: 12px; color: #778599; margin: 8px 0 0; line-height: 1.7; }
.customer-assets .customer-result-heading select { width: 140px; }
.customer-assets .customer-table-scroll { padding: 0 0 12px; border-radius: 12px; max-height: none; overflow-x: hidden; overflow-y: visible; overscroll-behavior: auto; scrollbar-gutter: auto; }
.customer-assets .customer-table { min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0 8px; margin: 0; font-size: 13px; }
.customer-assets .customer-table th { position: sticky; top: 0; z-index: 3; height: 48px; padding: 12px 16px; font-size: 12px; background: #f4f6f8; border: 0; color: #758297; box-shadow: 0 1px 0 #e7ebf1; }
.customer-table th>button { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; background: transparent; border: 0; color: inherit; text-align: left; font-size: 12px; padding: 0 8px 0 0; }
.customer-table th[aria-sort=ascending]>button, .customer-table th[aria-sort=descending]>button { color: #4265a4; font-weight: 600; }
.customer-column-resize { position: absolute; width: 12px; top: 8px; bottom: 8px; right: -3px; z-index: 5; cursor: col-resize; touch-action: none; border-right: 2px solid transparent; }
.customer-column-resize:hover, .customer-column-resize:focus-visible { border-right-color: #8ba7da; outline: none; }
.customer-resizing, .customer-resizing * { cursor: col-resize!important; user-select: none!important; }
.customer-assets .customer-table td { padding: 16px; height: 96px; border: 0; background: #fff; vertical-align: middle; line-height: 1.65; overflow: hidden; }
.customer-assets .customer-table td:first-child { border-radius: 12px 0 0 12px; padding-left: 20px; }
.customer-assets .customer-table td:last-child { border-radius: 0 12px 12px 0; padding-right: 16px; }
/* Align nearby rows below the 48px sticky heading plus its 6px row gaps. */
.customer-assets .customer-table tbody tr { box-shadow: 0 3px 12px rgba(149,157,165,.06); }
.customer-assets .customer-table td small { display: block; color: #7d8999; margin-top: 4px; font-size: 11px; }
.customer-assets .customer-table tbody tr:hover td { background: #f9fbff; }
.customer-truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.customer-identity { display: flex; gap: 12px; align-items: center; min-width: 0; min-height: 44px; }
.customer-identity>.avatar { flex: 0 0 36px; width: 36px; height: 36px; font-size: 14px; }
.customer-identity>div { min-width: 0; }
.customer-name-line { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: center; }
.customer-name { max-width: 100%; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; padding: 0; background: transparent; color: #334155; font-weight: 600; font-size: 13px; }
.customer-phone { color: #7c8799; font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.customer-progress-button { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 0; color: #52667f; }
.customer-progress-button b { font-size: 13px; font-weight: 500; }
.customer-progress-track { display: flex; gap: 4px; margin-top: 8px; width: 104px; }
.customer-progress-track i { height: 5px; flex: 1; border-radius: 4px; background: var(--customer-idle); }
.customer-progress-track i.active { background: var(--customer-active); }.customer-progress-track i.done { background: var(--customer-done); }.customer-progress-track i.error { background: var(--customer-error); }
.customer-progress-button small { display: flex!important; align-items: center; }
.customer-assets .customer-table .customer-overdue { color: #b75260; }
.customer-contact-state { background: #edf4fc; color: #4a6f9e; padding: 4px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.customer-contact-state.paused { background: #fff0f1; color: #b45762; }
.customer-row-actions, .customer-extra-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.customer-action { min-height: 36px; line-height: 20px; border: 0; border-radius: 6px; background: transparent; padding: 8px 6px; font-size: 12px; color: #526fa8; text-decoration: none; }
.customer-action:hover:not(:disabled) { background: #edf2ff; text-decoration: none; }.customer-action:disabled { color: #939cac; text-decoration: none; cursor: not-allowed; }
.customer-assets .customer-more { display: none; }
.customer-pagination { display: flex; gap: 16px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; font-size: 12px; color: #6d7a8d; }
.customer-pagination>span { margin-right: auto; }.customer-pagination label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.customer-assets .customer-pagination select, .customer-assets .customer-pagination input { margin: 0; width: 84px; background: #fff; }.customer-assets .customer-pagination input { width: 56px; }
.customer-assets .customer-empty { padding: 40px 24px!important; text-align: left; }.customer-empty h3 { font-size: 16px; }.customer-empty p { margin: 12px 0; color: #788598; }
.customer-field-notes { font-size: 12px; color: #7e8a9b; margin-top: 20px; line-height: 1.7; }
.customer-progress-detail>p { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 0; }.customer-progress-detail>p>span:last-child { margin-left: auto; }
.customer-state-dot { width: 8px; height: 8px; border-radius: 50%; background: #c3cad4; }.customer-state-dot.active { background: #5e82c7; }.customer-state-dot.done { background: #449477; }.customer-state-dot.error { background: #ce606b; }
@media(max-width:1200px) { .customer-filter-primary { grid-template-columns: minmax(220px,2fr) repeat(2,minmax(140px,1fr)); }.customer-filter-primary>.customer-search { grid-column: span 2; }.customer-filter-advanced { grid-template-columns: repeat(3,minmax(0,1fr)); }.customer-filter-advanced p { grid-column: 1/-1; } }
@media(max-width:1100px) { .customer-row-actions { gap: 12px; } }
@media(max-width:760px) { .customer-filters { padding: 16px; }.customer-filter-primary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.customer-filter-primary>.customer-search { grid-column: 1/-1; }.customer-filter-advanced { grid-template-columns: 1fr; }.customer-result-heading { flex-wrap: wrap; }.customer-result-heading>div { flex: 1 0 100%; }.customer-assets .customer-table-scroll { max-height: none; }.customer-rules { display: block; line-height: 1.8; }.customer-rules svg { vertical-align: middle; }.customer-pagination { gap: 12px; justify-content: flex-start; }.customer-pagination>span { flex-basis: 100%; }.customer-assets .customer-pagination input,.customer-assets .customer-pagination select { min-height: 44px; }.customer-assets .customer-action { min-height: 44px; }.customer-assets .customer-table td { height: 96px; } }

/* P1 additions: retain P0 data behavior and isolate this table from legacy tables. */
.customer-assets { container: customer-assets / inline-size; width: 100%; min-width: 0; max-width: 100%; }
.main-shell:has(.customer-assets) .page-heading { margin: 24px 0 20px; }
.customer-overview { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.customer-overview article { padding: 16px 20px; background: #fff; border: 1px solid #e8edf4; border-radius: 12px; box-shadow: 0 4px 16px rgba(149,157,165,.06); min-width: 0; }
.customer-overview article>span { display: block; font-size: 12px; color: #6c7a8c; }
.customer-overview strong { display: block; font-size: 26px; font-weight: 600; line-height: 1.35; margin: 8px 0; color: #334155; font-variant-numeric: tabular-nums; }
.customer-overview small { display: block; font-size: 11px; color: #8792a2; line-height: 1.6; }
.customer-main-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.customer-main-actions>div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.customer-main-actions>label { display: flex; align-items: center; gap: 8px; }
.customer-assets .customer-main-actions select { margin: 0; width: 160px; background: #fff; }
.customer-overview-scope { font-size: 11px; color: #8792a2; line-height: 1.6; margin: 12px 0 20px; }
.customer-view-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.customer-view-bar label { display: flex; align-items: center; gap: 8px; }
.customer-assets .customer-view-bar select { width: 220px; margin: 0; background: #fff; }
.customer-view-bar small { font-size: 11px; color: #8792a2; margin-left: auto; }
.customer-policy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 16px 0; color: #66758a; font-size: 12px; }
.customer-help { margin-left: auto; }
.customer-help>summary { cursor: pointer; color: #5973a3; font-size: 12px; }
.customer-help[open] { width: 100%; }
.customer-help>div { margin-top: 12px; background: #fff; border: 1px solid #e8edf4; border-radius: 8px; padding: 16px; line-height: 1.8; }
.customer-help p+p { margin-top: 8px; }
.customer-result-heading { align-items: center; }
.customer-bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; padding: 12px 16px; border: 1px solid #e6edf7; border-radius: 8px; background: #f0f4fa; font-size: 12px; color: #60728d; }
.customer-bulk-bar[hidden] { display: none; }
.customer-bulk-bar>span { margin-right: auto; }
.customer-assets .customer-bulk-bar>.button:not(:disabled) { background: #fff; border-color: #d3dff4; color: #4263bc; }
.customer-assets .customer-bulk-bar>.button { min-height: 32px; height: 32px; padding: 0 12px; font-size: 12px; }
.customer-assets input.customer-selection { width: 16px; min-width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: #5976b6; cursor: pointer; flex: 0 0 16px; }
.customer-assets .customer-table-scroll { position: relative; isolation: isolate; width: 100%; max-width: 100%; min-width: 0; border-radius: 12px; }
.customer-assets .customer-table { width: 100%; max-width: 100%; border-spacing: 0 6px; }
.customer-assets .customer-table td { height: 80px; padding: 12px 16px; }
.customer-assets .customer-table th { background: #f4f6f8; z-index: 4; }
.customer-assets .customer-table tbody tr:hover td { background: #f9fbff; }
.customer-assets .customer-table tr.customer-row-selected td { background: #f1f5fc; }
.customer-assets .customer-table time { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: left; }
.customer-row-actions { display: block; width: 100%; min-width: 0; }
.customer-action-content, .customer-extra-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.customer-pagination[hidden] { display: none; }
.customer-error { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px; margin: 16px 0; color: #98525f; background: #fff5f6; border: 1px solid #f1dfe3; border-radius: 12px; font-size: 13px; }
.customer-error small { display: block; margin-top: 4px; font-size: 12px; }
.customer-assets .customer-loading { padding: 32px 24px; text-align: left; background: #fff; }
.customer-loading p { font-size: 13px; color: #708098; margin: 12px 0; }
.customer-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #e3e9f3; border-top-color: #7490c3; border-radius: 50%; animation: customer-spin 1s linear infinite; }
.customer-skeleton { width: 80%; height: 16px; background: #eef2f7; border-radius: 4px; margin-top: 16px; }
.customer-skeleton:last-child { width: 55%; }
@keyframes customer-spin { to { transform: rotate(360deg); } }
.customer-mobile-cards { display: none; }
.customer-mobile-card { min-width: 0; padding: 16px; background: #fff; border: 1px solid #e8edf4; border-radius: 12px; box-shadow: 0 4px 16px rgba(149,157,165,.06); }
.customer-card-heading { display: flex; align-items: center; gap: 12px; }
.customer-card-heading .customer-identity { flex: 1; min-width: 0; }
.customer-mobile-card .customer-identity>div { flex: 1; }
.customer-mobile-card .customer-identity small { display: block; color: #7c899b; font-size: 12px; margin-top: 4px; white-space: normal; overflow-wrap: anywhere; }
.customer-mobile-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 16px 0; }
.customer-mobile-card dl>div { min-width: 0; }
.customer-mobile-card dt { font-size: 11px; color: #8290a3; margin-bottom: 4px; }
.customer-mobile-card dd { font-size: 13px; color: #43536c; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.customer-mobile-card dd small { display: block; font-size: 11px; color: #8792a2; margin-top: 4px; }
.customer-mobile-card time { font-variant-numeric: tabular-nums; }
.customer-card-extra { border-top: 1px solid #edf1f7; padding-top: 12px; }
.customer-card-extra summary { font-size: 12px; color: #738298; cursor: pointer; }
.customer-card-actions { border-top: 1px solid #edf1f7; margin-top: 12px; padding-top: 8px; }
.customer-card-actions .customer-action-content { justify-content: space-between; }
.customer-phone-result { margin-top: 20px; border-top: 1px solid #e8edf4; padding-top: 16px; font-size: 13px; }
.customer-phone-result>p { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.customer-batch-preview ul { list-style: none; max-height: 260px; overflow: auto; padding: 0; margin: 16px 0; }
.customer-batch-preview li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-bottom: 1px solid #edf1f7; font-size: 13px; }
.customer-batch-preview li small { color: #8190a3; font-size: 12px; }
@container customer-assets (max-width: 1000px) {
 .customer-overview { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }

 .customer-view-bar small { width: 100%; margin-left: 0; }
}
@container customer-assets (max-width: 680px) {
 .customer-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .customer-overview article { padding: 12px 16px; }
 .customer-overview strong { font-size: 24px; }
 .customer-mobile-cards { grid-template-columns: minmax(0,1fr); }
 .customer-filter-primary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 .customer-filter-primary>.customer-search { grid-column: 1/-1; }
 .customer-filter-advanced { grid-template-columns: minmax(0,1fr); }
 .customer-filter-summary { align-items: flex-start; }
 .customer-bulk-bar { gap: 8px; }
 .customer-bulk-bar>span { width: 100%; }
 .customer-help { margin-left: 0; }
}
/* Media fallback for browsers without container-query support. */
@media(max-width:1100px) { .customer-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }.customer-view-bar small { margin-left: 0; } }
@media(max-width:640px) { .customer-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.customer-overview article { padding: 12px; }.customer-main-actions { align-items: stretch; }.customer-assets .customer-main-actions>label { width: 100%; }.customer-main-actions>div { gap: 8px; }.customer-view-bar { gap: 8px; }.customer-assets .customer-view-bar select { width: 180px; }.customer-bulk-bar { gap: 8px; }.customer-bulk-bar>span { width: 100%; }.customer-assets .customer-bulk-bar>.button:not(:disabled) { background: #fff; border-color: #d3dff4; color: #4263bc; }
.customer-assets .customer-bulk-bar>.button { min-height: 40px; height: 40px; }.customer-mobile-card .customer-action { min-height: 40px; } }
@media(prefers-reduced-motion:reduce) { .customer-spinner { animation: none; } }

/* Store identity uses the same brand palette as the overview and kanban. */
.customer-shop-tag.shop-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 500; line-height: 1.6; white-space: nowrap; opacity: 1; }

/* Customer density refinement: people, urgency, and scanning alignment. */
.customer-owner-group { display: flex; align-items: center; gap: 6px; min-width: 0; text-align: left; }
.customer-owner-preview { display: grid; gap: 4px; flex: 1; min-width: 0; }
.customer-owner-person { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: #43536c; }
.customer-owner-avatar.shop-chip { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; flex: 0 0 22px; border-radius: 50%; font-size: 10px; font-weight: 600; }
.customer-owner-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-owner-more { flex: 0 0 auto; min-width: 30px; min-height: 30px; padding: 3px 5px; border: 1px solid #dce5f2; background: #f1f5fb; color: #526fa8; font-size: 11px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.customer-owner-more:hover, .customer-owner-more:focus-visible { background: #e7eef9; outline-color: #8099c6; }
.customer-owner-popover { display: none; position: fixed; inset: auto; margin: 0; width: 280px; max-width: calc(100vw - 24px); max-height: min(340px,calc(100dvh - 24px)); padding: 16px; border: 1px solid #e2e8f1; border-radius: 12px; background: #fff; color: #43536c; box-shadow: 0 10px 36px #24365026; overflow: auto; z-index: 90; text-align: left; font-size: 12px; line-height: 1.6; }
.customer-owner-popover:popover-open { display: block; }
.customer-owner-popover[data-owner-open=true] { display: block; }
.customer-owner-popover>b { display: block; margin-bottom: 12px; font-size: 12px; color: #334155; }
.customer-owner-popover>.customer-owner-person { margin-top: 8px; }
.customer-owner-popover .customer-shop-tag { margin-left: auto; }
.customer-assets .customer-table small.customer-overdue-tag, .customer-mobile-card small.customer-overdue-tag { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #fff0f1; color: #b83d50; font-weight: 600; font-size: 11px; }
.customer-assets .customer-table .customer-overdue, .customer-mobile-card .customer-overdue { color: #b83d50; font-weight: 600; }
.customer-assets .customer-table [data-customer-cell=identity], .customer-assets .customer-table [data-customer-cell=stage], .customer-assets .customer-table [data-customer-cell=owners] { text-align: left; }
.customer-assets .customer-table [data-customer-cell=last], .customer-assets .customer-table [data-customer-cell=next], .customer-assets .customer-table [data-customer-cell=last] time, .customer-assets .customer-table [data-customer-cell=next] time { text-align: right; font-variant-numeric: tabular-nums; }
.customer-assets .customer-table [data-customer-cell=last]>button, .customer-assets .customer-table [data-customer-cell=next]>button { justify-content: flex-end; text-align: right; }
.customer-assets .customer-table [data-customer-cell=progress] { text-align: center; font-variant-numeric: tabular-nums; }
.customer-assets .customer-table [data-customer-cell=progress]>button { text-align: center; }
.customer-assets .customer-table [data-customer-cell=progress] .customer-progress-track { margin-left: auto; margin-right: auto; }
.customer-intent-more { margin-top: 6px; font-size: 11px; color: #7d8999; }
.customer-intent-more summary { cursor: pointer; }
.customer-intent-more>small { white-space: normal; }
@media(max-width:1100px) { .customer-owner-more { min-height: 36px; min-width: 36px; } }

/* Only completed segments reveal their store color; detail dots identify stores. */
.customer-progress-track i[data-shop] { background: #e2e5ea; }
.customer-progress-track i.done[data-shop="大金空调"], .customer-state-dot[data-shop="大金空调"] { background: #5e82c7; }
.customer-progress-track i.done[data-shop="皮阿诺"], .customer-state-dot[data-shop="皮阿诺"] { background: #449477; }
.customer-progress-track i.done[data-shop="老板电器"], .customer-state-dot[data-shop="老板电器"] { background: #8d6bb7; }

/* The full owner list is a body-level, on-demand popover, never cell content. */
.customer-owner-popover .customer-owner-person { flex-wrap: wrap; }
.customer-owner-popover .customer-owner-name { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.customer-results>.customer-pagination { position: static; box-sizing: border-box; margin: 16px 0 0; padding: 16px 0; border-top: 1px solid #e8edf4; }
