/* Noorstar — app layout + components on top of design-system.css (hand-written; the design's
   inline styles turned into classes). Only design tokens are used. */

[hidden] { display: none !important; }

/* Status colours the design system has no tokens for — light values here, dark ones for the Control theme. */
:root { --danger-bg: #fdecec; --danger-border: #e6a3a3; --danger-text: #8a1f1f; --danger-strong: #c53030; --warn-text: #b45309; }
[data-theme="control"] { --danger-bg: #3a1618; --danger-border: #7a2c30; --danger-text: #f6b3b3; --danger-strong: #f07470; --warn-text: #f0a33a; }
html, body { height: 100%; }
.app { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); }

/* ── sidebar ─────────────────────────────────────────────────────────── */
.sidebar { border-right: 1px solid var(--color-divider); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--color-bg); }
.sidebar-brand { padding: 16px 14px 10px; display: flex; align-items: center; gap: 10px; }
.sidebar-code { width: 30px; height: 30px; display: grid; place-items: center; font-family: var(--font-heading); font-weight: 600; font-size: 15px; color: var(--color-accent-700); }
.sidebar-name { font-family: var(--font-heading); font-weight: 600; font-size: 17px; line-height: 1.1; }
.sidebar-sub, .nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-600); }
.nav-label { font-size: 10px; letter-spacing: .1em; padding: 8px 14px 2px; }
.nav-label + .nav-label { padding-top: 14px; }
/* drop an email from Outlook (24-Sep-2026) */
.email-drop { border: 2px dashed var(--color-neutral-300); padding: 14px 16px; text-align: center; font-size: 13px; color: var(--color-neutral-700); cursor: pointer; background: color-mix(in srgb, var(--color-text) 3%, transparent); border-radius: var(--radius-md, 6px); }
.email-drop.is-over { border-color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.email-drop .link { color: var(--color-accent-700); text-decoration: underline; }
.email-drop-results { text-align: left; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
/* a folding menu group (24-Sep-2026) */
.nav-fold { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; padding-top: 14px; }
.nav-fold:hover { color: var(--color-accent-700); }
.nav-fold .nav-caret { margin-left: auto; font-size: 11px; transition: transform .15s; }
.nav-fold[aria-expanded="true"] .nav-caret { transform: rotate(90deg); }
.sidebar-toggle { padding: 4px 14px 12px; }
.sidebar .seg { width: 100%; }
.sidebar .seg-opt { flex: 1; justify-content: center; }
.sidebar .seg-themes .seg-opt { padding: 7px 4px; font-size: 12px; min-width: 0; }
.sidebar nav { display: flex; flex-direction: column; }
.nl, .kpi, .list-row, .search-hit, .notif-row { text-decoration: none; }
.nl .nl-i { width: 18px; font-size: 11px; color: var(--color-neutral-500); font-variant-numeric: tabular-nums; }
.nl .nl-badge { margin-left: auto; font-size: 11px; color: var(--color-accent-700); }
.sidebar-theme { margin-top: auto; padding: 10px 14px 0; }
.sidebar-theme .nav-label { padding: 0; margin-bottom: 4px; }
.sidebar-user { padding: 14px; border-top: 1px solid var(--color-divider); font-size: 12px; margin-top: 10px; }
.sidebar-user b { font-weight: 500; }
.sidebar-user .muted { color: var(--color-neutral-600); }
.sidebar-user form { display: inline; }
.sidebar-user .btn-ghost { padding: 0; font-size: 12px; margin-top: 4px; }

/* ── main / header ───────────────────────────────────────────────────── */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--color-divider); position: sticky; top: 0; background: var(--color-bg); z-index: 5; }
.search-wrap { position: relative; flex: 1; max-width: 560px; }
.search-wrap .input { padding-left: 34px; }
.search-wrap svg { position: absolute; left: 11px; top: 11px; color: var(--color-neutral-500); }
.search-pop { position: absolute; top: 40px; left: 0; right: 0; background: var(--color-bg); z-index: 20; padding: 6px 0; }
.search-pop .pop-title { padding: 4px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-600); }
.search-hit { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 7px 12px; cursor: pointer; border-top: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent); text-decoration: none; color: inherit; }
.search-hit:hover { background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.search-hit .tag { justify-content: center; }
.search-hit .t { font-size: 13px; }
.search-hit .s { font-size: 12px; color: var(--color-neutral-600); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bell { position: relative; }
.bell-count { background: var(--color-accent); color: var(--color-bg); font-size: 10px; padding: 0 5px; line-height: 16px; }
.notif-pop { position: absolute; right: 20px; top: 52px; width: 380px; background: var(--color-bg); z-index: 20; }
.notif-head { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--color-divider); }
.notif-head span { font-family: var(--font-heading); font-weight: 600; font-size: 16px; }
.notif-head .btn-ghost { margin-left: auto; font-size: 12px; }
.notif-row { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 9px 14px; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent); text-decoration: none; color: inherit; }
.notif-row .dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--color-neutral-300); }
.notif-row .t { font-size: 13px; }
.notif-row .s { font-size: 11px; color: var(--color-neutral-600); }
.notif-empty { padding: 16px 14px; font-size: 13px; color: var(--color-neutral-600); }

