/* ==========================================
   Transactions (UI-03), approved Graphite. Loaded after graphite.css.
   Page pieces only, every rule under .tx; colours come from the --g-* tokens so Dark and Light follow the
   released palette on <html data-theme>. Shared sd-* pieces that graphite.css colours for Dark only get a
   Light rule here, scoped to this page so machine detail (UI-02) is unchanged.
   ========================================== */

:root, [data-theme="dark"] { --tx-info: #a9c7d8; --tx-skin: #18191c; --tx-fig-line: #383639; }
[data-theme="light"] { --tx-info: #2c5f7c; --tx-skin: #ffffff; --tx-fig-line: var(--g-line); }

.tx { max-width: 1480px; margin: 0 auto; font-size: 14px; line-height: 1.5; color: var(--g-text); }
.tx .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tx :is(.tx-fig-value, .tx-st strong, .tx-st-amt, td.n, .tx-day-cell strong, .tx-an-metrics strong, .sd-facts dd, .sd-pager) { font-variant-numeric: tabular-nums; }
.tx-missing { color: var(--g-muted); }
.tx-warn-text { color: var(--g-warn); }


/* ---- Head ---- */
.tx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.tx-head-main { min-width: 0; }
.tx-head h1 { margin: 6px 0 0; font-size: 33px; font-weight: 550; line-height: 1.2; letter-spacing: -1.2px; outline: none; }
.tx-sub { margin-top: 7px; font-size: 12.5px; color: var(--g-muted); }
.tx-ro { display: inline-flex; align-items: center; gap: 5px; color: var(--g-text-2); }
.tx-ro svg:not([width]) { width: 13px; height: 13px; }
.tx-head-actions { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.tx-head-actions .g-btn { height: 38px; }
.tx-head-actions .g-icon-btn { width: 38px; height: 38px; }
.tx-btn-primary { border: 1px solid var(--g-coral-line); background: var(--g-coral-bg); color: var(--g-coral-ink); font-weight: 500; }
.tx-btn-primary:hover:not(:disabled) { border-color: var(--g-coral); }
.tx-btn-danger { border: 1px solid var(--g-bad); background: var(--g-bad-bg); color: var(--g-bad); }
.tx-link { display: inline-flex; align-items: center; gap: 5px; padding: 4px 2px; border: 0; background: none; color: var(--g-coral-ink); font-size: 12.5px; cursor: pointer; }
.tx-link:hover { text-decoration: underline; }
.tx-link svg:not([width]) { width: 14px; height: 14px; }
.tx-link[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---- Finance strip (workspace-wide) ---- */
.tx-fin { border: 1px solid var(--g-line); border-radius: 13px; background: linear-gradient(113deg, #272527 0%, #1e1f22 57%, #1b1c1f 100%); box-shadow: var(--g-shadow); overflow: hidden; }
[data-theme="light"] .tx-fin { background: var(--g-panel); }
.tx-fin-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 22px 0; }
.tx-fin-head h2 { margin: 0; font-size: 13px; font-weight: 550; color: var(--g-text-2); letter-spacing: 0; }
.tx-fin-head .ov-source-btn { margin-left: auto; padding: 6px 10px; }
.tx-fin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 14px 22px 18px; }
.tx-fig { min-width: 0; padding: 0 20px; border-left: 1px solid var(--tx-fig-line); display: flex; flex-direction: column; gap: 4px; }
.tx-fig:first-child { padding-left: 0; border-left: 0; }
.tx-fig-label { font-size: 12.5px; color: var(--g-text-2); }
.tx-fig-label small { color: var(--g-muted); font-size: 11.5px; }
.tx-fig-value { font-size: 27px; font-weight: 500; letter-spacing: -.8px; line-height: 1.2; white-space: nowrap; }
.tx-fig.ok .tx-fig-value { color: var(--g-ok); }
.tx-fig.bad .tx-fig-value { color: var(--g-bad); }
.tx-fig-lines { margin: 4px 0 0; font-size: 12px; }
.tx-fig-lines > div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.tx-fig-lines dt { color: var(--g-muted); min-width: 0; }
.tx-fig-lines dd { margin: 0; color: var(--g-text-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-status-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--tx-fig-line); background: #1415184f; }
[data-theme="light"] .tx-status-row { background: #f5f2ee; }
.tx-st { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; padding: 11px 22px; border-left: 1px solid var(--tx-fig-line); min-width: 0; }
.tx-st:first-child { border-left: 0; }
.tx-st .sd-status { font-size: 12px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-st strong { font-size: 16px; font-weight: 550; text-align: right; }
.tx-st-amt { grid-column: 1 / -1; font-size: 12px; color: var(--g-muted); }
.tx-fin-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 22px; border-top: 1px solid var(--tx-fig-line); font-size: 12px; color: var(--g-warn); }
.tx-fin-note svg:not([width]) { width: 15px; height: 15px; }

/* ---- Analytics (opened on demand) ---- */
.tx-an { margin-top: 16px; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-panel); }
.tx-an-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 0 16px; }
.tx-an-head .sd-tabs { margin: 0; }
.tx-an-body { padding: 4px 18px 18px; }
.tx-an-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 0; }
.tx-scope { margin: 0; flex: 1 1 260px; font-size: 12px; color: var(--g-muted); }
.tx-scope b { color: var(--g-text-2); font-weight: 550; }
.tx-an-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.tx-an-metrics { display: grid; gap: 14px; }
.tx-an-metrics > div { display: grid; gap: 1px; }
.tx-an-metrics span { font-size: 12px; color: var(--g-muted); }
.tx-an-metrics strong { font-size: 22px; font-weight: 500; letter-spacing: -.5px; }
.tx-an-metrics small { font-size: 11.5px; color: var(--g-muted); }
.tx-an h3 { margin: 0 0 10px; font-size: 13px; font-weight: 550; }
.tx-an h3 small { font-weight: 400; color: var(--g-muted); margin-left: 4px; }
.tx .ok { color: var(--g-ok); } .tx .warn { color: var(--g-warn); } .tx .bad { color: var(--g-bad); }
.tx-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 0 0 2px; border-bottom: 1px solid var(--g-line); }
.tx-bars span { flex: 1 1 0; min-width: 3px; max-width: 26px; border-radius: 3px 3px 0 0; background: var(--g-coral); opacity: .85; }
.tx-bars span:hover { opacity: 1; }
.tx-bars-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--g-muted); }
.tx-details { margin-top: 10px; font-size: 12.5px; }
.tx-details summary { color: var(--g-coral-ink); cursor: pointer; }
.tx-details .sd-scroll { max-height: 220px; overflow-y: auto; margin-top: 6px; }
.tx-mini { width: 100%; font-size: 12.5px; }
.tx-mini th { padding: 6px 8px; text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: var(--g-muted); border-bottom: 1px solid var(--g-line); white-space: nowrap; }
.tx-mini td { padding: 6px 8px; border-bottom: 1px solid var(--g-line-soft); vertical-align: top; }
.tx-mini :is(th, td).n { text-align: right; white-space: nowrap; }
.tx-mini td small { display: block; font-size: 11px; color: var(--g-muted); }
.tx-mini .tx-rank { width: 22px; color: var(--g-muted); }
.tx-an-top .sd-trunc { max-width: 190px; }
.tx-empty-note { margin: 0; font-size: 12.5px; color: var(--g-muted); }
.tx-inline-state { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--g-line); border-radius: 9px; font-size: 12.5px; color: var(--g-warn); background: var(--g-warn-bg); }
.tx-inline-state svg:not([width]) { width: 16px; height: 16px; }
.tx-inline-state span { flex: 1; }
.tx-inline-state .g-btn { height: 30px; }
.tx-inline-state.muted { color: var(--g-muted); background: none; }
.tx-source-time { margin: 0 0 10px; font-size: 11.5px; color: var(--g-muted); }
.tx-risk { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; padding: 6px 0 12px; }
.tx-risk-score { display: grid; gap: 2px; }
.tx-risk-score span { font-size: 12px; color: var(--g-muted); }
.tx-risk-score strong { font-size: 34px; font-weight: 500; letter-spacing: -1px; }
.tx-risk-score small { font-size: 12px; color: var(--g-muted); }
.tx-rate.ok { color: var(--g-ok); } .tx-rate.warn { color: var(--g-warn); } .tx-rate.bad { color: var(--g-bad); }
.tx-risk-range { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--g-muted); }
.tx-risk-range b { color: var(--g-text); font-weight: 550; }
.tx-ratio { display: flex; height: 6px; margin-top: 5px; border-radius: 3px; overflow: hidden; background: var(--g-line); }
.tx-ratio.big { height: 10px; margin: 9px 0; border-radius: 5px; }
.tx-ratio i { display: block; height: 100%; }
.tx-ratio .paid { background: var(--g-ok); }
.tx-ratio .susp { background: var(--g-bad); }
.tx-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; }
.tx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tx-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--g-muted); }
.tx-legend .paid::before { background: var(--g-ok); }
.tx-legend .susp::before { background: var(--g-bad); }
.tx-legend .hold::before { background: var(--g-warn); }
.tx-legend small { color: var(--g-muted); }
.tx-risk-table { max-height: 320px; overflow: auto; margin-top: 8px; border: 1px solid var(--g-line-soft); border-radius: 9px; }
.tx-risk-table .tx-ratio { width: 120px; }
.tx-inline-muted { color: var(--g-muted); }

