/* ===========================================================================
 * tax-office.css — "Kế toán thuế" (Nội bộ · làm đủ theo 4 ảnh chốt · mã 05). Nạp SAU styles.css + ops.css.
 * ⛔ Chỉ token :root canonical — 0 mã màu, 0 cỡ chữ px. Tiền tố .tx-. Khung/khối/bảng/chi tiết dùng bộ B146 (.ops-*) của khung.
 * ⛔ Bố cục chỉ đổi ở ≤900px. Khối @media đặt CUỐI tệp.
 * =========================================================================== */
.tx { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; flex: 1 1 auto; min-height: 0; }
.tx-note { margin: 0; color: var(--text-muted); font-size: var(--font-help); }
.tx-msg { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--bg-emphasis-soft); color: var(--text-secondary); font-size: var(--font-help); }
.tx-msg[hidden] { display: none; }
.tx-nodata { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--bg-surface-soft); border: 1px solid var(--border-soft); color: var(--text-secondary); font-size: var(--font-body); }
.tx-link { border: 0; background: transparent; padding: 0; font: inherit; color: var(--text-link); cursor: pointer; text-align: left; }
.tx-link:hover { text-decoration: underline; }
.tx-link.is-off { color: var(--text-muted); cursor: not-allowed; text-decoration: none; }
.tx-empty { margin: 0; padding: var(--space-3); color: var(--text-muted); font-size: var(--font-body); }
.tx-sub { font-weight: 400; color: var(--text-muted); font-size: var(--font-help); }
.tx-none { color: var(--text-muted); }

/* vai (màu theo vai, chữ đậm) */
.tx-r-NB { color: var(--status-success); }
.tx-r-TH { color: var(--status-ai); }
.tx-r-CSH { color: var(--status-info); }
.tx-v-bad { color: var(--status-danger); }
.tx-v-warn { color: var(--status-warning); }
.tx-v-info { color: var(--status-info); }
.tx-v-none { color: var(--text-muted); }

/* trang đầy chiều ngang (Tổng quan · Lưu trữ) */
.tx-page { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; overflow: auto; flex: 1 1 auto; min-height: 0; padding-bottom: var(--space-3); }
.tx-page > * { flex-shrink: 0; }
.tx-tiles { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tx-tile { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2) var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--bg-surface-soft); min-width: 0; }
.tx-blk { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.tx-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-3); align-items: start; }
.tx-col { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }

/* 5 bước */
.tx-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.tx-step { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--bg-surface-soft); min-width: 0; }
.tx-step p { margin: 0; font-size: var(--font-help); color: var(--text-secondary); }
.tx-step.is-done { background: var(--status-success-soft); border-color: var(--status-success); }
.tx-step.is-now { background: var(--status-warning-soft); border-color: var(--status-warning); }

/* việc chờ · đồ của công ty */
.tx-tasks, .tx-assets, .tx-plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.tx-task { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--bg-emphasis-soft); font: inherit; font-size: var(--font-body); color: var(--text-primary); text-align: left; cursor: pointer; }
.tx-task-t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tx-task-go { color: var(--text-link); white-space: nowrap; }
.tx-assets li { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) 0; border-bottom: 1px solid var(--border-soft); font-size: var(--font-body); }
.tx-assets li b { text-align: right; }
.tx-aibox { padding: var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--status-ai-soft); color: var(--text-primary); font-size: var(--font-body); overflow-wrap: anywhere; }
.tx-aibox-main { background: var(--bg-surface); border-color: var(--border-focus); }
.tx-warnrow td { background: var(--bg-emphasis-soft); }

/* trái: lọc + danh sách kỳ / việc */
.tx-filt { display: flex; flex-wrap: nowrap; gap: var(--space-2); align-items: center; min-width: 0; }
.tx-chips { margin: 0; }
.tx-filt .tx-sel { flex: 1 1 0; min-width: 4.5rem; }
.tx-bar .tx-sel { flex: 0 0 auto; }
.tx-filt .tx-chips { flex: 0 0 auto; flex-wrap: nowrap; }
.tx-prow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%; padding: var(--space-2) var(--space-3); border: 0; border-left: 4px solid transparent; border-radius: var(--radius-sm); background: transparent; font: inherit; font-size: var(--font-body); color: var(--text-primary); text-align: left; cursor: pointer; }
.tx-prow:hover { background: var(--bg-surface-soft); }
.tx-prow.is-sel { background: var(--status-info-soft); border-left-color: var(--status-info); }
.tx-tt { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.tx-tt b { overflow-wrap: anywhere; }
.tx-listnote { padding: var(--space-3); }
.tx-newq { padding: var(--space-3); }

/* phải: thân chi tiết */
.tx-pbody { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }

/* lưu trữ: thanh công cụ + chú giải */
.tx-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.tx-bar .tx-find { flex: 3 1 24rem; min-width: 12rem; max-width: none; width: auto; }
.tx-bar-acts { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.tx-legend { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: 0; font-size: var(--font-help); color: var(--text-secondary); }

/* trao đổi: bong bóng tin */
.tx-msgs { display: flex; flex-direction: column; gap: var(--space-2); }
.tx-bub { max-width: 90%; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--bg-surface); font-size: var(--font-body); }
.tx-bub p { margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.tx-bub-h { font-size: var(--font-help); color: var(--text-muted); }
.tx-bub-AI { background: var(--status-ai-soft); }
.tx-bub-NB { align-self: flex-end; background: var(--status-info-soft); }
.tx-reply { width: 100%; resize: none; }

.tx-prow .crm-badge { flex: 0 0 auto; white-space: nowrap; }

/* ---------- Responsive (luôn đặt cuối tệp) ---------- */
@media (max-width: 900px) { .tx-matrix { min-width: 44rem; } .tx-steps, .tx-two { grid-template-columns: minmax(0, 1fr); } .tx-bub { max-width: 100%; } }
@media (max-width: 640px) { .tx-bar-acts { display: none; } .tx-task { min-height: 2.5rem; } }
