.shelf-page {
  --shelf-orange: #9d551b;
  --shelf-orange-bg: #fff1dd;
  --shelf-blue: #245c78;
  --shelf-blue-bg: #edf5fa;
  min-width: 0;
}
.shelf-heading {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  margin: 28px 0 24px;
}
.shelf-heading h1 {
  font-size: 32px;
  letter-spacing: -1.1px;
  line-height: 1.15;
  margin: 8px 0;
}
.shelf-heading p {
  margin: 8px 0;
  color: var(--muted);
}
.shelf-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--green2);
}
.shelf-local {
  flex-shrink: 0;
  font-size: 11px;
  background: #e6ebe1;
  color: var(--green);
  padding: 7px 10px;
  border-radius: 20px;
}
.shelf-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.shelf-metrics > div {
  padding: 17px 12px;
  border-radius: 17px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 5px;
}
.shelf-metrics b {
  font-size: 29px;
  line-height: 1;
}
.shelf-metrics span {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.shelf-metrics .shelf-attention {
  background: var(--shelf-orange-bg);
  color: var(--shelf-orange);
  border-color: #f0d4b4;
}
.shelf-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 4px;
  background: #e7e9e1;
  border-radius: 14px;
  gap: 3px;
  margin-bottom: 25px;
}
.shelf-tabs button {
  border: 0;
  border-radius: 11px;
  background: none;
  padding: 11px 3px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  min-width: 0;
  white-space: normal;
}
.shelf-tabs button.active {
  background: white;
  box-shadow: 0 2px 7px #18312a12;
  color: var(--green);
}
.shelf-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin: 0 0 16px;
}
.shelf-section-head h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  margin: 0 0 7px;
}
.shelf-section-head p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.shelf-section-head > button {
  width: auto;
  flex-shrink: 0;
  font-size: 12px;
  padding: 10px;
  margin: 0;
}
.shelf-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(285px, 100%), 1fr));
  gap: 13px;
}
.shelf-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 19px;
  margin-bottom: 13px;
  min-width: 0;
}
.shelf-card h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin: 12px 0;
}
.shelf-card h3 {
  font-size: 16px;
  margin: 10px 0;
}
.shelf-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.shelf-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.shelf-card > .primary-btn,
.shelf-card > .secondary-btn {
  margin-top: 18px;
  margin-bottom: 0;
}
.shelf-batch {
  margin: 0;
  border-top: 3px solid #62937c;
}
.shelf-batch.freezer {
  border-top-color: #83adc3;
}
.shelf-batch.soon {
  border-top-color: #d68c3a;
}
.shelf-batch.expired {
  border-top-color: #c64d4d;
  background: #fffafa;
}
.shelf-card-top {
  display: flex;
  gap: 7px;
  justify-content: space-between;
  align-items: center;
}
.shelf-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 750;
  border-radius: 7px;
  padding: 6px 8px;
  background: #ecf0e9;
  color: var(--green);
}
.shelf-badge.soon {
  color: var(--shelf-orange);
  background: var(--shelf-orange-bg);
}
.shelf-badge.expired {
  color: #a52e2e;
  background: #f9e5e5;
}
.shelf-badge.freezer {
  color: var(--shelf-blue);
  background: var(--shelf-blue-bg);
}
.shelf-lot {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.shelf-item-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  margin: 15px 0 19px;
}
.shelf-item-title h2 {
  margin: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.shelf-item-title > b {
  font-size: 27px;
  line-height: 1;
  text-align: right;
  flex-shrink: 0;
}
.shelf-item-title b small {
  font-size: 10px;
  font-weight: 400;
  margin-top: 4px;
}
.shelf-timer {
  display: block;
  font-size: 17px;
  letter-spacing: -0.3px;
}
.shelf-card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}
.shelf-card-actions .primary-btn {
  font-size: 12px;
  padding: 12px;
  margin: 0;
}
.shelf-card-actions .text-btn {
  width: auto;
  white-space: nowrap;
  margin: 0;
  font-size: 12px;
}
.shelf-card-actions .text-btn:only-child {
  margin-left: auto;
}
.shelf-empty {
  text-align: center;
  background: #ffffff90;
  border: 1px dashed #c9d3c9;
  border-radius: 20px;
  padding: 35px 24px;
}
.shelf-empty > span {
  display: block;
  font-size: 35px;
  color: var(--green2);
  margin-bottom: 20px;
}
.shelf-empty h2 {
  font-size: 21px;
}
.shelf-empty p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.shelf-empty button {
  margin-top: 16px;
}
.shelf-quantity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0 0;
}
.shelf-quantity-grid label {
  font-size: 11px;
  color: var(--muted);
  min-width: 0;
}
.shelf-quantity-grid input {
  font-size: 20px;
  font-weight: 700;
  min-width: 0;
  padding: 12px;
  margin: 6px 0 12px;
  text-align: center;
}
.shelf-quantity-grid input:disabled {
  background: #eee;
  color: #aaa;
}
.shelf-extra {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 16px;
}
.shelf-extra summary {
  font-size: 12px;
  color: var(--green);
  cursor: pointer;
  margin-bottom: 12px;
}
.shelf-invalid {
  color: #b03636 !important;
}
.shelf-save {
  color: var(--green2) !important;
  font-size: 11px !important;
}
.shelf-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.shelf-quick-actions button {
  width: auto;
  font-size: 12px;
  padding: 10px 12px;
  margin: 0;
}
.shelf-fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: #f6f3edf5;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 7px;
}
.shelf-fixed-footer button {
  margin: 0;
}
.shelf-fixed-footer small {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
}
.shelf-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.shelf-form-actions button {
  margin: 0;
}
.shelf-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.shelf-date-grid label {
  font-size: 12px;
  min-width: 0;
}
.shelf-date-grid input {
  min-width: 0;
  max-width: 100%;
  margin-top: 7px;
  font-size: 12px;
  padding: 12px 8px;
}
.shelf-rule-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.shelf-rule-controls label {
  font-size: 11px;
}
.shelf-rule-controls input.field {
  margin: 7px 0;
}
.shelf-checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
}
.shelf-rules-form {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.shelf-rules-form > button {
  font-size: 12px;
  margin: 5px 0;
  width: auto;
  padding: 10px 14px;
}
.shelf-order-results {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.shelf-order-result {
  text-align: left;
}
.shelf-order-result small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.shelf-order-added {
  margin-bottom: 15px;
}
/* One row per position, the column names once above: Позиция · Кол-во · Цена · Сумма. */
.shelf-order-line,
.shelf-order-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 62px 70px;
  gap: 4px 6px;
  align-items: center;
}
.shelf-order-line {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 13px;
}
.shelf-order-line > span {
  min-width: 0;
  margin-bottom: 8px;
}
.shelf-order-line label {
  font-size: 10px;
  color: var(--muted);
}
.shelf-order-line input {
  margin: 0 0 8px;
  padding: 9px 2px;
  text-align: center;
}
.shelf-order-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.shelf-order-head {
  padding: 6px 12px 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.shelf-order-head span + span {
  text-align: center;
}
.shelf-free-group {
  border-color: #c9dce7;
}
.shelf-free-group .shelf-group-head {
  background: var(--shelf-blue-bg);
  color: var(--shelf-blue);
}
/* The name of a free position takes the whole row: the numbers stay under their columns. */
.shelf-order-line > .shelf-free-name {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcfa;
}
.shelf-free-name + label {
  grid-column: 2;
}
.shelf-order-line .shelf-free-name input.field {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}
.shelf-free-remove {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}
.shelf-free-add {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--shelf-blue);
  font-weight: 800;
}
.shelf-order-line small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.shelf-event {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.shelf-event strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  display: block;
}
.shelf-test-clock {
  background: #fff1dd;
  padding: 11px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 15px;
  color: var(--shelf-orange);
}
.shelf-footnote {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 25px;
}
.shelf-form {
  padding-bottom: 8px;
}
.shelf-page button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.shelf-card > summary {
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.shelf-card .field {
  max-width: 100%;
  min-width: 0;
}
.shelf-batch.expired .shelf-timer {
  color: #a52e2e;
}
@media (max-width: 430px) {
  .shelf-heading {
    display: block;
  }
  .shelf-heading h1 {
    font-size: 30px;
  }
  .shelf-local {
    display: inline-block;
    margin-top: 5px;
  }
  .shelf-tabs button {
    font-size: 10px;
  }
  .shelf-card {
    padding: 16px;
  }
  .shelf-section-head h2 {
    font-size: 18px;
  }
  .shelf-quantity-grid {
    gap: 6px;
  }
  .shelf-quantity-grid input {
    padding: 11px 6px;
  }
  .shelf-card-actions {
    flex-wrap: wrap;
  }
  .shelf-card-actions .primary-btn {
    flex: 1;
  }
  .shelf-metrics > div {
    padding: 15px 9px;
  }
  .shelf-form-actions {
    grid-template-columns: 1fr;
  }
  .shelf-form-actions > .primary-btn {
    order: -1;
  }
}
.shelf-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 5px 0 20px;
  font-size: 11px;
  color: var(--muted);
}
.shelf-breadcrumbs button {
  width: auto;
  border: 0;
  background: none;
  color: var(--green);
  padding: 5px 0;
  font: inherit;
  text-align: left;
  margin: 0;
}
.shelf-breadcrumbs .secondary-btn {
  border: 0;
  background: none;
  padding: 4px 0;
}
.shelf-receipt-status {
  margin-bottom: 20px;
}
.shelf-receipt-status strong {
  display: block;
}
.shelf-receipt-status small {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}
.shelf-receipt-status p {
  margin-bottom: 0;
}
.shelf-purchase-page h1 {
  font-size: 25px;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin: 5px 0 15px;
}
.shelf-purchase-page .shelf-badge {
  white-space: normal;
  line-height: 1.5;
}
.shelf-purchase-page {
  min-width: 0;
}
.shelf-stock-status {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 12px;
  background: #fff;
}
.shelf-stock-status > div {
  flex: 1;
  min-width: 0;
}
.shelf-stock-status strong {
  font-size: 12px;
}
.shelf-stock-status small,
.shelf-notifications > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.shelf-stock-status > button {
  width: auto;
  margin: 0;
  padding: 10px;
  font-size: 11px;
  max-width: 100px;
}
.shelf-stock-issues,
.shelf-notifications {
  background: #f8f4e8;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.shelf-notifications article {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
.shelf-notifications article p {
  line-height: 1.5;
}
.shelf-removal.expired {
  border-top: 3px solid #c64d4d;
}
.shelf-removal .shelf-badge {
  line-height: 1.5;
}
.shelf-removal > strong {
  display: block;
  margin: 12px 0;
}
.shelf-stock-issues summary,
.shelf-notifications summary {
  cursor: pointer;
  font-weight: 650;
}
.shelf-notifications .text-btn {
  font-size: 12px;
}

.shelf-selected-removal {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.shelf-receiving-issue,
.shelf-receiving-diffs {
  padding: 13px;
  border-radius: 12px;
  background: #fff1dd;
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.shelf-receiving-issue p,
.shelf-receiving-diffs p {
  margin: 8px 0;
}
.shelf-receiving-issue small,
.shelf-receiving-diffs small {
  display: block;
  color: var(--muted);
}
.shelf-extra section + section {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.shelf-batch.go {
  border-top-color: #bd6700;
  background: #fff4df;
}
.shelf-badge.go {
  background: #f5d799;
  color: #753d00;
}
.shelf-go-note {
  font-weight: 750;
  color: #914e00 !important;
}

.shelf-stock-issues p .text-btn {
  margin-left: 8px;
}

.shelf-notifications article small {
  display: block;
}

.shelf-statement {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.shelf-statement th,
.shelf-statement td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line, #e4e4df);
  text-align: right;
}

.shelf-statement th:first-child,
.shelf-statement td:first-child {
  text-align: left;
}

.shelf-movement small {
  display: block;
}

/* Порядок на витрине: группы и мелкие плитки. */
.shelf-heading {
  margin: 12px 0;
}
.shelf-heading h1 {
  font-size: 24px;
  letter-spacing: -0.5px;
}
.shelf-metrics {
  gap: 6px;
  margin-bottom: 12px;
}
.shelf-metrics > div {
  padding: 8px 10px;
  border-radius: 12px;
  gap: 2px;
}
.shelf-metrics b {
  font-size: 19px;
}
.shelf-tile-group {
  margin-bottom: 14px;
}
.shelf-tile-group > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 2px 6px;
  font-size: 14px;
}
.shelf-tile-group > header small {
  font-size: 12px;
  color: var(--muted);
}
.shelf-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(165px, 46%), 1fr));
  gap: 6px;
}
.shelf-tile {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.shelf-tile-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}
.shelf-tile-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.shelf-tile-head b {
  font-size: 16px;
  line-height: 1.1;
}
.shelf-tile-lot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.shelf-tile-lot .shelf-badge {
  margin: 0;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.shelf-tile-lot small {
  font-size: 12px;
  font-weight: 600;
}
.shelf-tile-lot button {
  width: 100%;
  min-height: 44px;
  margin: 2px 0 0;
  padding: 6px;
  font-size: 12px;
}
.shelf-group {
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.shelf-group[hidden],
.shelf-rule-row[hidden] {
  display: none;
}
.shelf-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 6px 12px;
  background: #eef1ea;
  font-size: 14px;
  cursor: default;
}
summary.shelf-group-head {
  cursor: pointer;
}
.shelf-group-head small {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.shelf-group-found {
  background: var(--shelf-orange-bg);
}
.shelf-group-cold .shelf-group-head {
  background: var(--shelf-blue-bg);
}
.shelf-group .shelf-order-line,
.shelf-group .shelf-order-added {
  padding: 8px 12px 0;
}
.shelf-group .shelf-order-added .shelf-order-line {
  padding: 0;
  border-top: 0;
}
.shelf-order-line label {
  display: block;
}
.shelf-cold-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px auto;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}
.shelf-cold-row small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.shelf-cold-row b {
  font-size: 16px;
  text-align: right;
}
.shelf-cold-row button {
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  font-size: 12px;
}
.shelf-rule-row {
  border-top: 1px solid var(--line);
}
.shelf-rule-row summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.shelf-rule-row summary small {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.shelf-rule-row .shelf-rules-form {
  padding: 4px 12px 12px;
  background: #fbfaf5;
}
.shelf-order-total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  margin: 8px 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
}
.shelf-order-total small {
  width: 100%;
  font-size: 12px;
  color: var(--shelf-orange);
}
.shelf-order-total small.shelf-order-was {
  color: var(--muted);
}

.shelf-stock-status {
  justify-content: space-between;
  padding: 2px 4px;
  margin-bottom: 8px;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--muted);
}
.shelf-stock-status > button {
  flex-shrink: 0;
  max-width: none;
  min-height: 44px;
  padding: 0 8px;
  font-size: 13px;
}
.shelf-sync {
  margin-bottom: 10px;
}
.shelf-sync progress {
  display: block;
  width: 100%;
  height: 8px;
  accent-color: var(--green);
}
.shelf-sync small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.shelf-document-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.shelf-document-fields .field {
  margin-top: 4px;
  min-width: 0;
}

.receive-form {
  padding-bottom: 110px;
}
.receive-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.receive-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}
.receive-head p {
  margin: 2px 0 0;
  color: #52615a;
  font-size: 13px;
}
.receive-back {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  background: #fff;
  font-size: 18px;
}
.receive-form .shelf-card {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
}
.receive-form h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.receive-paper .field,
.receive-line .field {
  min-height: 44px;
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 16px;
}
.receive-paper .label {
  margin: 8px 0 0;
  font-size: 12px;
  color: #52615a;
}
.receive-time {
  margin-top: 6px;
}
.receive-time > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.receive-time > summary::-webkit-details-marker {
  display: none;
}
.receive-paper .shelf-save {
  display: block;
  margin: 0;
  color: #52615a;
  font-size: 11px;
}
.receive-line.differs {
  border: 2px solid #c98a3a;
}
.receive-line-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.receive-line-head b {
  color: #2d6a58;
  font-size: 12px;
  white-space: nowrap;
}
.receive-line.differs .receive-line-head b {
  color: #8a5a12;
}
.receive-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.receive-count > span {
  color: #52615a;
  font-size: 13px;
}
.receive-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.receive-stepper .field {
  width: 78px;
  margin: 0;
  padding: 8px 2px;
  border-color: transparent;
  background: transparent;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}