/* ── page ─────────────────────────────────────────────────────────────── */
.page { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head h2 { margin: 0; }
.page-head .sub { color: var(--color-neutral-600); font-size: 13px; }
.page-head .crumbs { font-size: 12px; color: var(--color-neutral-600); margin-bottom: 4px; }
.page-head .crumbs a { color: var(--color-accent); text-decoration: none; }
.page-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* dashboard toggles (Overview|Pipeline · ALL|names · period) stay on ONE line, right of the heading (Saqib, 25-Sep-2026) */
/* 25-Sep-2026 (Saqib): its own full-width row under the heading — Overview | Pipeline on the left, the company filter in the middle, the period on the right */
.page-head .head-tools { flex: 1 1 100%; display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; white-space: nowrap; margin-top: 6px; }
.page-head .head-tools > .seg:first-child { justify-self: start; grid-column: 1; }
.page-head .head-tools > #company-filter { justify-self: center; grid-column: 2; }
.page-head .head-tools > .seg:last-child:not(:first-child):not(#company-filter) { justify-self: end; grid-column: 3; }
@media (max-width: 760px) { .page-head .head-tools { grid-template-columns: 1fr; } .page-head .head-tools > * { justify-self: start !important; grid-column: 1 !important; } }
.flash { padding: 10px 14px; font-size: 13px; border: 1px solid var(--color-accent-300); background: var(--color-accent-100); color: var(--color-accent-800); }
.flash.err { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.errors { padding: 10px 14px; font-size: 13px; border: 1px solid var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

/* grids */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-32 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.grid-23 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-end { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.grow { flex: 1; min-width: 160px; }
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 16px; }
.small { font-size: 12px; } .tiny { font-size: 11px; } .muted { color: var(--color-neutral-600); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hide { display: none !important; }

/* KPI card */
.kpi { cursor: pointer; padding: 14px 16px; text-decoration: none; color: inherit; }
.kpi .v { font-family: var(--font-heading); font-weight: 600; font-size: 30px; line-height: 1; }
.kpi .s { font-size: 12px; color: var(--color-neutral-700); }
.kpi.warn .card-kicker { color: var(--warn-text); }

/* panels & tables */
.panel { padding: 16px; }
/* Every table scrolls inside its own box — never the page (ui-conventions). Cards are flex columns, so their
   children also need min-width:0 or wide content widens the card itself. */
.table-wrap { overflow-x: auto; max-width: 100%; }
.blueprint.table-wrap { padding: 0; }
.card > * { min-width: 0; }
.card > .btn { align-self: flex-start; }
/* Cells marked .wrap may break lines (names, makes, notes) so a table fits before it has to scroll. */
.table td.wrap, .table th.wrap { white-space: normal; }
.table td.wrap { min-width: 120px; }
.actions-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
/* Numeric column headings sit over their right-aligned figures (the design system left-aligns every th). */
.table th.num { text-align: right; }
/* Comparison matrix: one supplier per column, mixed numbers and text per column — everything reads
   left-aligned under its supplier heading (figures keep tabular digits, the best value keeps .best). */
.table.compare th, .table.compare td, .table.compare .num { text-align: left; }
/* Entry tables: headings may wrap, inputs fill their cell instead of forcing it wider. */
.table.lines th { white-space: normal; vertical-align: bottom; }
.table.lines td { white-space: normal; vertical-align: top; }
.table.lines .input { width: 100%; min-width: 0; }
.table.lines .input.w-70 { width: 76px; }
.table.lines .input.w-100 { width: 104px; }
.cell-stack { display: flex; flex-direction: column; gap: 4px; }
.cell-pair { display: flex; gap: 4px; }
.cell-pair > * { flex: 1; min-width: 0; }
.card .card-title { display: flex; align-items: baseline; gap: 14px; }
.card .card-title .ml-auto { font-size: 12px; font-weight: 400; color: var(--color-neutral-600); font-family: var(--font-body); }
/* every titled card minimises (Saqib, 23-Sep-2026): the chevron in the title hides everything but the title; cards with a
   data-fold-key remember it per browser */
.card-title > .card-fold { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--color-neutral-600); font: inherit; font-size: 13px; line-height: 1; padding: 2px 5px; align-self: center; transition: transform .15s; }
.card-title > .ml-auto + .card-fold { margin-left: 0; }
.card-title > .card-fold:hover { color: var(--color-accent); }
.card.is-folded > :not(.card-title):not(.corner) { display: none !important; }
.card.is-folded > .card-title > .card-fold { transform: rotate(-90deg); }
.list-row { display: grid; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent); font-size: 13px; }
.list-row b { font-family: var(--font-heading); font-weight: 600; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13px; }
.kv .k { color: var(--color-neutral-600); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step .step-i { font-size: 10px; color: var(--color-neutral-500); }
.bar { height: 6px; background: var(--color-neutral-200); position: relative; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--color-accent); }
.chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; align-items: end; height: 180px; margin-top: 14px; border-bottom: 1px solid var(--color-divider); }
.chart svg { width: 48px; height: 100%; display: block; margin: 0 auto; }
.chart-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; font-size: 12px; text-align: center; color: var(--color-neutral-600); margin-top: 6px; }
.legend { margin-left: auto; font-size: 12px; display: flex; gap: 12px; align-items: center; }
.legend .sw { display: inline-block; width: 10px; height: 10px; background: var(--color-accent); }
.legend .sw.o { background: none; border: 1px solid var(--color-accent-700); }
.totals { display: grid; grid-template-columns: auto auto; gap: 6px 24px; justify-content: end; font-size: 13px; padding: 10px 12px; }
.totals .k { color: var(--color-neutral-600); }
.totals .big { font-family: var(--font-heading); font-weight: 600; font-size: 16px; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* dense rows: a label that wrapped pushed its box down and the inputs of the row sat at different heights (Saqib, 23-Sep-2026) —
   labels stay on one line (ellipsis if too long; keep them short) so the inputs of a row are always inline */
.form-grid.cols-3 .field > label, .form-grid.cols-4 .field > label, .row-end .field > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-grid.cols-3, .form-grid.cols-4 { align-items: start; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.field .hint { font-size: 11px; color: var(--color-neutral-600); margin-top: 3px; }
.field.error .input { border-color: var(--danger-strong); }
.field .err { font-size: 11px; color: var(--danger-strong); margin-top: 3px; }
.input-sm { min-height: 30px; padding: 3px 8px; }
.input.w-70 { width: 70px; text-align: right; }
.input.w-100 { width: 100px; }
select.input { appearance: auto; }
.lines .input { min-height: 30px; padding: 3px 8px; }
.lines td { vertical-align: middle; }
.lines textarea.input { min-height: 30px; }
.item-sub { font-size: 12px; color: var(--color-neutral-600); }
.actions-cell { white-space: nowrap; }

/* dialogs */
/* Popups must be opaque in every theme. The Industry theme makes .card/.dialog transparent (right for cards on
   the page, wrong for a popup — the page showed through), and .dialog-body is faded to 85 %, too faint for forms. */
.dialog-backdrop { z-index: 50; background: rgba(15, 17, 20, .55); }
.dialog-backdrop .dialog { background: var(--color-surface); border: 1px solid var(--color-divider); box-shadow: var(--shadow-lg); max-height: calc(100vh - 32px); overflow-y: auto; }
.dialog-backdrop .dialog-body { opacity: 1; }
[data-theme="industry"] .dialog-backdrop .dialog { background: var(--color-bg); }
.dialog.wide { width: min(980px, 100%); }
.dialog.medium { width: min(640px, 100%); }
.dialog-body .table { font-size: 13px; }
.dialog-body .blueprint { padding: 10px 12px; font-size: 12px; }
.progress { height: 8px; background: var(--color-neutral-200); }
.progress > i { display: block; height: 100%; background: var(--color-accent); transition: width .2s; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--color-bg); }
.auth .card { width: min(400px, 100%); padding: 24px; gap: 14px; }
.auth h1 { font-size: 26px; margin: 0; }

/* print/pdf helpers live in the pdf layout, not here */

/* ── responsive ─────────────────────────────────────────────────────────
   (.menu-btn must be hidden BEFORE the media query that shows it — equal specificity, later wins) */
.menu-btn { display: none; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-32, .grid-23, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; height: auto; transform: translateX(-100%); transition: transform .2s; z-index: 40; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 8px 12px; }
  .search-wrap { max-width: none; }
  .search-wrap .input { font-size: 13px; }
  .topbar-actions .btn-primary { display: none; }
  .page { padding: 14px 12px 40px; }
  .grid-2, .form-grid, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .notif-pop { right: 8px; left: 8px; width: auto; }
  .totals { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 39; }

/* Cost build-up inside a quotation line: item cost + delivery, customs, misc, anything else. */
.cost-box { margin-top: 4px; }
.cost-rows { display: flex; flex-direction: column; gap: 3px; }
.cost-row { display: flex; gap: 4px; align-items: center; }
.table.lines .cost-row .input { min-height: 26px; padding: 2px 6px; font-size: 12px; }
.table.lines .cost-row .input:nth-child(1) { flex: 2 1 120px; width: auto; }
.table.lines .cost-row .input:nth-child(2) { flex: 1 1 80px; width: auto; max-width: 110px; text-align: right; }
.table.lines .cost-row .input:nth-child(3) { flex: 1 1 90px; width: auto; max-width: 120px; }
.cost-row .btn-ghost { margin: 0; }
.cost-add { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; margin-top: 3px; }
.cost-add .btn-ghost { margin: 0; padding: 0 2px; font-size: 12px; }

/* Quotation quantity differs from the enquiry. */
.qty-warn { color: var(--danger-strong); white-space: nowrap; }
.input.input-warn { border-color: var(--danger-strong); }

/* Supplier's answers under an RFQ item (portal + key-in form). */
.answers { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }   /* one line under the item (Saqib, 24-Sep-2026) */
.table.lines .answers .input { width: auto; flex: 0 1 auto; min-height: 26px; padding: 2px 6px; font-size: 12px; }
.table.lines .answers .input:first-child { flex: 0 1 260px; }
.table.lines .answers select.input, .table.lines .answers .ss { flex: 0 1 230px; min-width: 140px; }   /* the searchable-select wrapper needs its own basis in a flex row */
.table.lines .answers .ss .ss-control { width: 100%; }
.table.lines tr.answers-row td { border-top: 0; padding-top: 0; padding-bottom: 10px; }
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4px 16px; }
.check { display: flex; gap: 6px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 3px; }

/* ── Searchable dropdowns (public/js/select-search.js): every <select> becomes a button + a filter panel ── */
.ss { position: relative; display: block; min-width: 0; }
.ss .ss-native { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; padding: 0; border: 0; }
.ss-control { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ss-control .ss-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-control .ss-text.is-placeholder { color: var(--color-neutral-600); }
.ss-control .ss-caret { flex: none; font-size: 11px; color: var(--color-neutral-600); }
.ss-control:disabled { cursor: not-allowed; opacity: .6; }
.ss-control.is-invalid { border-color: var(--danger-strong); }
.table.lines .ss, .lines .ss { width: 100%; }
.ss-panel { position: fixed; z-index: 1000; background: var(--color-surface); border: 1px solid var(--color-divider); box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; gap: 6px; max-width: calc(100vw - 16px); box-sizing: border-box; }
[data-theme="industry"] .ss-panel { background: var(--color-bg); }
.ss-panel .ss-search { width: 100%; box-sizing: border-box; }
.ss-list { max-height: 260px; overflow: auto; }
.ss-opt { padding: 6px 8px; cursor: pointer; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-opt.is-active { background: color-mix(in srgb, var(--color-accent) 14%, transparent); }
.ss-opt.is-selected { font-weight: 600; }
.ss-opt.is-disabled { opacity: .5; cursor: default; }
.ss-empty { padding: 8px; font-size: 13px; color: var(--color-neutral-600); }

/* ── Deal pipeline (dashboard → Pipeline tab): one column per stage, one card per live deal ── */
/* four buckets per row, each scrolling inside itself (Saqib, 24-Sep-2026) */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 4px 2px 14px; align-items: start; }
/* every bucket in a row is the same height (Saqib, 25-Sep-2026); the ▾ in its heading minimises it to the heading alone */
.pipe-col { height: 360px; }
.pipe-head > .pipe-fold { border: 0; background: none; cursor: pointer; color: var(--color-neutral-600); font: inherit; font-size: 13px; line-height: 1; padding: 2px 4px; transition: transform .15s; }
.pipe-head > .pipe-fold:hover { color: var(--color-accent); }
.pipe-col.is-folded { height: auto; min-height: 0; overflow: hidden; }
.pipe-col.is-folded > :not(.pipe-head) { display: none !important; }
.pipe-col.is-folded > .pipe-head > .pipe-fold { transform: rotate(-90deg); }
@media (max-width: 1100px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pipeline { grid-template-columns: 1fr; } }
.pipe-col { background: color-mix(in srgb, var(--color-text) 4%, transparent); border: 1px solid var(--color-divider); padding: 8px; min-height: 140px; max-height: 360px; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 8px; }
.pipe-col > .pipe-head { position: sticky; top: -8px; margin: -8px -8px 0; padding: 8px 8px 6px; background: color-mix(in srgb, var(--color-text) 4%, var(--color-bg)); z-index: 1; }
.pipe-col.is-empty { opacity: .6; }
.pipe-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--color-neutral-700); line-height: 1.2; }
.pipe-head b { font-family: var(--font-heading); font-size: 14px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-divider); padding: 1px 7px; }
.pipe-card { display: block; padding: 8px 10px; background: var(--color-surface); color: inherit; text-decoration: none; font-size: 12.5px; line-height: 1.35; }
.pipe-card:hover, .pipe-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.pipe-ref { font-family: var(--font-heading); font-weight: 600; font-size: 13px; }
.pipe-party { color: var(--color-text); }
.pipe-title { color: var(--color-neutral-600); font-size: 12px; }
.pipe-meta { margin-top: 4px; color: var(--color-neutral-700); font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pipe-kind { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--color-neutral-600); }
.pipe-none { color: var(--color-neutral-600); text-align: center; padding: 14px 0; }
.seg .seg-opt.is-on { font-weight: 600; }
a.seg-opt { color: inherit; text-decoration: none; }

