/* Transfers-inspired inventory workspace. Scoped and screen-only so other apps
   and printed inventory documents keep their existing presentation. */
@media screen {
  .inventory-workspace.cw-page {
    --cw-ink:#1d2b42; --cw-muted:#64748b; --cw-primary:#275ac6;
    --cw-border:#dbe4ef; --cw-radius:14px; --cw-control-radius:8px;
    --cw-shadow:0 5px 22px #21375408; --cw-width:1180px; --cw-wide:1440px;
    max-width:var(--cw-width); width:100%; margin:0 auto; color:var(--cw-ink);
    box-sizing:border-box; background:none;
  }
  .inventory-workspace.cw-page.cw-page--wide { max-width:var(--cw-wide); }
  .inventory-workspace.cw-page .cw-heading { margin:12px 0 24px; gap:1rem; align-items:center; }
  .inventory-workspace.cw-page h1 { font-size:2rem; letter-spacing:-.04em; line-height:1.2; }
  .inventory-workspace.cw-page h2 { font-size:1.13rem; letter-spacing:-.02em; }
  .inventory-workspace.cw-page :is(.inventory-eyebrow,.cw-heading .eyebrow) {
    margin:0 0 .5rem; font-size:.7rem; font-weight:800; line-height:1.5;
    letter-spacing:.14em; text-transform:uppercase; color:#64768d;
  }
  .inventory-workspace.cw-page :is(.muted,.meta) { color:#64748b; font-size:.88rem; line-height:1.5; }
  .inventory-workspace.cw-page :is(.panel,.card,.workflow-card,.po-panel,.po-form-card,.order-card,.orders-workspace,.product-panel,.orientation-panel,.format-card,.po-summary a,.table-wrap,.order-helper-results) {
    border:1px solid #dbe4ef; border-radius:14px; background:#fff;
    box-shadow:0 5px 22px #21375408;
  }
  .inventory-workspace.cw-page :is(.card,.panel,.po-panel,.order-card) { padding:1.4rem; }
  .inventory-workspace.cw-page :is(.card-link,.format-card,.po-summary a) { transition:border-color .15s,background .15s; }
  .inventory-workspace.cw-page :is(.card-link,.format-card,.po-summary a):hover { border-color:#668ddd; background:#fbfcff; }
  .inventory-workspace.cw-page :is(.card-link,.po-summary a)[aria-current],
  .inventory-workspace.cw-page .format-card.selected { border-color:#8eace4; background:#f3f7ff; box-shadow:0 0 0 1px #dbe7fb; }
  .inventory-workspace.cw-page .inventory-tabs { background:none; padding:0 0 .85rem; border:0; border-bottom:1px solid #e8edf4; border-radius:0; gap:.4rem; box-shadow:none; }
  .inventory-workspace.cw-page .inventory-tabs a { padding:.6rem .8rem; border:0; border-radius:8px; font-size:.85rem; color:#4e617b; }
  .inventory-workspace.cw-page .inventory-tabs a[aria-current] { background:#edf3ff; color:#2451ad; }
  .inventory-workspace.cw-page :is(.filters,.orders-toolbar,.product-toolbar,.options) { background:#f7f9fc; border-color:#e8edf4; border-radius:10px; box-shadow:none; }
  .inventory-workspace.cw-page :is(input:not([type]),input[type=text],input[type=search],input[type=number],input[type=date],select,textarea) { border-color:#cbd5e1; border-radius:8px; color:#24344f; background:#fff; }
  .inventory-workspace.cw-page :is(.button,.correction-button,.primary-button,.secondary-button,.po-secondary-button,.back-to-pos) { border-radius:8px; font-size:.85rem; font-weight:600; }
  .inventory-workspace.cw-page :is(.panel,.workflow-card) label { font-size:.83rem; font-weight:650; color:#344969; }
  .inventory-workspace.cw-page th { background:#f7f9fc; color:#64748b; font-size:.74rem; text-transform:uppercase; letter-spacing:.05em; border-bottom-color:#e8edf4; }
  .inventory-workspace.cw-page td { border-bottom-color:#e8edf4; font-size:.9rem; }
  .inventory-workspace.cw-page tbody tr:hover > td { background:#fafcff; }
  .inventory-workspace.cw-page .table-wrap { padding:0; }
  .inventory-workspace.cw-page .overview-section { margin:2rem 0; }
  .inventory-workspace.cw-page .overview-section > h2 { margin-bottom:.35rem; }
  .inventory-workspace.cw-page .overview-section > p { margin-top:0; }

  /* Stocktakes shares Transfers' two entry cards and compact record tables. */
  .inventory-workspace .inventory-workflow-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:0 0 1.5rem; }
  .inventory-workspace .inventory-workflow-card { padding:1.4rem; border:1px solid #dbe4ef; border-radius:14px; background:#fff; box-shadow:0 5px 22px #21375408; min-width:0; }
  .inventory-workspace .inventory-workflow-card h2 { margin:.9rem 0 .4rem; }
  .inventory-workspace .inventory-workflow-card > p { font-size:.9rem; line-height:1.5; color:#64748b; }
  .inventory-workspace .inventory-workflow-icon { display:inline-flex; align-items:center; justify-content:center; width:44px; height:42px; border-radius:10px; color:#345dba; background:#edf3ff; }
  .inventory-workspace .inventory-workflow-icon svg { width:24px; height:24px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
  .inventory-workspace .inventory-workflow-card .fields { display:grid; grid-template-columns:minmax(0,1fr); gap:.85rem; margin:1rem 0; }
  .inventory-workspace .inventory-workflow-card .fields label { min-width:0; }
  .inventory-workspace .inventory-workflow-card :is(select,input) { width:100%; }
  .inventory-workspace .inventory-workflow-card .workflow-link { display:inline-flex; align-items:center; gap:.5rem; margin-top:.5rem; padding:.7rem 1rem; background:#edf3ff; border-radius:8px; color:#2758bc; font-size:.85rem; font-weight:650; text-decoration:none; }
  .inventory-workspace .inventory-workflow-card .workflow-link:hover { background:#e1ebff; }
  .inventory-workspace .inventory-workflow-card details { margin:1.4rem 0 0; padding-top:1rem; border-top:1px solid #e8edf4; font-size:.85rem; color:#64748b; line-height:1.5; }
  .inventory-workspace .inventory-workflow-card summary { color:#344969; cursor:pointer; font-weight:600; }
  .inventory-workspace .inventory-section-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.5rem; margin:0 0 1rem; }
  .inventory-workspace .inventory-section-heading h2 { margin:0; }
  .inventory-workspace .inventory-history { margin:0 0 1.5rem; }
  .inventory-workspace .inventory-history .table-wrap { margin:0; }
  .inventory-workspace .inventory-history :is(th,td) { padding:.9rem 1rem; }
  .inventory-workspace .inventory-history td > a { color:#2857b8; text-decoration:none; font-weight:650; }
  .inventory-workspace .inventory-history td small { font-size:.76rem; margin-top:.3rem; }
  .inventory-workspace .inventory-history .empty { text-align:center; padding:2rem 1rem; color:#728096; }
  .inventory-workspace .inventory-status { display:inline-flex; align-items:center; padding:.35rem .65rem; font-size:.75rem; font-weight:700; border-radius:999px; white-space:nowrap; color:#4e617b; background:#eaf0f7; }
  .inventory-workspace .inventory-status.counting { background:#edf3ff; color:#2451ad; }
  .inventory-workspace .inventory-status.completed { background:#e9f8ef; color:#197346; }
  .inventory-workspace .inventory-status.applying { background:#fff5d9; color:#795917; }
  .inventory-workspace .inventory-history .inventory-adjustment { font-variant-numeric:tabular-nums; white-space:nowrap; }
  .inventory-workspace .stocktake-refresh { margin:0 0 1rem; font-size:.78rem; color:#728096; }
  .inventory-workspace #stocktake-last-completed { font-size:.82rem; color:#64748b; margin:.8rem 0 1rem; }
  .inventory-workspace .stocktake-index-location { display:flex; align-items:center; gap:.75rem; font-size:.85rem; margin:1rem 0; }
  .inventory-workspace :is(a,button,input,select,textarea,summary):focus-visible { outline:3px solid #8eb8ee; outline-offset:3px; }
  @media(max-width:700px) {
    .inventory-workspace.cw-page h1 { font-size:1.6rem; }
    .inventory-workspace .inventory-workflow-grid { grid-template-columns:1fr; }
    .inventory-workspace.cw-page :is(.panel,.card,.po-panel,.order-card,.inventory-workflow-card) { padding:1rem; }
    .inventory-workspace.cw-page .table-wrap { padding:0; }
    .inventory-workspace .inventory-history table { min-width:600px; }
    .inventory-workspace.cw-page .inventory-tabs { flex-wrap:nowrap; overflow:auto; }
    .inventory-workspace.cw-page .inventory-tabs a { white-space:nowrap; }
  }
}