.receive-step {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #e9eee8;
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
}
.receive-note {
  margin-top: 8px;
}
.receive-note .field {
  border-color: #c98a3a;
}
.receive-place {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf0ec;
}
.receive-place label {
  color: #52615a;
  font-size: 12px;
}
.receive-place .field {
  font-weight: 700;
}
.receive-place [readonly] {
  background: #f4f6f3;
}
.receive-extra {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}
.receive-extra .text-btn {
  min-height: 44px;
  font-size: 14px;
}

.shelf-order-rule {
  padding: 0 12px 12px;
}
.shelf-order-rule .shelf-rule-controls {
  margin: 0;
}
.shelf-order-rule .shelf-invalid {
  margin: 0;
  font-size: 13px;
}
/* Without a date: each lot of the item is a place to put portions. */
.shelf-assign-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.shelf-assign-target.new {
  border-style: dashed;
}
.shelf-assign-target > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.shelf-assign-target .shelf-badge {
  align-self: flex-start;
  margin: 0;
}
.shelf-assign-target .receive-stepper .field {
  width: 44px;
  font-size: 18px;
}
.shelf-assign-total {
  font-weight: 700;
}
/* A lot on display is tapped to send it back to the freezer. */
button.shelf-tile-lot.movable {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* What a position is: an ingredient is told apart from a dessert at a glance. */
.shelf-kind {
  display: inline-block;
  width: max-content;
  white-space: nowrap;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--shelf-blue-bg);
  color: var(--shelf-blue);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
/* One rule block for a dish: shelf life, freezing, section. */
.shelf-rule-title {
  display: block;
  margin: 4px 0 10px;
  font-size: 13px;
}
.shelf-rule-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}
.shelf-rule-caption {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.shelf-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.shelf-choices-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.shelf-choice {
  position: relative;
  display: flex;
}
.shelf-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}
.shelf-choice span,
.shelf-hour-pick {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
}
.shelf-choice input:checked + span,
.shelf-hour-pick.chosen {
  border: 2px solid var(--green);
  background: var(--green-bg, #edf3ea);
  color: var(--green);
}
.shelf-choice input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.shelf-hour-own {
  display: flex;
  align-items: center;
  gap: 6px;
}
.shelf-hour-own input.field {
  width: 84px;
  margin: 0;
}
.shelf-rule-add #shelf-rule-add-form .shelf-rules-form {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

/* A freezer lot the shelf is missing: lit until it is taken out. */
.shelf-cold-row.shelf-take-out {
  border: 2px solid var(--shelf-orange);
  background: var(--shelf-orange-bg);
}
.shelf-cold-row.shelf-take-out strong {
  color: var(--shelf-orange);
}
.shelf-take-out-banner {
  border: 2px solid var(--shelf-orange);
  background: var(--shelf-orange-bg);
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 12px;
}
.shelf-take-out-banner p {
  margin: 4px 0 8px;
}

/* A prepayment linked in the bank registry, shown on the order. */
.shelf-prepay {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shelf-prepay-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.shelf-prepay small {
  color: var(--muted);
}
.shelf-extra {
  border: 2px solid var(--lime, #dbea75);
}
.shelf-extra-why {
  padding: 10px;
  background: var(--paper, #f6f3ed);
  border-radius: 12px;
  font-size: 13px;
}
.shelf-line-clear {
  display: block;
  margin-top: 2px;
  padding: 0;
  min-height: 24px;
  border: 0;
  background: none;
  color: var(--danger, #b93f3f);
  font-size: 12px;
  text-decoration: underline;
}
.shelf-picker {
  display: grid;
  gap: 6px;
}
.shelf-picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