/* ── Quotation line in two rows: description + qty on top, the costing underneath (customer-quotations/_line) ── */
.qline { display: flex; flex-direction: column; gap: 6px; }
.qline-top { display: flex; gap: 10px; align-items: flex-start; }
.qline-top textarea { flex: 1 1 auto; min-width: 200px; }
.qline-costs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-start; }
.qf { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--color-neutral-600); white-space: nowrap; }
.qf > span:first-child { line-height: 1.2; }
.qf .input { min-height: 30px; padding: 3px 8px; width: 100%; min-width: 0; text-align: right; }
/* what you type is white with an accent border; what the app works out is a grey read-only box */
#quotation-form .input:not([readonly]):not(select), #quotation-form select.input, #quotation-form .ss-control { background: var(--color-surface); border-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-divider)); }
#quotation-form .input:not([readonly]):not(select):focus { border-color: var(--color-accent); }
#quotation-form .input[readonly] { background: color-mix(in srgb, var(--color-text) 6%, transparent); color: var(--color-neutral-700); border-style: dashed; cursor: default; }
#quotation-form .input[readonly].is-total { font-family: var(--font-heading); font-weight: 600; color: var(--color-text); }

/* ── text size (Saqib, 23-Sep-2026: "hardly readable") — the whole UI scales; per user in users.density, switch in the sidebar ── */
html[data-density="normal"] { zoom: 1.12; }
html[data-density="large"] { zoom: 1.28; }
.seg a.seg-opt.is-on { background: var(--color-accent); color: var(--color-bg); }

