/* 独立客户档案布局：无批量阴影、无常驻入场动画。 */
#modal-customer-profile:not(.open){display:none!important}
#modal-customer-profile.open{display:flex;opacity:1;pointer-events:auto}
.cprof-overlay{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.cprof-dialog{width:1120px;max-width:96vw;height:min(850px,92vh);max-height:92vh;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);background:var(--surface,#fff);border-radius:14px}
.cprof-header{position:static;top:auto;z-index:auto;flex-wrap:nowrap;box-shadow:none!important;backdrop-filter:none!important;transform:none!important;will-change:auto!important;display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:20px 26px 16px;border-bottom:1px solid var(--border);flex-shrink:0}
.cprof-eyebrow{font-size:11px;color:var(--muted);letter-spacing:.12em;margin-bottom:6px}
.cprof-header h2{font-size:21px;line-height:1.4;margin:0;color:var(--text,#1e293b);overflow-wrap:anywhere}
.cprof-header p{font-size:12px;margin:7px 0 0;color:var(--muted)}
.cprof-close{flex-shrink:0;font-size:18px}
.cprof-tabs{display:flex;gap:4px;padding:10px 22px 0;border-bottom:1px solid var(--border);overflow-x:auto;flex-shrink:0}
.cprof-tabs button{border:0;border-bottom:3px solid transparent;background:transparent;padding:11px 12px;color:var(--muted);font:inherit;font-size:13px;white-space:nowrap;cursor:pointer}
.cprof-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent);font-weight:700}
.cprof-mobile-tabs{display:none}
.cprof-body{overflow:auto;flex:1;min-height:0;padding:22px 26px;overscroll-behavior:contain}
.cprof-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 26px;border-top:1px solid var(--border);flex-shrink:0;font-size:12px;color:var(--muted)}
.cprof-section+.cprof-section{margin-top:24px}
.cprof-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.cprof-section-title h3,.cprof-section h3{font-size:15px;margin:0}
.cprof-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.cprof-field{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--text,#334155);min-width:0}
.cprof-field.cprof-wide{grid-column:1/-1}
.cprof-field input,.cprof-field select,.cprof-field textarea{width:100%;box-sizing:border-box;min-height:36px;border:1px solid var(--border);border-radius:6px;padding:8px 10px;background:#fff;color:var(--text,#1e293b);font:inherit;font-size:13px}
.cprof-field textarea{resize:vertical;min-height:72px}
.cprof-field input:focus,.cprof-field select:focus,.cprof-field textarea:focus{outline:2px solid var(--accent);outline-offset:1px}
.cprof-field input:disabled,.cprof-field input:read-only,.cprof-field select:disabled,.cprof-field textarea:disabled{background:#f5f7fa;color:#64748b}
.cprof-field small{font-size:11px;color:var(--muted);line-height:1.5}
.cprof-check{flex-direction:row;align-items:center;min-height:36px}
.cprof-check input{width:17px;height:17px;min-height:0;padding:0}
.cprof-help{font-size:12px;line-height:1.7;color:var(--muted);margin:10px 0 16px}
.cprof-notice{background:#f3f7ff;border:1px solid #dbe7fa;border-radius:8px;padding:11px 14px;font-size:12px;line-height:1.7;margin-bottom:18px;color:#36567b}
.cprof-error{color:var(--red,#b91c1c);background:#fff4f3;border:1px solid #fecaca;padding:14px;border-radius:8px}
.cprof-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:18px}
.cprof-actions .btn{white-space:nowrap}
.cprof-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cprof-card{border:1px solid var(--border);border-radius:9px;padding:15px;min-width:0;overflow-wrap:anywhere}
.cprof-card h4{font-size:14px;margin:0 0 8px;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.cprof-card p{font-size:12px;line-height:1.7;margin:3px 0;color:var(--muted);white-space:pre-wrap}
.cprof-card.cprof-inactive{background:#f6f7f9}
.cprof-tag{font-size:10px;border:1px solid #d7e5f9;border-radius:4px;background:#f2f7ff;color:#325f99;padding:2px 6px;font-weight:400}
.cprof-editor{border:1px solid var(--border);background:#fafcff;border-radius:9px;padding:18px;margin-bottom:18px}
.cprof-empty{color:var(--muted);font-size:13px;border:1px dashed var(--border);padding:26px;text-align:center;border-radius:9px}
.cprof-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
.cprof-stat{border:1px solid var(--border);border-radius:8px;padding:14px}
.cprof-stat span{display:block;font-size:12px;color:var(--muted);margin-bottom:9px}
.cprof-stat strong{font-size:20px;overflow-wrap:anywhere}
.cprof-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:8px}
.cprof-table{width:100%;border-collapse:collapse;font-size:12px}
.cprof-table th,.cprof-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border);white-space:nowrap}
.cprof-table th{background:#f7f9fc;color:var(--muted);font-weight:500}
.cprof-table tbody tr:last-child td{border-bottom:0}
.cprof-filter{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;align-items:center}
.cprof-filter select,.cprof-filter input{padding:8px;border:1px solid var(--border);border-radius:6px;font:inherit;font-size:12px}
.cprof-filter input{flex:1;min-width:160px}
@media(max-width:768px){
  #modal-customer-profile.open{align-items:stretch!important;padding:0}
  .cprof-dialog{width:100%;max-width:100vw!important;height:100dvh;max-height:100dvh!important;border-radius:0;box-shadow:none!important;animation:none!important;transform:none!important}
  .cprof-header{padding:14px 16px}.cprof-header h2{font-size:17px}.cprof-header p{font-size:11px}
  .cprof-tabs{display:none}.cprof-mobile-tabs{display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--border);font-size:12px;flex-shrink:0}.cprof-mobile-tabs select{flex:1;width:auto}
  .cprof-body{padding:16px}.cprof-footer{padding:10px 16px max(10px,env(safe-area-inset-bottom))}
  .cprof-grid,.cprof-cards{grid-template-columns:1fr}.cprof-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cprof-stat strong{font-size:17px}
  .cprof-field input,.cprof-field select,.cprof-field textarea{font-size:16px;min-height:42px}.cprof-check input{min-height:0}
  .cprof-editor{padding:14px}.cprof-section-title{align-items:flex-start}.cprof-actions .btn{min-height:36px}
}
