.order-receipt {display:inline-block;box-sizing:border-box;width:14px;height:14px;border:2px solid currentColor;border-radius:50%;color:var(--muted);vertical-align:-2px;margin-right:4px}
.order-receipt--partial {background:linear-gradient(to right,currentColor 50%,transparent 50%)}
.order-receipt--full {color:var(--positive-text,var(--action));background:currentColor}
:root {
  color-scheme: light;
  --ink:#192d40; --muted:#53697a; --line:#d8e1e7; --paper:#fff;
  --bg:#f3f6f8; --rail:#142d40; --action:#086859; --tint:#e5f4ee;
  font: 100%/1.48 system-ui,"Segoe UI",sans-serif; color:var(--ink); background:var(--bg);
}
* {box-sizing:border-box}
.partner-field {width:100%;text-align:left;overflow-wrap:anywhere}
.basis-choice small {display:block;margin-top:3px}
.currency-preview-scroll {max-width:100%;overflow-x:auto}
.currency-preview-scroll table {width:100%}
.partner-context-menu {position:fixed;margin:0;padding:4px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);box-shadow:0 6px 20px #0003}
.partner-context-menu button {margin:0;min-width:140px}
body {margin:0}
.owner-view {min-width:0}
.owner-view h2,.owner-view h3 {margin:.3rem 0}
.dash-account {padding:.75rem 0;border-top:1px solid var(--line)}
.dash-total {font-size:1.4rem;color:var(--action)}
.dash-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr));gap:.75rem;margin:.6rem 0}
.dash-metrics > div,.owner-view td small {color:var(--muted)}
.dash-metrics strong,.owner-view td small {display:block}
.dash-metrics strong {color:var(--ink);font-variant-numeric:tabular-nums}
.dash-scroll,#promise .table-scroll {max-width:100%;overflow-x:auto}
.dash-scroll table {width:100%}
.dash-number {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.owner-view details {border:0;border-top:1px solid var(--line);border-radius:0;padding:.7rem 0;margin:.4rem 0}
.owner-view summary {color:var(--action);font-weight:600}
.owner-view form,#promise form {margin:1rem 0}
.owner-view form button,#promise form button {margin-top:.55rem}
.owner-view .section-head {flex-wrap:wrap}
.owner-view td {overflow-wrap:anywhere}
[hidden] {display:none!important}
a {color:var(--action);text-underline-offset:.18em}
:focus-visible {outline:3px solid #df992e;outline-offset:3px}
.skip {position:absolute;z-index:10;left:1rem;top:-8rem;background:white;padding:.7rem}
.skip:focus {top:.6rem}
.shell {display:grid;grid-template-columns:16rem minmax(0,1fr);min-height:100vh}
.canvas {min-width:0}
.rail {position:sticky;top:0;height:100vh;height:100dvh;overflow-y:auto;background:var(--rail);color:#e9f2f5;padding:1.25rem .8rem;scrollbar-width:thin;scrollbar-color:#47637a transparent}
.brand {display:flex;align-items:center;gap:.7rem;font-size:1.25rem;font-weight:750;line-height:1.2}
.rail .brand {margin:.2rem .45rem 1.7rem}
.brand small {display:block;font-size:.76rem;font-weight:500;color:#b5ccd8;letter-spacing:.03em}
.mark {display:inline-grid;place-items:center;width:2.2rem;height:2.2rem;border-radius:.65rem;background:#9be4c8;color:#112e36;line-height:1;font-size:1.45rem;font-weight:800}
.icon {width:1.15rem;height:1.15rem;flex:none}
.rail nav {display:block}
.rail-label,.eyebrow {font-size:.72rem;text-transform:uppercase;letter-spacing:.12em;font-weight:750}
.rail-label {color:#a5bdca;margin:1.45rem .7rem .55rem}
.overview,.nav-group summary {display:flex;align-items:center;gap:.65rem;padding:.65rem .75rem;color:#e9f2f5;text-decoration:none;border-radius:.45rem;font-weight:600;font-size:.92rem}
.nav-group {border:0;margin:.12rem 0;padding:0;border-radius:0;background:transparent}
.nav-group summary {list-style:none}
summary {cursor:pointer}
.nav-group summary::-webkit-details-marker {display:none}
.nav-group summary::after {content:"";margin-left:auto;width:.38rem;height:.38rem;border-right:1.5px solid #9db8c7;border-bottom:1.5px solid #9db8c7;transform:rotate(-45deg)}
.nav-group[open] summary::after {transform:rotate(45deg)}
.nav-group a {display:block;color:#d3e0e7;margin:.1rem 0 .1rem 1.25rem;padding:.43rem .65rem .43rem .9rem;border-left:1px solid #4a6375;text-decoration:none;font-size:.86rem}
.rail a:hover,.nav-group summary:hover {background:#203f53}
.rail [aria-current=page] {background:#245348;color:#ecfff5;border-color:#88ddbd}
.topbar {min-height:4.05rem;padding:.65rem clamp(1rem,3vw,3rem);display:flex;align-items:center;gap:.7rem;background:var(--paper);border-bottom:1px solid var(--line)}
nav {display:flex;flex-wrap:wrap;align-items:center;gap:.7rem}
.document-navigation,.document-path {display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .85rem}
.document-back {padding:.35rem .7rem;border:1px solid var(--line);border-radius:.45rem;background:var(--paper);text-decoration:none}
.document-path {list-style:none;margin:0;padding:0;font-size:.85rem;color:var(--muted)}
.document-path li + li::before {content:"›";margin-right:.65rem}
.document-navigation {margin-bottom:.65rem}
.document-navigation nav,.document-path li {min-width:0;max-width:100%;overflow-wrap:anywhere}
.topbar nav {margin-left:auto;font-size:.86rem}
.topbar nav a,.context {text-decoration:none;color:var(--ink)}
.context {display:flex;align-items:center;gap:.55rem;font-weight:650;overflow-wrap:anywhere}
.dot {width:.55rem;height:.55rem;background:#269b79;border-radius:50%;flex:none}
.topbar form {margin:0}
.topbar button {background:#fff;color:var(--muted);border-color:var(--line);font-size:.85rem}
main {max-width:88rem;margin:auto;padding:clamp(1.2rem,3.2vw,3rem);overflow-wrap:anywhere}
.standalone main {max-width:54rem}
.standalone .brand small {color:var(--muted)}
h1,h2,h3 {line-height:1.2;color:var(--ink)}
h1 {font-size:clamp(1.65rem,3vw,2.45rem);letter-spacing:-.04em;margin:.1rem 0 1.35rem}
h2 {font-size:1.17rem;margin:1.7rem 0 .8rem;letter-spacing:-.02em}
h3 {font-size:1rem;margin:.15rem 0 .75rem}
.eyebrow {margin:0 0 .5rem;color:var(--action)}
.page-lead {border-bottom:1px solid var(--line);padding-bottom:.35rem;margin-bottom:1.3rem}
.quick-grid,.directory,.type-grid {display:grid;gap:.8rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}
.quick,.tile,.panel,.card,.sheet,article,details {border:1px solid var(--line);border-radius:.7rem;background:var(--paper)}
.quick {display:flex;align-items:center;gap:.8rem;padding:1rem;text-decoration:none;color:var(--ink)}
.quick:hover,.card:hover {border-color:#76aa9f;background:#f8fcfa}
.quick small {display:block;color:var(--muted);font-size:.78rem}
.quick strong {font-size:.98rem}
.go {margin-left:auto;color:var(--action)}
.icon-box {display:grid;place-items:center;width:2.35rem;height:2.35rem;border-radius:.6rem;background:var(--tint);color:var(--action);flex:none}
.tile {padding:1.1rem}
.tile h3 {display:flex;align-items:center;gap:.55rem}
.tile .icon {color:var(--action)}
.tile a,.type-group a {display:block;width:fit-content;margin:.25rem 0;padding:.18rem 0;text-decoration:none}
.tile a:hover,.type-group a:hover,.topbar a:hover {text-decoration:underline}
.card,.panel,article,main details,.sheet {display:block;padding:1rem;margin:.75rem 0}
.card {text-decoration:none;width:fit-content;min-width:min(100%,17rem)}
.panel {max-width:44rem}
.sheet {padding:clamp(1rem,2vw,1.5rem)}
.section-head {display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
.section-head h2 {margin:0}
.count,.badge {display:inline-block;border-radius:2rem;padding:.2rem .65rem;background:#edf1f5;color:#485e70;font-size:.82rem;font-weight:625;white-space:nowrap}
.badge.posted {background:var(--tint);color:var(--action)}
.empty {padding:1.1rem;border:1px dashed var(--line);border-radius:.5rem;color:var(--muted)}
.type-grid {align-items:start;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr))}
.type-group {margin:0;padding:.7rem .9rem;background:#fafcfd}
.type-group summary {font-weight:650;color:var(--ink)}
.type-group summary span {font-size:.76rem;color:var(--muted);float:right}
label,legend {display:block;margin:.55rem 0;font-size:.88rem;font-weight:570}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea {display:block;width:100%;min-width:0;margin-top:.25rem;padding:.58rem .7rem;border:1px solid #9eafbd;border-radius:.4rem;background:#fff;color:var(--ink);font:inherit;font-weight:400}
textarea {min-height:4.5rem}
input[type=checkbox],input[type=radio] {accent-color:var(--action)}
fieldset {min-width:0;margin:.8rem 0;border:1px solid var(--line);border-radius:.55rem;padding:.7rem 1rem}
legend {padding:0 .3rem}
button {font:inherit;font-weight:600;line-height:1.25;padding:.6rem .85rem;border:1px solid #a9c1b9;border-radius:.45rem;color:var(--action);background:#eff8f3;cursor:pointer}
button:hover {filter:brightness(.96)}
button[name=action][value=save],button[name=action][value=post] {background:var(--action);border-color:var(--action);color:white}
.type-search {margin:0;min-width:min(100%,15rem);color:var(--muted);font-size:.8rem}
.doc-form {max-width:none}
.doc-fields,.doc-form .op-line {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));gap:.3rem 1rem}
.doc-fields {margin-bottom:1rem}
.doc-form .op-line button {align-self:end;justify-self:start;margin-bottom:.55rem}
.doc-form .op-line {background:#f8fafb}
[role=alert] {color:#9c3024}
pre {white-space:pre-wrap;overflow-wrap:anywhere}
table {display:block;overflow-x:auto;border-collapse:collapse;max-width:100%;margin:1rem 0}
th,td {padding:.65rem .8rem;text-align:left;border-bottom:1px solid var(--line)}
th {font-size:.82rem;color:var(--muted);background:#f5f7f9}
.journal {display:table;width:100%}
.journal td:first-child {width:60%}
.menu-trigger {display:none}
@media (max-width:52rem) {
  .shell {display:block}
  .rail {position:relative;height:auto;max-height:75vh}
  .has-menu .rail {display:none}
  .has-menu .menu-trigger {display:inline-flex;align-items:center;gap:.4rem}
  .has-menu .shell:has(.menu-trigger[aria-expanded=true]) .rail {display:block;position:fixed;inset:4.05rem auto auto 0;width:min(19rem,94vw);max-height:calc(100dvh - 4.05rem);z-index:5;box-shadow:4px 8px 20px #142d4029}
  .topbar {position:sticky;top:0;z-index:6;padding:.55rem .75rem}
  .topbar nav {gap:.45rem}
  .context {font-size:.84rem}
  .rail .brand {display:none}
  .quick-grid,.directory {gap:.6rem}
  .journal td,.journal th {padding:.45rem .3rem}
}
@media (max-width:32rem) {
  .topbar {flex-wrap:wrap}
  .topbar nav {font-size:.77rem}
  .topbar button {padding:.45rem}
  .context {max-width:24vw}
  .doc-form fieldset {padding:.5rem}
  .section-head {align-items:stretch}
  .type-search {flex:1}
}
@media print {
  .rail,.topbar,.skip,.menu-trigger {display:none!important}
  .shell {display:block}
  main {max-width:none;padding:0}
}
.roles-grid,.rights-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));gap:.3rem 1rem}
.roles-grid label {padding:.35rem .45rem;background:#f5f8fa;border-radius:.35rem}

/* Supplier order editor and its nested pickers */
:is(#order-editor,#payment-editor) .sheet h2,.order-dialog h2 {margin:0}
.order-grid {display:grid;grid-template-columns:1.5fr 1.3fr 1fr 1fr;gap:.8rem}
.expense-fields {border:0;padding:0;margin:0;min-width:0}
.execution-fields {border:0;padding:0;margin:0;min-width:0}
#execution-editor .doc-fields {align-items:end}
#execution-editor .doc-fields label {min-width:0}
#execution-editor .partner-field {display:block;margin-top:.25rem;min-height:36px;padding:7px 10px;font:inherit;font-weight:400;line-height:1.48}
:is(#execution-editor,#accrual-editor) .sheet h2 {margin-top:0}
:is(#execution-editor,#accrual-editor) .order-scroll input[inputmode=decimal] {width:100%;text-align:right;margin-top:0}
:is(#execution-editor,#accrual-editor) .order-scroll .amount {text-align:right}
:is(#execution-editor,#accrual-editor) .order-scroll :is(.good-name,.amount output) {display:block;min-height:36px;align-content:center}
:is(#execution-editor,#accrual-editor) .order-scroll :is(td.row-index,td.unit) {vertical-align:middle}
#execution-editor .order-scroll details {white-space:normal}
#execution-editor tr.stock-shortage > td {background:#ffe5e5;color:#70232c}
#execution-editor .stock-shortage :is(label,summary,[data-stock-shortage]) {color:#70232c}
#execution-editor .stock-shortage details {background:transparent;border-color:#e9bbc0}
#execution-editor [data-stock-shortage] {display:block;white-space:normal;margin:.25rem 0;font-weight:500}
#execution-editor .sale-result,.sale-cost-details .numeric {text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#execution-editor .sale-result small {display:block;color:var(--muted)}
.sale-result-total {text-align:right;margin-top:.75rem;font-variant-numeric:tabular-nums}
.sale-result-total p {margin:.3rem 0}
.sale-result-total small {color:var(--muted)}
.order-dialog.sale-cost-dialog {width:min(1100px,96vw);max-height:90vh}
#execution-editor .sale-cost-table th:nth-child(n+3) {text-align:right}
.sale-cost-dialog .sale-cost-details {padding:0;margin:0;border:0;box-shadow:none}
.sale-cost-details table {min-width:850px}
@media(pointer:coarse) {#execution-editor .partner-field {min-height:44px;font-size:16px}}
#payment-editor .order-grid .partner-field {display:block;margin-top:.25rem;min-height:36px;padding:7px 10px;font:inherit;font-weight:400;line-height:1.48}
@media(pointer:coarse) {#payment-editor .order-grid .partner-field {min-height:44px;font-size:16px}}
:is(#order-editor,#payment-editor) details {margin-bottom:0;padding:.6rem 0 0;border:0;border-top:1px solid var(--line);border-radius:0}
:is(#order-editor,#payment-editor) details summary {color:var(--muted);font-size:.85rem}
.order-tools,.picker-actions,.order-total,.order-actions {display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.order-actions form {margin:0}
.order-actions .pay-order {background:var(--action);color:white;font-weight:600;padding:.6rem .85rem;border-radius:.45rem;text-decoration:none}
.order-tools input[type=search] {flex:1;min-width:9rem;margin:0}
.order-search {position:relative}
#quick-hits:not(:empty) {position:absolute;top:100%;left:0;z-index:2;width:min(21rem,85vw);background:white;border:1px solid var(--line);box-shadow:0 .3rem 1rem #192d4024}
.order-scroll {overflow-x:auto}
.delivery-counts {display:block;margin-top:.25rem;font-size:.78rem;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.order-scroll table {display:table;width:100%;margin:0;min-width:39rem;overflow-wrap:normal}
.order-scroll table.sized-columns {table-layout:fixed;min-width:0;max-width:none}
.order-scroll th {position:relative}
.column-grip {position:absolute;inset:0 0 0 auto;width:10px;cursor:col-resize;touch-action:none;user-select:none}
.column-grip::after {content:"";position:absolute;top:20%;bottom:20%;right:3px;border-right:2px solid var(--line)}
.column-grip:hover::after,.column-grip:focus-visible::after {border-color:var(--action)}
.order-scroll th,.order-scroll td {padding:.5rem .4rem}
.order-scroll th,.order-scroll td {white-space:nowrap}
.order-scroll tbody td {vertical-align:top}
form#order-editor .order-scroll {--control-height:2.75rem}
form#order-editor .order-scroll :is(td > input[inputmode=decimal],td > select,.remove-line) {height:var(--control-height);margin-top:0}
form#order-editor .order-scroll :is(.row-index,.order-product,.unit,.amount output) {display:flex;align-items:center;min-height:var(--control-height)}
.order-scroll td:nth-child(2),.order-scroll .order-destination {white-space:normal;overflow-wrap:break-word}
.order-product {display:flex;align-items:center;gap:.5rem;overflow-wrap:anywhere}
.product-photo {padding:.1rem;background:white;flex:none}
.product-photo img {display:block;object-fit:contain}
#product-preview {width:fit-content;max-width:92vw}
#product-preview > img {display:block;max-width:100%;max-height:72vh;object-fit:contain;margin:.8rem auto 0}
#order-editor .order-scroll input[inputmode=decimal] {width:100%;text-align:right}
.order-scroll small,.order-scroll .doc-link {display:block;font-size:.76rem}
.order-scroll small,.order-dialog small {color:var(--muted)}
.order-scroll .amount,.order-total {font-variant-numeric:tabular-nums;white-space:nowrap}
.order-total,.picker-actions {justify-content:flex-end;margin:.9rem 0 0}
.order-total strong {font-size:1.35rem}
.order-summary {margin:1rem 0 0 auto;width:min(100%,24rem);font-variant-numeric:tabular-nums}
.order-summary div {display:flex;align-items:baseline;justify-content:space-between;gap:1rem;padding:.35rem 0}
.order-summary dd {margin:0;font-weight:700;text-align:right}
.remove-line,.doc-link,.picker-choice {background:white;border:0}
.doc-link {padding:.25rem 0;text-align:left;text-decoration:underline}
.order-dialog {width:min(39rem,94vw);max-height:86vh;overflow:auto;border:1px solid var(--line);border-radius:.8rem;padding:1.4rem;color:var(--ink);box-shadow:0 1rem 4rem #142d4033}
.order-dialog::backdrop {background:#17314066}
.picker-list {margin:.8rem 0;max-height:48vh;overflow:auto}
.picker-list label,.picker-choice {display:flex;align-items:center;gap:.7rem;width:100%;padding:.65rem .4rem;margin:0;text-align:left;border-radius:0;border-bottom:1px solid var(--line)}
.picker-list label:hover,.picker-choice:hover {background:var(--tint)}
.receipt-pick-head,.picker-list label.receipt-pick-row {display:grid;grid-template-columns:minmax(9rem,1fr) repeat(3,minmax(5rem,.45fr));gap:.5rem;align-items:center;min-width:27rem;padding:.6rem .4rem}
.receipt-pick-head {position:sticky;top:0;background:var(--paper);font-size:.83rem;color:var(--muted)}
.receipt-pick-head > :not(:first-child),.receipt-pick-row > :not(:first-child) {text-align:right;font-variant-numeric:tabular-nums}
.picker-error {color:#982e23}
.stock-goods-dialog {width:min(72rem,94vw)}
.goods-stock-table {display:table;width:100%;max-width:none;table-layout:fixed;overflow-wrap:normal}
.goods-stock-table th {position:sticky;top:0;background:var(--paper);z-index:1}
.goods-stock-table th,.goods-stock-table td {padding:.6rem .5rem}
.goods-stock-table :is(th,td):nth-child(n+4) {text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.picker-list .goods-stock-table label {border:0;padding:0;white-space:normal}
.goods-stock-table td:nth-child(2) {overflow-wrap:anywhere}
.picker-kinds {display:flex;gap:.35rem;margin-bottom:1rem}
.picker-kinds button[aria-pressed="true"] {background:var(--action);color:white}
#pick-buyer {display:block;margin:.3rem 0}
@media (max-width:68rem) {.order-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:34rem) {.order-grid {grid-template-columns:1fr}.order-search {width:100%}}
.receipt-line-info:not(:has(fieldset > :not([hidden]))) {display:none}
.receipt-costs {grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:.25rem 1rem}
.new-project {display:inline-flex;align-items:center;align-self:center;background:var(--action);color:white;border-radius:.45rem;padding:.6rem 1rem;text-decoration:none;font-weight:650}
.board-nav {display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin-bottom:1rem}
.board-nav [aria-current] {font-weight:700;color:var(--ink);text-decoration-thickness:2px;text-underline-offset:.3rem}
.project-board {display:grid;grid-auto-flow:column;grid-auto-columns:clamp(16rem,25vw,21rem);align-items:start;gap:.85rem;overflow-x:auto;padding:.25rem .15rem .8rem}
.board-lane {min-width:0;background:#eaf0f3;border-top:3px solid #6c8e92;border-radius:.6rem;padding:.7rem}
.board-lane h2 {display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:1rem;margin:0 0 .65rem}
.board-lane .count {background:white}
.card.project-tile {width:100%;min-width:0;display:grid;gap:.55rem;margin:0;padding:.85rem;color:var(--ink)}
.project-tile + .project-tile {margin-top:.6rem}
.project-tile .badge {justify-self:start;background:var(--tint);color:var(--action)}
.project-amount {display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.3rem}
.project-tile dl {display:grid;grid-template-columns:auto 1fr;gap:.3rem .6rem;border-top:1px solid var(--line);padding-top:.55rem;margin:0;font-size:.85rem}
.project-tile dt {color:var(--muted)}
.project-tile dd {margin:0;text-align:right}
.project-document > .section-head {justify-content:flex-start;margin:.6rem 0 1rem}
.project-document .section-head h1,.project-document .sheet h2 {margin:0}
.project-document .sheet > h2 {margin-bottom:.85rem}
.project-document .project-comment {grid-column:1 / -1}
.project-document .project-comment textarea {min-height:2.75rem}
.project-document .project-save {background:var(--action);border-color:var(--action);color:white}
.project-document details {margin:.65rem 0;padding:.6rem 0 0;border:0;border-top:1px solid var(--line);border-radius:0}
.project-document details summary {font-size:.88rem;color:var(--action)}
.project-document td details {margin:.35rem 0 0;padding:0;border:0}
.project-document td form {margin:.65rem 0}
.project-document .amount {text-align:right}
.project-document th:nth-child(n+3) {text-align:right;padding-right:1rem}
.project-transitions {display:flex;flex-wrap:wrap;align-items:end;gap:.8rem 1.2rem}
.project-tablist {display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:16px;padding:4px 3px}
.project-tablist[hidden],.project-workspace [data-project-panel][hidden] {display:none}
.project-tablist [role=tab] {flex:none;white-space:nowrap;margin:0;border:0;border-radius:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted)}
.project-workspace .project-tablist a[role=tab] {padding:10px 12px;text-decoration:none;min-height:44px;box-sizing:border-box}
.project-tablist [role=tab][aria-selected=true] {border-bottom-color:var(--action);color:var(--ink);font-weight:600}
.project-workspace [data-project-panel] > h2 {margin-bottom:12px}
.project-document-actions .project-tablist {flex-wrap:wrap;overflow:visible;margin-bottom:16px;padding:0;gap:0 5px}
.project-document-actions .project-tablist [role=tab] {padding:10px 12px;border-bottom-width:2px;font-size:13px}
.project-document-actions .project-tablist [aria-selected=true] {color:var(--action)}
.project-document-actions[data-tabs-ready] .project-action-heading {display:none}
.project-action-row {display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%}
.project-action-button {display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:36px;padding:8px 12px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-size:13px;font-weight:500;line-height:1.4;text-align:left;text-decoration:none;overflow-wrap:anywhere}
.project-action-button:hover {background:var(--hover,var(--tint));text-decoration:none}
.project-action-button .icon {width:16px;height:16px}
@media(pointer:coarse) {.project-action-button,.project-document-actions .project-tablist [role=tab] {min-height:44px}}
#estimate-editor td input[inputmode=decimal],#document-items td > input[inputmode=decimal] {text-align:right;margin-top:0}
#estimate-editor td,#document-items td {vertical-align:middle}
#document-items td details {margin:.4rem 0 0;padding:0;border:0}
#document-items td summary {color:var(--action);font-size:.85rem}

.demand-filter {display:flex;align-items:end;gap:.6rem;flex-wrap:wrap;margin-bottom:1rem}
.demand-filter label {width:min(100%,24rem);margin:0}
.demand-filter select {margin-bottom:0}
.demand-table {font-variant-numeric:tabular-nums}
.demand-table :is(th,td):nth-child(n+3) {text-align:right}
.demand-table tbody th {background:transparent;color:var(--ink);white-space:normal}
.demand-product {cursor:pointer}
.demand-product:hover {background:#f5f9f8}
.demand-product button {display:inline-flex;align-items:baseline;gap:.65rem;text-align:left;min-height:2rem;background:transparent;color:var(--ink);border:0;padding:.25rem;font:inherit;font-weight:650;margin:0}
.demand-product button::before {content:"";width:.45rem;height:.45rem;flex:none;border:solid var(--action);border-width:0 2px 2px 0;transform:rotate(-45deg)}
.demand-product button[aria-expanded=true]::before {transform:rotate(45deg)}
.demand-table .demand-product td {vertical-align:middle}
.demand-table .demand-sources {background:#f5f9f8}
.demand-table .demand-sources th {padding-left:1.8rem;font-weight:400}
.demand-sources th span {display:inline-block;color:var(--muted);font-size:.78rem;margin-right:.6rem}
.demand-table td:nth-child(6) strong {color:var(--action)}
.demand-product th[scope=row] {font-size:.95rem}
.reserve-notice {margin-bottom:1rem;padding:.75rem 1rem;border-left:3px solid var(--action);background:var(--tint)}
.reserve-notice ul {margin:.3rem 0 0;padding-left:1.25rem}
.reserve-notice ul:empty {display:none}
.usd-equivalent {display:block;margin-top:.2rem;color:var(--muted);font-size:.78rem;font-weight:400;white-space:nowrap;line-height:1.4}

/* Stock report: product selection above its warehouse, lot and demand details. */
.stock-filters {align-items:end}
.stock-filters button {margin-bottom:.55rem}
.stock-refresh {display:inline-flex;align-items:center;justify-content:center;min-width:36px}
@media (max-width:40rem) {.stock-refresh {min-width:44px;min-height:44px}}
.stock-error {color:var(--danger)}
.stock-detail-grid {display:grid;grid-template-columns:minmax(14rem,1fr) minmax(0,3fr);gap:1rem;align-items:start}
.stock-detail-grid > .sheet {min-width:0;margin-top:0}
.stock-selection {display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:1.5rem 0 .7rem}
.stock-selection span {font-size:.85rem;font-weight:400}
.stock-scroll {overflow-x:auto}
.stock-scroll > table {display:table;width:100%;margin:.8rem 0 0}
.stock-scroll > table.sized-columns {table-layout:fixed;max-width:none}
.stock-scroll > table.sized-columns > thead th {position:relative}
.stock-reserves td:first-child {overflow-wrap:anywhere}
.stock-reserves > thead th:not(:first-child) {text-align:right}
.stock-table-viewport {--stock-lot-row-height:48px;height:292px;overflow:auto;scrollbar-gutter:stable;margin-top:.8rem}
.stock-table-viewport > table {margin:0;table-layout:fixed;max-width:none}
.stock-table-viewport > table > thead {position:sticky;top:0;z-index:1}
.stock-table-viewport th {position:relative}
.stock-table-viewport > table > tbody > tr:not(.stock-issues) {height:var(--stock-lot-row-height)}
.stock-table-viewport > table > tbody > tr:not(.stock-issues) > td {vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stock-lot-source {display:flex;align-items:center;gap:.25rem;min-width:0}
.stock-lot-source > a {overflow:hidden;text-overflow:ellipsis}
.stock-report .numeric {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.stock-report td {vertical-align:top}
.stock-report .muted {color:var(--muted)}
.stock-products {max-height:24rem}
.stock-products thead {position:sticky;top:0;z-index:1}
.stock-products td:nth-child(2) {white-space:normal;overflow-wrap:anywhere}
.stock-products tbody tr {cursor:pointer}
.stock-products tbody tr:hover {background:#f8fcfa}
.stock-products .stock-selected {background:var(--tint);box-shadow:inset 3px 0 var(--action)}
.stock-select {display:block;font-weight:600;text-decoration:none}
.stock-report .stock-expand {display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;min-width:24px;height:24px;min-height:24px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--muted);font-size:16px}
.stock-report .stock-expand:hover {color:var(--action)}
.stock-report .stock-expand:focus-visible {outline:2px solid var(--action);outline-offset:1px}
@media (max-width:40rem) {
  .stock-table-viewport {--stock-lot-row-height:64px}
  .stock-report .stock-expand {width:44px;min-width:44px;height:44px;min-height:44px}
}
.stock-issues[hidden] {display:none}
.stock-issues > td {background:#f5f8fa;padding:1rem}
.stock-issues table {display:table;width:100%;margin:0}
.stock-note {font-size:.8rem;margin:.8rem 0 0}
@media (max-width:75rem) {.stock-detail-grid {grid-template-columns:1fr}}
.stock-toggles {display:flex;gap:.5rem 1.5rem;flex-wrap:wrap;margin-bottom:1rem}
.stock-toggles label {display:flex;gap:.4rem;align-items:center}
.stock-sort {color:inherit;background:transparent;border:0;border-radius:.2rem;padding:.2rem 1rem .2rem 0;text-align:inherit;font:inherit;white-space:nowrap}
.stock-sort::after {content:' ↕';color:var(--muted)}
th[aria-sort=ascending] > .stock-sort::after {content:' ↑';color:var(--action)}
th[aria-sort=descending] > .stock-sort::after {content:' ↓';color:var(--action)}
.stock-report th.numeric .stock-sort {text-align:right}
.stock-filters {grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto}
@media (max-width:40rem) {.stock-filters {grid-template-columns:1fr}.stock-filters button {justify-self:start}}
.project-result-table {table-layout:fixed}
.project-result-table > thead th:first-child {width:50%}
.project-result-table > thead th.result-number,.project-result-table > tbody > tr > td.result-number {text-align:right;font-variant-numeric:tabular-nums}
.project-result-table .result-amount {display:inline-flex;align-items:center;justify-content:flex-end;gap:.4rem;white-space:nowrap}
.project-result-table .result-indicator {font-size:.7rem;line-height:1}
.project-result-table .result-indicator--positive {color:var(--positive-text)}
.project-result-table .result-indicator--negative {color:var(--danger)}
@media (max-width:40rem) {.order-scroll > table.project-result-table {min-width:32rem}}
.project-result-table .analysis-toggle {display:inline;cursor:pointer;background:none;border:0;border-radius:0;padding:0;color:inherit;font:inherit;text-align:left}
.analysis-toggle::after {content:" ▸"}
.analysis-toggle[aria-expanded=true]::after {content:" ▾"}
#accrual-editor .order-total {display:flex;gap:1.5rem;flex-wrap:wrap}
#accrual-editor .order-scroll td {vertical-align:middle}
#accrual-editor .order-scroll select {width:100%;min-width:0;margin-top:0}
.payroll-table .amount {text-align:right;font-variant-numeric:tabular-nums}
.payroll-table input[inputmode=decimal] {width:150px;text-align:right;margin:0}
.payroll-table .payroll-balance {font-weight:700;color:var(--danger)}
.payroll-table small {display:block;color:var(--muted)}
#payout-editor [aria-busy=true] {opacity:.6}
.order-actions.salary-actions {justify-content:flex-start}
#salary-payment-editor .order-total {margin:12px 0 20px}
.project-result-table .order-scroll {margin-top:.75rem}

.staff-balance .table-scroll {max-width:100%;overflow-x:auto}
.staff-balance table {display:table;width:100%;min-width:42rem;max-width:none;overflow-wrap:normal}
.staff-balance th,.staff-balance td {white-space:nowrap}
.staff-balance .num {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.staff-balance .actions {display:flex;flex-wrap:wrap;gap:.5rem}
.movement-filters {align-items:end;grid-template-columns:repeat(3,minmax(0,1fr))}
.movement-filters button {justify-self:start;margin-bottom:0}
.movement-filters .movement-toggle {display:flex;align-items:center;gap:8px;align-self:center;margin:0}
.movement-toggle input {width:auto;min-width:0;margin:0}
.movement-scroll {max-width:100%;overflow:auto;max-height:65vh;border:1px solid var(--line);border-radius:6px}
.movement-table {display:table;width:max-content;min-width:100%;max-width:none;border-collapse:separate;border-spacing:0}
.movement-table.sized-columns {table-layout:fixed;min-width:0}
.movement-table th,.movement-table td {white-space:nowrap;border-right:1px solid var(--line)}
.movement-table th,.movement-table td {overflow:hidden;text-overflow:ellipsis}
.movement-table thead {position:sticky;top:0;z-index:3}
.movement-table thead th {position:relative;text-align:center;background:var(--surface);white-space:normal;overflow-wrap:anywhere}
.movement-table thead th[data-column=product] {position:sticky;left:0;z-index:1}
.movement-table tbody th,.movement-table tfoot th {position:sticky;left:0;z-index:1;background:var(--paper);white-space:normal;overflow-wrap:anywhere;text-align:left}
.movement-table small {display:block;font-weight:normal}
.movement-table .numeric {text-align:right;font-variant-numeric:tabular-nums}
.movement-table tfoot {font-weight:600}
.movement-table .movement-result {background:var(--tint);font-weight:600}
.movement-table tfoot th,.movement-table tfoot td {background:var(--tint);border-top:2px solid var(--action)}
.movement-export {display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
@media (max-width:600px) {
  .movement-filters {grid-template-columns:minmax(0,1fr)}
  .movement-table tbody th,.movement-table tfoot th,.movement-table thead th[data-column=product] {position:static}
}

/* Property tables share the document column controls and theme. */
.asset-register-table .amount {text-align:right;font-variant-numeric:tabular-nums}
.order-scroll .asset-register-table th {white-space:normal;padding-right:12px}
.asset-filter-fields {display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:end;gap:18px}
.asset-filter-fields > label,.asset-filter-fields > button {margin:0}
.asset-filter-fields .asset-filter-toggle {display:flex;align-items:center;gap:8px;min-height:36px;white-space:nowrap}
.asset-filter-toggle input {width:auto;min-width:0;margin:0}
.asset-filter-fields > button {min-height:36px}
@media (max-width:600px) {
  .asset-filter-fields {grid-template-columns:minmax(0,1fr);gap:12px}
  .asset-filter-fields > button {justify-self:start}
}

#asset-editor .order-scroll input,#asset-editor .order-scroll select {width:100%;min-width:0;margin:0}
#asset-editor .order-scroll .amount,#asset-editor input[inputmode=decimal] {text-align:right;font-variant-numeric:tabular-nums}
#asset-editor .asset-table th {white-space:normal}
#asset-editor .asset-table .date-field {display:block}
#asset-editor .good-name {display:block;min-height:36px;align-content:center}
#asset-editor label:has(> input[name=employee_charge]) {display:flex;align-items:center;align-self:end;gap:8px;min-height:36px;margin:0}
#asset-editor input[name=employee_charge] {width:auto;margin:0}
.reserve-offers {max-width:none}
.reserve-offer {display:flex;align-items:end;flex-wrap:wrap;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.reserve-offer:last-child {border-bottom:0}
.reserve-offer p {flex:1 1 280px;margin:0;overflow-wrap:anywhere}
.reserve-offer label {flex:0 1 130px;margin:0;min-width:0}
.reserve-offer input {width:100%}
.payment-confirmation-scroll {max-width:100%;overflow-x:auto}
.payment-confirmation-scroll table {display:table;min-width:620px;width:100%}
.payment-confirmation-scroll td:not(:first-child) {white-space:nowrap}
