/* IFS OPS Web · Kiểu dáng « Nhắn tin hội viên » (10/2026, thread "Nâng cấp giao diện Web") — theo bản mẫu đã duyệt, nền sáng.
   Dùng chung cho trang nhân viên « Tin nhắn » và trang hội viên. File đứng riêng, chỉ có hiệu lực bên trong phần tử có lớp .chat
   (bọc cả hộp thư lẫn khung trò chuyện trong <div class="chat">…</div>), nên tên lớp ngắn như bản mẫu không đụng phần còn lại của web.
   Màu lấy theo bộ giao diện đang dùng (theme.js): --yellow = màu nhấn, --on-accent = chữ trên màu nhấn. */
.chat {
  --c-acc: var(--yellow, #F4CF33); --c-acc-ink: var(--on-accent, #2B2300); --c-ink: var(--text, #151515); --c-mute: var(--muted, #626262);
  --c-line: var(--line, #E5E5E1); --c-card: var(--surface, #fff); --c-soft: var(--soft, #F1F1EE); --c-red: var(--danger, #B42318); --c-green: #1F8A4C;
  --c-pt: var(--pt, #DB2777); --c-black: #151515;
  color: var(--c-ink); min-width: 0;
}
.chat *, .chat *::before, .chat *::after { box-sizing: border-box; }
.chat button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- khung 2 cột của nhân viên: hộp thư | cuộc trò chuyện ---------- */
.chat .web { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-lg, 16px); overflow: hidden; display: flex; flex-direction: column; height: min(78vh, 760px); min-height: 480px; box-shadow: var(--sh-1, none); }
.chat .web-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--c-line); flex-wrap: wrap; }
.chat .web-h h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; } .chat .web-h .sp { flex: 1; }
.chat .web-h .tools { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.chat .web-b { flex: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 0; }
.chat .inbox { border-right: 1px solid var(--c-line); display: flex; flex-direction: column; min-height: 0; }
.chat .conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat .back2 { display: none; }

/* ---------- hộp thư ---------- */
.chat .srch { display: flex; gap: 6px; padding: 10px 10px 0; }
.chat .srch input { flex: 1; min-width: 0; border: 1px solid var(--c-line); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--c-soft); }
.chat .srch input:focus { outline: none; border-color: var(--c-black); background: #fff; box-shadow: var(--ring, 0 0 0 3px rgba(244,207,51,.45)); }
.chat .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.chat .chip { border: 1px solid var(--c-line); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--c-mute); background: var(--c-card); display: inline-flex; gap: 5px; align-items: center; transition: background .15s, color .15s, border-color .15s; }
.chat .chip:hover { border-color: var(--c-black); color: var(--c-ink); }
.chat .chip.on { background: var(--c-black); color: #fff; border-color: var(--c-black); }
.chat .chip .n, .chat .cnt { background: var(--c-red); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 6px; font-weight: 700; line-height: 16px; }
.chat .list { overflow: auto; flex: 1; overscroll-behavior: contain; }
.chat .it, .chat .row { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; }
.chat .it { padding: 10px 12px; border-top: 1px solid var(--c-line); transition: background .15s; }
.chat .it:hover { background: var(--hover, #FAFAF6); }
.chat .it.on { background: var(--accent-soft, #FFF3BD); box-shadow: inset 3px 0 0 var(--c-acc); }
.chat .it.done { opacity: .6; }
.chat .row { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 16px; padding: 12px; gap: 12px; transition: transform .15s, box-shadow .15s; }
.chat .row:active { transform: scale(.985); }
.chat :is(.it, .row, .hrow, .cv-h) .tx { flex: 1; min-width: 0; }
.chat :is(.it, .row, .hrow) .tx b { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 14.5px; }
.chat :is(.it, .row, .hrow) .tx span { display: block; color: var(--c-mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .it .snip { font-size: 11.5px; color: var(--c-ink); }
.chat .av { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; flex: none; }
.chat .it .av { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; }
.chat .av.club { background: var(--c-black); color: var(--c-acc); font-size: 18px; }
.chat .av.pt { background: var(--c-pt); color: #fff; }
.chat .av.m { background: #E9E6D8; color: #5A5236; }
.chat .badge { background: var(--c-red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; flex: none; box-shadow: none; }
.chat .k, .chat .tg, .chat .asg, .chat .late { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.chat .k.club { background: var(--c-black); color: var(--c-acc); } .chat .k.pt { background: #FBE3EE; color: var(--c-pt); }
.chat .tg { background: #EEF3FF; color: #1D3A7A; } .chat .asg { background: #ECEBE4; color: var(--c-ink); }
.chat .late { background: #FDECEC; color: var(--c-red); }
.chat .away { background: #E8F6EE; color: var(--c-green); border-radius: 8px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; }
.chat .empty { padding: 30px 16px; text-align: center; color: var(--c-mute); }
.chat .hint { font-size: 12px; color: var(--c-mute); text-align: center; padding: 4px 10px; margin: 0; }

/* ---------- đầu cuộc trò chuyện, hồ sơ nhanh, tin ghim ---------- */
.chat .cv-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--c-line); flex-wrap: wrap; background: var(--c-card); }
.chat .cv-h .tx { min-width: 140px; } .chat .cv-h .tx b { display: block; font-size: 15px; } .chat .cv-h .tx span { font-size: 12px; color: var(--c-mute); }
.chat .act, .chat .mini { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--c-line); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; background: var(--c-card); transition: background .15s, border-color .15s; }
.chat .act:hover, .chat .mini:hover { background: var(--c-soft); border-color: var(--c-black); }
.chat .act.dark { background: var(--c-black); color: #fff; border-color: var(--c-black); }
.chat .act.ok, .chat .mini.ok { background: var(--c-green); color: #fff; border-color: var(--c-green); }
.chat .act.no { color: var(--c-red); }
.chat .act svg { width: 16px; height: 16px; }
.chat .mini { border-radius: 9px; padding: 5px 10px; font-weight: 700; }
.chat .prof { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--c-line); background: var(--c-card); }
.chat .pc { font-size: 12px; border-radius: 8px; padding: 3px 8px; background: var(--c-soft); border: 1px solid var(--c-line); white-space: nowrap; }
.chat .pc.red { background: #FDECEC; border-color: #F3C4C4; color: var(--c-red); font-weight: 700; }
.chat .pc.tag { background: #EEF3FF; border-color: #CFDCFF; color: #1D3A7A; font-weight: 600; }
.chat .pmore { display: none; font-size: 12px; border-radius: 8px; padding: 3px 8px; border: 1px dashed var(--c-line); color: var(--c-mute); background: none; }
.chat .pinbar { display: flex; gap: 8px; align-items: center; background: var(--accent-soft, #FFF8DC); border-bottom: 1px solid var(--c-line); padding: 7px 12px; font-size: 12.5px; }
.chat .pinbar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- bong bóng tin nhắn ---------- */
.chat .cv-b, .chat .ph-b { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--c-soft); overscroll-behavior: contain; }
.chat .msgs { display: flex; flex-direction: column; gap: 6px; }
.chat .b { max-width: 80%; padding: 9px 12px; border-radius: 16px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-line; position: relative; font-size: 14px; animation: ch-in .18s ease-out both; }
.chat .cv-b .b { max-width: 70%; }
.chat .b .t { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; }
.chat .b img { display: block; border-radius: 10px; max-width: min(200px, 100%); max-height: 240px; object-fit: cover; margin-bottom: 4px; cursor: zoom-in; background: #DDD; }
.chat .b.me { align-self: flex-end; background: var(--c-acc); color: var(--c-acc-ink); border-bottom-right-radius: 5px; }
.chat .b.them { align-self: flex-start; background: var(--c-card); border: 1px solid var(--c-line); border-bottom-left-radius: 5px; }
.chat .b.sys { align-self: center; background: #ECEBE4; color: var(--c-mute); font-size: 12px; border-radius: 10px; padding: 6px 10px; max-width: 92%; text-align: center; }
.chat .b.bot { background: #EEF3FF; border: 1px solid #CFDCFF; color: #1D3A7A; }
.chat .b.hid { opacity: .55; text-decoration: line-through; }
.chat .b.blk { background: #FDECEC; border: 1px dashed var(--c-red); color: var(--c-red); }
.chat .b.wait { border: 1.5px dashed #D9A400; background: #FFFBEA; color: var(--c-ink); }
.chat .b.hasr { margin-bottom: 10px; }
.chat .who-l { font-size: 11px; color: var(--c-mute); margin: 4px 2px -2px; } .chat .who-l.r { align-self: flex-end; }
.chat .seen { align-self: flex-end; font-size: 11px; color: var(--c-mute); margin-top: -2px; }
.chat .note { align-self: stretch; background: #FFFBEA; border: 1px dashed #E0C25A; color: #5F4B00; border-radius: 12px; padding: 7px 10px; font-size: 12.5px; white-space: pre-line; }
.chat .tag { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-bottom: 3px; }
.chat .tag.red { background: #FDECEC; color: var(--c-red); } .chat .tag.grey { background: #ECEBE4; color: var(--c-mute); }
.chat .tag.amber { background: #FFF1C2; color: #7A5B00; } .chat .tag.green { background: #E3F4EA; color: var(--c-green); }
.chat .ap, .chat .bk .btns, .chat .rrow { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chat .mx { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--c-card); border: 1px solid var(--c-line); display: none; place-items: center; font-size: 12px; padding: 0; box-shadow: var(--sh-1, none); }
.chat .b:hover .mx, .chat .b:focus-within .mx { display: grid; }
.chat .react { position: absolute; bottom: -11px; right: 8px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 999px; font-size: 12px; padding: 0 5px; line-height: 18px; }
.chat .them .react { right: auto; left: 8px; }
.chat .rbtn, .chat .flagb { font-size: 11px; opacity: .55; margin-left: 6px; padding: 0 2px; border: 0; background: none; } .chat .rbtn:hover, .chat .flagb:hover { opacity: 1; }
.chat .rrow button { font-size: 18px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 2px 6px; }
.chat .file { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.6); border: 1px solid rgba(0,0,0,.08); border-radius: 10px; padding: 8px 10px; margin-bottom: 4px; min-width: 180px; text-decoration: none; color: inherit; }
.chat .file .ic { width: 34px; height: 40px; border-radius: 6px; background: var(--c-red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; flex: none; }
.chat .file b { display: block; font-size: 13px; } .chat .file small { font-size: 11px; opacity: .7; }
.chat .bk { display: flex; flex-direction: column; gap: 3px; min-width: 190px; } .chat .bk b { font-size: 13px; } .chat .bk .d { font-size: 15px; font-weight: 700; } .chat .bk .st { font-size: 12px; font-weight: 600; }
.chat .rate { align-self: center; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 14px; padding: 8px 12px; text-align: center; font-size: 12.5px; }
.chat .rate .stars { display: flex; flex-direction: row-reverse; gap: 2px; justify-content: center; margin-top: 4px; }
.chat .rate .stars button { font-size: 24px; color: #D6D3C4; line-height: 1; border: 0; background: none; padding: 2px; }
.chat .rate .stars button:hover, .chat .rate .stars button:hover ~ button { color: var(--c-acc); }
.chat .typing { align-self: flex-start; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 16px; padding: 8px 12px; font-size: 12px; color: var(--c-mute); display: flex; gap: 6px; align-items: center; }
.chat .dots { display: inline-flex; gap: 3px; } .chat .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c-mute); display: block; animation: ch-bl 1s infinite; }
.chat .dots i:nth-child(2) { animation-delay: .15s; } .chat .dots i:nth-child(3) { animation-delay: .3s; }
.chat mark { background: #FFE680; color: inherit; border-radius: 3px; padding: 0 1px; }
@keyframes ch-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes ch-bl { 50% { opacity: .25; } }

/* ---------- ô soạn tin ---------- */
.chat .compw { position: relative; }
.chat .comp { display: flex; gap: 6px; align-items: center; padding: 8px; background: var(--c-card); border-top: 1px solid var(--c-line); }
.chat .comp input[type=text], .chat .comp textarea { flex: 1; min-width: 0; border: 1px solid var(--c-line); border-radius: 999px; padding: 10px 14px; font: inherit; font-size: 16px; background: var(--c-soft); resize: none; }
.chat .comp input[type=text]:focus, .chat .comp textarea:focus { outline: none; border-color: var(--c-black); background: #fff; }
.chat .ib { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 0; background: none; transition: transform .12s, background .15s; }
.chat .ib:active:not(:disabled) { transform: scale(.92); }
.chat .ib.cam, .chat .ib.tool { background: var(--c-soft); border: 1px solid var(--c-line); font-size: 17px; }
.chat .ib.tool.on { background: var(--c-black); color: var(--c-acc); border-color: var(--c-black); }
.chat .ib.send { background: var(--c-acc); color: var(--c-acc-ink); }
.chat .ib svg { width: 20px; height: 20px; } .chat .ib:disabled { opacity: .4; cursor: not-allowed; }
.chat .lock, .chat .ro { padding: 10px 14px; font-size: 12.5px; text-align: center; }
.chat .lock { background: #FFF4D6; border: 1px solid #F0D27A; color: #7A5B00; border-radius: 12px; margin: 8px; }
.chat .ro { border-top: 1px solid var(--c-line); color: var(--c-mute); background: var(--c-card); }
.chat .topics { padding: 8px; background: var(--c-card); border-top: 1px solid var(--c-line); } .chat .topics p { margin: 0 0 6px; font-size: 12px; color: var(--c-mute); } .chat .topics div { display: flex; flex-wrap: wrap; gap: 6px; }
.chat .pop { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); background: var(--c-card); border: 1px solid var(--c-line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 10px; max-height: 300px; overflow: auto; z-index: 5; animation: ch-in .15s ease-out both; }
.chat .pop h4 { margin: 0 0 8px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.chat .pop .q { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; font-size: 13px; border: 0; background: none; } .chat .pop .q:hover { background: var(--c-soft); }
.chat .pop .q small { display: block; color: var(--c-mute); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .pop .fr { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; } .chat .pop .warn { color: var(--c-red); font-size: 12px; margin: 0 0 8px; }

/* ---------- bảng nổi: nhật ký, báo cáo, cài đặt thông báo ---------- */
.chat .webwrap, .chat .ph { position: relative; }
.chat .panel { position: absolute; inset: 0; background: rgba(18,18,18,.35); display: grid; place-items: center; padding: 16px; border: 0; border-radius: 0; margin: 0; box-shadow: none; z-index: 8; }
.chat .panel > div { background: var(--c-card); border-radius: 16px; padding: 16px; width: min(440px, 100%); max-height: 80%; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.chat .panel h3 { margin: 0 0 10px; font-size: 16px; }
.chat .panel textarea { width: 100%; min-height: 90px; border: 1px solid var(--c-line); border-radius: 10px; padding: 8px 10px; font: inherit; resize: vertical; }
.chat .log, .chat .faq, .chat .step, .chat .sw, .chat .hrow { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--c-line); padding: 8px 0; font-size: 12.5px; }
.chat .log time { color: var(--c-mute); font-variant-numeric: tabular-nums; flex: none; }
.chat .sw { justify-content: space-between; font-size: 13px; } .chat .sw small { display: block; color: var(--c-mute); font-size: 11.5px; }
.chat .cast { border-top: 1px solid var(--c-line); padding: 9px 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; } .chat .cast .g { font-weight: 700; } .chat .cast p { margin: 0; white-space: pre-line; } .chat .cast .m { font-size: 11.5px; color: var(--c-mute); }
.chat .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-bottom: 10px; }
.chat .kpis div, .chat .tile { background: var(--c-soft); border: 1px solid var(--c-line); border-radius: 12px; padding: 8px 10px; }
.chat .kpis b, .chat .tile b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; } .chat .kpis span, .chat .tile span { font-size: 11.5px; color: var(--c-mute); } .chat .tile.red b { color: var(--c-red); }
.chat .bars { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.chat .bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 34px; gap: 8px; align-items: center; font-size: 12.5px; padding: 0; margin: 0; }
.chat .bar i { display: block; height: 10px; border-radius: 5px; background: var(--c-acc); } .chat .bar b { text-align: right; font-variant-numeric: tabular-nums; }
.chat .sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c-card); border-radius: 20px 20px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(0,0,0,.18); z-index: 6; animation: ch-in .2s ease-out both; }
.chat .sheet h4 { margin: 0 0 6px; font-size: 15px; display: flex; justify-content: space-between; }
.chat .shade { position: absolute; inset: 0; background: rgba(0,0,0,.25); z-index: 5; }

/* ---------- điện thoại (nhân viên xem trên máy nhỏ, và trang hội viên) ---------- */
@media (max-width: 700px) {
  .chat .web { height: calc(100dvh - 190px); min-height: 420px; border-radius: 14px; }
  .chat .web-b { grid-template-columns: minmax(0, 1fr); }
  .chat .web-b.open .inbox { display: none; } .chat .web-b:not(.open) .conv { display: none; }
  .chat .back2 { display: inline-flex; }
  .chat .web.open .web-h .tools { display: none; }
  .chat .prof:not(.open) .pc:nth-child(n+3) { display: none; } .chat .pmore { display: inline-block; }
  .chat .cv-b .b { max-width: 84%; }
  .chat .web-h h2 { font-size: 15px; }
  .chat .comp { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}
@media (pointer: coarse) { .chat .act, .chat .mini, .chat .chip { min-height: 36px; } .chat .mx { display: grid; } }
@media (prefers-reduced-motion: reduce) { .chat .b, .chat .pop, .chat .sheet, .chat .dots i { animation: none; } }

/* ---- sửa sau khi thử với trang thật (11/10) ---- */
/* các dòng trong khung cuộn là phần tử flex: không cho co lại (nếu không bong bóng bị ép dẹt, chữ đè lên nhau) */
.chat :is(.cv-b, .ph-b, .msgs) > * { flex: none; }
.chat .b > .tag { display: table; margin-bottom: 4px; }
.chat .b > .tag + br { display: none; }
.chat .b .ap { margin-top: 8px; }
.chat .b.wait .t, .chat .b.blk .t { opacity: .75; }
.chat .cv-b { scroll-behavior: smooth; }
.chat .it .tx b { row-gap: 3px; }
.chat .web-h h2 svg, .chat .web-h h2 img { width: 20px; height: 20px; }
/* lớp .me / .file của trang (nút tài khoản, danh sách tệp) lọt vào bong bóng → đặt lại */
.chat .b { display: block; margin: 0; cursor: auto; gap: 0; overflow: visible; text-overflow: clip; white-space: pre-line; }
.chat .b.me { max-width: 80%; padding: 9px 12px; border-radius: 16px 16px 5px 16px; margin-left: 0; border: 0; }
.chat .cv-b .b.me { max-width: 70%; }
.chat .b.me:hover { background: var(--c-acc); }
.chat .b.me.wait, .chat .b.me.wait:hover { background: #FFFBEA; border: 1.5px dashed #D9A400; color: var(--c-ink); }
.chat .b.me.blk, .chat .b.me.blk:hover { background: #FDECEC; border: 1px dashed var(--c-red); color: var(--c-red); }
.chat .b.me.bot, .chat .b.me.bot:hover { background: #EEF3FF; border: 1px solid #CFDCFF; color: #1D3A7A; }
.chat .b .t { white-space: nowrap; }
.chat .b .file { padding: 8px 10px; border-top: 1px solid rgba(0,0,0,.08); }
.chat .note { color: #5F4B00; padding: 7px 10px; border-radius: 12px; margin: 0; }
.chat .hint { margin: 0; }
@media (max-width: 700px) { .chat .cv-b .b.me { max-width: 84%; } }
/* trang nhân viên thu nhỏ 70% (uiscale.js): 100vh phải chia cho hệ số thu nhỏ thì khung mới cao gần hết màn hình */
main#app .chat .web { height: calc(100vh / var(--ifs-zoom, 1) - 150px); max-height: none; min-height: 460px; }
@media (max-width: 700px) { main#app .chat .web { height: calc(100dvh / var(--ifs-zoom, 1) - 230px); min-height: 420px; } }
/* giờ gửi luôn nằm dòng riêng dưới nội dung, canh phải (trang hội viên có lớp .t riêng làm giờ nhảy lên cạnh chữ) */
.chat .b .t { display: block; float: none; position: static; width: auto; margin: 3px 0 0; text-align: right; white-space: nowrap; }
.chat .b.them .t { text-align: left; }
/* phần riêng của màn hình hội viên (hoi-vien-chat.js) */
.chat .list2 { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.chat .row .when { flex: none; font-size: 12px; color: var(--c-mute); }
.chat .filechip { display: flex; align-items: center; gap: 8px; margin: 6px 8px 0; padding: 6px 10px; border-radius: 10px; background: var(--c-soft); border: 1px solid var(--c-line); font-size: 13px; }
.chat .filechip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* bảng trượt dưới (báo cáo tin, cài đặt thông báo) trên màn hình hội viên: lớp nền mờ + các lựa chọn */
.chat .sheetbg { position: absolute; inset: 0; z-index: 5; background: rgba(10,10,10,.4); animation: ch-fade .18s ease-out both; }
.chat .sheet h4 { align-items: center; }
.chat .sheet .q { display: block; width: 100%; text-align: left; padding: 12px 12px; border: 0; border-top: 1px solid var(--c-line); background: none; font-size: 15px; border-radius: 0; }
.chat .sheet .q:active { background: var(--c-soft); }
.chat .sheet .hint { text-align: left; padding: 0 0 8px; }
.chat .b .t :is(.rbtn, .flagb) { font-size: 12px; opacity: .7; padding: 4px 6px; margin-left: 4px; vertical-align: baseline; }
.chat .rate .stars button { min-width: 40px; min-height: 40px; }
@keyframes ch-fade { from { opacity: 0; } }
/* bảng Cài đặt tin nhắn trên điện thoại (lỗi Tri báo 11/10): chữ mô tả bị ép thành cột hẹp, đè lên nhau → nhãn một hàng, ô chọn xuống hàng dưới */
.chat .sw { flex-wrap: wrap; align-items: center; gap: 6px 12px; line-height: 1.4; }
.chat .sw > span { flex: 1 1 220px; min-width: 0; font-weight: 600; }
.chat .sw > span small { font-weight: 400; margin-top: 2px; line-height: 1.4; }
.chat .sw > :is(select, input:not([type=checkbox]), b) { flex: 0 1 auto; max-width: 100%; min-width: 0; }
.chat .sw > select, .chat .sw > input:not([type=checkbox]) { border: 1px solid var(--c-line); border-radius: 10px; padding: 7px 10px; background: var(--c-card); font: inherit; }
.chat .sw > input[type=checkbox] { flex: none; width: 20px; height: 20px; accent-color: var(--c-black); }
.chat .faq { align-items: flex-start; line-height: 1.45; } .chat .faq > :not(input) { flex: 1; min-width: 0; } .chat .faq input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--c-black); }
.chat .panel h3 { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
@media (max-width: 700px) { .chat .panel { padding: 10px; } .chat .panel > div { max-height: 88%; padding: 14px; } .chat .sw > select, .chat .sw > input:not([type=checkbox]) { flex: 1 1 100%; } }
/* lớp .sw của trang (ô màu chú thích 10×10px ở Check-in) lọt vào các hàng cài đặt → đặt lại kích thước */
.chat .sw { display: flex; width: auto; height: auto; border-radius: 0; vertical-align: baseline; margin-left: 0; background: none; }
