:root {
  color-scheme: dark;
  --bg: #1e242b;
  --surface: #252c35;
  --surface-raised: #2c3540;
  --text: #f1f4f7;
  --muted: #b5bec8;
  --accent: #79d8c8;
  --accent-strong: #91eadb;
  --primary-text: #102522;
  --disabled-text: #a8b1bc;
  --danger: #ff9fa8;
  --danger-bg: #4a2028;
  --danger-text: #ffb7bd;
  --status-bg: #173e38;
  --status-text: #a6e8dc;
  --success-bg: #173e38;
  --success-text: #b8f2e8;
  --inactive-bg: #3d4249;
  --inactive-text: #e1e5e9;
  --warning-bg: #493718;
  --warning-text: #f4d38b;
  --stock-warning-bg: #3c2c12;
  --stock-warning-text: #ffe2a8;
  --stock-warning-backdrop: rgba(8, 11, 14, .82);
  --accent-tint: #243d3a;
  --border-subtle: #4b5663;
  --border-accent: #5f9e94;
  --hover-bg: #343e49;
  --combobox-bg: #252c35;
  --combobox-option-active: #36514f;
  --combobox-message: #f4d38b;
  --shadow-dark: #101419;
  --shadow-light: #3b4653;
  --topbar-shadow: #0c1015;
  --radius: 1.2rem;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #cccccc;
  --surface: #d6d6d6;
  --surface-raised: #dedede;
  --text: #24282d;
  --muted: #50555a;
  --accent: #075e54;
  --accent-strong: #064c45;
  --primary-text: #ffffff;
  --disabled-text: #555b60;
  --danger: #721c2a;
  --danger-bg: #e8c5ca;
  --danger-text: #721c2a;
  --status-bg: #b9d2cc;
  --status-text: #174f47;
  --success-bg: #b9d2cc;
  --success-text: #174f47;
  --inactive-bg: #b8b8b8;
  --inactive-text: #30353a;
  --warning-bg: #e5cca0;
  --warning-text: #684600;
  --stock-warning-bg: #f3e3c2;
  --stock-warning-text: #543700;
  --stock-warning-backdrop: rgba(36, 40, 45, .72);
  --accent-tint: #b8d5d0;
  --border-subtle: #b8b8b8;
  --border-accent: #5d948c;
  --hover-bg: #e0e0e0;
  --combobox-bg: #dedede;
  --combobox-option-active: #a9d2cb;
  --combobox-message: #684600;
  --shadow-dark: #a6a6a6;
  --shadow-light: #f7f7f7;
  --topbar-shadow: #999999;
  --radius: 1.15rem;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { appearance: none; margin: 0; }

.page-shell { width: min(100% - 2rem, 75rem); margin-inline: auto; padding-block: 2rem; }
.neo-panel { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: .65rem .65rem 1.25rem var(--shadow-dark), -.55rem -.55rem 1.15rem var(--shadow-light); }
.eyebrow { margin: 0; color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .16em; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; width: 2.75rem; aspect-ratio: 1; place-items: center; border-radius: .85rem; background: var(--surface-raised); color: var(--accent-strong); font-size: 1.3rem; font-weight: 900; box-shadow: inset .18rem .18rem .35rem var(--shadow-dark), inset -.15rem -.15rem .3rem var(--shadow-light); }
.brand-name { margin: -.1rem 0 0; font-size: 1rem; font-weight: 800; white-space: nowrap; }

.topbar { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; background: var(--surface); box-shadow: 0 .5rem 1.3rem var(--topbar-shadow); }
.nav-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.hamburger { display: grid; width: 2.75rem; height: 2.75rem; place-content: center; gap: .28rem; cursor: pointer; }
.hamburger span { display: block; width: 1.2rem; height: .12rem; border-radius: 1rem; background: var(--text); transition: transform .2s, opacity .2s; }
.neo-button, .primary-button, .secondary-button { border: 0; border-radius: .8rem; background: var(--surface); color: var(--text); box-shadow: .3rem .3rem .65rem var(--shadow-dark), -.25rem -.25rem .55rem var(--shadow-light); }
.nav-drawer { display: none; position: absolute; top: calc(100% + .6rem); right: 1rem; left: 1rem; padding: 1rem; border-radius: var(--radius); background: var(--surface); box-shadow: .7rem .7rem 1.4rem var(--shadow-dark), -.35rem -.35rem 1rem var(--shadow-light); }
.nav-toggle:checked ~ .nav-drawer { display: block; }
.nav-toggle:focus-visible + .hamburger { outline: .18rem solid var(--accent); outline-offset: .2rem; }
.nav-toggle:checked + .hamburger span:first-child { transform: translateY(.4rem) rotate(45deg); }
.nav-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .hamburger span:last-child { transform: translateY(-.4rem) rotate(-45deg); }
.nav-list { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.nav-link { display: flex; min-height: 2.75rem; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .8rem; border-radius: .7rem; text-decoration: none; font-weight: 700; }
a.nav-link:hover, a.nav-link:focus-visible { color: var(--accent-strong); background: var(--surface-raised); outline: none; box-shadow: inset .2rem .2rem .4rem var(--shadow-dark), inset -.15rem -.15rem .35rem var(--shadow-light); }
.nav-link.is-disabled { color: var(--disabled-text); cursor: not-allowed; }
.nav-link small { font-size: .68rem; font-weight: 500; }
.account-area { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.account-copy { display: grid; min-width: 0; }
.account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy span { color: var(--muted); font-size: .8rem; }
.theme-toggle { display: inline-flex; min-height: 2.75rem; align-items: center; gap: .45rem; padding: .55rem .8rem; cursor: pointer; font-weight: 800; white-space: nowrap; }
.theme-toggle:focus-visible { outline: .18rem solid var(--accent); outline-offset: .2rem; }
.theme-toggle-icon { font-size: 1.05rem; line-height: 1; }
.secondary-button, .primary-button { min-height: 2.75rem; padding: .55rem 1rem; cursor: pointer; font-weight: 800; }
.primary-button { background: var(--accent); color: var(--primary-text); box-shadow: .35rem .35rem .7rem var(--shadow-dark), -.2rem -.2rem .5rem var(--shadow-light); }
.primary-button:hover, .primary-button:focus-visible, .secondary-button:hover, .secondary-button:focus-visible { filter: brightness(1.08); outline: .15rem solid var(--accent); outline-offset: .18rem; }

.welcome-card { max-width: 48rem; margin: clamp(2rem, 8vw, 6rem) auto 0; padding: clamp(1.5rem, 5vw, 3rem); }
.welcome-card h1, .login-heading h1, .status-card h1 { margin: .35rem 0; line-height: 1.25; }
.welcome-card p:last-child, .login-heading p, .status-card > p { color: var(--muted); }
.login-page, .status-page { display: grid; place-items: center; }
.login-shell, .status-shell { padding-block: 2rem; }
.login-card { width: min(100%, 29rem); margin-inline: auto; padding: clamp(1.4rem, 6vw, 2.5rem); }
.brand-centered { margin-bottom: 2rem; }
.login-heading { margin-bottom: 1.5rem; }
.login-heading p { margin: .35rem 0 0; }
.stack-form { display: grid; gap: .65rem; }
.stack-form label { color: var(--muted); font-size: .9rem; font-weight: 700; }
.stack-form input { width: 100%; min-height: 3rem; margin-bottom: .55rem; padding: .65rem .85rem; border: 1px solid transparent; border-radius: .8rem; background: var(--bg); color: var(--text); box-shadow: inset .28rem .28rem .55rem var(--shadow-dark), inset -.2rem -.2rem .45rem var(--shadow-light); }
.stack-form input:focus { border-color: var(--accent); outline: none; }
.stack-form .primary-button { margin-top: .8rem; }
.alert { padding: .7rem .85rem; border-left: .25rem solid var(--danger); border-radius: .5rem; background: var(--danger-bg); color: var(--danger-text); }
.stock-warning-dialog { width: min(calc(100% - 2rem), 32rem); padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--warning-text); border-radius: var(--radius); background: var(--stock-warning-bg); color: var(--stock-warning-text); box-shadow: .7rem .7rem 1.4rem var(--shadow-dark); }
.stock-warning-dialog::backdrop { background: var(--stock-warning-backdrop); }
.stock-warning-dialog h2 { margin: 0 0 .75rem; font-size: 1.3rem; }
.stock-warning-dialog p { margin: 0 0 1.25rem; }
.stock-warning-dialog form { display: flex; justify-content: flex-end; }
.status-card { width: min(100%, 34rem); margin-inline: auto; padding: clamp(2rem, 7vw, 4rem); text-align: center; }
.status-code { margin: 0; color: var(--accent) !important; font-size: clamp(3rem, 14vw, 6rem); font-weight: 900; line-height: 1; }
.button-link { display: inline-flex; align-items: center; justify-content: center; margin-top: 1.25rem; text-decoration: none; }

.page-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; }
.page-heading h1 { margin: .25rem 0 0; font-size: clamp(1.8rem,5vw,2.7rem); line-height: 1.15; }
.page-heading p:last-child, .schema-note { margin: .4rem 0 0; color: var(--muted); }
.timezone { color: var(--muted); font-size: .85rem; }
.content-panel { min-width: 0; margin-bottom: 1.5rem; padding: clamp(1rem,3vw,1.6rem); }
.content-panel h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.prototype-form, .search-grid { display: grid; min-width: 0; gap: 1rem; }
.combobox { position: relative; display: block; }
.combobox-list { position: absolute; z-index: 20; inset: calc(100% + .25rem) 0 auto; max-height: 15rem; overflow-y: auto; padding: .35rem; border-radius: .7rem; background: var(--panel); box-shadow: .35rem .35rem .8rem var(--shadow-dark), -.2rem -.2rem .6rem var(--shadow-light); }
.combobox-list[hidden] { display: none; }
.combobox-list [role="option"] { width: 100%; padding: .6rem; border: 0; border-radius: .45rem; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.combobox-list [role="option"]:hover, .combobox-list [role="option"].is-active { background: var(--accent-tint); }
.form-grid, .summary-grid, .search-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: 1rem; }
.summary-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.form-grid--compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 18rem)); }
.outbound-header-fields { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .875rem; }
.outbound-field { width: min(100%, var(--field-width)); }
.outbound-header-fields > .outbound-field { flex: 0 0 min(100%, var(--field-width)); }
.outbound-field--customer { --field-width: calc(10em + 1.6rem); }
.outbound-field--address { --field-width: 18rem; }
.outbound-field--phone { --field-width: calc(13ch + 1.6rem); }
.outbound-field--sales { --field-width: calc(4em + 3rem); }
.outbound-field--payment { --field-width: calc(3em + 3rem); }
.summary-field--discount { max-width: calc(7ch + 1.6rem); }
.summary-field--shipping, .summary-field--shipping-cost { max-width: calc(6ch + 1.6rem); }
.form-grid--single { grid-template-columns: minmax(0, max-content); }
.supplier-field { width: min(100%, 12.6rem); }
.prototype-form .supplier-input { width: min(100%, calc(11em + 1.6rem)); font-size: 1rem; }
.prototype-form label, .search-grid label, .summary-grid label, .search-label { display: grid; min-width: 0; gap: .35rem; color: var(--muted); font-size: .83rem; font-weight: 700; overflow-wrap: break-word; }
.summary-value { display: flex; align-items: center; min-height: 2.7rem; padding: .55rem .1rem; color: var(--text); font-size: 1rem; }
.prototype-form input, .prototype-form select, .search-grid input, .search-grid select, .search-label input { width: 100%; min-height: 2.7rem; padding: .55rem .7rem; border: 1px solid transparent; border-radius: .7rem; background: var(--bg); color: var(--text); box-shadow: inset .2rem .2rem .4rem var(--shadow-dark), inset -.15rem -.15rem .35rem var(--shadow-light); }
.combobox { position: relative; display: block; }
.combobox-listbox { position: fixed; z-index: 20; width: max-content; max-width: min(24rem, 90vw); max-height: 15rem; overflow-y: auto; padding: .3rem; border: 1px solid var(--border-accent); border-radius: .65rem; background: var(--combobox-bg); box-shadow: .4rem .4rem .8rem var(--shadow-dark); font-size: .85rem; }
.combobox-listbox button { display: block; width: 100%; min-height: 2.5rem; padding: .45rem .6rem; border: 0; border-radius: .4rem; background: var(--combobox-bg); color: var(--text); text-align: left; cursor: pointer; }
.combobox-listbox button:hover, .combobox-listbox button[aria-selected="true"] { background: var(--combobox-option-active); color: var(--text); }
.combobox-message { position: absolute; z-index: 7; top: calc(100% + .25rem); left: 0; display: block; width: max-content; max-width: min(22rem, 80vw); color: var(--combobox-message); font-size: .78rem; }
.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; margin-top: 1rem; border-radius: .7rem; box-shadow: inset -.7rem 0 .65rem -.7rem var(--accent); scrollbar-color: var(--accent) var(--surface-raised); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline: .15rem solid var(--accent); outline-offset: .15rem; }
table { width: 100%; min-width: max-content; border-collapse: collapse; white-space: nowrap; font-size: .85rem; }
th, td { padding: .72rem .8rem; border-bottom: 1px solid var(--border-subtle); text-align: left; vertical-align: middle; }
th { color: var(--accent); font-size: .75rem; letter-spacing: .02em; }
tbody tr:hover { background: var(--hover-bg); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; margin-top: 1rem; }
.status-chip { display: inline-flex; padding: .15rem .55rem; border-radius: 2rem; background: var(--status-bg); color: var(--status-text); }
.status-chip.inactive { background: var(--inactive-bg); color: var(--inactive-text); }
.inactive-row { filter: grayscale(1); opacity: .68; }
.feedback { padding: .7rem .85rem; border-radius: .5rem; font-weight: 800; }
.success-feedback { background: var(--success-bg); color: var(--success-text); }
.management-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: 1rem; }
.management-card { display: grid; gap: .35rem; min-height: 7rem; align-content: center; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: .8rem; background: var(--surface-raised); text-decoration: none; box-shadow: .3rem .3rem .65rem var(--shadow-dark), -.2rem -.2rem .5rem var(--shadow-light); }
.management-card:hover, .management-card:focus-visible { border-color: var(--accent); outline: none; }
.management-card span { color: var(--muted); font-size: .85rem; }
.inline-check { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-weight: 700; }
.row-actions { display: flex; align-items: center; gap: .5rem; }
.row-actions form { margin: 0; }
.table-action.button-link { margin-top: 0; text-decoration: none; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.photo-picker { display: grid; width: 8.5rem; gap: .3rem; white-space: normal; }
.photo-picker-button { justify-self: start; white-space: nowrap; }
.photo-picker-message { color: var(--muted); font-size: .7rem; line-height: 1.3; }
.photo-previews { display: flex; flex-wrap: wrap; gap: .25rem; }
.photo-preview { position: relative; display: inline-flex; width: 2rem; height: 2rem; }
.photo-preview img { width: 100%; height: 100%; border: 1px solid var(--border-subtle); border-radius: .3rem; object-fit: cover; }
.photo-remove { position: absolute; top: -.35rem; right: -.35rem; display: grid; width: 1.15rem; height: 1.15rem; padding: 0; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; background: var(--danger-bg); color: var(--danger-text); cursor: pointer; font-size: .85rem; line-height: 1; }
.photo-remove:focus-visible, .photo-picker-button:focus-visible, .inventory-image-link:focus-visible { outline: .15rem solid var(--accent); outline-offset: .12rem; }
.inventory-image-link { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.filter-block { display: grid; gap: .6rem; margin-bottom: 1rem; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: .55rem; }
.filter-button, .table-action { min-height: 2.3rem; padding: .35rem .75rem; border: 0; border-radius: .65rem; background: var(--surface-raised); color: var(--text); cursor: pointer; }
.filter-button.active { background: var(--accent); color: var(--primary-text); font-weight: 800; outline: .15rem solid var(--accent-strong); outline-offset: .15rem; }
.table-input { width: 8em; min-height: 2.2rem; padding: .35rem .5rem; border: 1px solid var(--accent); border-radius: .5rem; background: var(--bg); color: var(--text); }
.inline-form { display: inline-flex; align-items: center; gap: .4rem; }
.prototype-form .table-input--text-1 { width: calc(1ch + 1.2rem); min-width: 44px; }
.prototype-form .table-input--text-5 { width: calc(5ch + 1.2rem); }
.prototype-form .product-code-input { width: calc(9ch + 1.2rem); max-width: calc(9ch + 1.2rem); }
.prototype-form .table-input--text-7 { width: calc(6ch + 1em + 1.2rem); }
.prototype-form .table-input--text-14 { width: calc(14ch + 1.2rem); }
.prototype-form .table-input--cjk-4 { width: calc(4em + 1.2rem); }
.prototype-form .table-input--cjk-10 { width: calc(10em + 1.2rem); }
.prototype-form { --table-num-extra-width: 1.2rem; }
.prototype-form .table-inputs--wide { --table-num-extra-width: 2rem; }
.prototype-form .table-input--num-2 { width: calc(2ch + var(--table-num-extra-width)); }
.prototype-form .table-input--num-3 { width: calc(3ch + var(--table-num-extra-width)); }
.prototype-form .table-input--num-4 { width: calc(4ch + var(--table-num-extra-width)); }
.prototype-form .table-input--num-5 { width: calc(5ch + var(--table-num-extra-width)); }
.form-grid--single + .table-wrap .table-input--cjk-4 { width: calc(4em + 2rem); }
.size-fields { display: inline-flex; align-items: center; gap: .4rem; }
.size-separator { color: var(--muted); font-weight: 800; user-select: none; }
.table-column--product-name { width: calc(10em + 1.6rem); min-width: calc(10em + 1.6rem); max-width: calc(10em + 1.6rem); white-space: normal; overflow-wrap: anywhere; }
.table-column--unit-cost { width: 7em; white-space: normal; }
.compact-input { width: 5.5rem; margin-right: .5rem; }
tr[hidden] { display: none; }
.linked-field { display: grid; align-content: end; gap: .35rem; color: var(--muted); font-size: .83rem; font-weight: 700; }
.master-form { margin-top: 1rem; padding: 1rem; border: 1px solid var(--border-accent); border-radius: .8rem; background: var(--accent-tint); }
.master-form h3 { margin: 0 0 1rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.section-heading h2 { margin: 0; }
.section-heading span { color: var(--muted); font-size: .85rem; }
output[data-subtotal] { font-weight: 800; color: var(--accent-strong); }
.pricing-option { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.2rem; cursor: pointer; }
.pricing-option input { width: 1rem; min-height: 1rem; margin: 0; accent-color: var(--accent); }
.pricing-option span { font-weight: 700; white-space: nowrap; }
.check-label { display: flex !important; align-items: center; align-self: end; min-height: 2.7rem; }
.check-label input { width: 1rem; min-height: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric { display: grid; gap: .35rem; padding: 1.1rem; }
.metric span { color: var(--muted); font-size: .82rem; }
.metric strong { font-size: 1.35rem; }
.adjustment-column { background: var(--warning-bg); color: var(--warning-text); }
details { margin-top: 1rem; color: var(--muted); }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.section-heading h2 { margin-bottom: 0; }
.result-count { color: var(--muted); font-size: .85rem; }
.audit-detail-row > td { padding-top: 0; white-space: normal; }
.audit-details { margin-top: 0; }
.audit-details summary { cursor: pointer; color: var(--accent); font-weight: 800; }
.audit-diff-wrap { max-width: calc(100vw - 4rem); }
.audit-diff-table { white-space: normal; }
.audit-diff-table td { min-width: 10rem; max-width: 32rem; vertical-align: top; }
.audit-diff-table td:first-child { min-width: 8rem; }
.audit-diff-table pre { margin: 0; overflow-wrap: anywhere; }
.daily-summary { padding: .8rem 1rem; border: 1px solid var(--border-accent); border-radius: .8rem; background: var(--accent-tint); }
.daily-summary summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); align-items: center; gap: .65rem; cursor: pointer; color: var(--text); }
.daily-summary summary strong { color: var(--accent); }
.daily-summary[open] summary { padding-bottom: .65rem; border-bottom: 1px solid var(--border-subtle); }
pre { overflow-x: auto; white-space: pre-wrap; }
button:disabled { opacity: .6; cursor: default; }
.image-management-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: 1rem; margin-top: 1rem; }
.image-management-card { display: grid; gap: .75rem; min-width: 0; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: .8rem; background: var(--surface-raised); }
.image-management-card img { display: block; width: 100%; max-height: 16rem; border-radius: .6rem; object-fit: contain; }
.image-filename { overflow-wrap: anywhere; font-weight: 800; }
.inbound-total-summary { padding: .75rem; border: 1px solid var(--border-subtle); border-radius: .7rem; color: var(--muted); }
.inbound-total-summary strong { color: var(--accent-strong); }
.voided-row, .voided-panel { filter: grayscale(1); opacity: .72; }
.void-details { display: block; max-width: 18rem; margin-top: .35rem; white-space: normal; color: var(--muted); }
.inbound-thumbnail-cell { display: grid; justify-items: start; gap: .35rem; }
.product-thumbnail { width: 3.5rem; height: 3.5rem; border-radius: .4rem; object-fit: cover; }
.void-line-form { display: grid; width: 12rem; gap: .4rem; }
.void-line-form label { display: grid; gap: .2rem; color: var(--muted); font-size: .75rem; }
.void-line-form input { width: 100%; min-height: 2.2rem; padding: .35rem .5rem; border: 1px solid var(--border-subtle); border-radius: .5rem; background: var(--bg); color: var(--text); }
.inventory-search-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.inventory-search-form .search-label { flex: 1 1 16rem; }
.inventory-order-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.inventory-order-banner > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.25rem; }
.inbound-photo-form { grid-template-columns: minmax(0, 24rem) max-content; align-items: end; margin-top: 1rem; }
.inbound-thumbnail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 8rem)); gap: .75rem; margin-top: 1rem; }
.inbound-photo-thumbnail { width: 100%; aspect-ratio: 1; border: 1px solid var(--border-subtle); border-radius: .6rem; object-fit: cover; }

