/* Release stylesheet scoped to the reviewed Audit and Warehouse sections. */
.admin-page.warehouse-page .inventory-count-actions .button:disabled {
cursor: not-allowed; opacity: .55; transform: none;
}

.audit-change summary {
color: var(--forest); cursor: pointer; font-size: .82rem; font-weight: 650;
}

.audit-fields {
display: grid; width: 100%; max-width: min(40vw, 460px); min-width: 0; gap: 3px; margin: 6px 0 10px;
}

.audit-fields > div {
display: grid; min-width: 0; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); gap: 8px; border-bottom: 1px solid var(--line); padding: 4px 6px;
}

.audit-fields dt {
min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: .72rem; font-weight: 650;
}

.audit-fields dd {
min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .78rem;
}

.audit-empty {
margin: 4px 0 8px; color: var(--muted); font-size: .78rem;
}

@media (max-width: 640px) {
.admin-page .audit-change summary {
min-height: 44px; padding: 8px 4px;
}

.audit-fields {
max-width: 100%;
}

.admin-page .inventory-count-form .table-wrap tbody td.inventory-count-expected-cell {
display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 8px; text-align: left;
}

.admin-page .inventory-count-form .table-wrap tbody td.inventory-count-expected-cell .inventory-count-reserve {
grid-column: 1 / -1; min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-align: left;
}
}

.audit-change summary {
color: var(--ink);
}

.audit-fields > div {
border-color: var(--line);
}

.inventory-form-summary {
grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  background: #f7f7f2;
}

.inventory-form-summary span {
color: var(--muted);
}

.inventory-form-summary a {
justify-self: start;
}

.inventory-stats .stat-card strong {
font-variant-numeric: tabular-nums;
}

.admin-page .inventory-heading {
margin-bottom: 22px;
}

.inventory-heading .page-actions {
display: flex; flex-wrap: wrap; gap: 10px;
}

.admin-page .inventory-table-scroll-hint {
display: none;
  margin: -4px 0 -10px;
  border-left: 2px solid #738572;
  border-radius: 0 6px 6px 0;
  padding: 7px 10px;
  background: #f0f3ef;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.4;
}

@media (min-width: 721px) and (max-width: 1023px) {
.admin-page .inventory-heading {
align-items: flex-start; flex-direction: column; gap: 14px;
}

.admin-page .inventory-heading .page-actions {
justify-content: flex-start;
}

.admin-page .inventory-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .inventory-stock-table .admin-action-link {
max-width: 132px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
}
}

.admin-page .inventory-heading {
align-items: flex-start; flex-direction: column; gap: 12px;
}

.admin-page .inventory-heading .page-actions {
display: grid;
  width: 100%;
  grid-template-columns: repeat(2, max-content);
  align-items: stretch;
  justify-content: start;
  gap: 8px;
}

.admin-page .inventory-heading .page-actions .button {
min-height: 44px; justify-content: center;
}

.admin-page .inventory-product-filters {
display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(160px, .8fr) minmax(165px, .65fr) auto auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 13px;
  background: #fbfcfa;
}

.admin-page .inventory-product-filters label {
display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 650;
}

.admin-page .inventory-product-filters :is(input, select) {
width: 100%; min-width: 0; min-height: 44px;
}

.admin-page .inventory-product-filters .button {
min-height: 44px;
}

.admin-page .inventory-product-filters .inventory-archived-toggle {
display: flex; min-height: 44px; align-items: center; gap: 9px; color: var(--ink); font-size: .78rem; line-height: 1.3; cursor: pointer;
}

.admin-page .inventory-product-filters .inventory-archived-checkbox {
flex: 0 0 19px; width: 19px; height: 19px; min-height: 19px; margin: 0; accent-color: var(--olive);
}

.admin-page .inventory-filter-reset {
display: inline-flex; min-height: 44px; align-items: center; white-space: nowrap;
}

.admin-page .inventory-more-actions {
position: relative; z-index: 20;
}

.admin-page .inventory-more-actions > summary {
display: inline-flex; min-height: 44px; align-items: center; gap: 8px; cursor: pointer; list-style: none;
}

.admin-page .inventory-more-actions > summary::-webkit-details-marker {
display: none;
}

.admin-page .inventory-more-actions-arrow {
width: .72em;
  height: .46em;
  flex: 0 0 .72em;
  border: 0;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: rotate(0);
  transition: transform .16s ease;
}

.admin-page .inventory-more-actions[open] > summary .inventory-more-actions-arrow {
transform: rotate(180deg);
}

.admin-page .inventory-more-actions-menu {
position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: min(260px, calc(100vw - 40px));
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-page .inventory-more-actions-menu a {
display: flex; min-height: 44px; align-items: center; border-radius: 6px; padding: 9px 11px; color: var(--ink); font-weight: 600; text-decoration: none;
}

.admin-page .inventory-more-actions-menu a:hover,
.admin-page .inventory-more-actions-menu a:focus-visible {
background: var(--accent-pale); color: var(--forest-deep);
}

.admin-page .inventory-stock-table th:nth-child(n+2):not(:nth-child(6)),
.admin-page .inventory-stock-table td:nth-child(n+2):not(:nth-child(6)) {
text-align: right; font-variant-numeric: tabular-nums;
}

.admin-page .inventory-result-count {
margin: 0 0 10px; font-size: .8rem;
}

.admin-page .inventory-stock-results {
scroll-margin-block: 16px;
}

.admin-page .inventory-stock-results:focus-visible {
outline: 3px solid rgba(89, 103, 81, .3); outline-offset: 4px; border-radius: var(--radius-control);
}

.admin-page .inventory-empty-results {
margin-top: 0;
}

.admin-page .inventory-empty-results .audit-empty-state {
padding: 0;
}

.admin-page .inventory-cost-alert {
display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: #f8f4e9;
}

.admin-page .inventory-cost-alert p {
margin: 0; line-height: 1.5;
}

.admin-page .inventory-cost-alert .button {
flex: 0 0 auto; min-height: 42px;
}

.admin-page .inventory-stats .stat-card strong small {
color: var(--muted); font-size: .72rem; font-weight: 650;
}

.admin-page .inventory-form-summary.inventory-live-preview {
grid-column: 1 / -1; margin: 0;
}

.admin-page .inventory-live-preview dl {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0;
}

.admin-page .inventory-live-preview dl > div {
display: flex; min-width: 0; justify-content: space-between; gap: 10px; border-radius: 8px; padding: 9px 11px; background: #fff;
}

.admin-page .inventory-live-preview dt {
color: var(--muted); font-size: .78rem;
}

.admin-page .inventory-live-preview dd {
margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}

.admin-page .inventory-live-preview .inventory-preview-result {
grid-column: 1 / -1; border: 1px solid #d9e4d8; background: #edf3ec;
}

.admin-page .inventory-live-preview .inventory-preview-result.has-warning {
border-color: #e6c9b8; background: #fbf0e9;
}

.admin-page .inventory-live-preview > p {
margin: 0;
}

.admin-page .inventory-count-progress {
display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .45fr);
  align-items: center;
  gap: 6px 18px;
  border: 1px solid #dfe3dc;
  border-radius: 11px;
  padding: 14px 16px;
  background: #fff;
}

