/* JAFA Clean: layar Pelanggan (clean-customers.js). Semua kelas .cx-* di dalam .clean-shell. */
.clean-shell .cx-search{position:relative}
.clean-shell .cx-scan{border:0;background:transparent;width:44px;height:44px;margin-right:-10px;display:grid;place-items:center;color:var(--cs-muted);cursor:pointer;flex-shrink:0}
.clean-shell .cx-scan svg,.clean-shell .cx-search>svg{width:20px;height:20px;flex-shrink:0}
.clean-shell .cx-suggest{display:grid;gap:10px;margin-top:10px;padding:12px 14px;border-radius:16px;background:var(--cs-surface);box-shadow:var(--cs-shadow)}
.clean-shell .cx-suggest[hidden]{display:none}
.clean-shell .cx-sg>span{display:block;font-size:12px;font-weight:600;color:var(--cs-muted);margin-bottom:6px}
.clean-shell .cx-sg>div{display:flex;flex-wrap:wrap;gap:6px}
.clean-shell .cx-pill{border:0;min-height:36px;padding:0 12px;border-radius:999px;background:var(--cs-sunken);font-size:13px;font-weight:600;cursor:pointer;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* strip insight: satu baris, bisa digeser */
.clean-shell .cx-strip{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:2px 16px 4px;scroll-padding-inline:16px;scroll-snap-type:x proximity}
.clean-shell .cx-strip::-webkit-scrollbar{display:none}
.clean-shell .cx-strip[hidden]{display:none}
.clean-shell .cx-ins{flex:0 0 auto;display:flex;align-items:center;gap:8px;min-height:44px;max-width:240px;padding:0 14px;border-radius:14px;border:1.5px solid transparent;background:var(--cs-surface);box-shadow:var(--cs-shadow);font-size:12.5px;font-weight:600;color:var(--cs-muted);cursor:pointer;scroll-snap-align:start;text-align:left}
.clean-shell .cx-ins b{font-size:15px;font-weight:800;color:var(--cs-ink);font-variant-numeric:tabular-nums;display:inline-flex}
.clean-shell .cx-ins b svg{width:16px;height:16px}
.clean-shell .cx-ins span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.clean-shell .cx-ins.is-ok b{color:var(--cs-ok)}
.clean-shell .cx-ins.is-bad b{color:var(--cs-bad)}
.clean-shell .cx-ins.is-warn b{color:var(--cs-warn)}
.clean-shell .cx-ins.is-acc b{color:var(--cs-accent)}
.clean-shell .cx-ins[aria-pressed="true"]{border-color:var(--cs-accent);color:var(--cs-ink)}

.clean-shell .cx-filter{display:flex;flex-wrap:wrap;gap:8px;margin:-2px 0 10px}
.clean-shell .cx-filter[hidden],.clean-shell .cx-selbar[hidden]{display:none}
.clean-shell .cx-fchip,.clean-shell .cx-fwa{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 12px;border-radius:999px;border:0;font-size:13px;font-weight:700;cursor:pointer}
.clean-shell .cx-fchip{background:var(--cs-accent-soft);color:var(--cs-accent)}
.clean-shell .cx-fwa{background:var(--cs-ok-soft);color:var(--cs-ok)}
.clean-shell .cx-fchip svg,.clean-shell .cx-fwa svg{width:16px;height:16px}

.clean-shell .cx-selbar{position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:6px;margin:0 0 10px;padding:6px 6px 6px 14px;border-radius:16px;background:var(--cs-ink);color:var(--cs-surface);font-size:13.5px}
.clean-shell .cx-selbar span{flex:1}
.clean-shell .cx-selbar button{border:0;background:transparent;color:inherit;min-height:40px;padding:0 10px;border-radius:12px;font-size:13px;font-weight:700;display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.clean-shell .cx-selbar button.is-wa{background:var(--cs-ok);color:#fff}
.clean-shell .cx-selbar button:disabled{opacity:.5}
.clean-shell .cx-selbar svg{width:16px;height:16px}

/* daftar & grup (Terbaru / A–Z) */
.clean-shell .cx-groups{display:grid;gap:14px}
.clean-shell .cx-gh{position:sticky;top:0;z-index:3;margin:0 0 -6px;padding:6px 2px;background:var(--cs-bg);font-size:12.5px;font-weight:700;color:var(--cs-muted)}
.clean-shell .cx-more{margin-top:0}
.clean-shell .cx-wrap{position:relative}
.clean-shell .cx-rail-hold{position:sticky;top:40px;height:0;z-index:5}
.clean-shell .cx-index{position:absolute;right:-15px;top:0;display:flex;flex-direction:column;align-items:center;padding:4px 0;touch-action:none;user-select:none;-webkit-user-select:none}
.clean-shell .cx-index[hidden]{display:none}
.clean-shell .cx-index span{display:block;width:16px;line-height:15px;text-align:center;font-size:10px;font-weight:800;color:var(--cs-accent);cursor:pointer}

.clean-shell .cx-row{position:relative;overflow:hidden;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.clean-shell .cx-row+.cx-row{border-top:1px solid var(--cs-line)}
.clean-shell .cx-li{position:relative;z-index:1;background:var(--cs-surface);touch-action:pan-y;padding-right:12px}
.clean-shell .cx-under{position:absolute;inset:0;display:none;align-items:center;justify-content:space-between;padding:0 12px;font-size:11px;font-weight:700;color:#fff}
.clean-shell .cx-under span{width:56px;display:inline-flex;flex-direction:column;align-items:center;gap:4px;opacity:.75;transition:opacity .15s,transform .15s}
.clean-shell .cx-under svg{width:20px;height:20px}
.clean-shell .cx-row.is-swiping .cx-under{display:flex}
.clean-shell .cx-row[data-dir="wa"] .cx-under{background:var(--cs-ok)}
.clean-shell .cx-row[data-dir="new"] .cx-under{background:var(--cs-accent)}
.clean-shell .cx-row[data-dir="wa"] .cx-u-new,.clean-shell .cx-row[data-dir="new"] .cx-u-wa{visibility:hidden}
.clean-shell .cx-row.is-armed .cx-under span{opacity:1;transform:scale(1.08)}
.clean-shell .cx-row.is-sel .cx-li{background:var(--cs-accent-soft)}
.clean-shell .cx-check{width:22px;height:22px;border-radius:50%;border:2px solid var(--cs-line);display:grid;place-items:center;flex-shrink:0;color:#fff}
.clean-shell .cx-row.is-sel .cx-check{background:var(--cs-accent);border-color:var(--cs-accent)}
.clean-shell .cx-check svg{width:14px;height:14px}
.clean-shell .cx-li .cs-tx strong{display:flex;align-items:center;gap:6px}
.clean-shell .cx-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.clean-shell .cx-note-i{font-size:12px;color:var(--cs-faint);flex-shrink:0}
.clean-shell .cx-chip{flex-shrink:0;display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}
.clean-shell .cx-chip.is-bad{background:var(--cs-bad-soft);color:var(--cs-bad)}
.clean-shell .cx-chip.is-ok{background:var(--cs-ok-soft);color:var(--cs-ok)}
.clean-shell .cx-chip.is-acc{background:var(--cs-accent-soft);color:var(--cs-accent)}
.clean-shell .cx-chip.is-warn{background:var(--cs-warn-soft);color:var(--cs-warn)}

/* avatar: huruf + cincin stempel 10+1 + titik status + peringkat */
.clean-shell .cx-av{position:relative;width:44px;height:44px;flex-shrink:0;display:grid;place-items:center}
.clean-shell .cx-letter{width:36px;height:36px;border-radius:50%;background:var(--cs-accent-soft);color:var(--cs-accent);display:grid;place-items:center;font-weight:800;font-size:14px}
.clean-shell .cx-ring{position:absolute;inset:0;width:44px;height:44px;transform:rotate(-90deg)}
.clean-shell .cx-ring circle{fill:none;stroke-width:2.6}
.clean-shell .cx-ring-bg{stroke:var(--cs-line)}
.clean-shell .cx-ring-fg{stroke:var(--cs-warn);stroke-linecap:round}
.clean-shell .cx-ring-fg.is-full{stroke:var(--cs-ok)}
.clean-shell .cx-dot{position:absolute;right:1px;bottom:1px;width:11px;height:11px;border-radius:50%;border:2px solid var(--cs-surface);background:var(--cs-faint)}
.clean-shell .cx-dot.is-active{background:var(--cs-ok)}
.clean-shell .cx-dot.is-new{background:#3b7bd4}
.clean-shell .cx-dot.is-slipping{background:#d9a21b}
.clean-shell .cx-dot.is-lost{background:var(--cs-bad)}
.clean-shell .cx-rank{position:absolute;left:-2px;top:-3px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--cs-ink);color:var(--cs-surface);font-size:10px;font-weight:800;display:grid;place-items:center;border:2px solid var(--cs-surface)}

.clean-shell .cx-add{border-top:1px solid var(--cs-line)}

/* tarik untuk memperbarui */
.clean-shell .cx-pull{height:0;overflow:hidden;display:grid;place-items:center;color:var(--cs-muted);transition:height .18s ease}
.clean-shell .cx-pull span{display:grid;width:30px;height:30px;place-items:center;border-radius:50%;background:var(--cs-surface);box-shadow:var(--cs-shadow)}
.clean-shell .cx-pull svg{width:18px;height:18px}
.clean-shell .cx-pull.is-ready{color:var(--cs-accent)}
.clean-shell .cx-pull.is-busy span{animation:cx-spin .8s linear infinite}
@keyframes cx-spin{to{transform:rotate(360deg)}}

/* sheet: ringkasan mini, aksi cepat, detail */
.clean-shell .cx-mini{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.clean-shell .cx-mini div{background:var(--cs-surface);border-radius:14px;padding:10px 12px;box-shadow:var(--cs-shadow);min-width:0}
.clean-shell .cx-mini small{display:block;font-size:11.5px;color:var(--cs-muted)}
.clean-shell .cx-mini b{display:block;font-size:14px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.clean-shell .cx-qgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.clean-shell .cx-qa{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:72px;padding:8px 4px;border:0;border-radius:16px;background:var(--cs-surface);box-shadow:var(--cs-shadow);font-size:11.5px;font-weight:600;color:var(--cs-ink);text-decoration:none;cursor:pointer;text-align:center}
.clean-shell .cx-qa svg{width:20px;height:20px;color:var(--cs-accent)}
.clean-shell .cx-detail{display:grid;gap:12px}
.clean-shell .cx-dcard{display:grid;gap:8px}
.clean-shell .cx-heat{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px}
.clean-shell .cx-heat i{display:block;height:18px;border-radius:5px;background:var(--cs-sunken)}
.clean-shell .cx-heat i.l1{background:color-mix(in srgb,var(--cs-accent) 28%,var(--cs-sunken))}
.clean-shell .cx-heat i.l2{background:color-mix(in srgb,var(--cs-accent) 50%,var(--cs-sunken))}
.clean-shell .cx-heat i.l3{background:color-mix(in srgb,var(--cs-accent) 75%,var(--cs-sunken))}
.clean-shell .cx-heat i.l4{background:var(--cs-accent)}
.clean-shell .cx-heat-ax{display:flex;justify-content:space-between;font-size:11px;color:var(--cs-faint)}
.clean-shell .cx-pred{font-size:13.5px;line-height:1.4}
.clean-shell .cx-facts{padding:8px 16px}
.clean-shell .cx-facts .cs-kv b{max-width:62%;overflow-wrap:anywhere}
.clean-shell .cx-facts .cs-label{padding-top:6px}
.clean-shell .cx-notebox{display:grid;gap:4px;width:100%;text-align:left;padding:12px 14px;border-radius:16px;border:1.5px solid var(--cs-warn-soft);background:var(--cs-warn-soft);cursor:pointer;font-size:14px;color:var(--cs-ink)}
.clean-shell .cx-notebox.is-empty{background:transparent;border-style:dashed;border-color:var(--cs-line)}
.clean-shell .cx-notebox.is-empty span:last-child{color:var(--cs-muted);font-size:13px}
.clean-shell .cx-seg{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:800;vertical-align:middle;background:var(--cs-sunken);color:var(--cs-muted);flex-shrink:0}
.clean-shell .cx-seg.is-vip{background:var(--cs-ink);color:var(--cs-surface)}
.clean-shell .cx-seg.is-rutin{background:var(--cs-ok-soft);color:var(--cs-ok)}
.clean-shell .cx-seg.is-baru{background:#e6effb;color:#2c64b3}
.clean-shell .cx-seg.is-hilang{background:var(--cs-bad-soft);color:var(--cs-bad)}
.clean-shell .cx-qbar{height:6px;border-radius:999px;background:var(--cs-sunken);overflow:hidden}
.clean-shell .cx-qbar i{display:block;height:100%;background:var(--cs-ok);transition:width .2s}

/* catatan pelanggan saat membuat transaksi */
.clean-shell .cs-note-warn{margin-top:10px;padding:10px 14px;border-radius:14px;background:var(--cs-warn-soft);color:var(--cs-ink);font-size:13.5px;line-height:1.4;overflow-wrap:anywhere}
.clean-shell .cs-note-warn b{display:block;font-size:12px;color:var(--cs-warn);margin-bottom:2px}
