#px-onhand-orders { margin: 24px 0 !important; scroll-margin-top: 24px; }
#px-receipt-dialog {
 width: min(440px, calc(100vw - 24px)); max-width: none; padding: 0;
 border: 1px solid #efd7e3; border-radius: 16px; background: #fff;
 color: #382536; box-shadow: 0 12px 50px #4d243a33;
}
#px-receipt-dialog::backdrop { background: #fbf2f7; }
#px-receipt-dialog .px-receipt-close { position: absolute; right: 12px; top: 12px; padding: 5px 10px; font-size: 12px; }
#px-receipt-body { padding: 20px; }
.px-receipt-brand { display: grid; justify-items: center; gap: 2px; }
.px-receipt-brand img { object-fit: contain; }
.px-receipt-brand strong { color: #8e315e; letter-spacing: .15em; }
.px-receipt-brand span { font-size: 11px; letter-spacing: .14em; }
#px-receipt-title { margin: 14px 0 5px; text-align: center; font-size: 25px; }
.px-receipt-status { margin: 0; text-align: center; color: #873059; font-weight: 700; }
.px-receipt-meta { margin: 14px 0; overflow-wrap: anywhere; }
#px-receipt-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
#px-receipt-body th, #px-receipt-body td { padding: 7px 3px; border-bottom: 1px solid #efdce6; text-align: left; vertical-align: top; }
#px-receipt-body th:last-child, #px-receipt-body td:last-child { text-align: right; white-space: nowrap; }
#px-receipt-body td small { display: block; margin-top: 3px; }
.px-receipt-totals { margin: 13px 0 0; }
.px-receipt-totals div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.px-receipt-totals dd { margin: 0; }
.px-receipt-total { font-weight: 800; color: #8e315e; font-size: 17px; }

/* The inventory column must not stretch the product editor to its full height. */
#productForm { align-self: start; align-content: start; }
#inventory { max-height: min(62vh, 650px); overflow-y: auto; }
#px-add-item-dialog { width: min(460px, calc(100vw - 24px)); }
#px-add-item-dialog h2 { margin-top: 0; padding-right: 65px; }
#px-add-item-dialog .px-add-close { position: absolute; right: 16px; top: 16px; }
#px-add-item-form { display: grid; gap: 12px; }
#px-add-item-status { margin: 0; }

#px-edit-item-dialog{width:min(100% - 2rem,32rem);border:0;border-radius:1rem;padding:1.25rem}
#px-edit-item-form{display:grid;gap:.75rem}
#px-edit-item-form label{display:grid;gap:.25rem}

.px-top-orders{background:#fff2f8;border:1px solid #e6a1bf;border-radius:12px;margin:12px 0;color:#59203c;padding:12px 16px}
.px-top-orders summary{cursor:pointer;color:#86134a;font-weight:700}
.px-top-orders ol{margin:10px 0 0;padding-inline-start:24px}
.px-top-orders li{padding:8px 0;border-top:1px solid #f0c5da}
.px-top-orders small{display:block;margin-top:3px}
