.business-management-page{min-width:0}
.customer-initial[data-tone="0"]{--initial-bg:#dcebf9;--initial-ink:#23547a}
.customer-initial[data-tone="1"]{--initial-bg:#e7e1fa;--initial-ink:#59438c}
.customer-initial[data-tone="2"]{--initial-bg:#d9eee4;--initial-ink:#235c43}
.customer-initial[data-tone="3"]{--initial-bg:#fae2e7;--initial-ink:#883951}
.customer-initial[data-tone="4"]{--initial-bg:#f7e7c9;--initial-ink:#785323}
.customer-initial[data-tone="5"]{--initial-bg:#d8edf0;--initial-ink:#265e68}
.customer-initial[data-tone="6"]{--initial-bg:#e8ecd2;--initial-ink:#56622b}
.customer-initial[data-tone="7"]{--initial-bg:#f1def1;--initial-ink:#78457c}
.customer-initial[data-tone="neutral"]{--initial-bg:#e9ecf2;--initial-ink:#536077}
.customer-initial[data-tone],.console-frame .customer-initial[data-tone]{background:var(--initial-bg);color:var(--initial-ink)}
.customer-load-mark{display:inline-flex;align-items:center;justify-content:center;gap:3px;flex:none;width:32px;height:32px;border-radius:10px;background:#eeeafa;color:#624aa8}
.customer-load-mark i{width:3px;height:9px;border-radius:3px;background:currentColor;animation:customer-load-wave 1.1s ease-in-out infinite}
.customer-load-mark i:nth-child(2){height:15px;animation-delay:.12s}
.customer-load-mark i:last-child{animation-delay:.24s}
@keyframes customer-load-wave{0%,80%,100%{transform:scaleY(.6)}40%{transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){.customer-load-mark i{animation:none}}
.customer-record-loading.skeleton{color:#526078;gap:10px;font-size:13px}
.customer-directory .customer-directory-message td[colspan]>.customer-record-loading{min-height:62px;padding:12px 16px;margin:0;background:#fafbff}
.customer-directory .customer-directory-placeholder td{padding-block:13px}
.customer-directory-placeholder td>span{display:block;width:clamp(28px,70%,92px);height:8px;border-radius:4px;background:#eceff5}
.customer-directory-placeholder:nth-child(odd) td>span{width:50%}
.customer-directory-placeholder td:nth-child(2)>span{width:80%;max-width:120px}
.customer-directory {
  container: customer-directory / inline-size;
  min-width: 0;
}
.customer-management-table > .customer-directory {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.customer-directory .table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.customer-directory .table-wrap:focus-visible { outline: 2px solid #6347bb; outline-offset: -2px; }
.customer-directory .customer-record-table tbody td[colspan] > .skeleton { margin: 0; }
.customer-directory .table-footer[hidden], .customer-scope-summary[hidden] { display: none; }
.customer-directory .customer-directory-count { font-variant-numeric: tabular-nums; }
.customer-directory .user-cell { min-width: 12.5rem; }
.customer-directory .user-cell > div { min-width: max(136px, 9rem); max-width: 17rem; overflow-wrap: anywhere; }
.customer-directory .agent-identity { min-width: max(100px, 7.5rem); }
.customer-directory td:is([data-label="用户编号"],[data-label="用户 ID"],[data-label="分组"],[data-label="当前额度（元）"]) { white-space: nowrap; }
.customer-directory td:is([data-label="注册时间"],[data-label="最后登录"]) { min-width: 8.5rem; }
@media(max-width:760px){
  .console-frame .customer-management-table .customer-list-toolbar:has(select:not([hidden])) > .field:not([hidden]):first-child { grid-column: 1 / -1; }
}
.customer-log-links{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.customer-log-links>.btn{flex:1;min-height:44px;justify-content:center}
.business-management-page .business-load-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.customer-scope-summary{display:flex;align-items:flex-start;gap:9px;margin:0 0 16px;color:#5a6880;font-size:12px;line-height:1.7}
.customer-scope-summary>svg{width:17px;height:17px;margin-top:2px;flex:none;color:#7764b8}
.business-page-rules{margin:0 0 16px;border:1px solid #e2e6f2;border-radius:14px;background:#fafbff;color:#506079}
.business-page-rules>summary{list-style:none;cursor:pointer;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:9px 15px;min-height:44px;font-size:12px}
.business-page-rules>summary::-webkit-details-marker{display:none}
.business-page-rules>summary:focus-visible{outline:3px solid #9987f766;outline-offset:2px;border-radius:14px}
.business-rules-title{display:inline-flex;align-items:center;gap:7px;font-weight:600}
.business-rules-title svg,.business-page-rules>summary>svg{width:15px;height:15px;color:#806ab5}
.business-page-rules>summary>svg{margin-left:auto;flex:none;transform:rotate(90deg)}
.business-page-rules[open]>summary>svg{transform:rotate(-90deg)}
.card-rules-impact{color:#8a601d;background:#fff4d9;border-radius:20px;font-size:11px;line-height:1.5;padding:3px 8px}
.business-rules-content{border-top:1px solid #e7eaf2;padding:12px 15px;font-size:12px;line-height:1.7}
.business-rules-content p+p{margin-top:6px}
.business-rules-content .card-rules-warning{color:#75581d}
.console-frame .customer-info-action,.console-frame .card-management-page .card-batch-download{border-color:#dcd5f6;background:#f6f3ff;color:#614bad}
.console-frame .customer-info-action:hover,.console-frame .card-management-page .card-batch-download:hover{background:#eee8ff;border-color:#c8b9ef}
.console-frame .customer-row-actions .customer-group-action{color:#64738a}
.console-frame .customer-management-page .customer-row-actions{flex-wrap:wrap;max-width:390px;gap:6px}
.console-frame .customer-row-actions .customer-password-action{color:#614bad}
.card-name-heading{display:flex;align-items:center;gap:3px 10px;flex-wrap:wrap;max-width:100%}
.card-name-heading .issue-card-name{min-width:0;overflow-wrap:anywhere}
.card-name-heading .card-row-actions{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.console-frame .card-management-page .card-row-actions .card-visibility-action{min-height:32px;padding:4px 7px;gap:4px;color:#516078;border:1px solid transparent;background:transparent;box-shadow:none}
.console-frame .card-management-page .card-visibility-action:hover{color:#394662;background:#f0f2f7}
.console-frame .card-management-page .card-row-actions .card-destructive-action:is(:hover,:focus-visible){color:#92293e;background:#fff2f3}
.console-frame .card-management-page .card-visibility-action:focus-visible{outline:2px solid #6950c8;outline-offset:2px}
@media(max-width:760px){
  .business-management-page .page-heading{flex-wrap:wrap}
  .console-frame .business-management-page .heading-actions{width:100%;justify-content:flex-end}
  .console-frame .business-management-page .heading-actions>.btn.primary{flex:1}
  .console-frame .customer-management-table .customer-list-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:14px}
  .console-frame .customer-management-table .customer-list-toolbar .field{max-width:none}
  .console-frame .customer-management-table .customer-list-toolbar .btn{min-height:46px}
  .console-frame .customer-management-page .customer-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px}
  .console-frame .customer-management-page .customer-row-actions .btn,.console-frame .card-management-page .card-row-actions .btn{min-width:44px;min-height:44px;padding:9px 12px;font-size:13px}
  .console-frame .card-management-page .card-row-actions .card-visibility-action{min-height:44px;min-width:44px;padding:8px}
  .console-frame .card-management-table .responsive-record-table>tbody>tr>td[data-label="卡密名称"]{display:block}
  .console-frame .card-management-table .responsive-record-table>tbody>tr>td[data-label="卡密名称"]::before{display:none}
  .card-name-heading{width:100%;justify-content:space-between}
}
.customer-note-cell{max-width:210px;display:grid;gap:5px}
.customer-note-cell>span{white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;color:#67718b}
.customer-note-cell>.btn{justify-self:start}
.customer-number{font-size:13px;font-weight:600;color:#44516e;user-select:all}
.customer-management-table td[data-label="最后登录"]{min-width:128px}
.customer-profile-dialog{width:min(810px,calc(100vw - 32px))}
.customer-upgrade-dialog{width:min(510px,calc(100vw - 32px))}
.customer-profile-dialog[open],.customer-upgrade-dialog[open]{max-height:calc(100dvh - 32px);display:flex;flex-direction:column}
.customer-profile-dialog .dialog-head,.customer-upgrade-dialog .dialog-head{flex:none}
.customer-profile-dialog .dialog-head h2{flex:1}
.customer-profile-dialog .dialog-head{gap:10px}
.customer-profile-dialog .dialog-body,.customer-upgrade-dialog .dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.customer-profile-content{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(202px,1fr);gap:16px;min-width:0}
.customer-profile-content>:is(.customer-profile-overview,.customer-profile-note,.customer-profile-security,.customer-record-loading,.page-error){grid-column:1/-1}
.customer-profile-account:last-child{grid-column:1/-1}
.customer-profile-overview{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);align-items:center;gap:20px;border:1px solid #e0e1ee;border-radius:15px;background:linear-gradient(115deg,#f8f8fe,#f3f1fb);padding:20px}
.customer-profile-identity{display:grid;gap:8px;min-width:0}
.customer-profile-identity .user-cell{min-width:0;gap:12px}
.customer-profile-identity .user-cell>div{min-width:0;overflow-wrap:anywhere}
.customer-profile-identity .user-cell strong{font-size:1rem;line-height:1.4;color:#28344a}
.customer-profile-identity .avatar{width:42px;height:42px;border-radius:50%;font-size:16px}
.customer-profile-tags{display:flex;flex-wrap:wrap;gap:6px;margin-left:54px}
.customer-profile-quota{display:grid;gap:5px;min-width:0;border-left:1px solid #dad9e9;padding-left:18px}
.customer-profile-quota>span{font-size:12px;color:#59647a}
.customer-profile-quota>strong{font-size:clamp(24px,3vw,30px);line-height:1.2;color:#343354;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.customer-profile-quota>small{font-size:12px;line-height:1.5;color:#647088}
.customer-profile-content h3,.customer-upgrade-eligibility h3{margin:0;font-size:14px;font-weight:650;color:#35415a}
.customer-profile-account,.customer-profile-service,.customer-profile-note{min-width:0;padding:16px;border:1px solid #e0e5ef;border-radius:13px;background:#fff}
.customer-profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 18px;margin:15px 0 0}
.customer-profile-fields>div{display:grid;align-content:start;gap:4px;min-width:0}
.customer-profile-fields dt{font-size:12px;color:#646e83}
.customer-profile-fields dd{margin:0;font-size:13px;color:#2e3a51;overflow-wrap:anywhere;line-height:1.55;font-variant-numeric:tabular-nums}
.customer-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.customer-profile-note p{margin:5px 0 0;font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:140px;overflow-y:auto}
.customer-profile-service{display:flex;flex-direction:column;gap:12px}
.customer-profile-service :is(.customer-service-actions,.customer-log-links){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,6rem),1fr));align-items:stretch;gap:7px;margin:0}
.customer-profile-service .customer-service-actions+.customer-log-links{border-top:1px solid #e5e8f0;padding-top:12px}
.customer-profile-service :is(.customer-service-actions,.customer-log-links)>.btn{min-width:0;min-height:36px;justify-content:center;white-space:normal}
.customer-profile-security{display:flex;align-items:center;gap:12px;border-top:1px solid #e3e6ef;padding:12px 1px 0}
.customer-profile-security>svg{flex:none;color:#74639c;width:20px;height:20px}
.customer-profile-security>div{flex:1;min-width:0}
.customer-profile-security p{margin:4px 0 0;font-size:12px;line-height:1.6;color:#647088}
.customer-profile-security>.btn{flex:none}
.customer-profile-dialog .dialog-actions,.customer-upgrade-dialog .dialog-actions{padding-top:14px;margin-top:16px;border-top:1px solid #e7e9f1}
.customer-upgrade-target{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px;border:1px solid #e6e2f4;background:#f8f7fe;border-radius:15px}
.customer-upgrade-target .user-cell{min-width:0;overflow-wrap:anywhere}
.customer-upgrade-quota{display:grid;gap:7px;padding:20px 2px}
.customer-upgrade-quota>span{font-size:12px;color:#7c859c}
.customer-upgrade-quota>strong{font-size:30px;line-height:1.3;color:#504078}
.customer-upgrade-quota>small{font-size:11px;color:#7c859c}
.customer-upgrade-eligibility{display:grid;gap:10px;margin-bottom:12px}
.customer-upgrade-eligibility .notice{margin:0}
.customer-upgrade-footnote{font-size:12px;color:#7c859c;line-height:1.7}
@media(max-width:600px){
  .customer-profile-dialog,.customer-upgrade-dialog{width:calc(100vw - 20px)}
  .customer-profile-dialog[open],.customer-upgrade-dialog[open]{max-height:calc(100dvh - 20px)}
  .customer-profile-content{grid-template-columns:minmax(0,1fr);gap:12px}
  .customer-profile-overview{grid-template-columns:minmax(0,1fr);padding:15px;gap:12px}
  .customer-profile-quota{grid-template-columns:minmax(0,1fr) auto;align-items:baseline;padding:10px 0 0;border-left:0;border-top:1px solid #deddeb}
  .customer-profile-quota>small{grid-column:1/-1}
  .customer-profile-account,.customer-profile-service,.customer-profile-note{padding:13px}
  .customer-profile-fields{gap:12px}
  .customer-profile-security{flex-wrap:wrap}
  .customer-profile-security>div{flex-basis:calc(100% - 36px)}
  .customer-profile-security>.btn{width:100%}
  .customer-profile-dialog .btn,.customer-upgrade-dialog .btn,.customer-profile-dialog .customer-log-links>a,.customer-profile-service :is(.customer-service-actions,.customer-log-links)>.btn,.customer-management-table .customer-info-action{min-height:44px}
  .customer-profile-dialog .dialog-actions>.btn,.customer-upgrade-dialog .dialog-actions>.btn{flex:1}
  .console-frame .customer-management-page .customer-row-actions{flex-wrap:wrap}
}
.customer-service-dialog{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 28px);display:flex;flex-direction:column}
.customer-service-dialog .dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.customer-service-target{display:grid;gap:6px;padding:14px;border-radius:14px;background:#f6f4ff;overflow-wrap:anywhere}
.customer-service-target>span{font-size:12px;color:#737e99}
.customer-service-confirm{display:flex;align-items:flex-start;gap:10px;line-height:1.7;font-size:13px}
.customer-service-confirm input{flex:none;margin-top:5px;width:18px;height:18px}
.customer-password-request-panel{display:grid;gap:12px;padding:14px;border:1px solid #e5dff4;background:#faf9fe;border-radius:14px}
.customer-password-request-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.customer-password-request-panel [hidden]{display:none!important}
.customer-password-request-status{line-height:1.7;overflow-wrap:anywhere}
.customer-service-dialog .customer-password-request-panel textarea{min-height:72px;max-height:24dvh}
.customer-password-request-actions .btn{min-height:44px}
.customer-password-result{display:flex;align-items:center;gap:8px;margin:16px 0;flex-wrap:wrap}
.customer-password-result>.input{flex:1;min-width:130px}
.customer-service-dialog textarea{min-height:150px;resize:vertical;max-height:45dvh}
.card-issue-receipt{width:min(30rem,calc(100% - 2rem))}
.card-issue-receipt .dialog-body{display:grid;gap:1.15rem}
.issue-receipt-batch{display:flex;align-items:center;gap:.65rem;color:#194d41;overflow-wrap:anywhere}
.issue-receipt-batch svg{flex:none;width:1.35rem;height:1.35rem;color:#22725a}
.issue-receipt-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;border:1px solid var(--line,#dce3ef);border-radius:12px;background:var(--surface,#f8f9fc);margin:0;padding:.85rem}
.issue-receipt-stats dt{font-size:.8rem;color:var(--muted,#536179)}
.issue-receipt-stats dd{font-weight:650;margin:.28rem 0 0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.card-issue-receipt .dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;margin:0}
.card-issue-receipt .dialog-actions .btn{min-height:40px}
@media(max-width:600px){.customer-service-dialog .dialog-actions{display:flex;flex-wrap:wrap;position:sticky;bottom:0;background:#fff;padding-top:12px}.customer-service-dialog .dialog-actions>.btn{flex:1;min-height:44px}.customer-note-cell{max-width:100%}}