/* ---- Filters ---- */
.tx-filters { display: grid; gap: 10px; margin-top: 20px; }
.tx-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.tx-input { height: 36px; padding: 0 9px; border: 1px solid var(--g-line); border-radius: 8px; background: var(--tx-skin); color: var(--g-text); font-size: 13px; color-scheme: dark; }
[data-theme="light"] .tx-input { color-scheme: light; }
textarea.tx-input { height: auto; padding: 8px 9px; resize: vertical; }
.tx-input:focus { outline: 2px solid var(--g-coral); outline-offset: 0; border-color: transparent; }
.tx-date { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--g-muted); }
.tx-field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--g-muted); white-space: nowrap; }
.tx-filters .sd-search { flex: 1 1 260px; max-width: 380px; height: 36px; }
.tx-filters .sd-search button { display: grid; padding: 2px; border: 0; border-radius: 5px; background: none; color: var(--g-muted); cursor: pointer; }
.tx-filters .sd-seg button { height: 28px; }
.tx-filter-label { font-size: 12.5px; color: var(--g-muted); }
.tx-filter-hint { font-size: 11.5px; color: var(--g-muted); }
.tx .sd-seg .dot.info { background: var(--tx-info); }
.tx .sd-seg .dot.bad { background: var(--g-bad); }
.tx .sd-seg .dot.muted { background: var(--g-muted); }

