/* Scoped replica of the existing customer-detail page; no changes to other views. */
#business-page:has(.customer-details){min-height:0;padding:10px 24px;border-radius:10px}
.customer-details{font-size:14px;color:#333;min-width:0;padding-bottom:0}
.customer-details *, .customer-details *::before,.customer-details *::after{box-sizing:border-box}
.customer-details [hidden]{display:none!important}
.customer-page-heading{height:56px;display:flex;align-items:center}
.customer-page-heading h1{margin:0;font-size:16px;line-height:24px;font-weight:600;color:#262626}
.customer-filter-form{padding:8px;background:#f7f9fc;margin:0 0 16px}
.customer-filter-grid{display:grid;grid-template-columns:minmax(0,1fr);column-gap:16px;row-gap:8px}
.customer-filter-cell{min-width:0}
.customer-details input,.customer-details button{font:inherit}
.customer-details .customer-input,.customer-select-trigger{height:34px;width:100%;min-width:0;border:1px solid #d9d9d9;border-radius:3px;background:white;padding:4px 11px;font-size:14px;color:#333;box-shadow:none;outline:none}
.customer-details input::placeholder,.customer-selected.is-placeholder{color:#bfbfbf}
.customer-details .customer-input:hover,.customer-select-trigger:hover{border-color:#ffba72;background:#fff}
.customer-details .customer-input:focus,.customer-select-trigger[aria-expanded=true]{border-color:#ff932a;box-shadow:0 0 0 2px #ff932a15}
.customer-select{position:relative;min-width:0}
.customer-select-trigger{display:flex;gap:6px;align-items:center;justify-content:space-between;text-align:left;font-weight:400}
.customer-selected{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.customer-chevron{width:14px;height:14px;flex-shrink:0;fill:none;stroke:#bfbfbf;stroke-width:1.4}
.customer-select-popup{position:absolute;z-index:35;top:calc(100% + 4px);left:0;width:100%;min-width:140px;padding:4px 0;background:#fff;border-radius:3px;box-shadow:0 3px 10px #0002}
.customer-options{max-height:264px;overflow:auto}
.customer-option{width:100%;display:flex;align-items:center;gap:8px;padding:7px 12px!important;min-height:32px;border:0;border-radius:0;text-align:left;background:#fff;color:#333;white-space:normal}
.customer-option:hover,.customer-option:focus-visible{background:#f5f5f5!important;outline:0}
.customer-option.is-selected{background:#fff3e6;color:#333}
.customer-option.is-selected:hover{background:#ffecd4!important}
.customer-option-tick{margin-left:auto;color:#ff932a}
.customer-option-check{border:1px solid #d9d9d9;width:16px;height:16px;line-height:14px;font-size:12px;flex-shrink:0;border-radius:2px;text-align:center}
.is-selected .customer-option-check{background:#ff932a;border-color:#ff932a;color:white}
.customer-options-empty{text-align:center;color:#bfbfbf;padding:18px 10px}
.customer-details .customer-option-search{border:1px solid #d9d9d9;border-radius:3px;width:calc(100% - 16px);margin:4px 8px 8px;height:30px;padding:4px 8px;outline:none}
.customer-select-footer{display:flex;justify-content:flex-end;border-top:1px solid #f0f0f0;padding:4px 10px;gap:16px}
.customer-select-footer button,.customer-details .customer-text-button{border:0;background:none;color:#ed922c;box-shadow:none;padding:4px 6px}
.customer-compound{display:flex;min-width:0}
.customer-compound>.customer-select{width:98px;flex-shrink:0}
.customer-compound .customer-select-trigger{border-radius:3px 0 0 3px;padding-left:10px;padding-right:8px}
.customer-compound .customer-input{flex:1;border-left:0;border-radius:0 3px 3px 0}
.customer-date-cell{grid-column:1/-1}
.customer-date-group{display:flex;position:relative;min-width:0}
.customer-date-group>.customer-select{width:23%;min-width:110px}
.customer-date-group>.customer-select .customer-select-trigger{border-radius:3px 0 0 3px}
.customer-range{display:flex;align-items:center;flex:1;min-width:0;height:34px;padding:0 10px;border:1px solid #d9d9d9;border-left:0;border-radius:0 3px 3px 0;background:white}
.customer-range:focus-within{outline:1px solid #ffba72}
.customer-details .customer-range input{background:none;flex:1;width:0;min-width:0;height:30px;border:0;padding:0;outline:none;font-size:14px;color:#333;box-shadow:none}
.customer-date-arrow{color:#bfbfbf;margin:0 10px;font-size:18px}
.customer-details .customer-calendar-open,.customer-details .customer-date-clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:16px;height:20px;padding:0;border:0;background:none;color:#bfbfbf;outline:none}
.customer-calendar-open svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.2}
.customer-details .customer-date-clear{display:none;font-size:17px}
.customer-range:hover .customer-date-clear{display:flex}
.customer-range:hover .customer-calendar-open{display:none}
.customer-tools{display:flex;align-items:center;gap:16px;margin-top:8px;flex-wrap:wrap}
.customer-tools button{height:34px;padding:4px 15px;border-radius:3px;color:#333}
.customer-details button.primary{background:#ff932a;border-color:#ff932a;color:white;box-shadow:none}
.customer-details button.primary:hover{background:#ffad59;border-color:#ffad59}
.customer-tools .customer-text-button{padding:4px 0}
.customer-batch{display:flex;align-items:center;gap:4px;background:#f5f5f5;color:#bfbfbf!important;border-color:#d9d9d9;opacity:1}
.customer-error{color:#ff4d4f;font-size:13px;margin:8px 0 0}
.customer-notice{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding:7px 10px;min-height:34px;border:1px solid #ffccc7;border-radius:3px;background:#fff2f0;color:#ff4d4f;font-size:14px;line-height:20px}
.customer-notice>span{width:14px;height:14px;line-height:14px;text-align:center;flex-shrink:0;border-radius:50%;background:#ff4d4f;color:white;font-size:10px;font-weight:bold}
.customer-table-frame{position:relative;border:1px solid #ededed;border-radius:3px;overflow:hidden}
.customer-table-scroll{overflow:auto;width:100%;scrollbar-color:#bfbfbf #f5f5f5;scrollbar-width:thin}
.customer-details .customer-table{min-width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:14px;line-height:22px}
.customer-table th{height:40px;text-align:left;padding:8px;font-size:14px;font-weight:500;background:#fafafa;color:#333;border:0;border-right:1px solid #ededed;border-bottom:1px solid #ededed;white-space:nowrap}
.customer-table td{height:168px;border:0;padding:0;background:white}
.customer-table .customer-selection{position:sticky;left:0;z-index:2;text-align:center}
.customer-selection input{margin:0;width:16px;height:16px;accent-color:#ff932a}
.customer-table .customer-name-column{position:sticky;left:50px;z-index:2}
.customer-table .customer-operation-column{position:sticky;right:0;z-index:3;box-shadow:-5px 0 6px -5px #0002}
.customer-details .customer-column-button{padding:0;border:0;background:none;width:20px;height:20px;vertical-align:middle;margin-left:4px;color:#555}
.customer-column-button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.2}
.customer-empty{position:absolute;top:40px;height:168px;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#bfbfbf;pointer-events:none}
.customer-calendar{position:absolute;right:0;top:calc(100% + 5px);width:640px;max-width:calc(100vw - 48px);z-index:38;background:white;box-shadow:0 3px 12px #0002;border-radius:3px;display:flex}
.customer-date-presets{width:98px;flex-shrink:0;border-right:1px solid #f0f0f0;padding:7px 0}
.customer-date-presets button{display:block;width:100%;border:0;text-align:left;padding:7px 14px;border-radius:0;font-size:14px;color:#555}
.customer-calendars{position:relative;display:flex;flex:1;min-width:0}
.customer-month{width:50%;padding:0 10px 9px}
.customer-month+.customer-month{border-left:1px solid #f0f0f0}
.customer-month-heading{height:42px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:center;font-weight:500}
.customer-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px 0;margin-top:4px;text-align:center}
.customer-weekday{line-height:30px;color:#666}
.customer-month-grid button{border:0;padding:0;border-radius:2px;height:30px;background:white;color:#333;font-size:13px}
.customer-month-grid button.customer-other-month{color:#bfbfbf}
.customer-month-grid button.is-today{box-shadow:inset 0 0 0 1px #ff932a}
.customer-month-grid button.in-range{background:#fff3e6;border-radius:0}
.customer-month-grid button.is-selected{background:#ff932a!important;color:white}
.customer-calendars>button{position:absolute;top:5px;width:25px;height:30px;padding:0;border:0;color:#aaa;font-size:21px;background:none}
.customer-month-prev{left:7px}.customer-month-next{right:7px}
.customer-details .customer-column-dialog{position:fixed;margin:0;padding:0;width:240px;max-width:calc(100vw - 16px);height:400px;max-height:calc(100vh - 16px);border:0;border-radius:3px;color:#333;background:#fff;box-shadow:0 4px 18px #0002;font-size:14px;overflow:hidden}
.customer-column-dialog[open]{display:flex;flex-direction:column}
.customer-column-dialog::backdrop{background:#0004}
.customer-column-head{display:flex;justify-content:space-between;align-items:center;padding:7px 16px;border-bottom:1px solid #eee;flex-shrink:0}
.customer-column-head strong{font-weight:500}
.customer-column-options{overflow:auto;padding:6px 16px;flex:1}
.customer-column-option{display:flex;align-items:center;gap:8px;min-height:29px;cursor:pointer;font-size:14px}
.customer-column-option input{width:16px;height:16px;margin:0;accent-color:#ff932a}
.customer-column-option:has(input:disabled){color:#aaa}
.customer-drag-handle{margin-left:auto;color:#aaa;cursor:grab}
.customer-column-footer{border-top:1px solid #eee;padding:10px 12px;display:flex;gap:8px;justify-content:flex-end;flex-shrink:0}
.customer-column-footer button{padding:3px 12px;height:30px;border-radius:3px}
@media(min-width:576px){.customer-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-date-cell{grid-column:span 2}}
@media(min-width:768px){.customer-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1200px){.customer-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:1600px){.customer-filter-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:767px){#business-page:has(.customer-details){padding:10px 12px}.customer-calendar{max-width:calc(100vw - 36px);width:360px}.customer-month{width:100%}.customer-month+.customer-month{display:none}.customer-date-group>.customer-select{min-width:92px}.customer-range{padding:0 6px}.customer-date-arrow{margin:0 5px}.customer-notice{font-size:12px}.customer-tools{gap:8px}}

.customer-batch>svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.2}
.customer-calendar.customer-calendar-above{top:auto;bottom:calc(100% + 5px)}
.customer-column-dialog::backdrop{backdrop-filter:none}

/* Populated rows retain the live list's compact, multi-line presentation. */
.customer-details .customer-table .customer-data-row td{height:65px;padding:8px;vertical-align:top;line-height:22px;border-right:1px solid #ededed;border-bottom:1px solid #ededed;background:#fff;color:#333;overflow:hidden}
.customer-table .customer-data-row:last-child td{border-bottom:0}
.customer-table .customer-data-row:hover td{background:#fafafa}
.customer-table .customer-data-row.is-selected td{background:#fff7ed}
.customer-data-row .customer-selection{vertical-align:top;padding-top:14px!important}
.customer-table .customer-empty-row td{height:168px;padding:0}
.customer-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.customer-name-line,.customer-id-line,.customer-copy-line{display:flex;align-items:center;gap:4px;min-width:0}
.customer-avatar{width:15px;height:15px;flex-shrink:0}
.customer-row-id{display:block;font-size:12px;color:#999;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;margin-top:5px}
.customer-id-line .customer-row-id{flex:1}
.customer-origin-badge{display:inline-block;color:#e89835;background:#fff3e3;font-size:12px;line-height:19px;padding:0 3px;flex-shrink:0;margin-top:5px}
.customer-tag-text{color:#ed922c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-abnormal{font-size:12px;line-height:18px;color:#ff4d4f;margin-top:3px}
.customer-blacklist-badge{display:inline-block;color:#ff4d4f;background:#fff2f0;border:1px solid #ffccc7;font-size:12px;line-height:18px;padding:0 3px;flex-shrink:0}
.customer-status{display:flex;align-items:center;gap:5px;line-height:22px}
.customer-status i{width:6px;height:6px;flex-shrink:0;border-radius:50%;background:currentColor}
.customer-tone-success{color:#52c41a}.customer-tone-danger{color:#ff4d4f}.customer-tone-muted{color:#b6afaf}.customer-tone-brown{color:#ad5900}.customer-tone-orange{color:#ed922c}
.customer-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:0 8px;line-height:24px}
.customer-details .customer-row-actions button,.customer-details .customer-inline-action{border:0;background:none;box-shadow:none;padding:0;color:#ed922c;font-size:14px;line-height:24px;height:auto;white-space:nowrap;border-radius:0;cursor:pointer}
.customer-details .customer-row-actions button:disabled{color:#bfbfbf;cursor:not-allowed;background:none}
.customer-details .customer-row-actions button:not(:disabled):hover{color:#ffad59}
.customer-details .customer-inline-action{line-height:20px;flex-shrink:0;font-size:14px}
.customer-copy-line .customer-ellipsis,.customer-copy-line .customer-row-id{max-width:calc(100% - 20px)}
.customer-pagination{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;padding:16px 0 10px;color:#555;font-size:14px}
.customer-pagination button{min-width:32px;height:32px;padding:0 9px;background:white;border:1px solid #d9d9d9;border-radius:3px;color:#555}
.customer-pagination button[aria-current=page]{border-color:#ff932a;color:#ff932a}
.customer-pagination button:disabled{color:#bfbfbf;background:#fafafa;cursor:not-allowed}
.customer-pagination select,.customer-pagination input{height:32px;border:1px solid #d9d9d9;border-radius:3px;background:#fff;color:#555;padding:0 7px;font:inherit}
.customer-pagination label{display:flex;align-items:center;gap:8px;margin:0}
.customer-pagination input{width:48px;appearance:textfield;text-align:center}
.customer-pagination input::-webkit-inner-spin-button{appearance:none}
.customer-tools .customer-batch:not(:disabled){background:#fff;color:#555!important}
.customer-table-scroll:has(.customer-data-row){max-height:calc(100vh - 200px);min-height:260px}
.customer-table-scroll:has(.customer-data-row) thead th{position:sticky;top:0;z-index:4}
.customer-table-scroll:has(.customer-data-row) thead .customer-selection,.customer-table-scroll:has(.customer-data-row) thead .customer-name-column{z-index:5}
.customer-table-scroll:has(.customer-data-row) thead .customer-operation-column{z-index:6}

.customer-tools button.primary:disabled{background:#f5f5f5;border-color:#d9d9d9;color:#bfbfbf;cursor:not-allowed}
