/* The working app uses a compact UI system; public client pages keep their own theme. */
.workspace-shell {
  --title-page: 30px;
  --title-panel: 26px;
  --control-height: 40px;
  background: var(--paper);
  color: var(--ink);
}
.workspace-shell > .workspace-content h1:not(.client-status h1),
.workspace-shell > .order-panel h1:not(.client-status h1) {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.workspace-shell .button {
  min-height: 38px;
  padding: 8px 14px;
  font-weight: 500;
  box-shadow: none;
}
.workspace-shell .button:not(.button--dark, .button--quiet, .record-action):hover { background: var(--paper); color: var(--ink); border-color: var(--input-line); }
.workspace-shell .button:active { transform: translateY(1px); }
.workspace-shell .button > svg { width: 16px; height: 16px; flex-shrink: 0; }
.workspace-shell .text-input,
.workspace-shell .select-input { padding-block: 8px; box-shadow: none; }
.workspace-shell :is(.text-input, .select-input):focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.workspace-shell .field-label { margin-bottom: 6px; }
.workspace-shell .eyebrow { font-family: var(--sans); letter-spacing: 0; text-transform: none; }
.workspace-shell .page-header { margin-bottom: 24px; }
.workspace-shell .page-tabs { margin-bottom: 16px; }
.workspace-shell .page-tabs a { min-height: 44px; font-weight: 400; }
.workspace-shell .page-tabs a[aria-current="page"] { font-weight: 500; }
.workspace-shell .page-tabs__count { border-radius: 0; }
.workspace-shell .flash { border-radius: var(--radius-control); font-size: var(--text-ui); }
.workspace-shell .stage-pill { border-radius: 0; }

/* The toolbar is secondary to the table, with familiar search and filter controls. */
.workspace-shell .production-tools { margin-bottom: 16px; gap: 12px; }
.workspace-shell .production-tools > .order-filters { flex: 1; align-items: center; gap: 10px; }
.workspace-shell .order-filters > .filter-field--search { position: relative; flex: 0 1 340px; width: 340px; min-width: 200px; }
.workspace-shell .filter-field--search > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.workspace-shell .order-filters .filter-field--search .text-input { padding-left: 36px; border-radius: 0; }
.workspace-shell .order-filters > .filter-field--stage { width: 164px; }
.workspace-shell .order-filters .select-input { border-color: var(--line); background-color: var(--surface); }
.workspace-shell .order-filters__actions { gap: 12px; margin-left: auto; }
.workspace-shell .order-filters__actions .text-link { display: inline-flex; align-items: center; min-height: 36px; font-weight: 400; }

/* Quiet rows, readable values, and a clear focus state make the grid feel editable. */
.workspace-shell #order-sheet { max-height: 70vh; border-color: var(--line); border-radius: 0; scrollbar-width: thin; scrollbar-color: var(--input-line) transparent; }
.workspace-shell #order-sheet .order-table { font-size: var(--text-ui); }
.workspace-shell #order-sheet .order-table td { height: 52px; border-bottom-color: var(--line-soft); }
.workspace-shell #order-sheet .sheet-input { height: 50px; min-height: 50px; padding-block: 12px; font-size: var(--text-ui); font-weight: 400; }
.workspace-shell #order-sheet .sheet-input--order-number { min-width: 170px; font-size: var(--text-dense); font-weight: 500; }
.workspace-shell #order-sheet .sheet-input--product { min-width: 210px; }
.workspace-shell #order-sheet .sheet-input--stage { font-size: var(--text-dense); font-weight: 500; color: var(--accent); }
.workspace-shell #order-sheet .order-row:hover > td { background-color: var(--paper); }
.workspace-shell #order-sheet .sheet-input:not(:disabled):not([aria-invalid="true"]):hover { background-color: var(--paper-deep); }
.workspace-shell #order-sheet .sheet-input:focus { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.workspace-shell #order-sheet .sheet-input[aria-invalid="true"] { background: var(--red-wash); box-shadow: inset 0 0 0 2px var(--red); }
.workspace-shell #order-sheet .row-drag-handle { color: var(--muted); border-radius: 0; }
.workspace-shell #order-sheet .row-drag-handle:hover { color: var(--accent); }
.workspace-shell #order-sheet :is(.sheet-open-order, .row-actions-button) { border-radius: 0; }
.workspace-shell #order-sheet .sheet-actions-heading { background: var(--table-header); }
.workspace-shell .order-sheet-footer { padding-inline: 2px; margin-top: 14px; }

@media (min-width: 761px) {
  .workspace-shell { --sidebar-width: 216px; }
  .workspace-shell.sidebar-collapsed { --sidebar-width: 72px; }
  .workspace-shell .desktop-sidebar { padding: 18px 12px 12px; background: var(--surface); }
  .workspace-shell .sidebar-brand { margin-bottom: 22px; }
  .workspace-shell .sidebar-navigation .nav-link { min-height: 40px; padding-block: 9px; }
  .workspace-shell .sidebar-navigation .nav-link[aria-current="page"] { background: var(--accent-wash); box-shadow: none; }
  .workspace-shell .sidebar-group__label { font: var(--text-meta)/1.5 var(--sans); letter-spacing: 0; text-transform: none; }
  .workspace-shell .sidebar-profile { min-height: 52px; }
  .workspace-shell .sidebar-profile:hover { background: var(--accent-wash); }
}
@media (max-width: 760px) {
  .workspace-shell { --title-page: 26px; --title-panel: 24px; --control-height: 44px; }
  .workspace-shell .page-header { align-items: center; gap: 12px; }
  .workspace-shell .page-header__identity { min-width: 0; }
  .workspace-shell .page-tabs a { min-height: 44px; }
  .workspace-shell .button { min-height: 44px; }
  .workspace-shell #order-sheet .sheet-input { font-size: var(--text-body); }
  .workspace-shell .production-tools > .order-filters { display: flex; flex-wrap: wrap; }
  .workspace-shell .order-filters > .filter-field--search { flex: 1 1 100%; width: 100%; min-width: 0; }
  .workspace-shell .order-filters > .filter-field--stage { flex: 0 0 164px; }
  .workspace-shell .order-filters__actions { flex-wrap: wrap; margin-left: 0; }
  .workspace-shell .mobile-navigation { background: var(--surface); }
  .workspace-shell .mobile-navigation .nav-link { border-radius: 0; }
}
@media (pointer: coarse) {
  .workspace-shell { --control-height: 44px; }
  .workspace-shell .button { min-height: 44px; }
}