/* deal progress bar in the RFQ page head (Saqib, 23-Sep-2026) */
.deal-progress { display: flex; align-items: center; gap: 12px; margin-top: 10px; max-width: 620px; }
.deal-progress .bar { flex: 1; height: 8px; }
.deal-progress .small { white-space: nowrap; color: var(--color-neutral-700); }

/* ── RFQ life-cycle page (client, 23-Sep-2026): the RFQ is the master document; every stage is appended below it ── */
.lc-strip { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }   /* one row, scrolls sideways (Saqib, 24-Sep-2026) */
.lc-strip > .lc-step { flex: 0 0 118px; }
.lc-step { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--color-divider); font-size: 11.5px; line-height: 1.25; color: var(--color-neutral-600); min-height: 46px; }
.lc-step .lc-i { font-size: 10px; letter-spacing: .3px; color: var(--color-neutral-500); }
.lc-step .lc-l { font-weight: 600; }
.lc-step .lc-at { font-size: 11px; color: var(--color-neutral-700); font-variant-numeric: tabular-nums; }
.lc-step.done { border-color: var(--color-accent-400); color: var(--color-accent-700); }
.lc-step.done .lc-at { color: var(--color-accent-700); }
.lc-step.cur { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.lc-step.cur .lc-i, .lc-step.cur .lc-at { color: inherit; opacity: .85; }
#life-cycle { border-left: 2px dashed var(--color-neutral-300); padding-left: 14px; }
.lc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.lc-head > .ml-auto { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lc-head form { display: inline; }
.lc-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px 14px; font-size: 13px; }
.lc-facts .k { display: block; font-size: 10.5px; color: var(--color-neutral-600); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 1px; }
.lc-sub { border-top: 1px solid var(--color-divider); padding-top: 8px; margin-top: 10px; }
.lc-sub-title { font-size: 13px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lc-sub-title > a:first-child { font-family: var(--font-heading); font-weight: 600; }
.lc-empty { color: var(--color-neutral-600); font-size: 13px; }
.lc-step.is-sel { box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent); }
/* done / current marks on the tiles (Saqib, 24-Sep-2026) */
.lc-step { position: relative; padding-right: 22px; }
.lc-mark { position: absolute; top: 5px; right: 6px; font-size: 13px; line-height: 1; font-weight: 700; }
.lc-mark.is-done { color: var(--color-accent-700); }
.lc-mark.is-now { color: var(--color-bg); font-size: 9px; top: 8px; }
.lc-step.done { background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
#life-cycle .is-focus { outline: 2px solid var(--color-accent); outline-offset: 3px; background: color-mix(in srgb, var(--color-accent) 9%, transparent); }
#life-cycle tr.is-focus td { background: color-mix(in srgb, var(--color-accent) 9%, transparent); }
.lc-step[data-sec] { cursor: pointer; }
.lc-step[data-sec]:hover, .lc-step[data-sec]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
#life-cycle.is-one { border-left: 0; padding-left: 0; }

/* a form that sits inline beside buttons (Users list: Unlock next to Edit) */
form.inline { display: inline-block; margin: 0; vertical-align: middle; }

/* ══ Dashboard laid out like the client's mock (Dashboard.jpeg page 1 of 12) — 25-Sep-2026 ══ */
:root { --ch-1: #2f6fed; --ch-2: #22a06b; --ch-3: #f59e0b; --ch-4: #7c3aed; --ch-5: #94a3b8; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }   /* rows of four, every tile the same size (Saqib, 25-Sep-2026) */
.tile-grid.tile-grid-money { grid-template-columns: repeat(5, minmax(0, 1fr)); }   /* the money row: five, Bid bonds included (1-Oct-2026) */
@media (max-width: 1100px) { .tile-grid, .tile-grid.tile-grid-money { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .tile-grid, .tile-grid.tile-grid-money { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 10px; color: inherit; text-decoration: none; }
.tile-ico { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; }
.tile-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-blue { color: var(--ch-1); background: color-mix(in srgb, var(--ch-1) 12%, transparent); }
.c-green { color: var(--ch-2); background: color-mix(in srgb, var(--ch-2) 12%, transparent); }
.c-orange { color: var(--ch-3); background: color-mix(in srgb, var(--ch-3) 14%, transparent); }
.c-red { color: #e5484d; background: color-mix(in srgb, #e5484d 12%, transparent); }
.c-purple { color: var(--ch-4); background: color-mix(in srgb, var(--ch-4) 12%, transparent); }
.tile-body { display: flex; flex-direction: column; min-width: 0; }
.tile-k { font-size: 12px; font-weight: 600; color: var(--color-neutral-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-v { font-family: var(--font-heading); font-weight: 600; font-size: 26px; line-height: 1.15; margin: 2px 0; }
.tile.is-money .tile-v { font-size: 20px; }
.tile-l { font-size: 11px; color: var(--color-neutral-600); }
.tile:hover .tile-l { color: var(--color-accent-700); text-decoration: underline; }
.tone-green { color: var(--ch-2); } .tone-blue { color: var(--ch-1); } .tone-red { color: #e5484d; }
.dash-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch; }
@media (max-width: 1100px) { .dash-charts { grid-template-columns: 1fr; } }
.card-title-sub { font-family: var(--font-body); font-weight: 400; }
.dchart { width: 100%; height: auto; display: block; margin-top: 8px; }
.dchart .grid { stroke: var(--color-divider); stroke-width: 1; }
.dchart .ax { font-size: 10px; fill: var(--color-neutral-600); font-family: var(--font-body); }
.dchart rect.ch-1, .dchart circle.ch-1 { fill: var(--ch-1); } .dchart rect.ch-2, .dchart circle.ch-2 { fill: var(--ch-2); } .dchart rect.ch-3 { fill: var(--ch-3); }
.dchart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; } .dchart .ln.ch-1 { stroke: var(--ch-1); } .dchart .ln.ch-2 { stroke: var(--ch-2); }
.legend .sw.ch-1 { background: var(--ch-1); border: 0; } .legend .sw.ch-2 { background: var(--ch-2); border: 0; } .legend .sw.ch-3 { background: var(--ch-3); border: 0; }
.donut-wrap { display: flex; gap: 14px; align-items: center; }
.donut { width: 120px; height: 120px; flex: 0 0 120px; }
.donut circle.ch-1 { stroke: var(--ch-1); } .donut circle.ch-2 { stroke: var(--ch-2); } .donut circle.ch-3 { stroke: var(--ch-3); } .donut circle.ch-4 { stroke: var(--ch-4); } .donut circle.ch-5 { stroke: var(--ch-5); }
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; flex: 1; min-width: 0; }
.donut-legend .row { gap: 8px; }
.donut-legend a { color: inherit; text-decoration: none; }
.donut-legend .sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 10px; }
.donut-legend .sw.ch-1 { background: var(--ch-1); } .donut-legend .sw.ch-2 { background: var(--ch-2); } .donut-legend .sw.ch-3 { background: var(--ch-3); } .donut-legend .sw.ch-4 { background: var(--ch-4); } .donut-legend .sw.ch-5 { background: var(--ch-5); }
.donut-legend b { color: var(--ch-2); }
.act-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent); font-size: 13px; color: inherit; text-decoration: none; }
.act-row:first-of-type { border-top: 0; }
.act-ico { width: 20px; height: 20px; border-radius: 50%; padding: 3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.act-row b { font-family: var(--font-heading); font-weight: 600; font-size: 12px; }

/* ── the left menu in the mock's dark navy (25-Sep-2026) ── */
.sidebar { --sb-bg: #0b1f44; --sb-fg: #e6ecf7; --sb-muted: #93a4c6; --sb-line: rgba(255,255,255,.14); background: var(--sb-bg); color: var(--sb-fg); border-right: 0; }
.sidebar .sidebar-name { color: #fff; }
.sidebar .sidebar-sub, .sidebar .nav-label, .sidebar .nl .nl-i, .sidebar-user .muted { color: var(--sb-muted); }
.sidebar .sidebar-code { color: #fff; }
.sidebar .blueprint > .corner::before, .sidebar .blueprint > .corner::after { background: rgba(255,255,255,.45); }
.sidebar .nl { color: var(--sb-fg); }
.sidebar .nl:hover { background: rgba(255,255,255,.08); }
.sidebar .nl[aria-current="page"] { background: var(--color-accent); color: #fff; border-left-color: #fff; }
.sidebar .nl[aria-current="page"] .nl-i, .sidebar .nl[aria-current="page"] .nl-badge { color: #fff; }
.sidebar .nl .nl-badge { color: #fff; background: rgba(255,255,255,.16); padding: 0 6px; border-radius: 9px; min-width: 18px; text-align: center; }
.sidebar .nl .nl-badge:empty { display: none; }
.sidebar .nav-fold:hover { color: #fff; }
.sidebar .seg { border-color: var(--sb-line); background: transparent; }
.sidebar .seg-opt { color: var(--sb-fg); }
.sidebar .seg-opt + .seg-opt { border-left-color: var(--sb-line); }
.sidebar .seg-opt:has(input:checked) { background: var(--color-accent); color: #fff; }
.sidebar .seg-opt:not(:has(input:checked)):hover { background: rgba(255,255,255,.08); }
.sidebar-user { border-top-color: var(--sb-line); }
.sidebar-user b { color: #fff; }
.sidebar .btn-ghost { color: var(--sb-fg); }
.sidebar .btn-ghost:hover { color: #fff; }
.card.tile { flex-direction: row; }
.sidebar .nl { white-space: nowrap; font-size: 13.5px; }
.dash-charts .card-title { flex-wrap: wrap; row-gap: 4px; }

.donut-legend .dl-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; }
.donut-legend .dl-row a, .donut-legend .dl-row .muted { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.donut-legend .dl-row b { margin-left: auto; }

.sidebar-logo { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px; flex: 0 0 34px; }

/* supplier checklist on the sourcing page (client, 26-Sep-2026: tick many suppliers; they know them by email) */
.sup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2px 14px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; border: 1px solid var(--color-divider); padding: 6px 8px; }
.sup-row { display: grid; grid-template-columns: 18px 1fr; grid-template-areas: "c n" "c m" "c t" "c b"; column-gap: 8px; align-items: center; padding: 5px 4px; cursor: pointer; font-size: 13px; line-height: 1.25; border-radius: 4px; }
.sup-row:hover { background: color-mix(in srgb, var(--color-accent) 7%, transparent); }
.sup-row:has(input:checked) { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.sup-row.is-off { opacity: .55; cursor: not-allowed; }
.sup-row input { grid-area: c; }
.sup-row .sup-name { grid-area: n; font-weight: 600; }
.sup-row .sup-mail { grid-area: m; color: var(--color-accent-700); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row .sup-meta { grid-area: t; color: var(--color-neutral-600); font-size: 11.5px; }
.sup-row .sup-brands { grid-area: b; color: var(--color-neutral-600); font-size: 11.5px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* every input field on a very light tint of the theme's own blue — the accent of the active menu entry (Saqib, 28-Sep-2026;
   first asked as #E6E5FF, then "a very light variant of this blue"). Worked-out (read-only) boxes keep their grey; the text
   inside an input is always dark, so the dark theme stays readable. */
:root { --input-bg: color-mix(in srgb, var(--color-accent) 9%, #ffffff); --input-fg: #16181d; }
.input:not([readonly]):not(:disabled), select.input:not(:disabled), textarea.input:not([readonly]), .ss-control:not(:disabled),
#quotation-form .input:not([readonly]):not(select), #quotation-form select.input, #quotation-form .ss-control,
.ss-panel .ss-search { background: var(--input-bg); color: var(--input-fg); }
.input::placeholder { color: color-mix(in srgb, var(--input-fg) 50%, transparent); }
.ss-control:not(:disabled) .ss-text.is-placeholder, .ss-control:not(:disabled) .ss-caret { color: color-mix(in srgb, var(--input-fg) 55%, transparent); }
select.input option { background: #fff; color: var(--input-fg); }
/* a list row with its Remove button beside it */
.row-with-remove { display: flex; align-items: center; gap: 6px; border-top: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent); }
.row-with-remove > .list-row { flex: 1 1 auto; min-width: 0; border-top: 0; }
.row-with-remove:first-of-type { border-top: 0; }
.btn-remove { color: #c0392b; font-size: 12px; padding: 2px 6px; }
.btn-remove:hover { text-decoration: underline; }

/* Quotation costing row (29-Sep-2026, client: "keep the inputs inline"): a hint or warning under a box floats below it
   instead of pushing that box up, so every input of the row stays on one line. */
#costing .field { position: relative; }
#costing .field > .hint, #costing .field > .err { position: absolute; top: 100%; left: 0; margin-top: 2px; white-space: nowrap; }

/* Status colours the client asked for (1-Oct-2026): "Quotations Received" pale yellow, the customer quotation (sent) light green */
.tag.tag-received { background: #fdf3c4; color: #7a5a00; }
.tag.tag-sent { background: #d6f2dd; color: #1d6b34; }
[data-theme="control"] .tag.tag-received { background: #4a3d0f; color: #f6dc7a; }
[data-theme="control"] .tag.tag-sent { background: #173d24; color: #9be2b0; }
/* every plain file box takes dropped files (03-Oct-2026, public/js/app.js) */
[data-drop-field] input[type=file] { border-style: dashed; }
[data-drop-field] .drop-hint { color: var(--color-neutral-500); }
[data-drop-field].is-over { outline: 2px dashed var(--color-accent); outline-offset: 3px; background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
/* Inputs in one line (Saqib, 03-Oct-2026: "keep inputs in line for good user experience in whole app"). A row of fields used to
   line up on the bottom, so a field with a hint under it pushed its label and input up out of line. Now every row of fields lines
   up on the top: labels on one line, inputs on one line, hints hang below; a button or other item in the row (and a field without
   a label) drops by one label's height to sit level with the inputs. */
.row:has(> .field), .row-end:has(> .field) { align-items: flex-start !important; }
.row > .field > label, .row-end > .field > label { line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row:has(> .field) > :not(.field):not([hidden]), .row-end:has(> .field) > :not(.field):not([hidden]),
.row:has(> .field) > .field:not(:has(> label)), .row-end:has(> .field) > .field:not(:has(> label)) { margin-top: 21px; }
.row:has(> .field) > [style*="flex-basis:100%"], .row-end:has(> .field) > [style*="flex-basis:100%"] { margin-top: 0; }
/* the profile menu at the top right (03-Oct-2026): the user, theme, text size and sign out — moved from the foot of the sidebar */
.profile-btn { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px; }
.profile-btn .profile-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-accent); color: var(--color-bg); font-size: 11px; font-weight: 600; letter-spacing: .3px; flex: none; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.profile-pop { position: absolute; right: 20px; top: 52px; width: 300px; background: var(--color-bg); z-index: 20; padding-bottom: 6px; }
.profile-head { display: flex; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--color-divider); }
.profile-head b { font-weight: 600; }
.profile-sec { padding: 10px 14px 0; }
.profile-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--color-neutral-600); margin-bottom: 4px; }
.profile-sec .seg { width: 100%; }
.profile-sec .seg-opt { flex: 1; justify-content: center; padding: 7px 4px; font-size: 12px; min-width: 0; }
.profile-out { padding-bottom: 8px; }
.profile-out .btn { width: 100%; }
@media (max-width: 760px) { .profile-btn .profile-name { display: none; } }
/* bank statements (5-Oct-2026): one cell per month */
.bst-grid td.num { white-space: nowrap; }
.bst-file { display: inline-flex; align-items: center; gap: 2px; }
.bst-file a { text-decoration: none; font-size: 16px; }
.bst-file form { display: inline; }
.bst-x { border: 0; background: none; color: var(--color-neutral-500); cursor: pointer; padding: 0 2px; font-size: 13px; line-height: 1; }
.bst-x:hover { color: var(--danger-strong); }
.bst-missing { color: var(--danger-strong); opacity: .75; }
/* a quotation line left out (Quote unticked, 05-Oct-2026): kept, dimmed, priced 0 */
.quote-tick { width: 52px; align-items: center; cursor: pointer; }
.quote-tick .chk { width: 18px; height: 18px; margin-top: 9px; }
#q-lines tr.is-left .qline-costs, #q-lines tr.is-left .qline-top textarea { opacity: .45; }
#q-lines tr.is-left [data-margin] { color: var(--danger-strong); }
/* tender submission (05-Oct-2026): submitted green · not yet amber · missed red · no bid / cancelled grey */
.tag.tag-sub-yes { background: #d6f2dd; color: #1d6b34; }
.tag.tag-sub-no { background: #fdf3c4; color: #7a5a00; }
.tag.tag-sub-late { background: #fbdcdc; color: #9b1c1c; }
.tag.tag-sub-off { background: color-mix(in srgb, var(--color-text) 8%, transparent); color: var(--color-neutral-600); }
[data-theme="control"] .tag.tag-sub-yes { background: #173d24; color: #9be2b0; }
[data-theme="control"] .tag.tag-sub-no { background: #4a3d0f; color: #f6dc7a; }
[data-theme="control"] .tag.tag-sub-late { background: #4d1717; color: #f5a9a9; }
/* Every column fits (Saqib, 05-Oct-2026: "on each and every form every column should fit and be shown"). The design system keeps
   every table cell on one line, so a long tender no. or customer name pushed the last columns off the screen. Text cells now wrap
   (long codes break at their hyphens / slashes, and anywhere if they must); figures, dates marked nowrap and the headings stay on one line. */
.table td { white-space: normal; overflow-wrap: anywhere; }
.table td.num, .table td.nowrap, .table td .nowrap, .table td .tag, .table td .btn { white-space: nowrap; overflow-wrap: normal; }
.table td .input, .table td select { min-width: 0; }

/* The side menu collapses to its numbers (05-Oct-2026): the button left of the search, remembered in this browser; every entry keeps
   its name as a tooltip. Phones keep the slide-in menu. */
.sb-collapse { flex: none; }
.sb-collapse .sb-ico { display: inline-block; transition: transform .15s; }
html.sb-collapsed .sb-collapse .sb-ico { transform: rotate(180deg); }
@media (min-width: 901px) {
  html.sb-collapsed .app { grid-template-columns: 58px minmax(0, 1fr); }
  html.sb-collapsed .sidebar .nl-t, html.sb-collapsed .sidebar .nl-badge, html.sb-collapsed .sidebar .nav-label:not(.nav-fold),
  html.sb-collapsed .sidebar .sidebar-brand > div, html.sb-collapsed .sidebar .sidebar-toggle, html.sb-collapsed .sidebar #view-as,
  html.sb-collapsed .sidebar #admin-fold, html.sb-collapsed .sidebar #admin-nav { display: none !important; }
  html.sb-collapsed .sidebar .sidebar-brand { justify-content: center; padding: 14px 6px 10px; }
  html.sb-collapsed .sidebar .sidebar-logo, html.sb-collapsed .sidebar .sidebar-code { width: 34px; height: 34px; }
  html.sb-collapsed .sidebar .nl { justify-content: center; padding-left: 0; padding-right: 0; }
  html.sb-collapsed .sidebar .nl .nl-i { width: auto; font-size: 13px; }
}
@media (max-width: 900px) { .sb-collapse { display: none; } }
/* headings may take two lines (words stay whole) so narrow figure columns do not force the table wider */
.table th { white-space: normal; overflow-wrap: normal; }
/* action buttons in a cell may stack instead of widening the table */
.table td.actions-wrap { white-space: normal; text-align: right; }
.table td.actions-wrap .btn, .table td.actions-wrap form { display: inline-block; }
/* entry tables (lines, payments): figure boxes give way down to a readable width before the table scrolls */
.table.lines td .input.w-70, .table.lines td .input.w-100, .table.lines td input[type=number].input { width: 100%; min-width: 64px; }
/* the costing bar wraps onto two rows on a laptop: leave room under each box for its note (the rate note, "≈ EUR … per kg") */
#costing { row-gap: 26px !important; }
/* bid bonds & guarantees on the dashboard (05-Oct-2026): pending amber, received back green */
.sec-pending { color: #a15c00; }
.sec-back { color: #1d6b34; }
[data-theme="control"] .sec-pending { color: #f6c35a; }
[data-theme="control"] .sec-back { color: #9be2b0; }