@media (max-width: 32rem) {
  .page-shell { width: min(100% - 1.25rem, 75rem); padding-block: 1.25rem; }
  .neo-panel { box-shadow: .35rem .35rem .7rem var(--shadow-dark), -.3rem -.3rem .65rem var(--shadow-light); }
  .topbar { box-shadow: 0 .3rem .75rem var(--topbar-shadow); }
  .nav-drawer { right: .625rem; left: .625rem; box-shadow: .4rem .4rem .75rem var(--shadow-dark), -.2rem -.2rem .55rem var(--shadow-light); }
  .stock-warning-dialog { box-shadow: .4rem .4rem .75rem var(--shadow-dark); }
  .content-panel { margin-bottom: 1rem; }
  .inbound-photo-form { grid-template-columns: 1fr; }
}

@media (min-width: 48rem) and (max-width: 63.999rem) {
  .nav-drawer { left: auto; width: min(calc(100% - 2rem), 32rem); }
}

@media (min-width: 64rem) {
  .topbar { padding-inline: clamp(1.5rem, 4vw, 4rem); }
  .hamburger { display: none; }
  .nav-drawer { display: flex; position: static; align-items: center; justify-content: flex-end; gap: 1.25rem; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .nav-list { display: flex; align-items: center; gap: .15rem; }
  .nav-link { min-height: 2.5rem; padding-inline: .65rem; font-size: .88rem; }
  .nav-link small { display: none; }
  .account-area { margin: 0; padding: 0 0 0 1.1rem; border-top: 0; border-left: 1px solid var(--border-subtle); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
.adjustment-row--voided {
  filter: grayscale(1);
  opacity: .72;
}

.adjustment-row--voided pre {
  white-space: pre-wrap;
  min-width: 14rem;
}
