/* Tables in a project (public/tables.js): a grid edited like a sheet. Theme tokens only. */
.tb-root { min-width: 0; }
.tb { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tb-empty { border: 1px solid var(--line); padding: 28px 28px 24px; max-width: 720px; }
.tb-empty h2 { font-size: 20px; margin-bottom: 8px; }
.tb-empty p { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.tb-start { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tb-start.col { flex-direction: column; align-items: stretch; margin: 0; }
.tb-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tb-tab { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; border-radius: 0; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-tab[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 500; }
.tb-tab:focus-visible, .tb-h:focus-visible, .tb-plus button:focus-visible, .tb-new button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tb-add { display: inline-flex; align-items: center; padding: 6px 8px; }
.tb-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tb-tools .spacer, .tb-foot .spacer { flex: 1; }
.tb-q { flex: 0 1 240px; min-width: 130px; font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 0; }
.tb-q:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.tb-tools .tb-grp { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mute); flex-wrap: nowrap; white-space: nowrap; }
/* the menu itself says "Kelompok: Status", so its label is for screen readers only (it stood above the menu and pushed the row down) */
.tb-grp-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tb-exp > summary { white-space: nowrap; }
.tb-exp .cs-pop { z-index: 40; }
.tb-sum[hidden] { display: none; }
/* the table's own menu sits at the end of its tabs (it wrapped alone under the toolbar) */
.tb-tabs .tb-more { margin-left: auto; align-self: center; }
.tb-grp select { font: inherit; font-size: 13px; max-width: 160px; }
.tb-ring { display: inline-flex; align-items: center; gap: 6px; }
.tb-more { display: inline-flex; align-items: center; padding-left: 8px; padding-right: 8px; }
.tb-wrap { border: 1px solid var(--line); min-width: 0; }
.tb-grid { overflow: auto; max-height: max(320px, calc(100vh - 330px)); max-height: max(320px, calc(100dvh - 330px)); outline: none; overscroll-behavior-x: contain; }
.tb-grid:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.tb-grid table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; font-variant-numeric: tabular-nums; }
.tb-grid th { position: sticky; top: 0; z-index: 3; background: var(--wash); border-bottom: 1.5px solid var(--ink); border-right: 1px solid var(--line); padding: 0; text-align: left; font-weight: 500; }
.tb-h { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 10px; cursor: pointer; font-size: 12.5px; color: var(--ink); }
.tb-h span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tb-h svg { flex: none; width: 13px; height: 13px; color: var(--gold); }
.tb-h b { font-weight: 600; }
.tb-ty { flex: none; font-style: normal; font-size: 10px; min-width: 18px; text-align: center; padding: 1px 3px; border: 1px solid var(--line); color: var(--mute); background: var(--paper); line-height: 1.4; }
.tb-rs { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 4; touch-action: none; }
.tb-rs:hover { background: var(--gold); opacity: .5; }
.tb-grid td { height: 32px; padding: 0 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; background: var(--paper); position: relative; cursor: cell; }
.tb-grid .tb-n { width: 44px; min-width: 44px; text-align: center; color: var(--mute); font-size: 11.5px; padding: 0; position: sticky; left: 0; z-index: 2; background: var(--wash); cursor: pointer; user-select: none; }
.tb-grid th.tb-n { z-index: 4; cursor: default; }
.tb-grid .tb-plus { width: 44px; border-right: 0; background: transparent; cursor: default; }
.tb-grid th.tb-plus { background: var(--wash); }
.tb-plus button, .tb-new button { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tb-plus button { width: 100%; height: 30px; color: var(--ink-2); }
.tb-plus button:hover { color: var(--ink); background: var(--line); }
.tb-grid td.t-number, .tb-grid td.t-rupiah { text-align: right; }
.tb-grid td.t-tick { text-align: center; }
.tb-grid td.in { background: color-mix(in srgb, var(--gold) 14%, var(--paper)); }
.tb-grid td.at { box-shadow: inset 0 0 0 2px var(--gold); }
.tb-grid tr.rsel td { background: color-mix(in srgb, var(--gold) 20%, var(--paper)); }
.tb-grid tr.rsel td.tb-n { background: var(--gold); color: var(--on-gold); }
.tb-grid td.ed { overflow: visible; padding: 0; z-index: 5; box-shadow: inset 0 0 0 2px var(--gold); }
.tb-ed { all: unset; box-sizing: border-box; width: 100%; height: 31px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink); background: var(--paper); text-align: inherit; }
.tb-pop { position: absolute; top: 100%; left: -1px; min-width: calc(100% + 2px); max-height: 240px; overflow: auto; background: var(--paper); border: 1.5px solid var(--ink); z-index: 6; display: flex; flex-direction: column; text-align: left; }
.tb-pop button { all: unset; cursor: pointer; padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.tb-pop button:hover, .tb-pop button.on { background: var(--wash); }
.tb-pop button.new { color: var(--ink-2); border-top: 1px solid var(--line); }
.tb-pop p { padding: 8px 10px; font-size: 12px; color: var(--mute); white-space: normal; min-width: 180px; }
.tb-chip { display: inline-block; padding: 1px 8px; font-size: 12px; line-height: 1.6; color: var(--ink); background: var(--note-yellow); max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tb-chip[data-n="green"] { background: var(--note-green); } .tb-chip[data-n="blue"] { background: var(--note-blue); } .tb-chip[data-n="pink"] { background: var(--note-pink); } .tb-chip[data-n="violet"] { background: var(--note-violet); }
.tb-tk.on { color: var(--ft-green); font-weight: 700; }
.tb-who::before { content: "@"; color: var(--mute); margin-right: 1px; }
.tb-bad { color: var(--red); text-decoration: underline dotted; }
.tb-due { font-style: normal; font-size: 11px; margin-left: 8px; padding: 0 5px; border: 1px solid currentColor; }
.tb-due.soon { color: var(--ft-amber); } .tb-due.late { color: var(--red); }
.tb-grid td a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tb-g td { height: 32px; background: var(--wash); font-size: 12px; color: var(--ink-2); cursor: default; border-right: 0; }
.tb-g b { color: var(--ink); margin-right: 10px; }
.tb-grid .tb-pad td { height: 0; padding: 0; border: 0; background: transparent; }
.tb-new td { border-right: 0; cursor: default; color: var(--mute); }
.tb-new .tb-n svg { width: 12px; height: 12px; vertical-align: middle; }
.tb-new button { padding: 4px 0; font-size: 12.5px; color: var(--ink-2); }
.tb-new button:hover { color: var(--ink); text-decoration: underline; }
.tb-grid tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--wash); border-top: 1.5px solid var(--ink); border-bottom: 0; font-weight: 600; font-size: 12.5px; cursor: default; }
.tb-load { padding: 18px 14px; }
.tb-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); min-height: 26px; }
.tb-sel { font-weight: 600; color: var(--ink); }
.tb-keys { color: var(--mute); font-size: 11.5px; }
.modal.tb-dlg { width: min(520px, calc(100vw - 32px)); }
.tb-dlg form { padding: 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.tb-dlg label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--mute); }
.tb-dlg label.cs-tick { flex-direction: row; align-items: center; color: var(--ink); font-size: 14px; }
.tb-dlg input:not([type=checkbox]):not([type=radio]), .tb-dlg select, .tb-dlg textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: 8px 10px; border-radius: 0; width: 100%; box-sizing: border-box; }
.tb-dlg textarea { resize: vertical; font-size: 13px; }
.tb-dlg .hint { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.tb-colacts { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-dlg .danger { color: var(--red); }
.tb-dlg .row-actions { display: flex; gap: 8px; align-items: center; }
.tb-dlg .row-actions .spacer { flex: 1; }
.tb-ref { display: inline-block; padding: 1px 8px; font-size: 12px; line-height: 1.6; border: 1px solid var(--line); background: var(--wash); max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tb-hid { color: var(--mute); font-size: 12px; font-style: italic; }
.tb-grid td.t-fx { background: color-mix(in srgb, var(--wash) 55%, var(--paper)); cursor: default; }
.tb-n > span { display: block; }
.tb-op { all: unset; display: none; cursor: pointer; width: 100%; height: 31px; align-items: center; justify-content: center; color: var(--ink); }
.tb-op svg { width: 14px; height: 14px; }
.tb-op:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
/* the number picks the row, the small arrow beside it opens it (the arrow used to cover the whole cell, so a mouse could never pick rows: 11 Oct 2026) */
@media (hover: hover) { .tb-grid tr:hover .tb-n > span { padding-right: 16px; } .tb-grid tr:hover .tb-op { display: inline-flex; position: absolute; top: 0; right: 0; width: 18px; height: 100%; } .tb-op:hover { background: var(--line); } }
.tb-lk { display: inline-flex; vertical-align: -2px; margin-right: 5px; }
.tb-lk svg { width: 12px; height: 12px; }
.tb-tab small { font-size: 11px; opacity: .7; margin-left: 4px; }
.tb-note { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--wash); font-size: 13px; color: var(--ink); line-height: 1.5; }
.tb-note .spacer { flex: 1; }
.tb-fine { margin-top: 6px; }
/* without the add-on: grey bars, never cells */
.tb-lockbox { position: relative; min-height: 300px; }
.tb-locked .tb-grid { max-height: 420px; overflow: hidden; }
.tb-locked .tb-grid table { width: 100%; table-layout: auto; }
.tb-locked .tb-h { cursor: default; }
.tb-blur { filter: blur(3px); }
.tb-bar { display: block; height: 9px; background: var(--line); width: 70%; }
.tb-bar[data-w="1"] { width: 45%; } .tb-bar[data-w="2"] { width: 88%; } .tb-bar[data-w="3"] { width: 30%; }
.tb-pay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 24px)); box-sizing: border-box; background: var(--paper); border: 1.5px solid var(--ink); padding: 22px 24px 20px; box-shadow: 0 12px 40px color-mix(in srgb, var(--ink) 18%, transparent); }
.tb-lockbox:not(:has(.tb-wrap)) .tb-pay { position: static; transform: none; width: auto; max-width: 560px; box-shadow: none; }
.tb-pay h2 { display: flex; gap: 8px; align-items: center; font-size: 18px; margin-bottom: 8px; }
.tb-pay h2 svg { width: 18px; height: 18px; flex: none; }
.tb-pay p { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); margin-bottom: 10px; }
.tb-pay .tb-price { color: var(--ink); font-weight: 600; font-size: 15px; }
.tb-pay .tb-start { margin: 4px 0 0; }
/* the dialogs */
.modal.tb-dlg.tb-wide { width: min(640px, calc(100vw - 32px)); }
.tb-dlg .tb-opts { display: flex; flex-direction: column; gap: 12px; }
.tb-dlg .tb-opts[hidden] { display: none; }
.tb-dlg label .hint { margin-top: 2px; }
.tb-dlg textarea[name="expr"] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.tb-names { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-nm { all: unset; cursor: pointer; font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); color: var(--ink-2); background: var(--wash); }
.tb-nm:hover { color: var(--ink); border-color: var(--ink); }
.tb-nm:focus-visible { outline: 2px solid var(--gold); }
.tb-colacts .btn { display: inline-flex; align-items: center; gap: 6px; }
.tb-acc { border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.tb-acc legend { font-size: 12.5px; color: var(--mute); padding: 0 6px; }
.tb-ppl { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 0 24px; max-height: 220px; overflow: auto; }
.tb-ppl[hidden] { display: none; }
.tb-hist { list-style: none; margin: 0; padding: 0; max-height: min(52vh, 460px); overflow: auto; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.tb-hl { padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.tb-hl p { color: var(--ink); }
.tb-hl b { font-weight: 600; }
.tb-hl small { display: block; font-size: 11.5px; color: var(--mute); }
.tb-hl i { font-style: normal; color: var(--mute); }
.tb-hl ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.tb-hl s { color: var(--mute); }
/* a row as a page */
.modal.tb-dlg.tb-page { width: min(600px, calc(100vw - 32px)); max-height: min(92vh, 900px); }
.modal.tb-dlg.tb-page[open] { display: flex; flex-direction: column; overflow: hidden; }
.tb-page form { padding: 0; gap: 0; flex: 1 1 auto; min-height: 0; }
.tb-page .modal-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); gap: 4px; align-items: center; }
.tb-page .modal-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.tb-pn { font-size: 12px; color: var(--mute); margin-right: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-pb { padding: 14px 20px 6px; overflow: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.tb-pt { margin: 0; }
.tb-fs { display: flex; flex-direction: column; gap: 12px; }
.tb-f { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; }
.tb-f > label { flex-direction: row; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.tb-fl { display: inline-flex; gap: 7px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-f.t-tick input { justify-self: start; width: 20px; height: 20px; accent-color: var(--ink); }
.tb-fr { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.tb-fr input, .tb-fr select { flex: 1 1 150px; min-width: 0; }
.tb-fr .btn { flex: none; text-decoration: none; }
/* a phone number: the number on its own line, Call / WhatsApp / Copy in one row under it (they wrapped two and one) */
.t-phone .tb-fr input { flex-basis: 100%; }
.t-phone .tb-fr .btn { padding-left: 10px; padding-right: 10px; }
.tb-fo { font-size: 14px; color: var(--ink); padding: 8px 10px; background: var(--wash); border: 1px dashed var(--line); min-height: 20px; font-variant-numeric: tabular-nums; }
.tb-pl { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.tb-pl h3 { font-size: 12.5px; font-weight: 500; color: var(--mute); margin: 0; }
.tb-pl h4 { margin: 0; }
.tb-dlg label.cs-tick input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.tb-dlg label.cs-tick { gap: 8px; cursor: pointer; }
.tb-pl section { border: 1px solid var(--line); }
.tb-pl h4 { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--wash); font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.tb-pl h4 small { font-weight: 400; font-size: 12px; color: var(--ink-2); flex: 1; min-width: 0; }
.tb-pl h4 .btn { display: inline-flex; gap: 4px; align-items: center; }
.tb-pl h4 .btn svg { width: 13px; height: 13px; }
.tb-pl ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.tb-pl li { border-top: 1px solid var(--line); }
.tb-pl li.p-meta, .tb-pl section > .p-meta { padding: 8px 10px; }
.tb-pl li button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; align-items: baseline; width: 100%; padding: 8px 10px; font-size: 13px; color: var(--ink); flex-wrap: wrap; }
.tb-pl li button:hover { background: var(--wash); }
.tb-pl li button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.tb-pl li b { font-weight: 500; }
.tb-pl li span { color: var(--ink-2); font-size: 12.5px; }
.tb-by { margin: 0; font-size: 11.5px; }
.tb-pa { padding: 12px 20px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 6px; }
.tb-pa .btn { padding-left: 12px; padding-right: 12px; }
.tb-pa .btn { display: inline-flex; gap: 6px; align-items: center; }
.tb-pa .btn svg { width: 14px; height: 14px; }
@media (hover: none) { .tb-grid td.tb-n { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; } }
@media (max-width: 700px) {
  .tb-keys { display: none; }
  .tb-grid { max-height: max(300px, calc(100dvh - 380px)); }
  .tb-q { flex-basis: 100%; }
  .tb-tools { gap: 6px 8px; }
  .tb-tools .tb-grp { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
  .tb-tools .tb-grp select { width: auto; min-width: 0; flex: 0 1 auto; min-height: 0; font-size: 13px; padding-top: 4px; padding-bottom: 4px; margin: 0; }
  .tb-tools .spacer { display: none; }
  .tb-empty { padding: 20px 18px; }
  .modal.tb-dlg.tb-page { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .tb-page form { height: 100%; }
  .tb-f { grid-template-columns: 1fr; gap: 4px; }
  .tb-pa .btn span { display: none; }
  .tb-pa .btn.danger, .tb-pa [data-pg="remind"] span { display: inline; }
  .tb-locked .tb-grid { max-height: 190px; }
  .tb-lockbox { min-height: 0; }
  .tb-lockbox .tb-pay { position: relative; left: auto; top: auto; transform: none; width: auto; margin: -84px 10px 0; padding: 18px 16px; }
  .tb-lockbox:not(:has(.tb-wrap)) .tb-pay { margin: 0; }
}

/* linking made easy (tables.js linkDialog / linkTo / tableFrom, the box in a column's dialog) */
.tb-lk-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; background: var(--wash); border: 1px solid var(--line); margin-bottom: 4px; }
.tb-lk-box > span { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
.modal.tb-dlg.tb-linkdlg { width: min(640px, calc(100vw - 24px)); }
.tb-lk-list { display: grid; gap: 10px; max-height: min(52vh, 460px); overflow: auto; }
.tb-lk-row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.tb-lk-row > b { font-size: 14px; }
.tb-lk-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-lk-ops small { font-weight: 400; opacity: .85; }
.tb-lk-on { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tb-lk-on span { font-size: 13px; padding: 3px 8px; border: 1px solid var(--line); background: var(--wash); }
.tb-tools [data-tb="links"] { display: inline-flex; align-items: center; gap: 6px; }
.tb-tools [data-tb="links"] svg { width: 15px; height: 15px; }

/* a calculated column built with buttons (tables.js fxBuilder): what to work out, then the columns, then a look at the first rows */
.tb-fxb { display: grid; gap: 10px; padding: 12px; background: var(--wash); border: 1px solid var(--line); }
.tb-fxk, .tb-fxrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tb-fxk { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tb-fxrow > span { font-size: 13px; color: var(--muted); }
.tb-fxof > span { flex: 1 1 100%; }
.tb-fxb .btn.small.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tb-fxrow select, .tb-fxrow input[type=text] { width: auto; min-width: 0; max-width: 100%; flex: 0 1 auto; font: inherit; font-size: 14px; padding: 5px 8px; }
.tb-fxrow input[type=text] { width: 9em; }
.tb-fxf { display: grid; gap: 8px; }
.tb-fxb label.tb-fxchk { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; margin: 0; font-size: 13px; color: var(--ink-2); }
.tb-fxb label.tb-fxchk input { width: auto; margin: 0; }
.tb-fxph { margin: 0; font-size: 12px; color: var(--muted); }
.tb-fxp { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.tb-fxp li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-top: 1px dashed var(--line); }
.tb-fxp li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.tb-fxp li b { font-weight: 600; white-space: nowrap; }
.tb-fxw summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.tb-fxw[open] summary { margin-bottom: 6px; }
.tb-fxq .btn[data-fbgo] { margin-left: auto; }
@media (max-width: 560px) { .tb-fxrow select { flex: 1 1 100%; } }

/* undo and redo in the foot (tables.js undo / applyStep): also the way on touch, where there is no Ctrl+Z */
.tb-ur { display: inline-flex; gap: 2px; }
.tb-urb { all: unset; cursor: pointer; min-width: 30px; height: 26px; display: inline-grid; place-items: center; font-size: 16px; line-height: 1; color: var(--ink); border: 1px solid var(--line); background: var(--paper); }
.tb-urb:hover:not(:disabled) { border-color: var(--ink); }
.tb-urb:disabled { opacity: .35; cursor: default; }
.tb-urb:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
@media (pointer: coarse) { .tb-urb { min-width: 40px; height: 34px; } }

/* where the cursor is, on the edges: the row number and the column heading (picked rows keep their gold) */
.tb-grid tr.cur td.tb-n { color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.tb-grid thead th.cur { box-shadow: inset 0 -3px 0 var(--gold); }

/* on the project page: reading and quick fixes; the heavier tools wait for full screen */
.tb-root:not(.tb-full) .tb-heavy { display: none !important; }
.tb-fullb { display: inline-flex; align-items: center; gap: 6px; }
.tb-fullb svg { width: 14px; height: 14px; flex: none; }
.tb-tabs .tb-fullb { margin-left: auto; }
.tb-full .tb-tabs .tb-more + .tb-fullb { margin-left: 0; }
/* full screen: the same table over the page, the grid takes what is left of the window (one scroller) */
.tb-root.tb-full { position: fixed; inset: 0; z-index: 82; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; padding: 14px 20px calc(10px + env(safe-area-inset-bottom)); box-sizing: border-box; overflow: hidden; }
.tb-full > .tb { flex: 1; min-height: 0; }
.tb-full .tb-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tb-full .tb-grid { flex: 1; min-height: 0; max-height: none; }
.tb-fullt { font-weight: 600; font-size: 14px; margin-right: 8px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.tb-full-on, html.tb-full-on body { overflow: hidden; }
html.tb-full-on .views, html.tb-full-on .menu-wrap, html.tb-full-on .ckl { display: none !important; }
@media (max-width: 760px) {
  /* the first column stays beside the row numbers while the rest scroll sideways (what the row is, always in sight) */
  .tb-grid td[data-c="0"], .tb-grid th[data-c="0"] { position: sticky; left: 44px; z-index: 2; box-shadow: 1px 0 0 var(--line), 4px 0 6px -4px rgba(0, 0, 0, .18); }
  .tb-grid th[data-c="0"] { z-index: 4; }
  .tb-grid td[data-c="0"] { background: var(--paper); }
  .tb-grid tr.tb-g td, .tb-grid tr.tb-new td { position: static; }
  .tb-root:not(.tb-full) .tb-fullb span { display: inline; }
  .tb-root.tb-full { padding: calc(8px + env(safe-area-inset-top)) 10px calc(8px + env(safe-area-inset-bottom)); }
  .tb-fullt { display: none; }
  .tb-full .tb-fullb span { display: none; }
  .tb-fullb { padding-left: 8px; padding-right: 8px; }
  /* the tools take one swipe row each, so the grid keeps the screen */
  .tb-full .tb-tabs, .tb-full .tb-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tb-full .tb-tabs > *, .tb-full .tb-tools > * { flex: none; }
  .tb-full .tb-tools .spacer { display: none; }
  .tb-full .tb-q { flex: 0 0 160px; min-width: 0; }
  .tb-full .tb-tabs .tb-fullb { position: sticky; right: 0; background: var(--paper); }
}

/* a cell that points at something else of the project (12 Oct 2026, public/refs.js) */
.tb-item { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-item.gone { color: var(--mute); text-decoration: line-through; }
.tb-go { flex: none; width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--paper); color: var(--ft-blue); border-radius: 4px; padding: 0; cursor: pointer; }
.tb-go:hover { border-color: var(--ink); color: var(--ink); }
.tb-popd { display: block; color: var(--mute); font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-used { margin-top: 16px; }
.tb-used h4 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin: 0 0 8px; }
/* files sent with a form (13 Oct 2026) */
.tb-file { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border: 1px solid var(--line); background: var(--wash); color: var(--ink); border-radius: 4px; padding: 0 6px; font: inherit; font-size: 12.5px; line-height: 20px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.tb-file:hover, .tb-file:focus-visible { border-color: var(--ink); }
.tb-files { display: flex; flex-wrap: wrap; gap: 6px; }
/* following a case (21 Oct 2026): the tracker in the toolbar, its window, sending one by one, Take a list. Colours of a status by what it means
   (--ft-green yes, --ft-amber maybe, --ft-red no, --ft-blue sent); never colour alone: the words and the numbers are always there. */
.tb-trk { display: inline-flex; align-items: center; gap: 6px; }
.tb-trk.live::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ft-green); }
.modal.tb-dlg.tb-trkdlg, .modal.tb-dlg.tb-lrdlg { width: min(640px, calc(100vw - 32px)); }
.tb-trkgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.tb-trkans { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tb-tsum { display: flex; flex-direction: column; gap: 10px; }
.tb-tbig { margin: 0; font-size: 24px; font-weight: 600; color: var(--ink); }
.tb-tbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--wash); gap: 2px; }
.tb-tbar i { display: block; min-width: 4px; }
.tb-tbar .t-yes, .tb-tchip.t-yes::before { background: var(--ft-green); }
.tb-tbar .t-maybe, .tb-tchip.t-maybe::before { background: var(--ft-amber); }
.tb-tbar .t-no, .tb-tchip.t-no::before { background: var(--ft-red, var(--red)); }
.tb-tbar .t-sent, .tb-tchip.t-sent::before { background: var(--ft-blue); }
.tb-tbar .t-none, .tb-tchip.t-none::before { background: var(--line); }
.tb-tchips { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.tb-tchip { display: inline-flex; align-items: center; gap: 6px; }
.tb-tchip::before { content: ''; width: 9px; height: 9px; border-radius: 50%; }
.tb-tchip b { color: var(--ink); }
.tb-tsec { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tb-tsec h3 { margin: 0; font-size: 15px; }
.tb-tsec .hint { margin: 0; }
.tb-tacts { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-tlink { display: flex; gap: 6px; align-items: center; }
.tb-tlink input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace !important; font-size: 12.5px !important; }
.tb-tmsg summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.tb-tmsg textarea { margin-top: 8px; }
.tb-sname { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tb-smsg { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13.5px; line-height: 1.5; background: var(--wash); border: 1px solid var(--line); padding: 10px 12px; max-height: 40vh; overflow: auto; }
.tb-lrrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-lrfile { cursor: pointer; flex-direction: row !important; color: var(--ink) !important; font-size: 13px !important; }
.tb-lrprev { display: flex; flex-direction: column; gap: 10px; max-height: 42vh; overflow: auto; }
.tb-lrprev:empty { display: none; }
.tb-lrpart { border: 1px solid var(--line); margin: 0; padding: 6px 10px 8px; min-width: 0; }
.tb-lrpart legend { padding: 0 4px; }
.tb-lrpart legend small { color: var(--mute); font-weight: 400; }
.tb-lrpart.off ul { opacity: .5; }
.tb-lrpart ul { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 18px; }
.tb-lrpart li { break-inside: avoid; }
.tb-lrpart li label.cs-tick { font-size: 13px; align-items: flex-start; padding: 2px 0; }
.tb-lrpart li small { color: var(--mute); }
.tb-lrpart li label.dup { color: var(--mute); }
.tb-lrpart li i { font-style: normal; font-size: 11.5px; color: var(--mute); }
.tb-lrmap:empty { display: none; }
@media (max-width: 560px) { .tb-trkgrid { grid-template-columns: minmax(0, 1fr); } .tb-tlink { flex-wrap: wrap; } .tb-tlink input { flex-basis: 100%; } }

/* a grid that scrolls inside a max-height keeps each row at its full height (owner, 27 Oct 2026: the Move to list squeezed its rows and cut the words in half) */
.tb-lk-list { grid-auto-rows: max-content; }
