:root {
  color-scheme: light;
  font-family: "Segoe UI", Aptos, Arial, sans-serif;
  font-size: 14px;
  color: #27303d;
  background: #f5f6f8;
  --ink: #27303d;
  --muted: #657080;
  --line: #e2e6ec;
  --surface: #ffffff;
  --page: #f5f6f8;
  --yellow: #f4d44d;
  --yellow-soft: #fff6cf;
  --green: #226548;
  --green-soft: #edf7f0;
  --amber: #89560d;
  --amber-soft: #fff5de;
  --red: #ae3636;
  --focus: #516c92;
  --radius-control: 7px;
  --shadow-overlay: 0 12px 38px rgb(31 43 59 / 14%);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
button { color: inherit; }
button, input, select { accent-color: #806600; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input { caret-color: var(--ink); }
::selection { color: var(--ink); background: #f6e794; }
[hidden] { display: none !important; }
body:has(dialog[open]) { overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 50; padding: 12px 20px; background: white; }
.skip-link:focus { top: 12px; }
.app-shell { display: grid; grid-template-columns: 216px minmax(0,1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: 32px; padding: 30px 16px 0; background: #f0f2f5; border-right: 1px solid var(--line); height: 100dvh; position: sticky; top: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding-inline: 10px; text-decoration: none; }
.brand-symbol { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 38px; background: var(--yellow); border-radius: 9px; color: #30343a; font-size: 24px; font-weight: 750; letter-spacing: -2px; padding-right: 2px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .025em; line-height: 1.3; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .15em; margin-top: 2px; }
.navigation { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 11px; min-height: 44px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-weight: 550; color: #535f6f; }
.nav-item:hover { background: #e7ebef; }
.nav-item.is-active { background: #fff3c1; color: #4b401d; font-weight: 650; }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 650; }
.sidebar-section-heading { display: flex; align-items: center; justify-content: space-between; padding-left: 11px; }
.sidebar-section-heading h2 { color: var(--muted); font-size: 12px; font-weight: 600; margin: 0; }
.sidebar-hint { padding-inline: 11px; margin: 8px 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.saved-section { min-height: 0; overflow-y: auto; }
.saved-view { display: flex; gap: 2px; align-items: center; margin: 3px 0; }
.saved-view > button:first-child { flex: 1; display: flex; align-items: center; min-width: 0; gap: 10px; border: 0; background: transparent; border-radius: 7px; padding: 9px 10px; text-align: left; font-size: 13px; }
.saved-view > button:first-child:hover { background: #e7ebef; }
.saved-view > button:first-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-view .delete-view { width: 26px; height: 30px; min-height: 30px; opacity: .45; }
.saved-view:hover .delete-view, .saved-view:focus-within .delete-view { opacity: 1; }
.sidebar-bottom { margin-top: auto; }
.source-info { display: flex; gap: 9px; align-items: flex-start; padding: 14px 11px 22px; }
.source-info .source-dot { margin-top: 5px; }
.source-info strong { display: block; font-size: 11px; font-weight: 600; }
.source-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.source-dot { display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #3a8b64; }
.source-dot.stale { background: #a47827; }
.profile { display: flex; align-items: center; gap: 9px; border-top: 1px solid #dce2e8; padding: 20px 3px; }
.avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: #e1e6ec; color: #4d5c70; font-weight: 650; }
.profile strong { display: block; font-size: 12px; }
.profile small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.profile .icon-button { margin-left: auto; width: 28px; }
.workspace { min-width: 0; height: 100dvh; padding: 27px 30px 16px; display: flex; flex-direction: column; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; flex-shrink: 0; }
.page-header h1 { margin: 0; font-size: 25px; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; }
.page-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mobile-brand { display: none; }
.header-actions { display: flex; gap: 9px; align-items: center; }
.sync-state { display: flex; gap: 7px; align-items: center; font-size: 11px; color: var(--muted); margin-right: 7px; white-space: nowrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 39px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--radius-control); font-weight: 600; font-size: 12px; line-height: 1.4; text-decoration: none; white-space: nowrap; transition: background-color .16s, border-color .16s, color .16s; }
.button.primary { background: var(--yellow); color: #3a351f; }
.button.primary:hover { background: #e9c631; }
.button.secondary { background: var(--surface); border-color: #dbe0e7; color: #435062; }
.button.secondary:hover { background: #f8fafb; border-color: #bcc6d3; }
.button.small { min-height: 31px; padding: 5px 10px; font-size: 11px; background: white; border-color: #dcc879; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; min-height: 34px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); padding: 7px; flex-shrink: 0; }
.icon-button:hover { color: var(--ink); background: #e9edf2; }
.icon-button.subtle { width: 29px; min-height: 29px; }
.icon-button.subtle .icon { width: 15px; height: 15px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: #506581; font-size: 12px; font-weight: 550; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.text-button:hover { text-decoration-color: currentColor; }
.orders-view { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.queue-bar { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; flex: 0 0 auto; margin-bottom: 17px; border-bottom: 1px solid #dfe3e9; }
.queue { display: flex; align-items: center; gap: 8px; position: relative; padding: 14px 13px 16px; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-align: left; min-width: 0; }
.queue .icon { width: 17px; height: 17px; flex-basis: 17px; }
.queue strong { margin-left: auto; font-size: 12px; min-width: 24px; text-align: center; font-weight: 600; background: #e9ecf0; border-radius: 5px; padding: 2px 5px; }
.queue:hover { background: #eef1f4; color: var(--ink); }
.queue.is-active { color: var(--ink); font-weight: 650; }
.queue.is-active::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; background: #d6ac13; }
.queue.is-active strong { background: var(--yellow-soft); color: #765e0e; }
.ledger-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 0; flex: 1; display: flex; flex-direction: column; }
.toolbar { display: flex; gap: 10px; padding: 17px 18px; align-items: center; flex-wrap: wrap; flex-shrink: 0; }
.search-field { display: flex; align-items: center; min-width: 210px; flex: 1 1 250px; max-width: 390px; padding: 0 10px; gap: 9px; border: 1px solid #dbe1e8; border-radius: var(--radius-control); height: 39px; color: #657185; background: #fff; }
.search-field:focus-within { border-color: var(--focus); outline: 2px solid #dbe4f2; }
.search-field input { border: 0; outline: 0; background: transparent; min-width: 0; width: 100%; font-size: 12px; padding: 8px 0; }
.search-field input:focus-visible { outline: none; }
.search-field input::placeholder { color: #707b8b; opacity: 1; }
kbd { font: inherit; font-size: 10px; border: 1px solid #e1e5ea; border-radius: 3px; padding: 1px 5px; background: #fafbfc; color: #728094; }
.toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.segmented { display: flex; border: 1px solid #e0e5eb; background: #f5f7f9; padding: 3px; border-radius: 8px; }
.segmented button { display: flex; align-items: center; gap: 6px; border: 1px solid transparent; background: transparent; padding: 6px 10px; border-radius: 5px; min-height: 29px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.segmented .icon { width: 15px; height: 15px; flex-basis: 15px; }
.segmented button[aria-pressed="true"] { background: white; color: var(--ink); border-color: #e0e5eb; font-weight: 600; }
.segmented button:hover { color: var(--ink); }
.options-menu { position: relative; }
.options-menu summary { list-style: none; border: 1px solid #e0e5eb; height: 38px; width: 37px; }
.options-menu summary::-webkit-details-marker { display: none; }
.options-menu[open] summary { background: #edf1f5; }
.options-content { position: absolute; z-index: 10; right: 0; top: calc(100% + 8px); width: 264px; padding: 16px; background: white; box-shadow: var(--shadow-overlay); border-radius: 10px; }
.options-content > strong { font-size: 12px; display: block; margin-bottom: 12px; }
.check-label { display: flex; align-items: center; gap: 9px; margin-block: 12px; font-size: 12px; cursor: pointer; }
input[type="checkbox"] { width: 15px; height: 15px; margin: 0; cursor: pointer; }
.control-hint { font-size: 11px; color: var(--muted); line-height: 1.6; }
.options-content .control-hint { margin: -7px 0 13px 24px; }
.menu-action { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 10px 7px; border-radius: 5px; font-size: 12px; width: 100%; text-align: left; }
.menu-action:hover { background: var(--page); }
.menu-action .icon { width: 16px; height: 16px; flex-basis: 16px; color: var(--muted); }
.filter-panel { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 0 18px 17px; background: white; flex-shrink: 0; }
.filter-panel label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 550; flex: 1 1 130px; }
.filter-panel input, .filter-panel select { width: 100%; border: 1px solid #dce1e7; border-radius: 6px; padding: 8px; min-height: 35px; font-size: 11px; color: var(--ink); background: #fafbfc; }
.filter-panel .text-button { min-height: 35px; }
.small-count { background: #e9edf2; border-radius: 4px; padding: 0 5px; font-size: 11px; }
.field-error { font-size: 12px; color: var(--red); margin: 2px 0 0; width: 100%; }
.list-context { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 0 18px 13px; color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.list-context p { margin: 0; line-height: 1.5; }
#result-count { white-space: nowrap; color: #526075; }
.selection-bar { display: flex; align-items: center; gap: 12px; background: #fff7d8; border-top: 1px solid #efe2ad; padding: 9px 18px; color: #69551b; font-size: 12px; }
.selection-bar > .text-button { margin-left: auto; color: #69551b; }
.table-wrap { overflow: auto; flex: 1 1 auto; min-height: 120px; scrollbar-width: thin; scrollbar-color: #c1c9d3 #f6f7f9; }
table { border-spacing: 0; border-collapse: separate; width: 100%; font-size: 12px; table-layout: fixed; min-width: 930px; }
thead { background: #f7f8fa; }
th { height: 41px; border-block: 1px solid var(--line); background: #f7f8fa; position: sticky; top: 0; z-index: 3; color: #667184; font-size: 10px; font-weight: 600; text-align: left; padding: 0 10px; white-space: nowrap; }
th button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: inherit; font: inherit; padding: 9px 0; }
th button:hover { color: var(--ink); }
th button .icon { width: 13px; height: 13px; flex-basis: 13px; opacity: .55; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: #35445b; }
th[aria-sort="ascending"] .icon, th[aria-sort="descending"] .icon { opacity: 1; }
td { border-bottom: 1px solid #eef0f4; vertical-align: middle; padding: 14px 10px; background: white; overflow: hidden; text-overflow: ellipsis; }
tbody tr:nth-child(even) td { background: #fcfcfd; }
tbody tr:hover td { background: #f8fafc; }
tbody tr.is-selected td { background: #fffae7; }
tbody tr { cursor: pointer; }
th:first-child, td:first-child { width: 38px; padding-inline: 14px 7px; position: sticky; left: 0; z-index: 1; }
th:nth-child(2), td:nth-child(2) { position: sticky; left: 38px; z-index: 1; }
th:first-child, th:nth-child(2) { z-index: 4; }
td:nth-child(2) { box-shadow: 1px 0 #eef0f4; }
.order-cell { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
.order-link { font-weight: 650; color: #334963; border: 0; padding: 0; background: transparent; font-size: 12px; text-align: left; }
.order-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { color: #667285; font-size: 11px; display: block; margin-top: 5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-cell .cell-sub { margin: 0; }
.cell-title { display: block; font-weight: 600; color: #354152; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.inline-quantity { display: inline; font-weight: 400; }
.mobile-saved-views { display: none; }
.product-cell .cell-sub { max-width: 100%; }
.cell-material { font-size: 10px; color: #667285; display: flex; align-items: center; gap: 5px; margin-top: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.issue-count { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--amber); font-weight: 550; white-space: nowrap; }
.issue-count .icon { width: 11px; height: 11px; flex-basis: 11px; }
.status-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 6px; border-radius: 4px; font-size: 10px; line-height: 1.25; font-weight: 550; background: #f0f2f5; color: #627083; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.status-chip .icon { width: 11px; height: 11px; flex-basis: 11px; }
.status-chip.success { color: var(--green); background: var(--green-soft); }
.status-chip.warning { color: var(--amber); background: var(--amber-soft); }
.status-chip.neutral { color: #596b82; background: #eef2f7; }
.payment-cell .status-chip { margin-top: 6px; }
.payment-cell .payment-value { display: block; }
.payment-value { font-size: 12px; font-weight: 600; white-space: nowrap; }
.missing-value { color: #687487; font-size: 11px; }
.required-missing { color: var(--amber); }
.carrier-name { font-size: 11px; font-weight: 550; white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.row-open { width: 25px; min-height: 30px; padding: 3px; opacity: .65; }
.row-open:hover { opacity: 1; }
.sheet-mode table { min-width: 2060px; table-layout: fixed; }
.sheet-mode th { background: #faf4d6; border-bottom-color: #e7d995; font-size: 11px; }
.sheet-mode td { white-space: nowrap; font-size: 11px; }
.sheet-mode td .missing-value { font-size: 11px; }
.sheet-mode td.cell-price, .sheet-mode td.cell-total, .sheet-mode td.cell-quantity { text-align: right; }
body.compact td { padding-block: 9px; }
body.compact .cell-material { margin-top: 3px; }
body.compact .cell-sub { margin-top: 3px; }
body.compact .order-cell .cell-sub { margin-top: 0; }
.mobile-rows, .mobile-sort { display: none; }
.list-footer { display: flex; gap: 16px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 10px 17px; min-height: 55px; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.list-footer > div { display: flex; align-items: center; gap: 20px; }
.page-size { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.page-size select { background: white; color: #566275; border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; font-size: 11px; }
.list-footer .pagination { gap: 10px; }
#page-position { min-width: 37px; text-align: center; }
.pagination .icon-button { border: 1px solid var(--line); width: 30px; min-height: 30px; }
.workspace-footnote { margin: 13px 2px 0; display: flex; align-items: center; gap: 7px; color: #758090; font-size: 10px; flex-shrink: 0; line-height: 1.6; }
.workspace-footnote .icon { width: 13px; height: 13px; flex-basis: 13px; }
.workspace-footnote .text-button { margin-left: auto; font-size: 10px; white-space: nowrap; }
.empty-state { display: flex; flex: 1; align-items: center; justify-content: center; flex-direction: column; padding: 40px 24px; min-height: 250px; text-align: center; border-top: 1px solid var(--line); }
.empty-symbol { color: #91a0b2; background: #f1f4f7; border-radius: 50%; width: 54px; height: 54px; margin-bottom: 16px; }
.empty-symbol .icon { width: 25px; height: 25px; }
.empty-state h2 { font-size: 17px; margin: 0 0 7px; font-weight: 600; }
.empty-state p { font-size: 12px; line-height: 1.7; color: var(--muted); max-width: 360px; margin: 0 0 20px; }
.notice, .demo-banner { padding: 11px 15px; margin-bottom: 12px; font-size: 12px; line-height: 1.6; border-radius: 7px; background: var(--amber-soft); color: #80571b; flex-shrink: 0; }
.notice { display: flex; align-items: center; gap: 8px; }
.demo-banner { background: #eaf0f9; color: #465e80; }
.skeleton { display: block; height: 9px; width: 78%; border-radius: 3px; background: #edf0f3; margin-block: 7px; }
.skeleton.short { width: 45%; height: 7px; background: #f2f4f6; }
.skeleton-row td { height: 82px; }
.loading-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { color: var(--ink); }
dialog::backdrop { background: rgb(25 37 53 / 28%); }
.order-dialog { width: min(536px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; margin: 0 0 0 auto; padding: 0; background: white; box-shadow: -12px 0 48px rgb(24 39 60 / 12%); }
.order-dialog[open] { display: flex; flex-direction: column; animation: enter-panel .2s cubic-bezier(.2,.8,.2,1); }
@keyframes enter-panel { from { transform: translateX(24px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
.detail-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px 19px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.detail-header > div > span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.detail-header h2 { font-size: 23px; letter-spacing: -.02em; margin: 0; font-weight: 650; }
.detail-content { flex: 1; overflow-y: auto; padding: 23px 28px; }
.detail-state { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.detail-state .status-chip { font-size: 11px; padding: 5px 8px; }
.detail-section { padding: 22px 0; border-top: 1px solid var(--line); }
.detail-section:first-child { padding-top: 0; border-top: 0; }
.detail-section h3 { margin: 0 0 15px; font-size: 13px; font-weight: 650; }
.detail-product { margin: 12px 0; }
.detail-product + .detail-product { padding-top: 17px; border-top: 1px dashed var(--line); }
.detail-product > strong { display: block; font-size: 14px; line-height: 1.6; font-weight: 600; }
.detail-product .cell-sub { font-size: 11px; margin: 5px 0 12px; white-space: normal; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 23px; margin: 0; }
.detail-grid > div { min-width: 0; }
.detail-grid dt { font-size: 11px; color: var(--muted); margin-bottom: 4px; line-height: 1.5; }
.detail-grid dd { margin: 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-grid .money { font-size: 16px; font-weight: 600; }
.detail-grid .caption { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.detail-note { font-size: 12px; color: #515e70; line-height: 1.8; white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }
.detail-issues { background: #fff9e9; border-radius: 8px; padding: 15px; margin: 0 0 22px; }
.detail-issues h3 { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 0 0 9px; color: #7c591b; }
.detail-issues ul { padding: 0; list-style: none; margin: 0; }
.detail-issues li { font-size: 11px; color: #826224; padding: 4px 0; line-height: 1.6; }
.detail-issues li::before { content: "•"; padding-right: 7px; }
.detail-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 17px 28px; background: #fff; flex-shrink: 0; }
.save-dialog { width: min(430px,calc(100% - 32px)); padding: 25px; border: 0; border-radius: 14px; box-shadow: var(--shadow-overlay); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-heading h2 { margin: 0; font-size: 20px; font-weight: 600; }
.save-dialog p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 14px 0 18px; }
.save-dialog label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.save-dialog input { width: 100%; border: 1px solid #cbd3df; border-radius: 7px; padding: 10px; }
.save-dialog .control-hint { margin: 8px 0 22px; font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 30; max-width: calc(100vw - 30px); padding: 13px 19px; border-radius: 8px; color: #fff; background: #344457; box-shadow: 0 5px 24px rgb(24 40 61 / 20%); font-size: 12px; line-height: 1.6; }
.toast.error { background: #8f3434; }
.help-view { overflow-y: auto; padding: 4px 6px 40px; }
.help-intro { max-width: 650px; padding: 25px 0 30px; }
.help-intro h2 { font-size: 25px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 14px; }
.help-intro p { font-size: 14px; line-height: 1.9; color: #586578; margin: 0 0 13px; }
.help-signature { font-size: 13px; font-weight: 600; }
.workflow { list-style: none; padding: 0; counter-reset: workflow; margin: 0 0 32px; max-width: 760px; }
.workflow li { counter-increment: workflow; position: relative; padding: 0 0 25px 49px; }
.workflow li::before { content: counter(workflow); display: grid; place-items: center; position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow-soft); color: #76601e; font-size: 12px; font-weight: 650; }
.workflow h3 { margin: 0 0 7px; font-size: 14px; font-weight: 650; }
.workflow p { font-size: 12px; line-height: 1.9; color: #596579; margin: 0; }
.help-notes { max-width: 760px; background: white; border: 1px solid var(--line); padding: 23px; border-radius: 12px; }
.help-notes h3 { font-size: 15px; margin: 0 0 13px; }
.help-notes details { padding: 13px 0; border-top: 1px solid var(--line); }
.help-notes summary { cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1.7; }
.help-notes p { font-size: 12px; color: #5c6a7f; line-height: 1.9; max-width: 65ch; margin: 10px 0 2px; }
.help-closing { font-size: 12px; line-height: 1.8; color: #68768a; margin-top: 22px; }

.login-body { min-height: 100dvh; background: white; }
.login-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(360px,.9fr) minmax(420px,1.1fr); }
.login-story { background: #f1f2ef; padding: 45px 10%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-story .brand { padding: 0; }
.login-story-content { margin: auto 0; padding: 70px 0; max-width: 400px; }
.login-story h1 { font-size: 38px; line-height: 1.2; letter-spacing: -.03em; font-weight: 600; margin: 0 0 20px; }
.login-story-content > p { color: #69716f; font-size: 14px; line-height: 1.8; max-width: 340px; margin: 0; }
.login-benefits { display: grid; gap: 0; padding: 0; list-style: none; margin: 34px 0 0; max-width: 330px; }
.login-benefits li { display: flex; align-items: center; gap: 12px; border-top: 1px solid #dce0da; padding: 16px 0; font-size: 12px; color: #50605a; }
.login-benefits .icon { color: #798979; width: 17px; height: 17px; }
.login-story-footer { color: #777f77; font-size: 10px; }
.login-area { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 32px; }
.login-form-wrap { width: min(100%,350px); }
.login-form-wrap .mobile-brand { margin-bottom: 44px; }
.login-form-wrap h2 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 9px; }
.login-form-wrap > p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 0 34px; }
.login-form { display: grid; gap: 20px; }
.login-form label { display: block; margin-bottom: 8px; color: #455061; font-size: 12px; font-weight: 550; }
.login-form input { width: 100%; border: 1px solid #ccd4dd; border-radius: 7px; background: #fff; padding: 12px; font-size: 14px; min-height: 45px; }
.login-form input::placeholder { color: #7c8694; }
.password-field { position: relative; }
.password-field input { padding-right: 45px; }
.password-field button { position: absolute; right: 5px; top: 5px; }
.login-form .button { min-height: 45px; margin-top: 2px; font-size: 13px; }
.login-error { color: var(--red); background: #fff2f2; padding: 10px 12px; border-radius: 6px; font-size: 12px; line-height: 1.6; }
.caps-hint { font-size: 11px; color: var(--amber); margin: 7px 0 0; }
.login-support { font-size: 11px; color: var(--muted); line-height: 1.8; padding: 23px 0; border-bottom: 1px solid var(--line); }
.login-privacy { display: flex; align-items: center; gap: 6px; color: #7d8794; font-size: 10px; padding-top: 18px; }
.login-privacy .icon { width: 12px; height: 12px; }

@media (min-width: 1650px) {
  .workspace { padding-inline: 40px; }
  td { padding-block: 16px; }
  .queue { font-size: 13px; }
  table { font-size: 13px; }
}
@media (max-width: 1250px) {
  .sidebar { padding-inline: 12px; }
  .app-shell { grid-template-columns: 192px minmax(0,1fr); }
  .workspace { padding: 23px 22px 14px; }
  .page-header { align-items: flex-start; margin-bottom: 17px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 295px; }
  .sync-state { flex: 1 1 100%; justify-content: flex-end; margin: 0 0 0; }
  .queue { padding-inline: 8px; gap: 6px; }
  .queue > [data-icon] { display: none; }
  .toolbar { padding: 14px; }
  .segmented button { padding-inline: 8px; }
  .search-field { max-width: none; }
  .queue span { font-size: 11px; }
  .workspace-footnote { font-size: 10px; }
}
@media (max-width: 950px) {
  .app-shell { grid-template-columns: 166px minmax(0,1fr); }
  .sidebar { padding-inline: 9px; }
  .brand { gap: 8px; padding-inline: 6px; }
  .brand strong { font-size: 14px; }
  .brand-symbol { width: 32px; height: 32px; flex-basis: 32px; font-size: 21px; }
  .nav-item { font-size: 12px; gap: 8px; padding: 10px 8px; }
  .profile small { display: none; }
  .profile .avatar { display: none; }
  .workspace { padding: 22px 18px 12px; }
  .page-header h1 { font-size: 22px; }
  .page-header p { max-width: 230px; }
  .toolbar { gap: 8px; }
  .toolbar-end { flex: 1 1 100%; justify-content: space-between; }
  .search-field { flex: 1; max-width: none; }
  .queue { gap: 6px; align-items: flex-start; flex-wrap: wrap; }
  .queue strong { margin-left: 0; }
  .queue > span:not([data-icon]) { width: 100%; }
  .workspace-footnote .text-button { display: none; }
}
@media (max-width: 700px) {
  :root { font-size: 14px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .workspace { min-height: 100dvh; height: auto; padding: 19px 15px; display: block; }
  .page-header { display: block; margin-bottom: 19px; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; margin-bottom: 22px; }
  .mobile-brand .brand-symbol { width: 30px; height: 30px; flex-basis: 30px; font-size: 19px; border-radius: 7px; }
  .mobile-brand .icon-button { margin-left: auto; width: 34px; min-height: 34px; }
  .mobile-brand .icon-button + .icon-button { margin-left: 0; }
  .page-header h1 { font-size: 24px; }
  .page-header p { max-width: none; font-size: 12px; }
  .header-actions { max-width: none; justify-content: flex-start; gap: 8px; margin-top: 17px; }
  .header-actions .sync-state { order: 2; justify-content: flex-start; margin-top: 3px; font-size: 10px; }
  .header-actions .button { flex: 1; min-height: 42px; }
  .orders-view { display: block; }
  .queue-bar { grid-template-columns: 1fr 1fr; background: transparent; border: 1px solid #dce2e9; border-radius: 9px; overflow: hidden; margin-bottom: 16px; gap: 1px; background: #dce2e9; }
  .queue { min-height: 44px; padding: 11px 10px; flex-wrap: nowrap; background: #f8fafc; align-items: center; }
  .queue span { font-size: 11px; }
  .queue > span:not([data-icon]) { width: auto; }
  .queue strong { margin-left: auto; font-size: 10px; }
  .queue.is-active { background: #fff5cf; }
  .queue.is-active::after { display: none; }
  .ledger-panel { border-radius: 10px; overflow: visible; }
  .toolbar { padding: 12px; flex-wrap: wrap; gap: 8px; }
  .toolbar > .button { min-height: 42px; }
  .search-field { height: 42px; flex: 1 1 190px; min-width: 130px; }
  .search-field input { font-size: 12px; }
  .search-field kbd { display: none; }
  .toolbar-end { flex: 1 1 100%; justify-content: space-between; }
  .segmented button { min-height: 31px; }
  .options-menu summary { height: 39px; }
  .options-content { right: 0; width: 263px; }
  .mobile-saved-views { display: block; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; }
  .mobile-saved-views:empty { display: none; }
  .mobile-saved-views > strong { font-size: 11px; color: var(--muted); }
  .check-label, .menu-action { min-height: 32px; }
  .filter-panel { padding: 4px 12px 15px; gap: 12px; }
  .filter-panel label { flex-basis: calc(50% - 10px); }
  .filter-panel input, .filter-panel select { font-size: 12px; min-height: 40px; }
  .filter-panel label:first-child { flex-basis: 100%; }
  .list-context { display: block; padding: 2px 12px 12px; font-size: 10px; }
  .list-context p { display: none; }
  .selection-bar { padding: 9px 12px; flex-wrap: wrap; gap: 8px; font-size: 11px; }
  .selection-bar > .icon { display: none; }
  .selection-bar .button.small { font-size: 10px; min-height: 35px; }
  .mobile-sort { display: flex; align-items: center; gap: 9px; padding: 0 12px 12px; font-size: 10px; color: var(--muted); }
  .mobile-sort select { border: 0; border-radius: 5px; background: #f5f7f9; color: #536378; font-size: 10px; padding: 7px; min-height: 32px; margin-left: auto; }
  .table-wrap { display: none; }
  .mobile-rows { display: block; }
  .mobile-row { border-top: 1px solid var(--line); padding: 16px 14px; background: white; }
  .mobile-row.is-selected { background: #fffae7; }
  .mobile-row-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
  .mobile-row-top input { width: 17px; height: 17px; }
  .mobile-row-top .cell-sub { margin: 0 0 0 auto; font-size: 10px; }
  .mobile-row-top .order-link { font-size: 12px; }
  .mobile-product { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
  .mobile-product strong { font-size: 13px; font-weight: 600; }
  .mobile-product > .payment-value { white-space: nowrap; }
  .mobile-row .cell-sub { font-size: 11px; white-space: normal; }
  .mobile-product > .payment-value { text-align: right; }
  .mobile-product > .payment-value .cell-sub { font-size: 9px; font-weight: 400; }
  .mobile-row-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
  .mobile-row-bottom .status-chip { font-size: 10px; }
  .mobile-row-bottom .row-open { width: 30px; min-height: 34px; margin-left: auto; }
  .sheet-mode .table-wrap { display: block; max-height: 65dvh; min-height: 250px; }
  .sheet-mode .mobile-rows, .sheet-mode .mobile-sort { display: none; }
  .sheet-mode .list-context p { display: block; margin-bottom: 5px; }
  .sheet-mode table { font-size: 11px; }
  .sheet-mode th:first-child, .sheet-mode td:first-child, .sheet-mode th:nth-child(2), .sheet-mode td:nth-child(2) { position: static; }
  .list-footer { gap: 8px; padding: 11px 12px; flex-wrap: wrap; font-size: 10px; }
  .list-footer > div { gap: 9px; }
  .list-footer .page-size { display: none; }
  .list-footer .pagination { gap: 6px; }
  .workspace-footnote { display: block; margin: 14px 4px; font-size: 10px; }
  .workspace-footnote > [data-icon] { margin-right: 4px; vertical-align: middle; }
  .workspace-footnote .text-button { display: inline-flex; margin-left: 0; font-size: 10px; }
  .empty-state { padding: 35px 20px; }
  .order-dialog { width: 100%; }
  .detail-header { padding: 19px 20px; }
  .detail-content { padding: 20px; }
  .detail-footer { padding: 14px 16px max(14px,env(safe-area-inset-bottom)); }
  .detail-footer .button { min-height: 43px; padding-inline: 12px; }
  .detail-grid { gap: 15px; }
  .detail-grid dt { font-size: 12px; }
  .detail-grid dd, .detail-note { font-size: 13px; }
  .help-intro { padding-top: 24px; }
  .help-intro h2 { font-size: 24px; }
  .help-intro p { font-size: 13px; }
  .help-notes { padding: 18px; }
  .help-notes summary { padding-block: 5px; }
  .login-shell { display: block; }
  .login-story { display: none; }
  .login-area { min-height: 100dvh; justify-content: flex-start; padding: 35px 27px; }
  .login-form-wrap .mobile-brand { display: flex; margin-bottom: 65px; }
  .login-form input { font-size: 16px; }
  .login-form-wrap h2 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; font-size: 9px; }
  .sidebar, .header-actions, .queue-bar, .toolbar, .filter-panel, .selection-bar, .list-footer, .workspace-footnote, .mobile-brand, .mobile-sort, .mobile-rows, dialog, .toast, .skip-link { display: none !important; }
  .app-shell, .workspace, .orders-view, .ledger-panel, .table-wrap { display: block !important; height: auto; max-height: none; min-height: 0; padding: 0; overflow: visible; border: 0; }
  .page-header { margin-bottom: 12px; }
  .page-header h1 { font-size: 18px; }
  .page-header p { font-size: 10px; }
  .list-context { padding: 0 0 10px; }
  table, .sheet-mode table { min-width: 0; width: 100%; table-layout: auto; font-size: 8px; }
  th, td, .sheet-mode td { padding: 7px 4px; white-space: normal; position: static !important; font-size: 8px; box-shadow: none !important; }
  th { height: auto; }
  tr { break-inside: avoid; }
  th:first-child, td:first-child, th:last-child, td:last-child { display: none; }
  .cell-title, .cell-sub, .cell-material, .order-link, .payment-value, .carrier-name { font-size: 8px; white-space: normal; }
  .status-chip { background: none !important; padding: 0; font-size: 8px; }
  th .icon { display: none; }
}
