:root {
  color-scheme: light;
  --ink: #202323;
  --muted: #626869;
  --line: #e1e4e4;
  --paper: #fff;
  --canvas: #f4f5f4;
  --accent: #314f43;
  --accent-strong: #233d33;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { color: inherit; font: inherit; }
button, .button, select, input[type=search] {
  min-height: 39px;
  border: 1px solid #cdd1d0;
  border-radius: 8px;
  background-color: var(--paper);
}
button, .button {
  padding: 8px 13px;
  font-size: .84rem;
  font-weight: 630;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover:not(:disabled), .button:hover { background-color: #f2f4f2; }
button:disabled { opacity: .52; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: white; }
button.primary:hover:not(:disabled) { background: var(--accent-strong); }
button.quiet { border-color: transparent; background: transparent; }
:focus-visible { outline: 2px solid #2467a2; outline-offset: 3px; }
a { color: #365b4c; text-underline-offset: 3px; }
input[type=checkbox] { min-width: 17px; min-height: 17px; margin: 0; accent-color: var(--accent); }
.shell { max-width: 1312px; margin: 0 auto; padding: 34px 26px 26px; }
.masthead, .identity, .header-actions, .snapshot, .list-caption, .batch {
  display: flex; align-items: center; gap: 12px;
}
.masthead, .snapshot, .list-bar { justify-content: space-between; }
.masthead { align-items: flex-end; padding-bottom: 19px; }
.identity { gap: 15px; }
.mark { width: 49px; height: 49px; display: grid; place-items: center; color: #eef6ee; background: var(--accent); border-radius: 13px; }
.mark svg { width: 27px; height: 27px; }
.app-name { font-size: .83rem; font-weight: 650; margin: 0 0 1px; color: var(--muted); }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); line-height: 1.07; letter-spacing: -.046em; margin: 0; }
.header-actions { flex-wrap: wrap; gap: 8px; }
.snapshot { min-height: 24px; margin: 0 0 12px; font-size: .78rem; color: var(--muted); }
.snapshot p { margin: 0; }
.mode { padding: 4px 8px; border-radius: 6px; background: #e7eeea; color: #355147; font-weight: 650; white-space: nowrap; }
.mode:empty { display: none; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; gap: 11px; }
.metrics > div { min-width: 0; display: grid; gap: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.metrics span { font-size: .82rem; font-weight: 650; }
.metrics strong { font-size: 1.82rem; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metrics small, .caption { color: var(--muted); font-size: .76rem; }
.worklist { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.controls { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(105px, 1fr)); gap: 10px; padding: 16px; }
.controls label { display: grid; gap: 6px; min-width: 0; }
.controls span { font-size: .77rem; font-weight: 650; }
select, input[type=search] { padding: 7px 9px; width: 100%; font-size: .83rem; }
input::placeholder { color: #6b7070; }
.list-bar { min-height: 49px; background: #fafbfa; border-block: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; padding: 7px 16px; }
.list-caption { font-size: .8rem; font-weight: 650; }
.list-caption label { display: grid; place-items: center; }
.batch { flex-wrap: wrap; gap: 6px; }
.batch select { width: auto; }
.batch button, .batch select { min-height: 33px; }
.group-title { margin: 0; padding: 13px 16px 10px; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.group-title small { color: var(--muted); font-size: .73rem; font-weight: 500; }
.group + .group { border-top: 1px solid var(--line); }
table { border-collapse: collapse; border-spacing: 0; width: 100%; table-layout: fixed; }
th, td { text-align: left; vertical-align: middle; padding: 10px 10px; border-top: 1px solid #eef0ee; overflow-wrap: anywhere; }
th { font-size: .71rem; font-weight: 670; color: var(--muted); }
td { font-size: .84rem; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
th.checkcell { width: 42px; }
th.ordercell { width: 17%; }
th.quantitycell { width: 9%; }
th.shippingcell { width: 27%; }
th.statuscell { width: 18%; }
tbody tr:hover { background: #fafcfb; }
tbody tr[data-selected=true] { background: #edf4ef; }
.order-number { font-weight: 700; }
.signer { font-weight: 680; white-space: pre-wrap; }
.sub { display: block; color: var(--muted); font-size: .72rem; margin-top: 3px; line-height: 1.35; }
.quantity { font-variant-numeric: tabular-nums; font-weight: 680; }
.pill { display: inline-block; max-width: 100%; padding: 4px 7px; font-size: .73rem; line-height: 1.2; font-weight: 680; border-radius: 6px; background: #eef0f0; color: #414949; }
.pill.blue { background: #e7f0fc; color: #285580; }
.pill.violet { background: #f0eaf8; color: #56367a; }
.pill.green { background: #e2f1e7; color: #285940; }
.pill.amber { background: #f9edd4; color: #67480b; }
td select { min-height: 34px; }
.empty { text-align: center; color: var(--muted); padding: 46px 16px; margin: 0; }
.notice { margin: 0 0 12px; border-radius: 8px; padding: 10px 13px; font-size: .84rem; background: #e6efe9; color: #294a3a; }
.notice.alert { background: #fae9e6; color: #7a2c20; }
.caption { margin: 11px 2px 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#print-preview { border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); width: min(940px, calc(100% - 24px)); max-height: 90dvh; padding: 0; }
#print-preview::backdrop { background: #18242080; }
.preview-controls { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 17px; border-bottom: 1px solid var(--line); }
#paper-output { display: none; }
.paper { padding: 20px; }
.paper h2 { font-size: 1rem; margin: 18px 0 6px; }
.paper p { font-size: .78rem; color: var(--muted); }
.paper table { table-layout: auto; }

@media (max-width: 760px) {
  .shell { padding: 22px 14px; }
  .masthead { display: grid; align-items: start; gap: 14px; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metrics > div { padding: 11px 13px; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .group-title { padding-left: 12px; }
  .group table, .group tbody { display: block; }
  .group thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .group tr { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); padding: 10px 12px; gap: 8px 10px; align-items: start; }
  .group td, .group td:first-child, .group td:last-child { padding: 0; border: 0; }
  .group td.checkcell { grid-column: 1 / -1; }
  .group td.shippingcell { grid-column: 1 / -1; }
  .group td::before { content: attr(data-label); display: block; margin-bottom: 3px; font-weight: 620; color: var(--muted); font-size: .71rem; }
  .group td.checkcell::before { display: none; }
  .list-bar { padding-inline: 12px; }
}
@media (max-width: 360px) {
  .controls { grid-template-columns: 1fr; }
}
@page { size: A4; margin: 13mm; }
@media print {
  :root { background: #fff; }
  .shell, #print-preview, #print-preview::backdrop { display: none !important; }
  #paper-output { display: block; padding: 0; color: #000; }
  .paper h1 { font-size: 18pt; }
  .paper h2 { font-size: 12pt; margin: 15pt 0 5pt; break-after: avoid; }
  .paper p { font-size: 9pt; margin: 4pt 0 12pt; }
  .paper table { table-layout: auto; }
  .paper thead { display: table-header-group; }
  .paper tr { break-inside: avoid; }
  .paper th, .paper td { border-top: .5pt solid #aaa; padding: 5pt 4pt; color: #000; font-size: 9pt; }
}
