.restock-page [hidden] { display: none !important; }
.restock-page .pagehead { margin-bottom: 1.25rem; }
.restock-toolbar, .restock-storage { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding: .75rem 1rem; background: #e6edf1; }
.restock-toolbar p, .restock-storage p { margin: 0; font-weight: 650; }
.restock-toolbar > a { display: inline-flex; align-items: center; min-height: 44px; }
.restock-storage { margin-top: .65rem; background: #ede9df; }
.restock-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.5rem; margin: 1.5rem 0; align-items: start; }
.restock-editor { background: #fffaf2; padding: 1rem; border: 1px solid #d7cdbd; border-top: 3px solid #a45236; }
.restock-page h2, .restock-page h3 { margin-top: 0; scroll-margin-top: 1rem; }
.restock-page label { display: block; color: #263d4a; }
.restock-page input:not([type=checkbox],[type=file]), .restock-page textarea { width: 100%; min-width: 0; min-height: 44px; display: block; margin-top: .2rem; padding: .45rem .6rem; border: 1px solid #777c76; border-radius: 4px; background: #fffefa; color: #212b29; font: inherit; }
.restock-page button, .restock-page summary { min-height: 44px; }
.restock-page button { padding: .5rem .75rem; border-radius: 4px; }
.restock-page button:disabled { opacity: .6; cursor: default; }
.restock-page :focus-visible { outline: 2px solid #263d4a; outline-offset: 3px; }
.restock-page button.secondary { background: #fffefa; color: #263d4a; border: 1px solid #65757c; }
.restock-actions, .restock-card-top { display: flex; align-items: center; gap: .5rem .65rem; flex-wrap: wrap; }
.restock-editor form > label, .restock-pair, .restock-place { margin-bottom: .65rem; }
.restock-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.restock-editor .restock-actions { margin-top: .75rem; }
.restock-page [role=status]:empty { margin: 0; }
.restock-page [role=status] { color: #773a28; }
#restock-items { margin: .7rem 0 0; padding: 0; list-style: none; }
.restock-card, .restock-empty { background: #fffdf7; border: 1px solid #d7cdbd; padding: 1rem; margin-bottom: .65rem; overflow-wrap: anywhere; }
.restock-card-top { justify-content: space-between; }
.restock-card h3, .restock-card p { margin: 0 0 .35rem; }
.restock-badge { border-radius: 20px; padding: .18rem .6rem; background: #e6edf1; color: #263d4a; font-weight: 650; }
.restock-badge[data-kind=buy], .restock-badge[data-kind=check] { color: #773a28; background: #f4e4d8; }
.restock-place { border-top: 1px solid #dfd5c6; padding-top: .6rem; }
.restock-place .restock-actions { align-items: end; }
.restock-place input { max-width: 9rem; }
.restock-backup { background: #ede9df; padding: .6rem 1rem 1rem; }
.restock-page summary { padding-block: .55rem; cursor: pointer; font-weight: 650; }
.restock-page input[type=file] { display: block; max-width: 100%; min-height: 44px; }
#restock-options label { display: flex; align-items: center; min-height: 44px; gap: .55rem; overflow-wrap: anywhere; }
.restock-page dialog { width: min(calc(100% - 1.5rem), 34rem); max-height: calc(100% - 1.5rem); padding: 1rem; border: 1px solid #777c76; border-top: 4px solid #a45236; background: #fffaf2; color: #212b29; }
.restock-page dialog::backdrop { background: rgb(26 36 41 / 64%); }
@media (max-width: 760px) {
  .restock-layout { display: flex; flex-direction: column; gap: 1rem; }
  .restock-layout > section { width: 100%; }
  .restock-layout[data-empty] .restock-editor { order: -1; }
  .restock-toolbar .restock-actions { width: 100%; }
  .restock-page .pagehead { margin-bottom: .8rem; }
}

#restock-share-options label { min-height: 44px; padding-block: .4rem; overflow-wrap: anywhere; }
.restock-card-storage { margin-top: .75rem; padding: .5rem .65rem; background: #e6edf1; }

.restock-storage { margin-bottom: .65rem; }
@media (max-width: 760px) {
  .restock-toolbar button:disabled { display: none; }
  .restock-toolbar .restock-actions:not(:has(button:not(:disabled))) { display: none; }
  .restock-layout { margin-top: 1rem; }
}

.restock-filters { margin-bottom: .65rem; }
.restock-filters > label { margin-bottom: .55rem; }
.restock-page select { display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: .2rem; padding: .45rem .5rem; border: 1px solid #777c76; border-radius: 4px; background: #fffefa; color: #212b29; font: inherit; }
.restock-pending { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem; margin-top: .65rem; padding: .55rem .75rem; background: #f4e4d8; }
.restock-pending p { margin: 0; }
.restock-count-draft { color: #773a28; font-weight: 650; }
.restock-place-dirty { border-inline-start: 3px solid #a45236; padding-inline-start: .55rem; }
#restock-done { margin-top: .75rem; }
#restock-done-items { list-style: none; padding: 0; margin: .35rem 0 0; }
.restock-storage:not(:has(button:not([hidden]))) { padding-block: .4rem; }

@media (max-width: 760px) {
  .restock-toolbar, .restock-storage { padding: .55rem .75rem; }
  .restock-storage { column-gap: .5rem; }
}
