/* S04 D32 G3 — IT-019A A1 / A1d / A1e / A1t / A1m (Khách đang chờ), A2 (báo cáo), A3 (Tổng quan).
   Nguồn: IT-019A 01-artboards/r19a.css (.ws .wtm .wq .dlg) on the IT-019 tokens; app tokens --ux-* only.
   Không đụng vùng chat FROZEN (danh sách bên trái, menu, hộp thoại). */

/* state chips (artboard .ws): a Chưa phản hồi · b Đã nhận, chưa xong · u Chưa rõ phòng · c Đồng nghiệp hỏi */
.s19w-ws { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 700; white-space: nowrap; flex: none; border: 0; font-family: inherit; }
.s19w-ws.a { background: var(--ux-sel); color: var(--ux-link); }
.s19w-ws.b { background: var(--ux-ai-soft); color: var(--ux-ai); }
.s19w-ws.u { background: var(--ux-surface); color: var(--ux-text); border: 1px dashed var(--ux-border-strong); }
.s19w-ws.c { background: var(--ux-hover); color: var(--ux-text-2); border: 1px solid var(--ux-border-strong); }
button.s19w-ws { cursor: pointer; }
button.s19w-ws:hover { text-decoration: underline; text-underline-offset: 2px; }
button.s19w-ws:focus-visible { outline: 2px solid var(--ux-primary); outline-offset: 2px; }

/* wait time (artboard .wtm): plain < 2 giờ · ◔ yellow ≥ 2 giờ · ▲ red ≥ 6 giờ (D25) */
.s19w-wtm { font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--ux-text-2); }
.s19w-wtm.w { color: var(--ux-warn); }
.s19w-wtm.d { color: var(--ux-danger); }

/* A1: the list column is wider while it shows waits */
.s3-land .lc.s19w { width: 600px; }
@media (max-width: 1365px) { .s3-land .lc.s19w { width: 480px; } }
.s19w-qfs { display: flex; flex-wrap: wrap; gap: 8px; }
.s19w-qf { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--ux-border-strong); background: var(--ux-surface); color: var(--ux-text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.s19w-qf:hover { background: var(--ux-hover); }
.s19w-qf.on { background: var(--ux-primary); border-color: var(--ux-primary); color: var(--ux-on-primary); }
.s19w-qf:focus-visible { outline: 2px solid var(--ux-primary); outline-offset: 2px; }

/* one wait (artboard .wq): name · wait · ··· / who + state / department + person / Khách cần gì / question / note */
.s19w-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--ux-border); background: var(--ux-surface); cursor: pointer; }
.s19w-row:hover { background: var(--ux-surface-2); }
.s19w-r1 { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ux-text-2); }
.s19w-nm { font-size: 13.5px; font-weight: 700; color: var(--ux-text); text-decoration: none; min-width: 0; }
.s19w-nm:hover { text-decoration: underline; }
.s19w-nm:focus-visible { outline: 2px solid var(--ux-primary); outline-offset: 2px; border-radius: 4px; }
.s19w-kb { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ux-text-2); cursor: pointer; flex: none; }
.s19w-kb:hover, .s19w-kb[aria-expanded="true"] { background: var(--ux-sel); color: var(--ux-text); }
.s19w-kb:focus-visible { outline: 2px solid var(--ux-primary); outline-offset: 2px; }
.s19w-r2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ux-text); }
.s19w-r2 b, .s19w-tx { font-weight: 700; color: var(--ux-text); }
.s19w-nd { font-size: 13px; line-height: 18px; color: var(--ux-text); }
.s19w-nd .l { color: var(--ux-muted); font-size: 11.5px; margin-right: 6px; }
.s19w-org { font-size: 12.5px; line-height: 18px; color: var(--ux-text-2); border-left: 3px solid var(--ux-border-strong); padding: 1px 8px; min-width: 0; }
.s19w-nt { font-size: 11.5px; line-height: 16px; color: var(--ux-muted); }

/* D33: a wait of the viewer's department in a group they do not read ("trả lời qua sale"): no link to open it */
.s19w-row.rl { cursor: default; }
.s19w-row.rl .s19w-nm:hover { text-decoration: none; }
.s19w-og { padding: 6px 2px 0; font-weight: 600; }

/* A1t: "Đã ẩn … Hoàn tác" stays until pressed or the list is left */
.s19w { position: relative; }
.s19w-snack { position: absolute; left: 12px; right: 12px; bottom: 56px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; background: var(--ux-text); color: var(--ux-surface); font-size: 13px; font-weight: 600; z-index: 5; }
.s19w-snack span { flex: 1; min-width: 0; }
.s19w-snack button { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.s19w-snack button:focus-visible { outline: 2px solid var(--ux-surface); outline-offset: 2px; }

/* A1d: Chuyển cho phòng khác (artboard .dlg) */
.s3-pop.s19w-dlg { width: 440px; max-width: calc(100vw - 24px); padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--ux-surface); border: 1px solid var(--ux-border-strong); border-radius: 14px; box-shadow: var(--ux-shadow); color: var(--ux-text); }
.s19w-dlg h3 { font-size: 16px; font-weight: 700; margin: 0; }
.s19w-opts { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
/* the id beats base.css's long input:not() chain */
.s19w-dlg #s19w-note { height: 36px; border: 1px solid var(--ux-border-strong); border-radius: 8px; background: var(--ux-input); color: var(--ux-text); padding: 0 10px; font: inherit; font-size: 13px; width: 100%; }
.s19w-dlg #s19w-note:focus { outline: 0; border-color: var(--ux-primary); box-shadow: 0 0 0 2px var(--ux-sel); }
.s19w-dlg .s19p-nt { align-items: flex-start; }

/* Tin đã ẩn */
.s3-pop.s19w-hid { width: 380px; max-width: calc(100vw - 24px); max-height: 420px; overflow: auto; }
.s19w-hr { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--ux-border); }

/* A3: the two states under the KPI number */
.s19w-kc { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }

/* A2: report card */
.s19r-wsum { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--ux-border); }
.s19r-tw { overflow-x: auto; }
.s19r-dt.s19r-wt th { text-transform: none; letter-spacing: 0; font-size: 12px; text-align: left; }
.s19r-dt.l td.s19r-need { width: 220px; color: var(--ux-text); }
.s19r-ml { display: none; }

/* 390 (artboard A1m, A2m) */
@media (max-width: 760px) {
  .s3-land .lc.s19w { width: 100%; }
  .s19w-row { padding: 12px; }
  .s19w-snack { bottom: 64px; }
  /* A2m: one card per message — giờ · hội thoại · chờ / [phòng / người] / người hỏi / Khách cần gì / trạng thái */
  .s19r-dt.s19r-wt thead { display: none; }
  .s19r-dt.s19r-wt tr { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 3px; }
  .s19r-dt.s19r-wt td.n { display: contents; }
  .s19r-dt.s19r-wt td.n b { grid-column: 2; grid-row: 1; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .s19r-dt.s19r-wt td.n > span { grid-column: 1 / -1; grid-row: 2; }
  .s19r-dt.s19r-wt td.w { grid-column: 3; grid-row: 1; }
  .s19r-dt.s19r-wt td.x { padding-top: 0; }
  .s19r-dt.s19r-wt td.s19r-need { width: auto; }
  .s19r-dt.s19r-wt td.st { grid-column: 1 / -1; grid-row: auto; text-align: left; padding-top: 2px; }
  .s19r-ml { display: inline; color: var(--ux-text-2); }
}
