/* Isolated customer-group module. Theme follows CRM's existing #themecss. */
.cg-root{--cg-bg:#f5f8fa;--cg-surface:#fff;--cg-ink:#172b3b;--cg-muted:#617589;--cg-border:#dce6ed;--cg-accent:#087f79;--cg-soft:#e4f5f1;--cg-spouse:#9b5a9d;--cg-spouse-bg:#f8edf8;color:var(--cg-ink);font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:left;box-sizing:border-box}
.cg-root.cg-dark{--cg-bg:#101d2a;--cg-surface:#1a2b3b;--cg-ink:#e9f1f8;--cg-muted:#a4b7c8;--cg-border:#344a5e;--cg-accent:#77dbca;--cg-soft:#183e40;--cg-spouse:#e5a9e5;--cg-spouse-bg:#3b2b46}
.cg-root *{box-sizing:border-box}.cg-overlay{position:fixed;inset:0;z-index:1060;background:rgba(7,17,29,.66);backdrop-filter:blur(5px);padding:24px;overflow:auto}.cg-dialog{max-width:1400px;margin:0 auto;background:var(--cg-bg);border:1px solid var(--cg-border);border-radius:24px;box-shadow:0 25px 90px #0005;overflow:hidden;outline:none}.cg-header{display:flex;justify-content:space-between;align-items:center;padding:25px 30px;background:var(--cg-surface);border-bottom:1px solid var(--cg-border)}.cg-eyebrow{font-size:10px;font-weight:750;letter-spacing:1.8px;color:var(--cg-muted)}.cg-root h2{font-size:27px;line-height:1.3;font-weight:650;margin:4px 0 0;color:var(--cg-ink)}.cg-root h3{font-size:21px;line-height:1.4;margin:3px 0;color:var(--cg-ink);overflow-wrap:anywhere}.cg-content{padding:24px 30px 30px}.cg-copy{color:var(--cg-muted);margin:0 0 20px;max-width:850px}.cg-root .cg-button{font:inherit;font-size:13px;font-weight:600;background:var(--cg-surface);color:var(--cg-ink);border:1px solid var(--cg-border);border-radius:10px;padding:10px 14px;cursor:pointer;white-space:normal;margin:4px 6px 4px 0;box-shadow:none;text-transform:none;line-height:1.4}.cg-root .cg-button:hover{border-color:var(--cg-accent);background:var(--cg-soft)}.cg-root .cg-primary{background:var(--cg-accent);color:var(--cg-bg);border-color:transparent}.cg-root .cg-primary:hover{background:var(--cg-soft);color:var(--cg-accent)}.cg-root .cg-danger{color:#bd4858}.cg-root.cg-dark .cg-danger{color:#ffa6b1}.cg-root .cg-close{font-size:26px;width:44px;height:44px;padding:0;flex-shrink:0;margin-left:15px}.cg-root .cg-button:disabled{opacity:.5;cursor:wait}.cg-root button:focus-visible,.cg-node:focus-visible{outline:3px solid var(--cg-accent);outline-offset:3px}.cg-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(510px,1fr));gap:22px}.cg-group{border:1px solid var(--cg-border);border-radius:18px;background:var(--cg-surface);overflow:hidden;margin-bottom:20px}.cg-group-heading{padding:22px 24px 0}.cg-map{position:relative;margin:0 10px;background:radial-gradient(ellipse at center,var(--cg-soft),transparent 68%)}.cg-lines{position:absolute;top:0;left:0;pointer-events:none}.cg-lines line,.cg-lines path{stroke:var(--cg-accent);stroke-width:2;opacity:.45;fill:none}.cg-lines .cg-spouse-line{stroke:var(--cg-spouse);stroke-width:3;stroke-dasharray:6 5;opacity:.8}.cg-lines .cg-pending-line{stroke-dasharray:4 6}.cg-node{width:150px;min-height:120px;border:1px solid var(--cg-border);border-radius:16px;background:var(--cg-surface);box-shadow:0 5px 20px #00000009;display:flex;align-items:center;text-align:center;flex-direction:column;padding:10px 8px;cursor:pointer;color:var(--cg-ink);z-index:1}.cg-node:hover{border-color:var(--cg-accent);box-shadow:0 7px 24px #0002}.cg-avatar{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--cg-soft);color:var(--cg-accent);font-size:12px;font-weight:700;margin-bottom:5px;flex-shrink:0}.cg-node strong{font-size:13px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cg-node small{font-size:10px;color:var(--cg-muted);margin-top:3px}.cg-main{width:170px;min-height:140px;border:2px solid var(--cg-accent);background:var(--cg-soft)}.cg-main .cg-avatar{width:52px;height:52px;font-size:17px;background:var(--cg-accent);color:var(--cg-bg)}.cg-spouse{border-color:var(--cg-spouse);background:var(--cg-spouse-bg)}.cg-spouse .cg-avatar{background:var(--cg-spouse);color:var(--cg-bg)}.cg-here{font-size:9px;line-height:1.4;text-transform:uppercase;font-weight:750;letter-spacing:1px;color:var(--cg-accent);margin-top:4px}.cg-node:has(.cg-here){box-shadow:0 0 0 3px var(--cg-bg),0 0 0 5px var(--cg-accent)}.cg-pending{border:2px dashed var(--cg-accent);cursor:default}.cg-group-actions{padding:15px 20px;border-top:1px solid var(--cg-border);display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.cg-remove-list{padding:0 20px 15px}.cg-root .cg-subtle{font-size:11px;padding:6px 9px;background:transparent;color:var(--cg-muted)}.cg-banner{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:1045;max-width:calc(100% - 24px);width:max-content;padding:9px 14px;display:flex;gap:10px;align-items:center;border-radius:15px;background:var(--cg-surface);border:1px solid var(--cg-accent);box-shadow:0 8px 30px #0003}.cg-banner>span:not(.cg-pulse){overflow-wrap:anywhere}.cg-pulse{width:9px;height:9px;background:var(--cg-accent);border-radius:50%;flex-shrink:0;animation:cg-pulse 2.5s ease-in-out infinite}.cg-card{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.cg-error{border-left:3px solid #ca4b60;background:var(--cg-surface);color:var(--cg-ink);padding:12px;margin:12px 0}.cg-compact .cg-node{min-height:120px}.cg-root .cg-group-trigger{color:var(--cg-accent);background:var(--cg-soft)}
@keyframes cg-pulse{50%{box-shadow:0 0 0 6px #24aa9220}}
@media(max-width:700px){.cg-overlay{padding:8px}.cg-dialog{border-radius:18px}.cg-header{padding:18px}.cg-root h2{font-size:22px}.cg-content{padding:18px 10px}.cg-grid{grid-template-columns:minmax(0,1fr)}.cg-group-heading{padding:16px 14px 0}.cg-group-actions{padding:12px}.cg-banner{bottom:8px;gap:6px;padding:7px 9px;font-size:12px}.cg-banner .cg-button{font-size:11px;padding:6px;max-width:110px;flex-shrink:0}}
@media(prefers-reduced-motion:reduce){.cg-pulse{animation:none}}

.cg-symbol{width:21px;height:21px;vertical-align:middle;margin-right:8px;fill:var(--cg-soft);stroke:currentColor;stroke-width:1.7}

.cg-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 8px}.cg-toolbar h4{margin:8px 0}.cg-toolbar-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}.cg-toolbar-actions .cg-card{margin:0}.cg-toolbar-actions .cg-button{margin:0}.cg-toolbar-actions i{margin-right:6px}
.cg-enter{animation:cg-dialog-enter 220ms ease-out both}.cg-step{animation:cg-step-enter 180ms ease-out both}
@keyframes cg-dialog-enter{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@keyframes cg-step-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.cg-enter,.cg-step{animation:none}}
@media(max-width:600px){.cg-toolbar-actions{width:100%;justify-content:flex-start;margin-left:0}}

.cg-root .cg-group-trigger{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;flex-shrink:0;height:42px}
.cg-root .cg-group-trigger .cg-symbol{display:block;flex:0 0 21px;margin:0}
