/* X v33 / 76ad1a2d0d51ea03ed06880b4e52196ef73cbb9a.
   Reuses the real management-table v32/v33 metric/style rules in plain W tables.
   React grid/filter/resize logic is not ported: W data/filter behavior stays unchanged. */
:root{--w-table-row-height:28px;--w-table-header-height:44px;--w-table-font:14px;--w-table-line:16px;--w-table-header-line:17px}
:is(main,dialog) table{table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:var(--w-table-font);line-height:var(--w-table-line)}
:is(main,dialog) table tbody tr,:is(main,dialog) table td{height:var(--w-table-row-height)!important}
:is(main,dialog) table td{min-width:0;padding:1px 3px!important;font-size:var(--w-table-font)!important;line-height:var(--w-table-line)!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;border-bottom:1px solid #e2e8f0;border-right:1px solid #dce6ed}
:is(main,dialog) table th{height:var(--w-table-header-height)!important;padding:2px 3px!important;font-size:var(--w-table-font)!important;line-height:var(--w-table-header-line)!important;vertical-align:top;position:sticky;top:0;background:#f6f7f9;z-index:2;text-align:left;border-bottom:1px solid #c5d0dc;border-right:1px solid #dce6ed;white-space:normal;overflow:hidden}
:is(main,dialog) table th>button,:is(main,dialog) table th>.header-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal;overflow-wrap:anywhere;overflow:hidden;text-overflow:ellipsis;line-height:17px!important;max-height:34px;font-size:14px!important;margin:0;padding:0!important;border:0;background:transparent;text-align:left}
:is(main,dialog) table td input,:is(main,dialog) table td select{width:100%!important;min-width:0;min-height:0;height:24px!important;padding:1px 2px!important;font-size:14px!important;line-height:18px!important;margin:0;border:0!important;border-radius:0!important;background:transparent;box-sizing:border-box}
:is(main,dialog) table td input:focus,:is(main,dialog) table td select:focus{outline:2px solid #d97706;outline-offset:-2px}
:is(main,dialog) table td:focus-within{background:#fff6df;box-shadow:inset 0 1px #d5a747,inset 0 -1px #d5a747}
:is(main,dialog) table td button{min-height:0;height:20px!important;padding:1px 2px!important;font-size:12px!important;line-height:16px!important;margin:0;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
:is(main,dialog) table tbody tr:hover td{box-shadow:inset 0 0 0 1px #c0d9d9}
:is(main,dialog) table tr:focus-visible td{background:#dceafc!important;box-shadow:inset 0 0 0 1px #4584c6}
:is(.master-scroll,.journal-scroll,#workflow-row-scroll,.preview-scroll,.staff-scroll){overflow:auto;min-height:0;border:1px solid #dce6ed}
:is(.master-table,.journal-scroll table,.workflow-row-table,.preview-scroll table,.staff-table) td:first-child{position:sticky;left:0;z-index:1;background:#fff}
:is(.master-table,.journal-scroll table,.workflow-row-table,.preview-scroll table,.staff-table) th:first-child{left:0;z-index:3;background:#f6f7f9}
.master-table{min-width:1250px}.workflow-row-table{min-width:1260px}.journal-scroll table{min-width:1250px}.preview-scroll table{min-width:1450px}.staff-table{width:1210px;min-width:1210px}
.master-table th,.workflow-row-table th,.staff-table th{width:auto!important}
.master-table td{max-height:28px}.master-inline{height:24px!important}.master-table td:has(.master-inline){padding:1px 3px!important}
.workflow-row-table .flow-track{height:24px}.workflow-row-table .flow-track button{flex-shrink:0;overflow:visible;max-width:none}
.journal-scroll .task-content{display:none}.journal-scroll .journal-task{display:block;width:100%;border:0;text-align:left}
.journal-scroll th:nth-child(1){width:98px}.journal-scroll th:nth-child(2){width:88px}.journal-scroll th:nth-child(3){width:120px}.journal-scroll th:nth-child(4),.journal-scroll th:nth-child(5){width:120px}.journal-scroll th:nth-child(6){width:330px}.journal-scroll th:nth-child(7){width:88px}.journal-scroll th:nth-child(8){width:250px}
.preview-scroll th{width:120px}.preview-scroll th:nth-child(1){width:70px}.preview-scroll th:nth-child(2){width:98px}.preview-scroll th:nth-child(3){width:88px}.preview-scroll th:nth-child(7){width:330px}.preview-scroll th:nth-child(8){width:230px}.preview-scroll th:nth-child(9){width:100px}.preview-scroll th:nth-child(10){width:220px}
/* Record detail sheets retain full original values; density applies to typography, not truncating the detail itself. */
:is(main,dialog) table.remote-detail td{white-space:pre-wrap!important;overflow-wrap:anywhere;height:auto!important;line-height:16px!important}.remote-detail th{position:static!important;height:auto!important;vertical-align:top;width:140px!important}
#settings-view[hidden]{display:none!important}#settings-view{padding:12px 0;overflow:auto}#settings-view h2{font-size:18px;margin:0 0 8px}#settings-view h3{font-size:16px;margin:0}#settings-view p{font-size:14px;line-height:20px}.staff-scroll{max-height:55vh}#staff-draft-dialog{width:640px}#staff-company-options{display:flex;gap:10px;flex-wrap:wrap}#staff-company-options label{display:flex;gap:4px;align-items:center}#staff-draft-result{white-space:pre-wrap;font-size:14px;line-height:20px}
/* Override W's earlier .master-inline !important sizing with X's input-cell metrics. */
.master-table td .master-inline{font-size:14px!important;line-height:18px!important;height:24px!important;padding:1px 2px!important;border:0!important}

/* Employee forms: preserve X v33 table density, keep checkbox labels intact. */
#staff-draft-dialog label:has(input[type=checkbox]){display:flex;align-items:center;gap:6px;width:auto;white-space:nowrap}
#staff-draft-dialog input[type=checkbox]{width:14px;height:14px;flex:0 0 14px;margin:0}
#staff-company-options label{flex:0 0 auto;white-space:nowrap}
#staff-company-options{gap:8px 14px;padding:8px 0}
.staff-table{width:1400px;min-width:1400px}.staff-table th:last-child,.staff-table td:last-child{width:210px!important}
#password-change-dialog,#staff-reset-dialog{width:min(480px,90vw)}
#password-change-dialog label,#staff-reset-dialog label{display:block;margin:10px 0}

/* X v33 exact resizer geometry; existing typography/28px rows unchanged. */
.master-table.resizable-table th,.master-table.resizable-table td{width:auto;max-width:none}.master-table.resizable-table th{padding-right:10px}
.master-table th>.column-resizer{position:absolute;top:0;right:0;bottom:0;width:8px;max-height:none;cursor:col-resize;touch-action:none;user-select:none;z-index:5;overflow:visible;border-right:1px solid #c5d0dc}
.column-resizer:hover,.column-resizer:focus-visible{background:#b7cce5;outline:none}.master-table input{min-width:0}
#master-columns-dialog{width:min(700px,95vw)}#master-columns-list{max-height:55vh;overflow:auto}.master-column-row{display:flex;align-items:center;gap:6px;padding:4px 0}.master-column-row label{display:flex;align-items:center;gap:4px;min-width:160px}.master-column-row input[type=checkbox]{width:14px;height:14px}.master-column-row input[type=number]{width:80px}.master-column-row button{height:20px;padding:0 5px}#master-column-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}.master-draft input,.master-draft select{width:100%;height:24px;font-size:14px;padding:1px 3px}.master-draft{background:#eff6ff}

/* Selection follows the common dense grid; never writes Task data. */
.master-table .master-select-cell input[type=checkbox],.master-table th input[type=checkbox]{width:14px!important;height:14px!important;margin:0!important;display:inline-block;vertical-align:middle}
.master-table tbody tr.is-selected td{background:#dceafc!important}
#master-preferences-status,#master-selection-count{font-size:12px;white-space:nowrap}
.master-table th[draggable=true]{cursor:grab}

/* Common header controls: retain X v33 28/44px metrics. */
.w-column-heading{display:flex;align-items:center;gap:2px;height:38px;padding-right:6px;min-width:0}
.w-column-heading>button:first-child{flex:1;min-width:0;max-height:34px;line-height:17px;font-size:14px;white-space:normal;overflow:hidden;text-overflow:ellipsis;border:0;background:transparent;padding:0;text-align:left}
.w-column-heading .w-header-filter{flex:0 0 22px;width:22px;height:24px;min-height:0;padding:0;border:1px solid #c5d0dc;border-radius:3px;background:#fff;color:#334155;font-size:18px;line-height:22px}
.w-column-heading .w-header-filter[aria-pressed=true]{background:#dbeafe;color:#174c99;border-color:#4584c6}
.master-heading{gap:8px;flex-wrap:wrap}.master-heading button{margin-left:0;min-height:24px;padding:2px 6px;font-size:12px}
#master-active-filters{font-size:12px;white-space:nowrap}
.w-column-filter{width:min(360px,92vw);max-height:80vh;padding:16px;border:1px solid #c5d0dc;border-radius:6px;overflow:auto}
.w-column-filter h3{font-size:16px;margin:0 0 10px}.w-column-filter form>label{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:14px}
.w-column-filter form>label input{flex:1;min-width:0;height:30px}.w-column-filter select{width:100%;height:30px;margin:6px 0}
.w-column-filter fieldset{max-height:240px;overflow:auto;margin:8px 0;border:1px solid #dce6ed}.w-column-filter fieldset label{display:flex;align-items:center;gap:6px;margin:4px 0;font-size:14px}.w-column-filter input[type=checkbox]{width:14px;height:14px;margin:0}
.w-filter-actions{display:flex;gap:8px;margin-top:12px}.w-filter-actions button{min-height:28px;padding:3px 10px}
.journal-table.resizable-table th{width:auto!important}.journal-table th>.column-resizer{position:absolute;top:0;right:0;bottom:0;width:8px;cursor:col-resize;touch-action:none;z-index:5;border-right:1px solid #c5d0dc}.journal-table th[draggable=true]{cursor:grab}
.journal-table tbody tr.is-selected td{background:#dceafc!important}.journal-table input[type=checkbox]{width:14px!important;height:14px!important;margin:0!important}
.journal-heading{justify-content:flex-start;gap:8px;flex-wrap:wrap;padding:8px}.journal-heading button{min-height:24px;padding:2px 6px;font-size:12px}.journal-heading span,#journal-message{font-size:12px}#journal-message{margin:4px 8px}

.master-table td.grid-selected{background:#e9f0fc;box-shadow:inset 0 0 0 1px #c3d3ef}.master-table td.grid-active{box-shadow:inset 0 0 0 2px #7c9eca}.master-table td.grid-editing{background:#fff7dc}.master-table td[data-field]{user-select:none}.master-table .master-inline{user-select:text}.grid-row-number{font-size:10px;padding:0 2px;border:0;background:transparent;color:#68758b}.master-table .master-select-cell{white-space:nowrap}
