/* =====================================================================
   OmniChat demo — สไตล์ทั้งหมด (ธีมเดียวกับระบบ ozariam: น้ำเงิน/ขาว radius 14)
   ===================================================================== */
:root {
  --ink: #0b2b5c; --brand: #1f5fe0; --brand-2: #1747b8; --brand-soft: #eaf1fe; --brand-line: #cfe0fb;
  --bg: #f4f6fa; --card: #fff; --line: #e6ecf5; --line-soft: #eef2f8; --text: #16233a; --muted: #64748b; --muted-2: #94a3b8;
  --ok: #16a34a; --ok-bg: #e8f7ee; --warn: #b8730f; --warn-bg: #fdf3e2; --danger: #dc2626; --danger-bg: #fdecec;
  --purple: #7c3aed; --purple-bg: #f2ecfe; --amber: #f59e0b; --amber-bg: #fef5e4;
  --fb: #1877F2; --ig: #E1306C; --tt: #111111; --line-ch: #06C755;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 2px 6px rgba(15,43,92,.06), 0 12px 32px rgba(15,43,92,.10); --shadow-sm: 0 1px 2px rgba(15,43,92,.06);
  --rail: 84px; --convs-w: 340px; --info-w: 320px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "IBM Plex Sans Thai", "Sarabun", "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
  font-size: 14.5px; line-height: 1.55; overflow-wrap: break-word; word-break: break-word; -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
svg.i { width: 1.15em; height: 1.15em; vertical-align: -0.22em; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #d3dbe8; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
[hidden] { display: none !important; }
[class*="backdrop-blur"] { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* ---------- โครงหลัก ---------- */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.rail { background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 14px 8px; gap: 4px; }
.rail-brand { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(135deg, var(--brand), #6d8dff); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; margin-bottom: 10px; box-shadow: 0 6px 16px rgba(31,95,224,.28); }
.rail-item { width: 68px; padding: 8px 4px 6px; border: 0; background: none; border-radius: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; line-height: 1.2; position: relative; }
.rail-item svg.i { width: 22px; height: 22px; }
.rail-item:hover { background: var(--bg); color: var(--ink); }
.rail-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.rail-badge { position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.main { min-width: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.page { padding: 22px 26px 40px; overflow: auto; height: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 22px; color: var(--ink); font-weight: 700; }
.page-head .sub { color: var(--muted); font-size: 13.5px; }
.page-head .ph-back { display: none; flex: none; }   /* แสดงเฉพาะมือถือ (ดู @media ด้านล่าง) */
.chat-head .acts .ch-info { flex: none; gap: 5px; font-weight: 600; color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.page-head .spacer, .spacer { flex: 1; }
.demo-pill { font-size: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 3px 10px; font-weight: 600; white-space: nowrap; }

/* ---------- ส่วนประกอบพื้นฐาน ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 8px 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 15px; color: var(--ink); }
.card-body { padding: 16px 18px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 500; line-height: 1.3; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--bg); border-color: #d5deeb; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-2); }
.btn.soft { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.btn.danger { color: var(--danger); } .btn.danger:hover { background: var(--danger-bg); border-color: #f5c2c2; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--bg); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }
.btn.icon.sm { width: 30px; height: 30px; padding: 5px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.fb { background: var(--fb); border-color: var(--fb); color: #fff; } .btn.fb:hover { background: #1462c9; }
.input, textarea.input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; transition: border-color .12s, box-shadow .12s; }
.input:focus, textarea.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { resize: vertical; min-height: 80px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; } .row.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.search { position: relative; }
.search svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search .input { padding-left: 34px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.strong { font-weight: 600; color: var(--ink); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe8cc; } .chip.warn { background: var(--warn-bg); color: var(--warn); border-color: #f3dcb0; }
.chip.danger { background: var(--danger-bg); color: var(--danger); border-color: #f5c2c2; } .chip.brand { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.chip.purple { background: var(--purple-bg); color: var(--purple); border-color: #dccdfb; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap; }
.tag .x { opacity: .7; cursor: pointer; margin-left: 2px; } .tag .x:hover { opacity: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.online { background: var(--ok); } .dot.busy { background: var(--amber); } .dot.offline { background: #cbd5e1; }
.avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; background: #94a3b8; overflow: visible; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; } .avatar.xs { width: 24px; height: 24px; font-size: 10px; } .avatar.lg { width: 60px; height: 60px; font-size: 22px; }
.avatar .chb { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.avatar .chb svg { width: 16px; height: 16px; }
.avatar.lg .chb { width: 22px; height: 22px; } .avatar.lg .chb svg { width: 20px; height: 20px; }
.avatar .st { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: #cbd5e1; }
.avatar .st.online { background: var(--ok); } .avatar .st.busy { background: var(--amber); }
.ch-ic { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; }
.ch-ic.lg { width: 28px; height: 28px; } .ch-ic.xl { width: 40px; height: 40px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: #f8fafc; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table th, .table td { word-break: normal; overflow-wrap: normal; }   /* ไม่ให้เซลล์หดจนตัวอักษรเรียงแนวตั้ง — ตารางกว้างเกินจอให้เลื่อนข้างแทน */
.pager { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .pg { min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 0 8px; }
.pager .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.toggle { width: 40px; height: 22px; border-radius: 11px; background: #cbd5e1; border: 0; position: relative; flex: none; transition: background .15s; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on { background: var(--ok); } .toggle.on::after { left: 20px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .ico { width: 68px; height: 68px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ico svg.i { width: 30px; height: 30px; stroke-width: 1.6; }
.empty .t { font-weight: 600; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.notice { padding: 10px 14px; border-radius: 10px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.notice.warn { background: var(--warn-bg); color: #8a5608; } .notice.info { background: var(--brand-soft); color: var(--ink); } .notice.ok { background: var(--ok-bg); color: #166534; } .notice.danger { background: var(--danger-bg); color: #991b1b; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.copy { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; max-width: 100%; }
.copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps > div { display: flex; gap: 12px; align-items: flex-start; }
.steps > div::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; display: grid; place-items: center; flex: none; font-size: 13px; }

/* ---------- select2 (dropdown ค้นหาได้) ---------- */
.sel { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 100%; min-height: 36px; text-align: left; }
.sel:hover { border-color: #c9d4e5; } .sel .sel-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel .chev { margin-left: auto; color: var(--muted-2); } .sel.sm { padding: 4px 8px 4px 10px; min-height: 30px; font-size: 13px; border-radius: 8px; }
.sel.block { width: 100%; }
.pop { position: fixed; z-index: 95; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; max-width: 340px; overflow: hidden; animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.pop .pop-search { padding: 8px; border-bottom: 1px solid var(--line-soft); }
.pop .pop-search .input { padding: 7px 10px; border-radius: 8px; }
.pop .pop-list { max-height: 280px; overflow: auto; padding: 6px; }
.pop .opt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; text-align: left; }
.pop .opt:hover, .pop .opt.hl { background: var(--bg); } .pop .opt.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pop .opt .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.pop .none { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.pop.emoji .pop-list { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; } .pop.emoji .opt { justify-content: center; font-size: 20px; padding: 6px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(11,27,60,.45); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 20px 60px rgba(11,27,60,.28); animation: pop .15s ease-out; }
.modal.wide { max-width: 860px; } .modal.narrow { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { margin: 0; font-size: 17px; color: var(--ink); }
.modal-body { padding: 18px 20px; } .modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { background: #0f1f3d; color: #fff; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow); animation: pop .15s ease-out; cursor: default; }
.toast.click { cursor: pointer; } .toast .ch-ic { flex: none; margin-top: 1px; } .toast b { color: #fff; }
.toast.ok { background: #14532d; } .toast.danger { background: #7f1d1d; }

/* ---------- หน้าเข้าสู่ระบบ ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, #dfe9ff 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #ffe3ef 0%, transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 420px; padding: 32px 30px 26px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .rail-brand { margin: 0; }
.login-brand h1 { margin: 0; font-size: 20px; color: var(--ink); } .login-brand .sub { font-size: 12.5px; color: var(--muted); }
.login .chs { display: flex; gap: 6px; align-items: center; margin: 6px 0 20px; color: var(--muted); font-size: 13px; }
.login .err { margin-bottom: 12px; }

/* ---------- กล่องข้อความ (3 คอลัมน์) ---------- */
.inbox { display: grid; grid-template-columns: var(--convs-w) minmax(0, 1fr) var(--info-w); height: 100%; min-height: 0; }
.inbox.no-info { grid-template-columns: var(--convs-w) minmax(0, 1fr); }
.inbox.no-info .info { display: none; }
.convs { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.convs-head { padding: 16px 16px 10px; }
.convs-head h2 { margin: 0 0 10px; font-size: 18px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.convs-head h2 .cnt { font-size: 12px; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.tabs { display: flex; gap: 2px; background: var(--bg); border-radius: 10px; padding: 3px; margin-top: 10px; }
.tab { flex: 1; border: 0; background: none; padding: 6px 4px; border-radius: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tab.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.chchips { display: flex; gap: 6px; padding: 8px 16px 10px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.chchip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.chchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chchip .n { font-size: 11px; opacity: .8; }
.conv-list { overflow: auto; flex: 1; min-height: 0; }
.conv { display: flex; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; position: relative; }
.conv:hover { background: #f8fafc; } .conv.on { background: var(--brand-soft); }
.conv.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.conv-body { min-width: 0; flex: 1; }
.conv-top { display: flex; align-items: baseline; gap: 6px; }
.conv-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.conv-time { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.conv.unread .conv-time { color: var(--brand); font-weight: 600; }
.conv-prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.conv.unread .conv-prev { color: var(--text); font-weight: 500; }
.conv-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.conv-meta .tag { font-size: 10.5px; padding: 0 6px; }
.conv-meta .who { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.live { font-size: 10px; font-weight: 700; color: #fff; background: var(--ok); padding: 1px 6px; border-radius: 5px; letter-spacing: .3px; }
.sim-row { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }

.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-head .who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 220px; }   /* ฐานกว้างจริง: ที่ไม่พอ → ปุ่มสถานะตกบรรทัดใหม่ ไม่บีบชื่อ */
.chat-head .who > div { min-width: 0; flex: 1; }
.chat-head .name { font-weight: 700; color: var(--ink); font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .sub .ch-ic { display: inline-flex; vertical-align: -3px; margin-right: 4px; }
.chat-head .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ref-bar { display: flex; align-items: center; gap: 8px; padding: 7px 16px; background: #fbfcfe; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.msgs { flex: 1; overflow: auto; overflow-x: hidden; padding: 18px 20px 10px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); background: #e9eef6; padding: 2px 10px; border-radius: 999px; margin: 8px 0 4px; }
.msg { display: flex; gap: 8px; max-width: 78%; align-items: flex-end; }
.msg.cust { align-self: flex-start; } .msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { margin-bottom: 18px; }
.msg-col { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.msg.me .msg-col { align-items: flex-end; }
.bubble { padding: 9px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; line-height: 1.5; box-shadow: var(--shadow-sm); max-width: 100%; overflow-wrap: break-word; }   /* ลิงก์ยาว/รูปใหญ่ไม่ดันแชทล้นจอ */
.msg.cust .bubble { border-bottom-left-radius: 5px; }
.msg.me .bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-bottom-right-radius: 5px; }
.msg.me .bubble a { color: #fff; text-decoration: underline; }
.msg.bot .bubble { background: #f1f5f9; color: var(--text); border-color: #e2e8f0; }
.msg.failed .bubble { background: var(--danger-bg); color: var(--danger); border-color: #f5c2c2; }
.msg-meta { font-size: 11px; color: var(--muted-2); padding: 0 4px; display: flex; gap: 5px; align-items: center; }
.msg-meta .auto { background: var(--purple-bg); color: var(--purple); padding: 0 6px; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.msg-meta { flex-wrap: wrap; }
.msg.note { max-width: 78%; align-self: center; width: 100%; justify-content: center; }
.msg.note .bubble { background: #fff8db; border: 1px dashed #f0d27a; color: #6b5310; border-radius: 12px; font-size: 13.5px; width: 100%; }
.msg.note .bubble .nt { font-weight: 700; display: flex; gap: 6px; align-items: center; margin-bottom: 2px; font-size: 12.5px; }
.msg.sys { align-self: center; max-width: 100%; }
.msg.sys span { font-size: 12px; color: var(--muted); background: #eef2f8; padding: 3px 12px; border-radius: 999px; }
.bubble.card-b, .msg.me .bubble.card-b, .msg.bot .bubble.card-b { padding: 0; overflow: hidden; background: #fff; color: var(--text); border: 1px solid var(--line); width: 300px; max-width: 100%; white-space: normal; box-shadow: var(--shadow-sm); }
.msg.me .bubble.card-b { border-bottom-right-radius: 16px; }
.prod { display: flex; gap: 12px; padding: 12px; align-items: center; }
.prod .tile { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 28px; flex: none; }
.prod .pn { font-weight: 600; color: var(--ink); font-size: 13.5px; line-height: 1.35; }
.prod .pp { font-size: 14px; font-weight: 700; color: var(--brand); margin-top: 3px; } .prod .pp s { color: var(--muted-2); font-weight: 400; font-size: 12px; margin-right: 4px; }
.card-b .cb-foot { border-top: 1px solid var(--line-soft); padding: 8px 12px; display: flex; gap: 6px; justify-content: flex-end; }
.order { padding: 12px 14px 10px; font-size: 13px; }
.order .oh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); } .order .oh b { color: var(--ink); font-size: 13.5px; }
.order .oh svg.i { color: var(--brand); }
.order .oi { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; color: var(--text); align-items: baseline; }
.order .oi > span:first-child { min-width: 0; } .order .oi > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.order .oi.muted { color: var(--muted); font-size: 12.5px; }
.order .ot { display: flex; justify-content: space-between; border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 7px; font-weight: 700; color: var(--ink); font-size: 14px; }
.order .trk { display: flex; align-items: center; gap: 8px; margin-top: 8px; background: var(--bg); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }
.timeline { display: flex; gap: 0; margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.timeline div { flex: 1; text-align: center; font-size: 11px; color: var(--muted-2); position: relative; padding-top: 14px; line-height: 1.2; }
.timeline div::before { content: ""; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 9px; height: 9px; border-radius: 50%; background: #dbe3ef; }
.timeline div::after { content: ""; position: absolute; top: 6px; left: 50%; width: 100%; height: 2px; background: #dbe3ef; }
.timeline div:last-child::after { display: none; }
.timeline div.done { color: var(--ok); } .timeline div.done::before, .timeline div.done::after { background: var(--ok); }
.timeline div.cur { color: var(--brand); font-weight: 700; } .timeline div.cur::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.slip { width: 230px; padding: 12px 14px; background: linear-gradient(180deg, #ffffff, #f7f9ff); color: var(--text); }
.slip .sh { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0f6e3c; font-size: 13px; }
.slip .sh i { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.slip .amt { font-size: 24px; font-weight: 700; color: var(--ink); margin: 6px 0 2px; }
.slip .sr { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.photo { width: 220px; height: 150px; display: grid; place-items: center; background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: #475569; font-size: 13px; text-align: center; padding: 10px; }
.photo .big { font-size: 34px; margin-bottom: 2px; }
.bubble.img-real { padding: 0; overflow: hidden; } .bubble.img-real img { display: block; max-width: min(260px, 100%); max-height: 260px; width: auto; height: auto; }
.bubble.card-b.img-real { width: auto; max-width: min(262px, 100%); }   /* กรอบพอดีรูป ไม่เว้นขาว */
.msg.cust .msg-col { align-items: flex-start; }
.bubble.text img.image { display: block; max-width: min(260px, 100%); max-height: 320px; width: auto; height: auto; border-radius: 10px; margin-top: 4px; }   /* รูปที่ส่งพร้อมข้อความ (เช่น ข้อความจากคลังที่แนบรูป) */
.bubble.text img.sticker { display: block; max-width: 120px; max-height: 120px; }
.bubble.sticker { background: none !important; border: 0 !important; box-shadow: none; font-size: 44px; padding: 0 6px; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: blink 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.composer { border-top: 1px solid var(--line); background: #fff; padding: 10px 16px 12px; }
.comp-modes { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.mode { border: 1px solid transparent; background: none; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mode.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); font-weight: 600; }
.mode.note.on { background: #fff8db; color: #6b5310; border-color: #f0d27a; }
.ai-note { margin-left: auto; color: var(--purple); font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.comp-text { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: none; min-height: 44px; max-height: 160px; outline: none; background: #fff; }
.comp-text:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.composer.note-mode .comp-text { background: #fffbea; border-color: #f0d27a; }
.comp-tools { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.tool { border: 0; background: none; padding: 6px 9px; border-radius: 8px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.tool:hover { background: var(--bg); color: var(--ink); }
.tool.ai { color: var(--purple); font-weight: 600; } .tool.ai:hover { background: var(--purple-bg); }
.tool .tl-short { display: none; }
@media (max-width: 380px) { .tool .tl-long { display: none; } .tool .tl-short { display: inline; } }   /* จอเล็กมาก: "AI ร่าง" */
.comp-modes .line-note { color: #0f6e3c; }

.info { border-left: 1px solid var(--line); background: var(--card); overflow: auto; min-height: 0; }
.info-x-bar, .info-back { display: none; }
.info-top { padding: 20px 18px 14px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.info-top .avatar { margin: 0 auto 8px; }
.info-top .nm { font-weight: 700; color: var(--ink); font-size: 16px; }
.info-top .hd { font-size: 12.5px; color: var(--muted); }
.info-sec { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.info-sec h4 { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; display: flex; align-items: center; gap: 6px; }
.info-sec h4 .btn { margin-left: auto; }
.irow { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 3px 0; min-width: 0; }
.irow svg.i { color: var(--muted-2); } .irow span { min-width: 0; }
.chan-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.chan-row .h { color: var(--muted); font-size: 12.5px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat3 div { background: var(--bg); border-radius: 10px; padding: 8px 6px; text-align: center; }
.stat3 b { display: block; font-size: 16px; color: var(--ink); } .stat3 span { font-size: 11px; color: var(--muted); }
.ord { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--line-soft); }
.ord:last-child { border-bottom: 0; } .ord .no { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink); font-weight: 600; }
.ord .amt { margin-left: auto; font-weight: 600; white-space: nowrap; }
.note-item { background: #fff8db; border-radius: 8px; padding: 7px 10px; font-size: 13px; color: #5b4708; margin-bottom: 6px; }
.note-item .by { font-size: 11px; color: #9a7b1a; margin-top: 2px; }
.hist { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 13px; cursor: pointer; border-radius: 8px; }
.hist:hover { background: var(--bg); } .hist .t { color: var(--muted); font-size: 11.5px; margin-left: auto; white-space: nowrap; }
.ai-sum { background: var(--purple-bg); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #3b1c7a; line-height: 1.5; }
.ai-sum ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- แดชบอร์ด / กราฟ ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; }
.kpi .l { font-size: 12.5px; color: var(--muted); } .kpi .v { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.2; margin: 4px 0; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; font-weight: 600; } .kpi .d.up { color: var(--ok); } .kpi .d.down { color: var(--danger); } .kpi .d.flat { color: var(--muted); }
.viz { padding: 14px 18px 12px; }
.viz h3 { margin: 0 0 2px; font-size: 15px; color: var(--ink); } .viz .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 6px 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz svg { width: 100%; height: auto; display: block; }
.viz .ax { font-size: 11px; fill: var(--muted); } .viz .gl { stroke: #e9eef6; stroke-width: 1; }
.viz .seg:hover, .viz .cell:hover, .viz .hb:hover { opacity: .8; }
.tip { position: fixed; z-index: 70; background: #0f1f3d; color: #fff; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; pointer-events: none; box-shadow: var(--shadow); max-width: 260px; }
.tip b { color: #fff; }
.hbar { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.hbar .bar { height: 12px; border-radius: 4px; background: var(--bg); overflow: hidden; } .hbar .bar i { display: block; height: 100%; border-radius: 4px; }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); } .hbar .val small { color: var(--muted); }
.topic { display: grid; grid-template-columns: 1fr 60px; gap: 8px; align-items: center; font-size: 13px; padding: 5px 0; }
.topic .bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 3px; } .topic .bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }

/* ---------- ช่องทาง ---------- */
.chan-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.chan-card .top { display: flex; align-items: center; gap: 12px; }
.chan-card .top .nm { font-weight: 700; color: var(--ink); font-size: 15.5px; } .chan-card .top .ac { font-size: 12.5px; color: var(--muted); }
.chan-card .feat { display: flex; flex-wrap: wrap; gap: 5px; }
.chan-card .feat span { font-size: 11.5px; background: var(--bg); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.chan-card .st3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chan-card .st3 div { background: var(--bg); border-radius: 8px; padding: 7px; text-align: center; } .chan-card .st3 b { display: block; color: var(--ink); font-size: 15px; } .chan-card .st3 span { font-size: 11px; color: var(--muted); }
.chan-card .foot { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.chan-card.soon { border-style: dashed; opacity: .85; }
.pagerow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; flex-wrap: wrap; }
.pagerow:last-child { border-bottom: 0; }
.log-row { font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: 92px auto minmax(0, 1fr); gap: 8px; align-items: center; }
.log-row:last-child { border-bottom: 0; } .log-row .t { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- บรอดแคสต์ / ระบบอัตโนมัติ / ทีม ---------- */
.bc-stat { display: flex; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.mini-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; } .mini-bar i { display: block; height: 100%; background: var(--brand); }
.phone { width: 260px; background: #0f172a; border-radius: 28px; padding: 12px; box-shadow: var(--shadow); margin: 0 auto; }
.phone .scr { background: #f1f5f9; border-radius: 18px; height: 400px; overflow: hidden; display: flex; flex-direction: column; }
.phone .ph { padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.phone .pm { padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.phone .pb { background: #fff; border-radius: 14px; border-bottom-left-radius: 4px; padding: 8px 11px; font-size: 12.5px; white-space: pre-wrap; max-width: 90%; align-self: flex-start; box-shadow: var(--shadow-sm); }
.phone .pbtn { align-self: flex-start; background: var(--brand-soft); color: var(--brand); border-radius: 10px; padding: 6px 12px; font-size: 12px; font-weight: 600; }
.chsel { display: flex; gap: 8px; flex-wrap: wrap; }
.chsel button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.chsel button.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.rule { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.rule:last-child { border-bottom: 0; } .rule .kw { display: flex; gap: 5px; flex-wrap: wrap; } .rule .kw span { background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.rule .rp { font-size: 13px; color: var(--muted); margin-top: 3px; }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.flow .nd { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 500; }
.flow .nd.ai { background: var(--purple-bg); border-color: #dccdfb; color: var(--purple); } .flow .nd.hu { background: var(--ok-bg); border-color: #bfe8cc; color: #166534; }
.flow .ar { color: var(--muted-2); }
.team-row td .st { display: inline-flex; align-items: center; gap: 6px; }
.settings-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.settings-tabs button { border: 0; background: none; padding: 9px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.settings-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.qr-row { display: grid; grid-template-columns: 110px 140px 1fr 70px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.qr-row:last-child { border-bottom: 0; } .qr-row .k { font-family: ui-monospace, Consolas, monospace; color: var(--brand); font-weight: 600; font-size: 12.5px; }
.qr-row .tx { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob-back { display: none; }
.spin svg.i { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bubble.img-real img.sticker { max-width: 120px; max-height: 120px; }
.bubble.card-b.img-real:has(img.sticker) { background: transparent; border-color: transparent; box-shadow: none; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 1180px) {
  .inbox, .inbox.no-info { grid-template-columns: var(--convs-w) minmax(0, 1fr); }
.inbox.no-info .info { display: none; }
  .inbox .info, .inbox.no-info .info { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); z-index: 50; box-shadow: -8px 0 30px rgba(11,27,60,.18); transform: translateX(105%); transition: transform .18s ease-out; }
  .inbox.info-open .info { transform: none; }
  .info-x-bar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 3; background: var(--card);
    border-bottom: 1px solid var(--line); padding: 8px 14px 8px 6px; font-weight: 600; color: var(--ink); font-size: 14px; }
  .info-x-bar svg { width: 16px; height: 16px; color: var(--muted); }
  .info-x-bar .btn { font-weight: 600; color: var(--brand); gap: 4px; }
  .info-x-bar .btn svg { color: var(--brand); }
  .page-head .ph-back { display: inline-flex; }
  .page-head .hide-narrow { display: none; }   /* มีปุ่ม ‹ กลับ แทนแล้ว */
  .inbox.info-open .info-back { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(11, 27, 60, .32); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px),
       (pointer: coarse) and (max-height: 560px),
       (pointer: coarse) and (max-width: 1100px) and (max-aspect-ratio: 5/8) {   /* มือถือแนวนอน + มือถือที่เปิด "เว็บไซต์เดสก์ท็อป" */
  .app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .rail { order: 2; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 4px 4px; gap: 0; overflow-x: auto; justify-content: flex-start; }
  .rail-brand, .rail-bottom { display: none; }
  .rail-item { width: auto; min-width: 66px; padding: 6px 6px 4px; font-size: 10.5px; }
  .main { order: 1; }
  .inbox, .inbox.no-info { grid-template-columns: minmax(0, 1fr); }
  .inbox .convs { display: flex; } .inbox .chat { display: none; }
  .inbox.m-chat .convs { display: none; } .inbox.m-chat .chat { display: flex; }
  .mob-back { display: inline-flex; }
  .chat-head { padding: 8px 10px; gap: 6px 8px; }
  .chat-head .who { flex: 1 1 calc(100% - 48px); }            /* ชื่อลูกค้าได้ทั้งบรรทัดแรก */
  .chat-head .acts { flex: 1 1 100%; flex-wrap: nowrap; min-width: 0; }
  .chat-head .acts .sel { min-width: 0; flex: 0 1 auto; }
  .chat-head .acts .sel:first-child { flex-shrink: 0; }   /* สถานะแชทอ่านได้เสมอ — ให้ชื่อผู้รับผิดชอบย่อแทน */
  .table-wrap > .table:has(th:nth-child(5)) { min-width: 640px; }   /* ตาราง 5 คอลัมน์ขึ้นไป: เลื่อนข้างดู ไม่บีบคอลัมน์ */
  .table-wrap > .table:has(th:nth-child(7)) { min-width: 820px; }
  .page { padding: 16px 14px 30px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .msg { max-width: 90%; }
  .msgs { padding: 12px 10px 8px; }
  .composer { padding: 8px 10px 10px; }                       /* ช่องพิมพ์กะทัดรัด เหลือที่ให้ข้อความ */
  .comp-modes { margin-bottom: 6px; }
  .comp-modes .kb-hint { display: none; }                      /* ปุ่มลัดคีย์บอร์ด ไม่ใช้บนมือถือ */
  .comp-tools { flex-wrap: nowrap; gap: 0; margin-top: 6px; }   /* ปุ่มส่งอยู่บรรทัดเดียวกับเครื่องมือเสมอ */
  .comp-tools .tool { flex: none; padding: 6px 7px; gap: 4px; }
  .comp-tools .tool .tl-opt { display: none; }
  .comp-tools .btn.primary { flex: none; margin-left: auto; }
  .qr-row { grid-template-columns: 1fr; gap: 3px; }
  .hbar { grid-template-columns: 80px 1fr 80px; }
  .toasts { left: 12px; right: 12px; max-width: none; }
  .modal { max-height: calc(100vh - 24px); }
}
/* รวมหลายรูปเป็นภาพเดียวก่อนส่ง */
.collage-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 12px 8px; }
.collage-tgl { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px 5px 6px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); }
.collage-tgl svg { width: 16px; height: 16px; }
.collage-tgl .sw { width: 28px; height: 16px; border-radius: 999px; background: #cbd5e1; position: relative; flex: none; transition: background .15s; }
.collage-tgl .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; }
.collage-tgl.on { color: var(--ink); border-color: var(--brand-line); background: var(--brand-soft); }
.collage-tgl.on .sw { background: var(--brand); } .collage-tgl.on .sw::after { transform: translateX(12px); }