/* ---- Day strip (filtered, one UTC day) ---- */
.tx-day { margin-top: 14px; border: 1px solid var(--g-coral-line); border-radius: 11px; background: var(--g-panel); }
.tx-day-head { padding: 9px 16px; border-bottom: 1px solid var(--g-line-soft); font-size: 12px; color: var(--g-muted); }
.tx-day-head b { color: var(--g-text); font-weight: 550; }
.tx-day-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tx-day-cell { display: grid; gap: 1px; padding: 10px 16px; border-left: 1px solid var(--g-line-soft); min-width: 0; }
.tx-day-cell:first-child { border-left: 0; }
.tx-day-cell span { font-size: 12px; color: var(--g-muted); }
.tx-day-cell strong { font-size: 18px; font-weight: 500; letter-spacing: -.3px; }
.tx-day-cell small { font-size: 11.5px; color: var(--g-muted); }

/* ---- Result line + bulk ---- */
.tx-result { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; min-height: 40px; margin: 14px 0 10px; font-size: 12.5px; color: var(--g-muted); }
.tx-result b { color: var(--g-text); font-weight: 600; }
.tx-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 5px 6px 5px 12px; border: 1px solid var(--g-coral-line); border-radius: 10px; background: var(--g-coral-bg); color: var(--g-text); }
.tx-bulk .g-btn { height: 32px; }
.tx-sim, .tx-sim-note { color: var(--g-warn); font-size: 11.5px; }
.tx-sim { padding: 1px 6px; border: 1px dashed currentColor; border-radius: 5px; }
.tx-sim-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 8px 10px; border: 1px dashed var(--g-warn); border-radius: 8px; line-height: 1.5; }
.tx-sim-note svg:not([width]) { width: 15px; height: 15px; margin-top: 1px; }

