:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #19372e;
  background: #f6f7f2;
  line-height: 1.55;
  font-size: 16px;
  --green: #235b48;
  --muted: #54685f;
  --border: #ccd6cc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #173f36;
  color: white;
  padding: 0.65rem max(1rem, calc((100% - 64rem) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
header a {
  color: white;
}
.brand {
  font-weight: 800;
  font-size: 1.4rem;
  text-decoration: none;
  letter-spacing: -0.04em;
}
nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
nav form {
  margin: 0;
}
main {
  max-width: 64rem;
  margin: auto;
  padding: 0.75rem 1rem 3rem;
  min-height: 78vh;
}
h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 1.3rem 0;
}
h2 {
  font-size: 1.25rem;
}
a {
  color: #235b48;
  text-underline-offset: 0.2rem;
  overflow-wrap: anywhere;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  background: var(--green);
  color: white;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 650;
  line-height: 1.3;
}
button:hover,
.button:hover {
  filter: brightness(0.9);
}
button:disabled {
  opacity: 0.65;
  cursor: wait;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #c1741d;
  outline-offset: 3px;
}
.secondary {
  background: #edf2e9;
  color: #235b48;
  border-color: var(--border);
}
.quiet {
  background: transparent;
  color: white;
  border-color: #72938b;
}
.danger {
  background: #a32e2e;
}
.danger-link {
  color: #982b2b;
}
.card {
  display: block;
  padding: 1.2rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}
.cards .card {
  margin: 0.5rem 0;
}
.inventory-list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.inventory-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: white;
}
.inventory-open {
  display: block;
  height: 100%;
  padding: 0.9rem 3.6rem 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
  border-radius: inherit;
}
.inventory-open:hover {
  background: #edf2e9;
}
.inventory-open h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}
.inventory-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.85rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.inventory-read-only {
  font-size: 0.75rem;
}
.inventory-card > .action-menu {
  position: absolute;
  top: 0.5rem;
  right: 0.35rem;
}
.action-menu {
  position: relative;
  flex-shrink: 0;
}
.action-menu > summary {
  padding: 0;
  list-style: none;
}
.action-menu > summary::-webkit-details-marker {
  display: none;
}
.action-menu[open] {
  z-index: 3;
}
.action-popover {
  position: absolute;
  z-index: 4;
  top: 100%;
  right: 0;
  width: 12rem;
  max-width: calc(100vw - 3rem);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.3rem;
  background: white;
  box-shadow: 0 0.4rem 1rem #19372e20;
}
.action-popover a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  border-radius: 0.3rem;
  font-size: 0.9rem;
  text-decoration: none;
}
.action-popover a:hover {
  background: #edf2e9;
}
.box-list:not(:empty) {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
}
.box-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.box-row-link {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 0.8rem 0.85rem;
  color: inherit;
  text-decoration: none;
}
.box-row > .action-menu {
  margin-right: 0.35rem;
}
.box-row:last-child {
  border-bottom: 0;
}
.box-row:hover {
  background: #f6f7f2;
}
.box-row-link:focus-visible {
  outline-offset: -3px;
}
.box-row-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.box-row-top h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}
.box-row-top .badge {
  flex-shrink: 0;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
}
.box-row .muted {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
}
.card h2 {
  margin: 0.5rem 0;
}
.narrow {
  max-width: 29rem;
  margin: 3rem auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.badge {
  display: inline-block;
  font-size: 0.8rem;
  border-radius: 2rem;
  background: #edf2e9;
  color: #345442;
  padding: 0.2rem 0.65rem;
}
.stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.stats strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.2;
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  border-radius: 0.5rem;
  color: var(--muted);
  text-decoration: none;
}
.icon-button.danger-link {
  color: #982b2b;
}
.icon-button:hover {
  background: #edf2e9;
}
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
form {
  margin: 1.2rem 0;
  max-width: 40rem;
}
label {
  display: block;
  font-weight: 600;
  margin: 1rem 0;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #91a598;
  border-radius: 0.45rem;
  padding: 0.75rem;
  background: white;
  color: #19372e;
  font: inherit;
  margin-top: 0.35rem;
  min-height: 46px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  display: inline-block;
  width: auto;
  min-height: unset;
  margin-right: 0.6rem;
}
.check {
  padding: 0.6rem 0;
}
.transfer-selection {
  margin: 1.5rem 0;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  min-width: 0;
}
.transfer-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.transfer-choice input {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
}
.transfer-choice > span {
  min-width: 0;
}
.transfer-note {
  display: block;
  font-weight: 400;
}
summary {
  cursor: pointer;
  min-height: 46px;
  padding: 0.7rem 0;
  color: var(--green);
  font-weight: 650;
}
.alert,
.notice {
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-wrap: anywhere;
}
.alert {
  background: #fae9e6;
  color: #862727;
  border: 1px solid #e0a7a0;
}
.notice {
  background: #e1eee0;
  border: 1px solid #a2c79d;
}
.empty {
  padding: 2rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 0.8rem;
  color: var(--muted);
}
.search {
  max-width: none;
  margin: 2rem 0;
}
.search-row {
  display: flex;
  gap: 0.5rem;
}
.search-row input {
  margin: 0;
  min-width: 0;
}
.items {
  list-style: none;
  padding: 0;
}
.item-selection,
.box-selection {
  max-width: none;
}
.item-selection li,
.box-selection .box-row {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.item-content {
  flex: 1;
}
.item-with-thumbnail {
  position: relative;
  min-height: 64px;
  padding-left: 76px;
}
.item-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 3px;
  border: 1px solid #dce3da;
  border-radius: 8px;
  background: #f2f5ef;
  overflow: hidden;
}
.item-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.item-with-thumbnail .pre-wrap {
  margin: 0.25rem 0 0;
}
.item-name:focus-visible .item-thumbnail {
  outline: 3px solid #c1741d;
  outline-offset: 3px;
}
.item-pick,
.box-pick,
.box-status-controls,
.selection-js,
.is-selecting .item-edit,
.box-selection.is-selecting .box-row > .action-menu {
  display: none;
}
.is-selecting .item-pick,
.is-selecting .box-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  min-height: 44px;
  margin: 0;
}
.item-pick input,
.box-pick input {
  margin: 0;
  width: 1.2rem;
  height: 1.2rem;
}
.selection-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  position: sticky;
  top: 0.5rem;
  z-index: 2;
  width: fit-content;
  max-width: 100%;
  background: #f6f7f2;
  border-radius: 0.5rem;
}
.selection-split {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: white;
}
.selection-start {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.5rem 0 0 0.5rem;
}
.selection-menu {
  position: static;
  border-left: 1px solid var(--border);
}
.selection-menu .action-popover {
  left: 0;
  right: auto;
}
.selection-menu button {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  border: 0;
  background: transparent;
  color: var(--green);
  border-radius: 0.3rem;
  font-size: 0.9rem;
  font-weight: 400;
}
.selection-menu .danger {
  color: #982b2b;
}
.selection-menu button:hover,
.selection-start:hover {
  background: #edf2e9;
  filter: none;
}
.selection-menu button:disabled {
  cursor: default;
}
.selection-menu hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0.3rem 0;
}
.selection-count {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.is-selecting .selection-count {
  display: block;
}
.selection-menu .selection-js {
  display: none;
}
.selection-enhanced .selection-js {
  display: flex;
}
.items li.is-selected,
.box-row.is-selected {
  background: #edf2e9;
}
.box-selection .selection-toolbar {
  margin-bottom: 0.6rem;
  padding: 0.25rem;
}
.is-selecting .box-status-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.box-status-controls label {
  margin: 0;
  font-size: 0.85rem;
}
.box-status-controls select {
  width: auto;
  margin: 0;
}
.bulk-review {
  padding-left: 1.25rem;
  overflow-wrap: anywhere;
}
.items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  overflow-wrap: anywhere;
}
.items li > div {
  min-width: 0;
}
.items a {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0.6rem 0;
}
.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.box-code {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.preview-banner {
  padding: 0.8rem 1rem;
  background: #fff1c9;
  text-align: center;
  border-bottom: 1px solid #d3b967;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: white;
  padding: 1rem;
  z-index: 1;
}
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: block;
}
footer {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
@media (min-width: 640px) {
  main {
    padding: 1rem 2rem 4rem;
  }
  .narrow {
    margin-top: 4rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  .button {
    transition: filter 0.15s;
  }
}

.account-menu > summary {
  color: white;
}
.account-menu > summary:hover {
  background: #2b564b;
}
.account-menu .action-popover a,
.account-menu button {
  color: var(--green);
}
.account-menu button {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.5rem 0.7rem;
}
.breadcrumbs {
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
}
.breadcrumbs a,
.breadcrumbs [aria-current] {
  display: inline-block;
  line-height: 44px;
  min-width: 0;
  max-width: 15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.8rem 0;
}
.page-heading h1 {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.compact-notice {
  margin: 0.6rem 0;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
}
.box-status {
  margin: 1rem 0;
}
.status-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}
.status-form label {
  margin: 0;
  font-size: 0.9rem;
}
.status-form select {
  flex: 1;
  min-width: 0;
  max-width: 12rem;
  margin: 0;
  padding: 0.5rem 0.6rem;
}
.status-form button {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
}
.sealed-message {
  margin: 0.6rem 0;
  font-size: 0.85rem;
}

.items .item-name {
  display: inline-block;
  max-width: 100%;
  padding: 0.55rem 0;
}
.item-page-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.5rem;
}
.item-page-heading h1 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.item-location {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}
.item-workspace {
  display: grid;
  align-items: start;
  gap: 1rem;
}
.item-workspace > .card {
  margin: 0;
  min-width: 0;
}
.item-fields input,
.item-fields select,
.item-fields textarea {
  min-width: 0;
}
.item-fields {
  margin: 0;
}
.item-fields label {
  margin: 1rem 0 0.35rem;
}
.item-number-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.item-number-fields label {
  font-size: 0.9rem;
}
.item-number-fields > div {
  display: grid;
  grid-template-rows: 1fr auto;
}
.item-fields input[readonly],
.item-fields textarea[readonly],
.item-fields select:disabled {
  background: #f6f7f2;
  color: #19372e;
  opacity: 1;
}
.item-fields button {
  margin-top: 1rem;
}
.item-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}
.item-record-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (min-width: 48rem) {
  .item-workspace {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem;
  }
}
.item-photo img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 480px;
  margin-bottom: 1rem;
  border-radius: 0.4rem;
}
.item-photo form + form {
  margin-top: 1.5rem;
}
.photo-upload-enhanced [data-photo-upload-submit] {
  display: none;
}
[data-photo-upload][data-uploading] input[type="file"] {
  pointer-events: none;
  opacity: 0.65;
}
.photo-crop {
  margin: 0.75rem 0;
}
.photo-crop > summary {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: #edf2e9;
  list-style: none;
  font-weight: 650;
  color: var(--green);
  cursor: pointer;
}
.photo-crop > summary::-webkit-details-marker {
  display: none;
}
.photo-crop[open] > summary,
.item-photo:has(.photo-crop[open]) > .photo-view,
.item-photo:has(.photo-crop[open]) > .photo-management {
  display: none;
}
.photo-crop form {
  margin: 0;
}
.crop-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 0.4rem;
}
.crop-stage img,
.crop-stage canvas {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 55vh;
  margin: 0;
  user-select: none;
}
.crop-stage [hidden] {
  display: none;
}
.crop-frame,
.crop-js {
  display: none;
}
.crop-enhanced .crop-stage {
  touch-action: none;
  cursor: crosshair;
}
.crop-enhanced .crop-frame {
  display: block;
  position: absolute;
  inset: 0;
  border: 2px solid white;
  box-shadow: 0 0 0 100vmax rgb(0 0 0 / 55%);
  cursor: move;
}
.crop-enhanced .crop-js {
  display: block;
}
.crop-enhanced .crop-no-js {
  display: none;
}
.crop-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to right,
      transparent 33%,
      #fff8 33%,
      #fff8 33.5%,
      transparent 33.5%,
      transparent 66%,
      #fff8 66%,
      #fff8 66.5%,
      transparent 66.5%
    ),
    linear-gradient(
      to bottom,
      transparent 33%,
      #fff8 33%,
      #fff8 33.5%,
      transparent 33.5%,
      transparent 66%,
      #fff8 66%,
      #fff8 66.5%,
      transparent 66.5%
    );
}
.crop-enhanced .crop-ratios {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.35rem 0;
  margin: 0.5rem 0;
}
.crop-enhanced .crop-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.crop-tools .crop-ratios {
  flex: 1;
  min-width: 0;
}
.crop-rotate {
  padding: 0;
  width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
}
.crop-ratios button {
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  color: var(--green);
  background: white;
  border-color: var(--border);
}
.crop-ratios button[aria-pressed="true"] {
  background: var(--green);
  color: white;
}
.crop-ratios button:disabled {
  cursor: not-allowed;
}
.crop-precision {
  margin: 0.5rem 0;
}
.crop-precision > summary {
  min-height: 44px;
  padding: 0.5rem 0;
  color: var(--muted);
  cursor: pointer;
}
.crop-precision[open] {
  padding-bottom: 1rem;
}
.crop-caption {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}
.crop-frame button {
  position: absolute;
  width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  cursor: nwse-resize;
}
.crop-frame button::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  border: 2px solid var(--green);
  border-radius: 50%;
}
.crop-frame [data-crop-corner^="n"] {
  top: 0;
}
.crop-frame [data-crop-corner^="s"] {
  bottom: 0;
}
.crop-frame [data-crop-corner$="w"] {
  left: 0;
}
.crop-frame [data-crop-corner$="e"] {
  right: 0;
}
.crop-frame [data-crop-corner^="n"]::after {
  top: 0;
}
.crop-frame [data-crop-corner^="s"]::after {
  bottom: 0;
}
.crop-frame [data-crop-corner$="w"]::after {
  left: 0;
}
.crop-frame [data-crop-corner$="e"]::after {
  right: 0;
}
.crop-frame [data-crop-corner="ne"],
.crop-frame [data-crop-corner="sw"] {
  cursor: nesw-resize;
}
.crop-frame button:focus-visible {
  outline-offset: -5px;
}
.crop-measurements {
  min-width: 0;
  margin: 1rem 0;
  padding: 0;
  border: 0;
}
.crop-measurements legend {
  font-weight: 650;
}
.crop-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.crop-fields label {
  min-width: 0;
  margin: 0;
}
.crop-size {
  display: block;
  margin: 0.75rem 0;
}
.crop-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Compact inventory workspace and its contextual box-selection dock. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.inventory-overview {
  margin: 0 0 0.75rem;
}
.inventory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.inventory-heading h1 {
  min-width: 0;
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  overflow-wrap: anywhere;
}
.inventory-description {
  margin: 0.3rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.inventory-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.inventory-summary p {
  margin: 0;
}
.inventory-summary p > span {
  margin: 0 0.3rem;
}
.inventory-summary strong {
  color: #19372e;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.inventory-unboxed {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0.5rem;
}
.inventory-unboxed > span {
  min-width: 1.6rem;
  padding: 0.05rem 0.4rem;
  border-radius: 0.4rem;
  background: #e8eee5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.inventory-unboxed:hover {
  text-decoration: underline;
}
.inventory-search {
  max-width: none;
  margin: 0.75rem 0 1rem;
}
.inventory-search .search-row {
  gap: 0.5rem;
}
.inventory-search input {
  min-width: 0;
  margin: 0;
  border-color: var(--border);
  border-radius: 0.65rem;
}
.inventory-search button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  color: white;
  border-radius: 0.65rem;
}
.box-selection {
  margin: 0;
}
.box-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 44px;
  margin: 0.75rem 0 0.5rem;
}
.box-list-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.box-list-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.inventory-new-box {
  min-height: 44px;
  padding: 0 0.75rem;
  font-size: 0.85rem;
}
.box-selection-start {
  gap: 0.35rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
}
.box-selection-start svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.box-selection.is-selecting .box-list-controls {
  display: none;
}
.box-pick input {
  accent-color: var(--green);
}
.box-selection.is-selecting {
  padding-bottom: var(
    --box-dock-clearance,
    calc(9rem + env(safe-area-inset-bottom, 0px))
  );
}
html:has(.box-selection.is-selecting) {
  scroll-padding-bottom: var(
    --box-dock-clearance,
    calc(9rem + env(safe-area-inset-bottom, 0px))
  );
}
.box-selection .box-selection-dock {
  display: none;
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  gap: 0.25rem 0.5rem;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  background: #fffffff5;
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: 0 -8px 30px #19372e12;
}
.box-selection.is-selecting .box-selection-dock {
  display: grid;
}
.box-selection-dock .selection-count {
  grid-column: 1 / 3;
  grid-row: 1;
  color: #19372e;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.selection-enhanced .box-selection-dock .selection-count {
  grid-column: 1;
}
.box-selection-dock .box-status-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 0.5rem;
}
.box-selection-dock .box-status-controls select {
  min-width: 0;
  width: 100%;
  margin: 0;
  border-color: var(--border);
}
.box-selection-dock .box-status-controls button {
  min-width: 0;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.box-selection-dock
  .box-status-controls
  button:disabled:not([data-submit-label]) {
  cursor: default;
}
.box-selection-dock .selection-menu {
  display: none;
  position: relative;
  grid-column: 2;
  grid-row: 1;
  border: 0;
}
.selection-enhanced .box-selection-dock .selection-menu {
  display: block;
}
.box-selection-dock .box-selection-cancel {
  grid-column: 3;
  grid-row: 1;
}
.box-selection-dock .selection-menu .action-popover {
  top: auto;
  bottom: calc(100% + 0.5rem);
  left: auto;
  right: 0;
  max-width: calc(100vw - 2rem);
}
@media (min-width: 48rem) {
  .box-selection .box-selection-dock {
    left: 50%;
    right: auto;
    bottom: 1rem;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 60rem;
    grid-template-columns: minmax(100px, 1fr) minmax(260px, 2fr) 44px 44px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
  }
  .box-selection-dock .selection-count {
    grid-column: 1;
  }
  .box-selection-dock .box-status-controls {
    grid-column: 2 / 4;
    grid-row: 1;
  }
  .selection-enhanced .box-selection-dock .box-status-controls {
    grid-column: 2;
  }
  .box-selection-dock .selection-menu {
    grid-column: 3;
  }
  .box-selection-dock .box-selection-cancel {
    grid-column: 4;
  }
}