.admin-page .inventory-count-progress > div {
display: grid; gap: 3px;
}

.admin-page .inventory-count-progress > div > span {
color: var(--muted); font-size: .8rem;
}

.admin-page .inventory-count-progress progress {
width: 100%; height: 9px; accent-color: var(--olive);
}

.admin-page .inventory-count-reserve {
display: block; margin-top: 4px; color: var(--muted); font-size: .73rem; font-weight: 500; line-height: 1.4;
}

.admin-page .inventory-count-delta {
font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap;
}

.admin-page .inventory-count-delta.is-positive {
color: var(--forest-deep);
}

.admin-page .inventory-count-delta.is-negative {
color: #a33c31;
}

.admin-page .inventory-cancel-button {
color: #71443b;
}

.admin-page .inventory-cancel-button:hover {
border-color: #d8b9af; background: #fbf2ee;
}

@media (max-width: 720px) {
.admin-page .inventory-heading .page-actions {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .inventory-heading .page-actions .button {
width: 100%;
}

.admin-page .inventory-heading .page-actions .button:first-child {
grid-column: 1 / -1;
}

.admin-page .inventory-heading .inventory-more-actions {
grid-column: 1 / -1;
}

.admin-page .inventory-heading .inventory-more-actions > summary {
justify-content: center;
}

.admin-page .inventory-more-actions-menu {
top: auto;
    bottom: calc(100% + 6px);
    max-height: max(56px, calc(100dvh - 230px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.admin-page .inventory-product-filters {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-product-filters .button {
width: 100%; justify-content: center;
}

.admin-page .inventory-filter-reset {
justify-content: center;
}

.admin-page .inventory-cost-alert {
align-items: stretch; flex-direction: column;
}

.admin-page .inventory-cost-alert .button {
width: 100%; justify-content: center;
}

.admin-page .inventory-live-preview dl {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-count-progress {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-count-progress progress {
grid-row: 2;
}
}

@media (max-width: 720px) and (max-height: 460px) {
.admin-page .inventory-heading .inventory-more-actions-menu {
top: calc(100% + 6px);
    bottom: auto;
    max-height: min(max(40px, calc(100dvh - 260px)), var(--inventory-more-actions-safe-height, 100dvh));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.admin-page .inventory-heading .inventory-more-actions[data-menu-placement="above"] .inventory-more-actions-menu {
top: auto;
    bottom: calc(100% + 6px);
    max-height: min(calc(100dvh - 16px), var(--inventory-more-actions-safe-height, 100dvh));
}
}

@media (max-width: 720px) and (max-height: 360px) {
.admin-page .inventory-heading .inventory-more-actions-menu {
position: fixed;
    top: auto;
    right: auto;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 14px;
    max-height: min(calc(100dvh - 100px), var(--inventory-more-actions-safe-height, 100dvh));
}
}

@media (max-width: 390px) {
.admin-page .inventory-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .inventory-stats .stat-card:last-child {
grid-column: auto;
}

.admin-page .inventory-stats .stat-card {
min-width: 0; padding: 14px 12px;
}

.admin-page .inventory-stats .stat-card strong {
font-size: clamp(1.3rem, 7vw, 1.8rem);
}

.admin-page .inventory-stock-table tbody tr {
grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px;
}

.admin-page .inventory-stock-table tbody td:first-child {
grid-column: 1 / -1;
}

.admin-page .inventory-stock-table tbody td:nth-child(6),
.admin-page .inventory-stock-table tbody td:nth-child(7) {
grid-column: 1 / -1;
}

.admin-page .inventory-stock-table tbody td {
padding-block: 6px; font-size: .78rem;
}

.admin-page .inventory-stock-table tbody td::before {
font-size: .65rem;
}
}

@media (max-width: 340px) {
.admin-page .inventory-stats {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-stock-table tbody tr {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .inventory-stock-table tbody td:first-child,
.admin-page .inventory-stock-table tbody td:nth-child(6),
.admin-page .inventory-stock-table tbody td:nth-child(7) {
grid-column: 1 / -1;
}
}

@media (max-width: 420px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
align-items: center;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar-label {
display: none;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: unset;
    gap: 2px 8px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .admin-account {
grid-column: 1;
    grid-row: 1;
    max-width: none;
    margin: 0;
    border-left: 0;
    padding-left: 0;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .language-switch {
grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav > a:not(.button) {
grid-column: 1;
    grid-row: 2;
    justify-self: start;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav form.inline {
grid-column: 2;
    grid-row: 2;
    justify-self: end;
}
}

@media (max-width: 720px) {
.admin-page .inventory-form :is(input, select, textarea, button),
.admin-page .inventory-product-filters :is(input, select, button),
.admin-page .inventory-movement-filters :is(input, select, button),
.admin-page .inventory-count-form :is(input, button) {
scroll-margin-block-end: calc(104px + env(safe-area-inset-bottom));
}
}

@media print {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
display: none !important;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace,
body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace > .page {
display: block !important; width: 100% !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
}
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
min-height: 72px;
  background: #fff;
  padding-inline: max(24px, calc((100vw - 1520px) / 2));
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
gap: 15px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav > a:not(.button),
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav .link-button {
display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 4px 6px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar-label {
color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace {
min-width: 0;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace > .page {
width: 100%;
  max-width: none;
  min-height: calc(100vh - 146px);
  margin: 0;
  padding: 34px 0 64px;
}

.admin-page .audit-heading {
margin-bottom: 4px;
}

.admin-page .audit-heading h1 {
margin-bottom: 0;
}

.admin-page .audit-intro {
margin: 0 0 18px; color: var(--muted); font-size: .88rem; line-height: 1.5;
}

.admin-page .audit-filters {
display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid #e1e5df;
  border-radius: 11px;
  padding: 14px;
  background: #f8f9f7;
}

.admin-page .audit-filters .search {
grid-column: 1 / -1;
}

.admin-page .audit-filters label {
display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: .8rem; font-weight: 650;
}

.admin-page .audit-filters :is(input, select) {
width: 100%; min-width: 0; min-height: 44px; border: 1px solid #858f81; border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); font: inherit;
}

.admin-page .audit-filters :is(input, select):focus-visible {
border-color: var(--olive); outline: 3px solid var(--olive); outline-offset: 1px;
}

.admin-page .audit-filter-disclosure {
margin-bottom: 14px;
}

.admin-page .audit-filter-summary {
display: none;
}

@media (min-width: 721px) {
.admin-page .audit-filter-disclosure > summary:focus {
display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    border: 1px solid #858f81;
    border-radius: 8px;
    padding: 8px 12px;
    background: #f8f9f7;
    color: var(--ink);
    cursor: pointer;
}

.admin-page .audit-filter-disclosure > summary:focus-visible {
outline: 3px solid var(--olive); outline-offset: 2px;
}
}

.admin-page .audit-filters [aria-invalid="true"],
.admin-page .audit-filters [aria-invalid="true"]:focus-visible {
border-color: #a44732;
}

.admin-page .audit-filter-actions {
display: flex; grid-column: 1 / -1; align-items: center; gap: 14px;
}

.admin-page .audit-filter-actions .button {
min-height: 44px;
}

.admin-page .audit-filter-actions .button:not(:hover):not(:focus-visible) {
border-color: #858f81;
}

.admin-page .audit-filter-actions .admin-action-link {
min-height: 44px;
}

.admin-page :is(.audit-filter-actions, .audit-empty-state) .admin-action-link {
border-color: #858f81;
}

.admin-page .audit-filter-error {
margin: 0 0 12px; border-left: 3px solid #a44732; padding: 8px 11px; background: #fbefeb; color: #7d3324; font-size: .84rem;
}

.admin-page .audit-results-count {
margin: 0 0 10px; color: var(--muted); font-size: .82rem;
}

.admin-page .audit-results-count strong {
color: var(--ink); font-variant-numeric: tabular-nums;
}

.admin-page .audit-events {
margin-top: 0;
}

.admin-page .audit-table {
min-width: 980px;
}

.admin-page .audit-table th,
.admin-page .audit-table td {
padding: 12px 11px; vertical-align: top;
}

.admin-page .audit-table td:first-child {
white-space: nowrap; font-variant-numeric: tabular-nums;
}

.admin-page .audit-action {
color: #27352a; font-weight: 700; line-height: 1.4;
}

.admin-page .audit-object-type {
display: block; font-weight: 650;
}

.admin-page .audit-object-id {
display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere;
}

.admin-page .audit-change {
display: block; width: 100%; min-width: 0;
}

.admin-page .audit-change summary {
display: inline-flex; min-height: 38px; align-items: center; gap: 3px; color: var(--forest); cursor: pointer; font-size: .8rem; font-weight: 700;
}

.admin-page .audit-change summary::after {
width: 7px; height: 7px; flex: 0 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ""; transform: translateY(-2px) rotate(45deg);
}

.admin-page .audit-change[open] summary::after {
transform: translateY(2px) rotate(225deg);
}

.admin-page .audit-change summary span {
color: var(--muted); font-weight: 600;
}

.admin-page .audit-result {
display: inline-flex; min-height: 28px; max-width: 100%; align-self: flex-start; align-items: center; overflow-wrap: anywhere; border: 1px solid #e1e5df; border-radius: 999px; padding: 4px 9px; background: #f3f4f1; color: #59605b; font-size: .74rem; font-weight: 650; line-height: 1.2;
}

.admin-page .audit-result.is-success {
border-color: #d7e4d7; background: #edf5ed; color: #365c3c; white-space: nowrap;
}

.admin-page .audit-empty-state {
max-width: 560px; margin: 4px auto; padding: 20px; text-align: center;
}

.admin-page .audit-empty-state strong {
display: block; color: var(--ink); font-size: .98rem;
}

.admin-page .audit-empty-state p {
margin: 7px 0 10px; color: var(--muted); font-size: .84rem; line-height: 1.5;
}

.admin-page .audit-empty-state .admin-action-link {
min-height: 44px;
}

.admin-page .audit-events .audit-table tbody tr.audit-empty-row > td:first-child {
border: 0;
}

.admin-page .audit-pagination {
display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: 10px; margin: 16px 0 24px;
}

.admin-page .audit-page-status {
grid-column: 2; color: var(--muted); font-size: .78rem; line-height: 1.4; text-align: center;
}

.admin-page .audit-pagination a {
display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid #858f81; border-radius: 8px; padding: 8px 12px; background: #fff; color: var(--ink); font-size: .82rem; font-weight: 650; text-decoration: none;
}

.admin-page .audit-page-prev {
grid-column: 1; grid-row: 1; justify-self: start;
}

.admin-page .audit-page-next {
grid-column: 3; grid-row: 1; justify-self: end;
}

@media (max-width: 1330px) {
.admin-page .audit-filters {
grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-page .audit-filters .search {
grid-column: 1 / -1;
}

.admin-page .audit-events {
overflow: visible; border: 0; background: transparent;
}

.admin-page .audit-events .audit-table,
.admin-page .audit-events .audit-table tbody {
display: block; width: 100%;
}

.admin-page .audit-events .audit-table {
min-width: 0;
}

.admin-page .audit-events .audit-table thead {
position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}

.admin-page .audit-events .audit-table tbody tr {
display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; padding: 10px 14px; background: var(--surface); box-shadow: 0 2px 7px rgba(32, 35, 33, .035);
}

.admin-page .audit-events .audit-table tbody td,
.admin-page .audit-events .audit-table tbody td:first-child {
display: flex; min-width: 0; grid-column: 1; align-items: stretch; flex-direction: column; justify-content: flex-start; gap: 3px; border: 0; padding: 8px 0; overflow-wrap: anywhere; text-align: left; white-space: normal;
}

.admin-page .audit-events .audit-table tbody td:first-child {
border-bottom: 1px solid var(--line); padding-bottom: 10px;
}

.admin-page .audit-events .audit-table tbody td::before {
content: attr(data-label); flex: 0 1 auto; color: var(--muted); font-size: .75rem; font-weight: 650; letter-spacing: .025em; text-align: left;
}

.admin-page .audit-events .audit-table tbody td:nth-child(5)::before {
display: none;
}

.admin-page .audit-change {
display: block; width: 100%; min-width: 0;
}

.admin-page .audit-change summary {
min-height: 44px;
}

.admin-page .audit-fields {
width: 100%; max-width: 100%;
}

.admin-page .audit-fields > div {
grid-template-columns: minmax(0, .75fr) minmax(0, 1fr);
}

.admin-page .audit-empty-state {
padding: 12px 4px;
}
}

@media (min-width: 721px) and (max-width: 1330px) {
.admin-page .audit-events .audit-table tbody tr {
grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px;
}

.admin-page .audit-events .audit-table tbody td:nth-child(-n+4) {
grid-column: auto;
}

.admin-page .audit-events .audit-table tbody td:nth-child(5),
.admin-page .audit-events .audit-table tbody td:last-child {
grid-column: 1 / -1;
}
}

@media (max-width: 720px) {
.admin-page .audit-pagination {
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
}

.admin-page .audit-page-status {
grid-column: 1 / -1; grid-row: 1;
}

.admin-page .audit-page-prev {
grid-column: 1; grid-row: 2; justify-self: stretch;
}

.admin-page .audit-page-next {
grid-column: 2; grid-row: 2; justify-self: stretch;
}

.admin-page .audit-pagination a {
width: 100%; padding-inline: 6px; white-space: normal;
}

.admin-page .audit-pagination--single-action .audit-page-prev,
.admin-page .audit-pagination--single-action .audit-page-next {
grid-column: 1 / -1;
}

.admin-page .audit-filters {
grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 12px;
}

.admin-page .audit-filters .search,
.admin-page .audit-filter-actions {
grid-column: 1 / -1;
}

.admin-page .audit-filter-actions {
align-items: stretch; flex-direction: column; gap: 5px;
}

.admin-page .audit-filter-actions .button,
.admin-page .audit-filter-actions .admin-action-link {
width: 100%; justify-content: center;
}

.admin-page .audit-filter-disclosure {
margin-bottom: 8px;
}

.admin-page .audit-filter-disclosure > summary {
display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #858f81;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8f9f7;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.admin-page .audit-filter-disclosure > summary::-webkit-details-marker {
display: none;
}

.admin-page .audit-filter-disclosure > summary:focus-visible {
outline: 3px solid var(--olive); outline-offset: 2px;
}

.admin-page .audit-filter-active-badge {
border-radius: 999px; padding: 4px 7px; background: #e8eee6; color: #3d503c; font-size: .75rem; font-weight: 700; white-space: nowrap;
}

.admin-page .audit-filter-summary-icon::before {
content: "+"; font-size: 1.25rem; line-height: 1;
}

.admin-page .audit-filter-disclosure[open] > summary {
border-bottom-color: transparent; border-radius: 10px 10px 0 0;
}

.admin-page .audit-filter-disclosure[open] .audit-filter-summary-icon::before {
content: "−";
}

.admin-page .audit-filter-disclosure:not([open]) > .audit-filters {
display: none;
}

.admin-page .audit-filter-disclosure[open] > .audit-filters {
margin: 0;
    border: 1px solid #858f81;
    border-top: 0;
    border-radius: 0 0 10px 10px;
}
}

@media (max-width: 390px) {
.admin-page .audit-intro {
display: none;
}

.admin-page .audit-filters {
grid-template-columns: minmax(0, 1fr); row-gap: 4px;
}

.admin-page .audit-filters .search,
.admin-page .audit-filter-actions {
grid-column: 1;
}

.admin-page .audit-filter-actions {
align-items: stretch; flex-direction: row; gap: 8px;
}

.admin-page .audit-filter-actions .button {
flex: 1 1 0; min-width: 0; width: auto;
}

.admin-page .audit-filter-actions .admin-action-link {
flex: 1 1 0; min-width: 0; width: auto; white-space: normal; overflow-wrap: anywhere;
}
}

@media (max-width: 360px) {
.admin-page .audit-heading {
margin-bottom: 8px;
}

.admin-page .audit-filters {
padding: 6px; row-gap: 2px; margin-bottom: 0;
}

.admin-page .audit-filters label {
gap: 4px;
}
}

@media (min-width: 361px) and (max-width: 390px) {
.admin-page .audit-heading {
margin-bottom: 8px;
}
}

@media (max-width: 420px) {
.admin-page .audit-intro {
display: none;
}
}

@media (max-width: 1023px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace > .page {
min-height: 0; padding: 25px 0 48px;
}
}

@media (max-width: 720px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
align-items: flex-start; gap: 8px 14px; padding: 12px 18px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
width: 100%; justify-content: space-between; gap: 8px 12px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar-label {
margin-right: auto; font-size: .65rem;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace > .page {
padding-top: 22px;
}

.admin-page .inventory-heading .page-actions {
display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}

.admin-page .inventory-heading .page-actions .button {
width: 100%; justify-content: center;
}

.admin-page .inventory-heading .page-actions .button:first-child {
grid-column: 1 / -1;
}
}

.admin-page .inventory-section {
margin: 30px 0 38px;
}

.admin-page .inventory-section > h2 {
margin-bottom: 14px;
}

.admin-page .inventory-return-field-help,
.admin-page .inventory-field-help {
color: var(--muted); font-size: .82rem; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere;
}

.admin-page .inventory-field-heading {
display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px; min-width: 0; max-width: 100%; line-height: 1.4;
}

.admin-page .inventory-field-required-marker {
color: var(--accent-hover); font-weight: 800;
}

.admin-page .inventory-field-optional-marker {
color: var(--muted); font-size: .78em; font-weight: 500; white-space: nowrap;
}

.admin-page .inventory-field-legend {
grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4;
}

.admin-page .inventory-return-form :is(input, select, textarea)[aria-invalid="true"] {
border-color: var(--danger);
}

.admin-page .inventory-return-form :is(input, select, textarea):disabled {
cursor: not-allowed; opacity: .62;
}

.admin-page .inventory-return-form .button:disabled {
cursor: not-allowed; opacity: .62; transform: none;
}

.admin-page .inventory-section .section-heading {
display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px;
}

.admin-page .inventory-section .section-heading h2 {
margin: 0 0 4px;
}

.admin-page .inventory-section .section-heading p {
margin: 0;
}

.inventory-low-badge {
display: inline-flex; align-items: center; min-height: 22px; margin-left: 8px; border-radius: 999px; padding: 2px 9px; background: #eaf0e9; color: #49644b; font-size: .7rem; font-weight: 700; line-height: 1.2; white-space: nowrap;
}

.admin-page .inventory-movement-filters {
display: grid; grid-template-columns: minmax(170px, 1.3fr) minmax(155px, 1fr) repeat(2, minmax(135px, .8fr)) auto auto; align-items: end; gap: 10px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 14px; background: #fbfcfa;
}

.admin-page .inventory-movement-filters label {
display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: .73rem; font-weight: 650;
}

.admin-page .inventory-movement-filters {
grid-template-columns: minmax(170px, 1.15fr) minmax(190px, 1.25fr) minmax(130px, .8fr) repeat(2, minmax(120px, .8fr)) auto auto;
}

.admin-page .inventory-movement-filters select,
.admin-page .inventory-movement-filters input {
width: 100%; min-height: 40px;
}

.admin-page .inventory-movement-filters .button {
min-height: 40px;
}

.admin-page .inventory-form .receipt-lines-section {
grid-column: 1 / -1; display: grid; gap: 12px; min-width: 0;
}

.admin-page .inventory-count-form .table-wrap {
margin-block: 18px;
}

.admin-page .inventory-count-form input[type="number"] {
width: min(100%, 180px); min-height: 44px; border: 1px solid #d4d0c6; border-radius: var(--radius-control); padding: 9px 11px; background: var(--surface); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums;
}

.admin-page .inventory-count-form input[type="number"]:focus-visible {
border-color: var(--olive); outline: 3px solid rgba(89, 103, 81, .14); outline-offset: 1px;
}

.admin-page .inventory-count-actions {
display: flex; flex-wrap: wrap; gap: 10px;
}

.admin-page .inventory-cancel-form {
margin: 0;
}

.admin-page .inventory-start-form .muted {
grid-column: 1 / -1; margin: 0;
}

.admin-page .inventory-start-form .button {
justify-self: start;
}

.admin-page .inventory-empty-state {
display: flex; align-items: center; justify-content: space-between; gap: 18px;
}

.admin-page .inventory-empty-state > div {
min-width: 0;
}

.admin-page .inventory-empty-state h2 {
margin: 0 0 8px; font-size: 1.05rem;
}

.admin-page .inventory-empty-state p {
max-width: 68ch; margin: 5px 0 0;
}

.admin-page .inventory-empty-state .button {
flex: 0 0 auto;
}

.warehouse-preview-banner {
width: min(calc(100% - 40px), 1520px); margin: 12px auto 0; border: 1px solid #d8e4d7; border-radius: 12px; padding: 10px 15px; background: #edf3ec; color: #405d44; font-size: .8rem; line-height: 1.45;
}

@media (max-width: 1199px) {
.admin-page .inventory-product-filters {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .inventory-movement-filters {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (min-width: 1200px) and (max-width: 1399px) {
.admin-page .inventory-movement-filters {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (max-width: 720px) {
.admin-page .inventory-section .section-heading {
align-items: flex-start; flex-direction: column;
}

.admin-page .inventory-movement-filters {
grid-template-columns: 1fr;
}

.admin-page .inventory-movement-filters .button {
width: 100%;
}

.admin-page .inventory-empty-state {
align-items: stretch; flex-direction: column;
}

.admin-page .inventory-empty-state .button {
width: 100%; justify-content: center;
}

.admin-page .inventory-count-actions .button {
width: 100%;
}

.warehouse-preview-banner {
width: calc(100% - 28px); margin-top: 9px;
}
}

@media (max-width: 420px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
justify-content: flex-start;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar-label {
flex-basis: calc(100% - 12px);
}
}

@media (min-width: 1024px) and (max-width: 1139px) {
.admin-page .inventory-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (min-width: 1024px) and (max-width: 1127px) {
.admin-page .inventory-stock-section .section-heading > .button {
flex: 0 0 auto; white-space: nowrap;
}
}

@media (min-width: 1140px) {
.admin-page .inventory-stats {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}

body.admin-page:is(.audit-page, .warehouse-page) body.admin-page .admin-topbar .nav form.inline .link-button {
display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
}

@media (min-width: 641px) and (max-width: 720px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
flex-wrap: wrap;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
flex: 1 1 100%;
}
}

body.admin-page.warehouse-page .staff-action-dialog-content {
display: grid;
  gap: 12px;
  max-height: min(90dvh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px;
}

body.admin-page.warehouse-page .staff-action-dialog-heading {
position: sticky;
  z-index: 1;
  top: -26px;
  display: grid;
  gap: 12px;
  margin: -26px -26px 0;
  padding: 26px 26px 0;
  background: var(--surface);
}

@media (max-width: 420px) {
body.admin-page.warehouse-page .staff-action-dialog-content {
padding: 22px 18px;
}

body.admin-page.warehouse-page .staff-action-dialog-heading {
top: -22px; margin: -22px -18px 0; padding: 22px 18px 0;
}
}

@media (max-height: 360px) {
body.admin-page.warehouse-page .staff-action-dialog .staff-action-dialog-content {
gap: 6px;
    padding: 8px 12px;
}

body.admin-page.warehouse-page .staff-action-dialog .staff-action-dialog-heading {
top: -8px;
    gap: 4px;
    margin: -8px -12px 0;
    padding: 8px 12px 0;
}

body.admin-page.warehouse-page .staff-action-dialog h2 {
font-size: clamp(1.12rem, 4.6vw, 1.35rem); line-height: 1.16;
}

body.admin-page.warehouse-page .staff-action-dialog .product-archive-name {
font-size: .92rem; line-height: 1.25;
}

body.admin-page.warehouse-page .staff-action-dialog .product-archive-description {
font-size: .82rem; line-height: 1.35;
}

body.admin-page.warehouse-page .staff-action-dialog .product-archive-actions {
position: sticky;
    z-index: 1;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(80px, .8fr) minmax(0, 1.2fr);
    gap: 8px;
    margin-top: 0;
    padding: 8px 0;
    background: var(--surface);
}

body.admin-page.warehouse-page .staff-action-dialog .product-archive-actions .button {
width: 100%;
    min-height: 44px;
    padding: 6px 8px;
    font-size: .82rem;
    line-height: 1.2;
}
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-mobile-bottom-nav {
display: none;
}

@media (max-width: 720px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace :is(a[href], button, input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])) {
scroll-margin-block-end: calc(96px + env(safe-area-inset-bottom));
}

.admin-page .inventory-return-form > label {
min-width: 0;
}

.admin-page .inventory-return-form :is(input, select, textarea) {
width: 100%;
    min-width: 0;
    max-width: 100%;
}

.admin-page .inventory-return-history tbody tr {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-return-history tbody td {
align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    overflow-wrap: anywhere;
    text-align: left;
}

.admin-page .inventory-return-history tbody td::before {
flex: 0 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav-summary {
display: none;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-mobile-bottom-nav {
position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 110;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    border-top: 1px solid var(--line);
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 24px rgba(32, 35, 33, .08);
    backdrop-filter: blur(12px);
}

body.admin-page:is(.audit-page, .warehouse-page).auth-page .admin-mobile-bottom-nav {
display: none;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-mobile-bottom-nav > a {
position: relative;
    display: flex;
    min-width: 0;
    min-height: 56px;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 9px;
    padding: 4px 2px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-mobile-bottom-nav > a[aria-current="page"] {
background: #edf2ec;
    color: var(--forest);
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-mobile-bottom-nav > a[aria-current="page"]::before {
position: absolute;
    top: -5px;
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--forest);
    content: "";
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-mobile-bottom-nav svg {
width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-mobile-bottom-nav span {
max-width: 100%;
    overflow: hidden;
    font-size: .75rem;
    font-weight: 650;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-page.audit-page .admin-mobile-bottom-nav span {
font-size: .85rem;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav-disclosure[open] > .admin-nav {
position: fixed;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 101;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: auto;
    max-height: min(68vh, 600px);
    max-height: min(68dvh, 600px);
    margin: 0 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 14px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(32, 35, 33, .18);
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav-group {
grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav-group-title {
grid-column: 1 / -1;
    margin-bottom: 3px;
    padding-inline: 8px;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav a {
min-height: 44px;
    padding-inline: 8px;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav .admin-nav-link-primary {
display: none;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav-group:not(:has(> a:not(.admin-nav-link-primary))) {
display: none;
}
}

@media (max-width: 360px) {
body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav-group {
grid-template-columns: 1fr;
    gap: 3px;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav a {
gap: 6px;
}

body.admin-page:is(.audit-page, .warehouse-page).has-admin-mobile-nav .admin-nav a span {
overflow-wrap: normal;
}
}

@media (min-width: 641px) and (max-width: 860px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar-label {
display: none;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
gap: 8px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav > a:not(.button),
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav .link-button {
min-height: 44px; white-space: nowrap;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .language-switch button {
min-width: 44px; min-height: 44px;
}
}

@media (orientation: landscape) and (min-width: 480px) and (max-width: 720px) and (max-height: 420px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding-block: 2px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar-label {
display: none;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
width: auto;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .admin-account {
max-width: 150px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .admin-account strong {
overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace > .page {
padding-top: 0;
}

.admin-page .audit-intro {
display: none;
}

.admin-page .audit-heading {
margin-bottom: 0;
}

.admin-page .audit-filters {
row-gap: 2px; padding-top: 8px;
}

.admin-page .audit-events .audit-table tbody tr {
grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px;
}

.admin-page .audit-events .audit-table tbody td:nth-child(-n+4) {
grid-column: auto;
}

.admin-page .audit-events .audit-table tbody td:nth-child(5),
.admin-page .audit-events .audit-table tbody td:last-child {
grid-column: 1 / -1;
}
}

@media (max-width: 480px) and (max-height: 420px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
gap: 4px 12px; padding-block: 6px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar .nav {
row-gap: 2px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace > .page {
padding-top: 8px;
}

.admin-page .audit-intro {
display: none;
}
}

@media (orientation: landscape) and (min-width: 480px) and (max-width: 720px) and (max-height: 420px) {
body.admin-page:is(.audit-page, .warehouse-page) .admin-topbar {
padding-block: 4px;
}

body.admin-page:is(.audit-page, .warehouse-page) .admin-workspace > .page {
padding-top: 2px;
}

.admin-page .audit-heading h1 {
margin-top: 0;
}

.admin-page .audit-filter-disclosure {
margin-bottom: 2px;
}

.admin-page .audit-filter-disclosure > summary {
min-height: 44px;
}

.admin-page .audit-results-count {
margin-bottom: 4px;
}
}

.admin-page .inventory-live-preview[hidden],
.admin-page .inventory-live-preview [hidden] {
display: none !important;
}

@media (max-width: 720px) {
.admin-page .inventory-product-filters {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-product-filters .button {
width: 100%; justify-content: center;
}

.admin-page .inventory-cost-alert {
align-items: stretch; flex-direction: column;
}

.admin-page .inventory-cost-alert .button {
width: 100%; justify-content: center;
}

.admin-page .inventory-live-preview dl {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-count-progress {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-count-progress progress {
grid-row: 2;
}
}

@media (max-width: 390px) {
.admin-page .inventory-stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .inventory-stats .stat-card:last-child {
grid-column: auto;
}

.admin-page .inventory-stock-table tbody tr {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .inventory-stock-table tbody td:first-child,
.admin-page .inventory-stock-table tbody td:nth-child(6),
.admin-page .inventory-stock-table tbody td:nth-child(7) {
grid-column: 1 / -1;
}
}

@media (max-width: 340px) {
.admin-page .inventory-stats {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-stock-table tbody tr {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-stock-table tbody td:first-child,
.admin-page .inventory-stock-table tbody td:nth-child(6),
.admin-page .inventory-stock-table tbody td:nth-child(7) {
grid-column: 1;
}
}

@media (max-width: 600px) {
.admin-page .inventory-stock-table tbody tr {
gap: 0 8px; margin-bottom: 8px; padding: 8px 10px;
}

.admin-page .inventory-stock-table tbody td {
padding-block: 5px;
}

.admin-page .inventory-stock-table tbody td:first-child,
.admin-page .inventory-stock-table tbody td:nth-child(6),
.admin-page .inventory-stock-table tbody td:nth-child(7) {
grid-column: 1 / -1;
}

.admin-page .inventory-stock-table tbody td:nth-child(6) {
margin-top: 3px; border-top: 1px solid var(--line); padding-top: 9px;
}

.admin-page .inventory-stock-table .admin-action-link {
min-height: 44px;
}
}

@media (max-width: 340px) {
.admin-page .inventory-stock-table tbody tr {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

.admin-page .inventory-stock-table .inventory-cost-cell {
display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-page .inventory-stock-table .inventory-cost-value {
display: block;
  min-width: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-page .inventory-stock-table .inventory-cost-cell .inventory-cost-edit-link {
flex: 0 0 auto;
  min-width: 0;
  min-height: 24px;
  border: 0;
  border-radius: 4px;
  padding: 2px 0;
  color: var(--forest);
  font-size: .76rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: #aeb9aa;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.admin-page .inventory-stock-table .inventory-cost-edit-link:hover,
.admin-page .inventory-stock-table .inventory-cost-edit-link:focus-visible {
color: var(--clay);
  text-decoration-color: currentColor;
}

@media (min-width: 641px) {
.admin-page .inventory-stock-table {
width: 100%;
    min-width: 860px;
    table-layout: fixed;
}

.admin-page .inventory-stock-table .inventory-col-product {
width: 13%;
}

.admin-page .inventory-stock-table .inventory-col-on-hand {
width: 10%;
}

.admin-page .inventory-stock-table .inventory-col-reserved {
width: 8%;
}

.admin-page .inventory-stock-table .inventory-col-available {
width: 13%;
}

.admin-page .inventory-stock-table .inventory-col-minimum {
width: 13%;
}

.admin-page .inventory-stock-table .inventory-col-cost {
width: 25%;
}

.admin-page .inventory-stock-table .inventory-col-value {
width: 18%;
}

.admin-page .inventory-stock-table thead th {
white-space: normal; line-height: 1.3;
}

.admin-page .inventory-stock-table thead .inventory-table-labels th:nth-child(3),
.admin-page .inventory-stock-table thead .inventory-table-labels th:nth-child(4) {
text-align: center;
}

.admin-page .inventory-stock-table thead .inventory-table-groups th {
border-bottom: 0;
    background: #f8f9f6;
    color: var(--muted);
    font-size: .65rem;
    letter-spacing: .07em;
}

.admin-page .inventory-stock-table thead .inventory-table-labels th {
padding-top: 7px;
}

.admin-page .inventory-stock-table thead tr.inventory-table-groups > th.inventory-group-quantity,
.admin-page .inventory-stock-table thead tr.inventory-table-groups > th.inventory-group-value {
text-align: left;
}

.admin-page .inventory-stock-table thead .inventory-group-product {
vertical-align: bottom; text-align: left;
}

.admin-page .inventory-stock-table thead .inventory-group-value,
.admin-page .inventory-stock-table tbody td:nth-child(6) {
border-left: 1px solid var(--line);
}

.admin-page .inventory-stock-table td:first-child {
overflow-wrap: anywhere;
}

.admin-page .inventory-stock-table td:nth-child(n+2):not(:nth-child(6)) {
white-space: nowrap;
}

.admin-page .inventory-stock-table tbody td:first-child {
color: var(--ink); font-weight: 650;
}

.admin-page .inventory-stock-table tbody td.inventory-quantity-secondary,
.admin-page .inventory-stock-table tbody td.inventory-quantity-minimum {
color: var(--muted);
}

.admin-page .inventory-stock-table tbody td.inventory-available-value {
color: var(--forest-deep); font-weight: 750;
}

.admin-page .inventory-stock-table tbody td:nth-child(6),
.admin-page .inventory-stock-table tbody td:nth-child(7) {
background: #fbfaf7;
}

.admin-page .inventory-stock-table tbody tr:hover td:nth-child(6),
.admin-page .inventory-stock-table tbody tr:hover td:nth-child(7) {
background: #f5f3ed;
}
}

@media (max-width: 640px) {
.admin-page .inventory-stock-table tbody td:nth-child(6) {
display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 8px;
}

.admin-page .inventory-stock-table tbody td:nth-child(6)::before {
min-width: 0;
}

.admin-page .inventory-stock-table tbody td:nth-child(6) .inventory-cost-cell {
min-width: 0;
}

.admin-page .inventory-stock-table tbody td:nth-child(6) .inventory-cost-cell {
display: grid; justify-items: end; gap: 3px;
}

.admin-page .inventory-stock-table .inventory-cost-cell .inventory-cost-edit-link {
min-height: 44px;
    justify-content: flex-end;
    padding-block: 8px;
    text-align: right;
}

.admin-page .inventory-stock-table .inventory-cost-value {
text-align: right;
}
}

.admin-page .inventory-stock-section .inventory-table-scroll-hint.is-visible,
.admin-page .inventory-movements-section .inventory-movements-table-scroll-hint.is-visible {
display: block;
}

.admin-page .inventory-movements-section .table-wrap tbody tr.inventory-movement-empty-row > td,
.admin-page .inventory-movements-section .table-wrap tbody tr.inventory-movement-empty-row > td:first-child {
border: 0;
}

.admin-page .inventory-section .section-heading {
display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 10px 24px;
}

.admin-page .inventory-section .section-heading > div {
min-width: 0;
}

.admin-page .inventory-section .section-heading > .button {
justify-self: end;
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 1139px) {
.admin-page .inventory-section .section-heading {
grid-template-columns: minmax(0, 1fr);
}

.admin-page .inventory-section .section-heading > .button {
justify-self: start;
}
}

@media (max-width: 1090px) {
.admin-page.warehouse-page .brand {
display: inline-flex;
    min-height: 44px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.admin-page.warehouse-page .back-link,
.admin-page.warehouse-page .admin-action-link {
min-height: 44px;
}

.admin-page.warehouse-page .back-link {
padding-block: 8px;
}

.admin-page.warehouse-page .admin-action-link {
padding-block: 7px;
}

.admin-page.warehouse-page .inventory-stocktake-document-link {
min-width: 44px;
}

.admin-page.warehouse-page :is(.button, button, input:not([type="hidden"]):not([type="checkbox"]), select, textarea) {
min-height: 44px;
}
}

@media (min-width: 721px) and (max-width: 1090px) {
.admin-page.warehouse-page .receipt-line {
grid-template-columns: minmax(220px, 1.5fr) minmax(120px, .65fr) minmax(155px, .85fr);
}

.admin-page.warehouse-page .receipt-line-remove {
grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
}
}

.admin-page.warehouse-page .receipt-lines {
min-width: 0;
}

.admin-page.warehouse-page .receipt-lines-section {
grid-template-columns: minmax(0, 1fr);
}

.admin-page.warehouse-page .receipt-lines-section .inventory-production-link .admin-action-link {
max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}

.admin-page.warehouse-page .receipt-line {
min-width: 0;
}

.admin-page.warehouse-page .receipt-line :is(input, select) {
min-width: 0;
}

.admin-page.warehouse-page .inventory-form[data-receipt-form] [data-receipt-submit]:disabled {
cursor: not-allowed; background: #e7ece7; border-color: #c9d4c8; color: #526852; opacity: 1; transform: none;
}

@media (max-width: 340px) {
.admin-page.warehouse-page .admin-workspace > .page {
padding-top: 14px;
}

.admin-page.warehouse-page .admin-workspace > .page > .eyebrow {
display: none;
}

.admin-page.warehouse-page .warehouse-preview-banner {
margin-top: 6px;
    padding: 6px 8px;
    font-size: .74rem;
    line-height: 1.35;
}

.admin-page.warehouse-page .inventory-heading {
gap: 10px;
}
}

@media (max-width: 340px) and (max-height: 580px) {
.admin-page.warehouse-page .admin-workspace > .page {
padding-top: 8px;
}

.admin-page.warehouse-page .warehouse-preview-banner {
margin-top: 4px; padding: 4px 8px;
}

.admin-page.warehouse-page .inventory-heading {
gap: 8px;
}

.admin-page.warehouse-page .inventory-heading h1 {
margin-bottom: 12px;
}

.admin-page.warehouse-page .inventory-heading p {
margin-bottom: 8px;
}

.admin-page.warehouse-page .inventory-heading .page-actions {
gap: 6px;
}
}

@media (max-width: 340px) and (max-height: 360px) {
.admin-page.warehouse-page .admin-topbar {
min-height: 0;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
}

.admin-page.warehouse-page .brand {
flex: 0 0 auto;
}

.admin-page.warehouse-page .admin-topbar .nav {
display: grid;
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 4px;
}

.admin-page.warehouse-page .admin-account {
grid-column: 1;
    grid-row: 1;
    max-width: 104px;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.admin-page.warehouse-page .admin-account strong,
.admin-page.warehouse-page .admin-account small {
overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-page.warehouse-page .admin-topbar .language-switch {
grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex-wrap: nowrap;
    gap: 2px;
}

.admin-page.warehouse-page .admin-topbar .nav > a:not(.button) {
grid-column: 1;
    grid-row: 2;
    justify-self: start;
    min-width: 0;
    min-height: 44px;
    padding-inline: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.admin-page.warehouse-page .admin-topbar .nav form.inline {
grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

.admin-page.warehouse-page .admin-sidebar {
padding-top: 0;
}

.admin-page.warehouse-page .warehouse-preview-banner {
margin: 2px auto 0;
    padding: 3px 8px;
    font-size: .7rem;
    line-height: 1.25;
}

.admin-page.warehouse-page .admin-workspace > .page {
padding-top: 4px;
}

.admin-page.warehouse-page .warehouse-preview-banner {
margin-top: 0;
    padding: 1px 8px;
    font-size: .64rem;
    line-height: 1.1;
}

.admin-page.warehouse-page .admin-workspace > .page > .back-link {
margin-bottom: 0;
}

.admin-page.warehouse-page .admin-workspace > .page > .eyebrow {
display: none;
}

.admin-page.warehouse-page .admin-workspace > .page > h1 {
font-size: 1.375rem;
    line-height: 1.15;
}

.admin-page.warehouse-page .admin-workspace > .page > .page-heading:not(.inventory-heading) h1 {
font-size: 1.375rem;
    line-height: 1.15;
}

.admin-page.warehouse-page .messages {
margin-bottom: 4px;
}

.admin-page.warehouse-page .messages .message {
margin: 2px 0;
    padding: 4px 8px;
    font-size: .75rem;
    line-height: 1.2;
}
}

@media (orientation: landscape) and (min-width: 480px) and (max-width: 720px) and (max-height: 360px) {
.admin-page.warehouse-page .warehouse-preview-banner {
margin: 0 auto;
    padding: 2px 8px;
    font-size: .64rem;
    line-height: 1.1;
}

.admin-page.warehouse-page .inventory-heading h1 {
margin-top: 0;
}

.admin-page.warehouse-page .inventory-heading .page-actions {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page.warehouse-page .inventory-heading .page-actions .button:first-child,
.admin-page.warehouse-page .inventory-heading .inventory-more-actions {
grid-column: auto;
}
}

@media (max-width: 720px) and (max-height: 360px) {
.admin-page.warehouse-page .messages {
margin-bottom: 0;
}

.admin-page.warehouse-page .messages .message {
margin: 0;
    padding: 2px 8px;
    font-size: .7rem;
    line-height: 1.05;
}

.admin-page.warehouse-page .admin-workspace > .page {
padding-top: 0;
}

.admin-page.warehouse-page .admin-workspace > .page > .back-link {
min-height: 36px;
    margin-bottom: 0;
    padding-block: 4px;
}

.admin-page.warehouse-page .admin-workspace > .page > h1 {
margin-top: 0;
}
}

.admin-page .inventory-return-history-section {
container-type: inline-size;
  container-name: return-history;
}

.admin-page .inventory-document-number {
color: var(--muted);
  font-size: .72em;
  font-weight: 650;
  white-space: nowrap;
}

.admin-page .inventory-movement-cost-value {
font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@container return-history (min-width: 600px) and (max-width: 900px) {
.admin-page .inventory-return-history {
overflow: visible;
    border: 0;
    background: transparent;
}

.admin-page .inventory-return-history table,
.admin-page .inventory-return-history tbody {
display: block; width: 100%;
}

.admin-page .inventory-return-history thead {
position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.admin-page .inventory-return-history tbody tr {
display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(32, 35, 33, .035);
}

.admin-page .inventory-return-history tbody td {
display: flex;
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    border: 0;
    padding: 8px 0;
    overflow-wrap: anywhere;
    text-align: left;
}

.admin-page .inventory-return-history tbody td:first-child {
grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.admin-page .inventory-return-history tbody td:last-child {
grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.admin-page .inventory-return-history tbody td::before {
flex: 0 0 auto;
    color: var(--muted);
    content: attr(data-label);
    font-size: .75rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
}

.admin-page .inventory-return-history tbody td[colspan] {
display: block;
    grid-column: 1 / -1;
}

.admin-page .inventory-return-history tbody td[colspan]::before {
content: none;
}
}

@media (max-width: 1330px) {
.admin-page .inventory-movements-section .table-wrap {
overflow: visible;
    border: 0;
    background: transparent;
}

.admin-page .inventory-movements-section .table-wrap table,
.admin-page .inventory-movements-section .table-wrap tbody {
display: block;
    width: 100%;
}

.admin-page .inventory-movements-section .table-wrap table {
min-width: 0;
}

.admin-page .inventory-movements-section .table-wrap thead {
position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.admin-page .inventory-movements-section .table-wrap tbody tr {
display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(32, 35, 33, .035);
}

.admin-page .inventory-movements-section .table-wrap tbody td,
.admin-page .inventory-movements-section .table-wrap tbody td:first-child {
display: flex;
    min-width: 0;
    grid-column: 1;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    border: 0;
    padding: 8px 0;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
}

.admin-page .inventory-movements-section .table-wrap tbody td:first-child {
border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.admin-page .inventory-movements-section .table-wrap tbody td::before {
flex: 0 1 auto;
    color: var(--muted);
    content: attr(data-label);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .025em;
    text-align: left;
}

.admin-page .inventory-movements-section .table-wrap tbody td[colspan] {
display: block;
    grid-column: 1 / -1;
}

.admin-page .inventory-movements-section .table-wrap tbody td[colspan]::before {
content: none;
}
}

@media (min-width: 721px) and (max-width: 1330px) {
.admin-page .inventory-movements-section .table-wrap tbody tr {
grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
}

.admin-page .inventory-movements-section .table-wrap tbody td:nth-child(-n+4) {
grid-column: auto;
}

.admin-page .inventory-movements-section .table-wrap tbody td:nth-child(5),
.admin-page .inventory-movements-section .table-wrap tbody td:last-child {
grid-column: 1 / -1;
}
}