/* ---- Table ---- */
.tx-table-col { min-width: 0; }
/* sr-only children are absolutely positioned: keep them inside the table's own scroller, not the page. */
.tx .sd-table-wrap .sd-scroll { position: relative; }
.tx-table { min-width: 860px; }
.tx .sd-work.has-panel .tx-table { min-width: 760px; }
.tx-table .tx-check { width: 40px; padding-right: 0; }
.tx-check-hit { display: flex; align-items: center; min-height: 32px; cursor: pointer; }
.tx-select-tools { display: none; align-items: center; gap: 8px; }
.tx-select-tools .g-btn { height: 34px; }
.tx-select-tools [aria-pressed="true"] { border-color: var(--g-coral-line); background: var(--g-coral-bg); color: var(--g-coral-ink); }
.tx-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--g-coral); cursor: pointer; }
.tx-table .money { color: var(--g-text); font-weight: 500; }
.tx-table td.dim { color: var(--g-muted); }
.tx-table .tx-bonus, .sd-facts .tx-bonus { color: var(--tx-info); }
.tx-table .tx-fee { color: var(--g-warn); }
.tx-table td .sub { color: var(--g-muted); }
.tx-table .sd-mono { font-size: 12px; }
.tx-table .sd-trunc { max-width: 220px; }
.tx-table td.m-cell { display: none; }
.tx-actions-cell { width: 44px; }
.tx-row-btn { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--g-muted); cursor: pointer; }
.tx-row-btn:hover { border-color: var(--g-bad); color: var(--g-bad); }
.tx-row-btn svg:not([width]) { width: 15px; height: 15px; }
.tx-table tfoot td { height: 40px; padding: 6px 12px; border-top: 1px solid var(--g-line); font-size: 12.5px; color: var(--g-muted); white-space: nowrap; background: var(--g-panel); }
.tx-table tfoot td.n { color: var(--g-text-2); }
.tx .sd-status.info { color: var(--tx-info); } .tx .sd-status.info i { background: var(--tx-info); }
.tx .sd-status.muted { color: var(--g-muted); } .tx .sd-status.muted i { background: var(--g-muted); }
.tx-gap { padding: 0 4px; color: var(--g-muted); }
.tx-ps select { height: 30px; margin-left: 6px; border: 1px solid var(--g-line); border-radius: 7px; background: var(--tx-skin); color: var(--g-text); padding: 0 6px; }
.tx .sd-pager button svg:not([width]) { width: 14px; height: 14px; }
.tx .sd-pager button { display: inline-grid; place-items: center; }
.tx-skel-table { padding: 6px 0; }
.tx-skel-row { display: flex; gap: 24px; align-items: center; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--g-line-soft); }

/* ---- Row panel ---- */
.tx .sd-work.has-panel { grid-template-columns: minmax(0, 1fr) 360px; }
.tx-panel-top { display: flex; align-items: center; gap: 6px; padding-top: 12px; }
.tx-panel .sd-facts dd a { color: var(--g-coral-ink); text-decoration: none; }
.tx-panel .sd-facts dd a:hover { text-decoration: underline; }
.tx-panel .sd-facts dt small { display: block; font-size: 11px; color: var(--g-muted); }
.tx-notes { margin: 0; font-size: 13px; color: var(--g-text-2); }
.tx-panel .sd-panel-foot .g-btn { height: 34px; }

