/* BALANCE-01 · Cài đặt → Chia hội thoại (balance190.js) */
.bl19{display:flex;flex-direction:column;gap:14px;max-width:920px;color:#0f172a}
.bl19-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.bl19-head h4{margin:0;font-size:16px}
.bl19-head p{margin:4px 0 0;color:#475569;font-size:13px;line-height:1.45;max-width:640px}
.bl19-state{margin:0;padding:8px 12px;border-radius:10px;background:#f1f5f9;color:#475569;font-size:12.5px}
.bl19-state.on{background:#ecfdf5;color:#065f46}
.bl19-sec{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}
.bl19-sec h5{margin:0;font-size:13px;font-weight:600;color:#334155}
.bl19-sec h5 small{font-weight:400;color:#64748b}
.bl19-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.bl19-muted{color:#64748b;font-size:12.5px;margin:0}
.bl19-err{color:#b91c1c;font-size:12.5px}
.bl19-ok{color:#059669;font-weight:600}
.bl19-warn{color:#b45309;font-weight:600}
/* công tắc kiểu Zalo */
.bl19-switch{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;cursor:pointer;margin:0;white-space:nowrap;user-select:none}
.bl19-switch input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.bl19-track{position:relative;width:42px;height:24px;border-radius:12px;background:#cbd5e1;transition:background .15s;flex:0 0 auto}
.bl19-track::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.25);transition:transform .15s}
.bl19-switch input:checked+.bl19-track{background:#0068ff}
.bl19-switch input:checked+.bl19-track::after{transform:translateX(18px)}
.bl19-switch input:focus-visible+.bl19-track{outline:2px solid #93c5fd;outline-offset:2px}
/* người nhận */
.bl19-chips{display:flex;flex-wrap:wrap;gap:8px}
.bl19-chip{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:260px;padding:6px 10px 6px 6px;border:1px solid #e2e8f0;border-radius:999px;background:#fff;color:inherit;font:inherit;cursor:pointer;text-align:left;transition:border-color .12s,background .12s}
.bl19-chip:hover{border-color:#94a3b8}
.bl19-chip.on{border-color:#0068ff;background:#eff6ff}
.bl19-chip:focus-visible{outline:2px solid #93c5fd;outline-offset:1px}
.bl19-av{position:relative;flex:0 0 auto;width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:600;font-size:13px;color:#fff;background:hsl(var(--bl19h,210) 55% 52%)}
.bl19-av img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.bl19-dot{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:#22c55e;border:2px solid #fff}
.bl19-who{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.bl19-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bl19-who small{font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bl19-tick{flex:0 0 auto;width:18px;height:18px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;color:transparent;border:1px solid #cbd5e1}
.bl19-chip.on .bl19-tick{background:#0068ff;border-color:#0068ff;color:#fff}
/* ô chọn */
.bl19-check{display:flex;align-items:flex-start;gap:8px;font-size:13px;color:#1e293b;margin:0;cursor:pointer}
.bl19-check>input{flex:0 0 auto;width:auto;margin:2px 0 0}
.bl19-check>span{display:flex;flex-direction:column;gap:1px}
.bl19-check small{color:#64748b;font-size:11.5px}
.bl19-line{display:block;line-height:1.7}
.bl19-line .bl19-num,.bl19-inline .bl19-num{display:inline-block;margin:0 2px;vertical-align:baseline}
.bl19-inline{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:13px;color:#1e293b;margin:0}
.bl19-num{width:64px;padding:3px 6px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;background:#fff;color:inherit;display:inline-block}
.bl19-check .bl19-num{margin:0 2px}
.bl19-last{padding-left:24px}
.bl19-pills{display:flex;flex-wrap:wrap;gap:6px}
.bl19-pill{padding:5px 12px;border:1px solid #e2e8f0;border-radius:999px;background:#fff;color:#334155;font:inherit;font-size:12.5px;cursor:pointer}
.bl19-pill small{color:#94a3b8;margin-left:2px}
.bl19-pill.on{border-color:#0068ff;background:#0068ff;color:#fff}
.bl19-pill.on small{color:#dbeafe}
.bl19-save{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:12px}
.bl19-save.dirty{position:sticky;bottom:8px;z-index:2;box-shadow:0 4px 14px rgba(15,23,42,.12)}   /* chỉ nổi khi có thay đổi chưa lưu */
/* lần chia gần đây */
.bl19-recent{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.bl19-recent li{display:flex;gap:10px;padding:6px 0;border-bottom:1px solid #f1f5f9;font-size:12.5px}
.bl19-recent li:last-child{border-bottom:0}
.bl19-time{flex:0 0 auto;width:78px;color:#64748b;font-variant-numeric:tabular-nums}
.bl19-what{display:flex;flex-direction:column;gap:1px;min-width:0}
.bl19-what small{color:#64748b;font-size:11.5px}
.bl19-conv{font-weight:500}
@media (max-width:600px){.bl19-chip{max-width:100%;flex:1 1 calc(50% - 8px)}.bl19-time{width:64px}}
/* nền tối */
:root[data-zsc-scheme="dark"] .bl19{color:#e2e8f0}
:root[data-zsc-scheme="dark"] .bl19-head p,:root[data-zsc-scheme="dark"] .bl19-muted,:root[data-zsc-scheme="dark"] .bl19-who small,:root[data-zsc-scheme="dark"] .bl19-check small,:root[data-zsc-scheme="dark"] .bl19-what small,:root[data-zsc-scheme="dark"] .bl19-time{color:#94a3b8}
:root[data-zsc-scheme="dark"] .bl19-state{background:#1e293b;color:#cbd5e1}
:root[data-zsc-scheme="dark"] .bl19-state.on{background:#064e3b;color:#d1fae5}
:root[data-zsc-scheme="dark"] .bl19-sec{background:#0f172a;border-color:#334155}
:root[data-zsc-scheme="dark"] .bl19-sec h5,:root[data-zsc-scheme="dark"] .bl19-check,:root[data-zsc-scheme="dark"] .bl19-inline{color:#e2e8f0}
:root[data-zsc-scheme="dark"] .bl19-chip,:root[data-zsc-scheme="dark"] .bl19-pill,:root[data-zsc-scheme="dark"] .bl19-num{background:#1e293b;border-color:#334155;color:#e2e8f0}
:root[data-zsc-scheme="dark"] .bl19-chip.on{background:#172554;border-color:#3b82f6}
:root[data-zsc-scheme="dark"] .bl19-pill.on{background:#2563eb;border-color:#2563eb;color:#fff}
:root[data-zsc-scheme="dark"] .bl19-dot{border-color:#0f172a}
:root[data-zsc-scheme="dark"] .bl19-recent li{border-color:#1e293b}
:root[data-zsc-scheme="dark"] .bl19-save{background:#0f172a;border-color:#334155;box-shadow:0 4px 14px rgba(0,0,0,.4)}
