/* ─── Odoo tab ───────────────────────────────────────────────────────────────────
   Sixth derivative of the workspace archetype (shared.css owns .pathbar, .workspace,
   .workspace-rail/-row, .workspace-panel/-head/-body, both folds and the .panel-*
   inspector shapes). What's left here is the three grid columns and the pane's sections,
   mirroring workers.css · visual polish is its own pass.
   ─────────────────────────────────────────────────────────────────────────────── */

/* categories · the section's list · the selected product */
.odoo-workspace { --rail-w: 14rem; --panel-w: 22rem; grid-template-columns: var(--rail-col) minmax(0, 1fr) var(--panel-col); }

/* the pane is a column of chrome and one scrolling view, not a scroller itself */
.odoo-pane { display: flex; flex-direction: column; overflow: hidden; }
.odoo-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.odoo-section .table-scroll { flex: 1; min-height: 0; margin-bottom: 0; }

/* a row is a selection, not just a row to read */
#odoo-tbody tr { cursor: pointer; }

/* the Odoo model a section reads · the screen and the API saying the same thing */
.odoo-route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin-bottom: 0.4rem; font-size: 0.72rem; color: var(--text-muted); }
.odoo-route-app { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }

/* a count opening another app · a list row that's a button */
.odoo-jumps { list-style: none; padding: 0; margin: 0; }
.odoo-jumps .odoo-jump { width: 100%; display: flex; align-items: center; gap: 0.5rem; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.odoo-jumps .odoo-jump:disabled { cursor: default; color: var(--text-faint); }
.odoo-jump-app { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-right: 0.35rem; }

/* our own data beside Odoo's record · a bridge, read from our own route */
.odoo-bridge { border: 1px dashed var(--border); border-radius: var(--radius-md); padding: 0.5rem 0.65rem; }
.odoo-bridge-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.odoo-link-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.odoo-link-actions:empty { display: none; }
/* a kit the Odoo 20 product matches by model, kit and revision · offered as a row the size of a search result */
.odoo-suggest { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.odoo-suggest li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0.5rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: 0.82rem; }
.odoo-narrow-chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; }

/* The BOM send's review (odoo/bom_push_review.js) · the kit, its stacks and their sheets as one grouped tree, folded by level from the bar above it */
.bp-tree td:first-child { white-space: nowrap; }
.bp-tree .table-row--child td:first-child { color: var(--text-muted); }
.bp-treebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.bp-name { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.bp-notes { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.bp-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-muted); }

/* The certificate import's review (material_certs/import.js) · each value tinted by the column it lands in, the same tint on its Results header */
.coc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.4rem 1.5rem; }
.coc-docbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; font-size: 0.82rem; }
.coc-docname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 24rem; }
.coc-pager { margin-left: auto; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text-muted); }
.coc-doc { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.72rem; line-height: 1.6; white-space: pre; overflow: auto; max-height: 58vh;
           padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.coc-doc .ln { display: block; border-left: 3px solid transparent; padding-left: 4px; }
.coc-doc .ln.is-read { border-left-color: var(--primary); }
.coc-doc .ln.is-flash { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.coc-doc mark { color: inherit; border-radius: 2px; padding: 0 1px; cursor: help; background: transparent; }
.coc-doc mark.coc-check { outline: 1.5px solid var(--success); }
.coc-checks li { display: flex; gap: 0.4rem; align-items: baseline; }
.coc-checks-head { display: flex; align-items: center; justify-content: space-between; }
.coc-records { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; padding-left: 0; }
.coc-record-head { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.coc-record > .coc-checks { margin: 0.25rem 0 0 1.4rem; }
.coc-ok { color: var(--success); } .coc-warn { color: var(--warning); font-weight: 700; } .coc-bad { color: var(--danger); }
.coc-t-vendor_doc_no { background: color-mix(in srgb, #a16207 22%, transparent) !important; }
.coc-t-issued_on { background: color-mix(in srgb, #64748b 26%, transparent) !important; }
.coc-t-po_name { background: color-mix(in srgb, #3b82f6 24%, transparent) !important; }
.coc-t-lot_name { background: color-mix(in srgb, #8b5cf6 24%, transparent) !important; }
.coc-t-delivered_ref { background: color-mix(in srgb, #22c55e 24%, transparent) !important; }
.coc-t-tested_ref { background: color-mix(in srgb, #06b6d4 24%, transparent) !important; }
.coc-t-density { background: color-mix(in srgb, #f59e0b 28%, transparent) !important; }
.coc-t-compressive_strength { background: color-mix(in srgb, #ef4444 20%, transparent) !important; }
.coc-t-compressive_modulus { background: color-mix(in srgb, #14b8a6 24%, transparent) !important; }
.coc-t-shear_strength { background: color-mix(in srgb, #84cc16 26%, transparent) !important; }
.coc-t-shear_modulus { background: color-mix(in srgb, #ec4899 20%, transparent) !important; }

/* ─── Attachment rows · a CoC's uploaded files, moved here when the Documents tab that first drew them retired ─── */

/* a <label> wrapping a hidden file input, so it needs the button's centring without a button's block sizing */
.doc-attachment-upload-btn { justify-content: center; font-size: 0.8rem; }

.doc-attachment-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--table-surface);
  border: 1px solid var(--border);
}
.doc-attachment-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
/* uploader and date sit under the name rather than beside it — beside it they truncated the filename */
.doc-attachment-meta { font-size: 0.72rem; color: var(--text-faint); white-space: nowrap; }
.doc-attachment-text { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.doc-attachment-actions { display: flex; gap: 0.2rem; flex-shrink: 0; margin-left: auto; }