/* ---- Modal ---- */
.tx-modal.wide { width: min(760px, calc(100vw - 32px)); }
.tx-modal .g-modal-body h3:first-of-type { margin-top: 18px; }
.tx-modal .sd-recon td small { line-height: 1.5; }
.tx-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.tx-modal-foot > span { margin-right: auto; font-size: 11.5px; line-height: 1.5; }
.tx-modal-foot .g-btn { height: 36px; }
.tx-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.tx-form .tx-sim-note, .tx-form .full { grid-column: 1 / -1; }
.tx-form label { display: grid; gap: 5px; font-size: 12.5px; color: var(--g-text-2); }
.tx-form .tx-input { width: 100%; }
.tx-form [aria-invalid="true"] { border-color: var(--g-bad); }
.tx-err { font-size: 12px; color: var(--g-bad); }

.tx-toast { position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px; border: 1px solid var(--g-line); border-radius: 10px; background: var(--g-raised); color: var(--g-text); font-size: 13px; box-shadow: 0 12px 40px #0005; }

/* ---- Light: shared sd-* pieces that graphite.css only colours for Dark ---- */
[data-theme="light"] .tx .sd-panel-head, [data-theme="light"] .tx .sd-panel-foot { border-color: var(--g-line); }
[data-theme="light"] .tx .sd-panel-foot { background: var(--g-panel); }
[data-theme="light"] .tx .sd-facts > div { border-bottom-color: var(--g-line-soft); }
[data-theme="light"] .tx .sd-facts dt { color: var(--g-muted); }
[data-theme="light"] .tx .sd-seg .n { color: var(--g-muted); }
[data-theme="light"] .tx .sd-alert { border-color: var(--g-bad); }
[data-theme="light"] .tx .sd-pager button { color: var(--g-text-2); }
[data-theme="light"] .tx .sd-table td.primary { color: var(--g-text); }
[data-theme="light"] .tx .sd-table tbody tr[aria-selected="true"] td { background: var(--g-select); }

/* ---- Responsive ---- */
@media (max-width: 1360px) {
    .tx .sd-work.has-panel { grid-template-columns: minmax(0, 1fr); }
    .tx-an-grid { grid-template-columns: 190px minmax(0, 1fr); }
    .tx-an-top { grid-column: 1 / -1; }
}
@media (max-width: 1150px) {
    .tx-fin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
    .tx-fig:nth-child(3) { padding-left: 0; border-left: 0; }
    .tx-status-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tx-st:nth-child(4) { border-left: 0; }
    .tx-st:nth-child(n+4) { border-top: 1px solid var(--tx-fig-line); }
    .tx-day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tx-day-cell:nth-child(4) { border-left: 0; }
    .tx-day-cell:nth-child(n+4) { border-top: 1px solid var(--g-line-soft); }
    .tx-head { align-items: flex-start; flex-direction: column; gap: 14px; }
    .tx-head-actions { justify-content: flex-start; }
    .tx-table .opt-panel { display: none; }
    .tx-table, .sd-work.has-panel .tx-table { min-width: 720px; }
}
@media (max-width: 720px) {
    .tx-head h1 { font-size: 28px; letter-spacing: -1px; }
    .tx-head-actions { width: 100%; }
    .tx-head-actions .g-btn { flex: 1 1 auto; justify-content: center; }
    .tx-fin-head { padding: 14px 16px 0; }
    .tx-fin-head .ov-source-btn { margin-left: 0; }
    .tx-fin-grid { grid-template-columns: 1fr; padding: 12px 16px 14px; row-gap: 0; }
    .tx-fig, .tx-fig:nth-child(3) { padding: 12px 0; border-left: 0; border-top: 1px solid var(--tx-fig-line); }
    .tx-fig:first-child { border-top: 0; padding-top: 4px; }
    .tx-fig-value { font-size: 24px; }
    .tx-status-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-st { padding: 10px 16px; border-left: 0; border-top: 1px solid var(--tx-fig-line); }
    .tx-st:nth-child(even) { border-left: 1px solid var(--tx-fig-line); }
    .tx-st:first-child { border-top: 0; }
    .tx-st:nth-child(2) { border-top: 0; }
    .tx-an-head { flex-wrap: nowrap; padding: 10px 10px 0; }
    .tx-an-head .sd-tabs { width: auto; flex: 1; flex-wrap: nowrap; }
    .tx-an-head .sd-tab { flex: 1; justify-content: center; padding: 7px 8px; }
    .tx-an-body { padding: 4px 14px 14px; }
    .tx-an-grid, .tx-risk { grid-template-columns: 1fr; gap: 16px; }
    .tx-an-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .tx-an-metrics strong { font-size: 17px; }
    .tx-filters .sd-search { flex: 1 1 100%; min-width: 0; max-width: none; order: -1; }
    .tx-filter-row > * { min-width: 0; max-width: 100%; }
    .tx-filters .sd-seg { flex-wrap: wrap; }
    .tx-date { flex: 1 1 100%; }
    .tx-date .tx-input { flex: 1; min-width: 0; }
    .tx-filter-hint { display: none; }
    .tx-day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-day-cell, .tx-day-cell:nth-child(4) { border-left: 0; border-top: 1px solid var(--g-line-soft); }
    .tx-day-cell:nth-child(even) { border-left: 1px solid var(--g-line-soft); }
    .tx-day-cell:nth-child(-n+2) { border-top: 0; }
    .tx-day-cell:last-child { grid-column: 1 / -1; border-left: 0; }
    .tx-bulk { width: 100%; }
    /* Table → list rows (graphite.css sd-table phone rules); every field stays in the panel and the CSV. */
    .tx-table, .sd-work.has-panel .tx-table { min-width: 0; }
    .tx-table td.m-cell.m-show { display: block; }
    .tx-table tfoot { display: none; }
    /* Selection on the phone list: off by default, "Chọn" shows a checkbox column at the start of each row. */
    .tx-select-tools { display: flex; }
    .tx-table:not(.selecting) .tx-check { display: none !important; }
    .tx-table.selecting tbody tr[data-row] { grid-template-columns: 34px minmax(0, 1fr) auto; }
    .tx-table.selecting td.tx-check { display: flex !important; align-items: center; grid-column: 1; grid-row: 1 / span 2; width: auto; padding: 0; }
    .tx-table.selecting td.m-title { grid-column: 2; }
    .tx-table.selecting td.m-right { grid-column: 3; }
    .tx-table.selecting td.m-line { grid-column: 2 / -1; }
    .tx-table.selecting input[type="checkbox"] { width: 20px; height: 20px; }
    .tx .sd-pager { flex-direction: column; align-items: stretch; }
    .tx .sd-pager-btns { flex-wrap: wrap; }
    .tx-form { grid-template-columns: 1fr; }
}

/* ---- Blazor page additions ---- */
.tx-fin-error { display: flex; align-items: center; gap: 10px; padding: 16px 22px 18px; color: var(--g-bad); font-size: 13px; }
.tx-fin-error svg:not([width]) { width: 16px; height: 16px; }
.tx-fin-error span { flex: 1; }
.tx-fin-error .g-btn { height: 34px; }
.tx-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border: 1px solid var(--g-coral-line); border-radius: 8px; background: var(--g-coral-bg); color: var(--g-text-2); font-size: 12.5px; }
.tx-chip b { font-weight: 550; color: var(--g-text); }
.tx-chip button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--g-muted); cursor: pointer; }
.tx-chip button:hover { color: var(--g-text); }
.tx-chip svg:not([width]) { width: 13px; height: 13px; }
.tx .sd-alert { margin-bottom: 16px; }
.tx .sd-alert .g-btn { height: 32px; }
.tx .sd-panel-foot > span { min-width: 0; }
.tx .tx-modal .tx-err { margin: 10px 0 0; }
.tx-bulk .tx-err { flex-basis: 100%; }
.tx .sd-facts dd small { display: block; }

