/* Quản trị → Tin chưa nhận (báo lỗi, bước 10b — thiết kế v5.4 F.4; js/view-tin-chua-nhan.js, js/quan-tri-tin-chua-nhan.js): the owner's
   list of the saves the server refused, a case in its dialog, the export line. Built on the classes and colours of css/quan-tri.css
   (.qt-*, not changed here) and the error report of css/messages.css (.bl-*, the red letters .hl-text mark.hl-err); every class of its
   own starts with .tcn-. The Quản trị pages stay Sáng (js/giao-dien.js keepLight); the tokens keep their Sáng values here.
   Breakpoints as Quản trị: < 768px the list is a card per case, 40px taps, the dialog full width. */

/* ------------------------------------------------------------------ the page */
.tcn-xuat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--toi-vien-c7d7f5, #c7d7f5); border-radius: 8px; background: var(--toi-nen-eef4ff, #eef4ff); color: var(--toi-chu-1f3b73, #1f3b73); font-size: 13px; }
.tcn-xuat[hidden], .tcn-canh[hidden] { display: none; }
.tcn-canh { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--qt-warn-line); border-radius: 8px; background: var(--qt-warn-bg); color: var(--qt-warn-ink); font-size: 13px; }
.tcn-note-head ul { margin: 0; padding-left: 18px; }
.tcn-table tbody tr.tcn-row { cursor: pointer; }
.tcn-table tbody tr.tcn-row:focus-visible { outline: 2px solid var(--focus-line); outline-offset: -2px; }
.tcn-table tr.is-seen > td { color: var(--xa-grey); }
.tcn-table .c-time { width: 128px; white-space: nowrap; }
.tcn-table .c-acc { min-width: 120px; max-width: 200px; overflow-wrap: anywhere; }
.tcn-table .c-ctx { min-width: 150px; }
.tcn-table .c-st { width: 150px; }
.tcn-table .c-msg { min-width: 260px; }
.tcn-dau {
  display: block; padding: 2px 6px; border-radius: 4px; background: var(--xa-sunk); color: var(--tts-ink, #222); font: 12.5px/1.45 var(--mono, ui-monospace, Consolas, monospace);
  white-space: normal; overflow-wrap: anywhere;
}
.tcn-loi { display: block; margin-top: 4px; color: var(--danger-ink); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.tcn-loi b { font-weight: 600; }

/* ------------------------------------------------------------------ a case (dialog) */
.tcn-modal .modal-body { display: grid; gap: 12px; }
.tcn-ca { display: grid; gap: 12px; min-width: 0; }
.tcn-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; margin: 0; padding: 10px 12px; border: 1px solid var(--xa-line-2); border-radius: 8px; background: var(--xa-sunk); font-size: 13px; }
.tcn-meta div { min-width: 0; }
.tcn-meta dt { color: var(--xa-grey); font-size: 11.5px; font-weight: 600; }
.tcn-meta dd { margin: 0; overflow-wrap: anywhere; }
.tcn-ban, .tcn-sau { display: grid; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--xa-line); border-radius: 10px; background: var(--table-bg, #fff); }
.tcn-sau { border-color: var(--qt-ok-line); background: var(--qt-ok-bg); }
.tcn-ban-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13.5px; }
.tcn-ban-head small { color: var(--xa-grey); }
.tcn-ban-meta { flex: 1 1 auto; min-width: 0; color: var(--xa-grey); font-size: 12.5px; }
.tcn-copy { display: inline-flex; align-items: center; gap: 5px; }
/* the text as the server received it, its red spots drawn as in the entry box (.hl-text mark.hl-err) */
.hl-text.tcn-text { max-height: 46vh; overflow: auto; padding: 8px 10px; border: 1px solid var(--xa-field-line); border-radius: 6px; background: var(--xa-field, #fff); font-size: 14px; line-height: 1.55; letter-spacing: .04em; }
.tcn-text-sau .tcn-doi { background: var(--qt-hit-bg); }
.tcn-more > summary { cursor: pointer; color: var(--a-ink); font-size: 12.5px; font-weight: 600; }
.tcn-pre { max-height: 32vh; margin: 6px 0 0; padding: 6px 8px; overflow: auto; border-radius: 6px; background: var(--xa-sunk); font: 12px/1.45 var(--mono, ui-monospace, Consolas, monospace); white-space: pre-wrap; overflow-wrap: anywhere; }
.tcn-warn { padding: 6px 10px; border: 1px solid var(--qt-warn-line); border-radius: 6px; background: var(--qt-warn-bg); color: var(--qt-warn-ink); font-size: 12.5px; }
.tcn-bl:empty { display: none; }
.tcn-note { display: grid; gap: 6px; justify-items: start; }
.tcn-note label { margin: 0; }
.tcn-note textarea { width: 100%; min-height: 56px; }

/* ------------------------------------------------------------------ phones: a card per case */
@media (max-width: 767.98px) {
  .tcn-table, .tcn-table tbody { display: block; width: 100%; border: 0; background: none; }
  .tcn-table thead { display: none; }
  .tcn-table tr.tcn-row {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 8px; padding: 10px 12px;
    border: .8px solid var(--xa-line-2); border-radius: 10px; background: var(--table-bg); box-shadow: var(--xa-shadow-flat);
  }
  .tcn-table td { display: block; min-width: 0 !important; max-width: none !important; width: auto !important; padding: 0 !important; border: 0 !important; background: none !important; }
  .tcn-table tbody tr:hover > td { background: none; }
  .tcn-table td.c-time { order: 1; font-size: 12px; color: var(--xa-grey); }
  .tcn-table td.c-time .qt-sub { display: inline; margin-left: 4px; }
  .tcn-table td.c-st { order: 2; margin-left: auto; text-align: right; }
  .tcn-table td.c-st .qt-sub { display: none; }
  .tcn-table td.c-acc { order: 3; flex: 1 1 100%; font-size: 14px; }
  .tcn-table td.c-acc .qt-sub { display: inline; margin-left: 6px; font-size: 13px; }
  .tcn-table td.c-acc .qt-sub::before { content: "· "; }
  .tcn-table td.c-ctx { order: 4; flex: 1 1 100%; font-size: 12.5px; }
  .tcn-table td.c-ctx .qt-sub { display: inline; margin-left: 6px; }
  .tcn-table td.c-ctx .qt-sub::before { content: "· "; }
  .tcn-table td.c-msg { order: 5; flex: 1 1 100%; margin-top: 4px; }
  .tcn-table .tcn-dau { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .tcn-xuat .btn { min-height: 40px; }
  .tcn-meta { grid-template-columns: 1fr 1fr; }
  .tcn-copy { min-height: 40px; }
  .tcn-modal .modal-footer .btn { flex: 1 1 auto; min-height: 44px; }
}
