.stock-receipts{max-width:1120px;margin:auto}
.stock-receipts .page-heading{margin-bottom:10px;gap:8px}
.stock-receipts .page-heading h1{font-size:26px;margin:0}
.stock-receipts .page-heading p{margin:4px 0;font-size:13px}
.stock-receipts .page-heading .actions{gap:6px}
.stock-receipts .page-heading .btn{min-height:44px;padding:9px 12px;font-size:13px}
.receipt-top-label{display:flex;justify-content:space-between;gap:8px;margin:8px 0 5px;font-size:12px;color:var(--muted)}
.receipt-summary{margin:0 0 10px;min-width:0}
.receipt-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:11px;background:var(--white);overflow:hidden}
.receipt-summary-grid>div{padding:9px 10px;min-width:0}
.receipt-summary-grid>div+div{border-left:1px solid var(--line)}
.receipt-summary-grid small{display:block;color:var(--muted);font-size:11px;line-height:1.35;margin-bottom:4px}
.receipt-summary-grid strong{display:block;font-size:17px;line-height:1.3;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.receipt-summary-grid .receipt-profit{background:var(--action-soft,#eaf3e8)}
.receipt-summary-grid .receipt-profit small,.receipt-summary-grid .receipt-profit strong{color:var(--action-ink,var(--text,#174b39))}
.receipt-summary-grid .receipt-profit.is-negative strong{color:var(--danger,#b54832)}
:root:not([data-theme=dark])[data-palette=rose] .receipt-summary-grid .receipt-profit.is-negative strong{color:#ad432e}
.receipt-summary-note{font-size:11px;line-height:1.4;color:var(--muted);margin:5px 0 0}
.receipt-calculation{font-size:12px;margin:2px 0 0;color:var(--ink)}
.receipt-calculation>summary{display:list-item;cursor:pointer;min-height:44px;padding:12px 0 8px;color:var(--action-ink,var(--ink));font-weight:600;line-height:1.5}
.receipt-calculation>summary:focus-visible{outline:2px solid var(--action-ink,var(--ink));outline-offset:2px;border-radius:4px}
.receipt-calculation dl{margin:0;border:1px solid var(--line);border-radius:9px;overflow:hidden}
.receipt-calculation dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:6px 9px}
.receipt-calculation dt,.receipt-calculation dd{margin:0;min-width:0;overflow-wrap:anywhere}
.receipt-calculation dd{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.receipt-calculation-result{border-top:1px solid var(--line);font-weight:700;background:var(--action-soft,var(--white))}
.receipt-calculation p{font-size:11px;line-height:1.45;color:var(--muted);margin:6px 0 0}
.receipt-search{display:block;margin:10px 0}
.receipt-search input{width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--white);color:inherit;font-size:16px}
.receipt-today h2{display:flex;align-items:center;gap:8px;font-size:16px;margin:12px 0 7px}
.stock-receipts summary span,.receipt-today h2 span{font-size:11px;font-weight:500;border-radius:99px;background:var(--action-soft,#eaf3e8);padding:2px 7px}
.receipt-row{padding:9px 11px;border:1.5px solid var(--line);border-radius:11px;background:var(--white);margin:5px 0;min-width:0}
.receipt-row-main{display:flex;align-items:center;gap:8px}
.receipt-row-name{flex:1;min-width:0}
.receipt-row-name>strong{display:block;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.receipt-row-name>small{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.receipt-row-cost{flex:none;text-align:right;font-size:13px;font-variant-numeric:tabular-nums;max-width:32%;overflow-wrap:anywhere}
.receipt-row .product-photo{width:38px;height:38px}
.receipt-row-details>summary{min-height:36px;font-size:12px;color:var(--action-ink,var(--text));padding:10px 0 3px;cursor:pointer}
.receipt-row-details .receipt-summary{margin:8px 0 0}
.receipt-row-details .receipt-summary-grid strong{font-size:14px}
.receipt-audit{display:block;margin:6px 0;color:var(--muted);font-size:11px}
.receipt-history,.receipt-pending{border:1px solid var(--line);border-radius:11px;margin-top:10px;padding:0 10px;background:var(--white)}
.receipt-history>summary,.receipt-pending>summary,.receipt-day>summary{min-height:44px;padding:12px 0;font-size:14px;font-weight:650;cursor:pointer}
.receipt-day+.receipt-day{border-top:1px solid var(--line)}
.receipt-day>summary{font-size:13px}
.receipt-empty{font-size:13px;color:var(--muted);padding:10px 0;margin:0}
.receipt-pending-list{padding-bottom:5px}
.receipt-pending-row{display:flex;justify-content:space-between;gap:8px;align-items:center;width:100%;text-align:left;min-height:48px;padding:9px 0;background:transparent;color:inherit;border-top:1px solid var(--line);font-size:12px}
.receipt-pending-row b{font-size:13px;overflow-wrap:anywhere}
.receipt-pending-row small{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.receipt-pending-row>span:last-child{white-space:nowrap;font-weight:650}
/* Keep the photo available without pushing the main product fields below the fold. */
#product-form .product-essential-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px}
#product-form .product-essential-grid>.full{grid-column:1/-1}
#product-form .product-more{border:1px solid var(--line);border-radius:9px;padding:0 10px;margin:9px 0}
#product-form .product-more>summary{min-height:44px;padding:12px 0;font-size:13px;font-weight:600;cursor:pointer}
#product-form .code-field{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:5px 8px;margin:0 0 9px}
#product-form .code-field .field{margin:0}
#product-form .code-field .btn{width:auto;min-height:44px;padding:8px 10px;font-size:12px}
#product-form .code-field small{grid-column:1/-1;font-size:11px;line-height:1.3;margin:0}
.product-stock-note{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:5px 0 8px;font-size:12px;color:var(--muted)}
.product-stock-note .btn{min-height:44px;padding:8px 10px;font-size:12px}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:not(:has(#checkout-form,.online-finance-modal)) .modal-body .info-box{padding:10px;font-size:13px;line-height:1.45}
:where(body:has(#app>.layout:not(.online-workspace))) #modal .details-list{gap:10px}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-editor{gap:9px;padding:9px;margin:8px 0 12px;align-items:center}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-preview,:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-preview .photo-large{width:48px;min-width:48px;height:48px;margin:0}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-actions{gap:4px;flex:1}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-actions>strong{font-size:13px}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-actions>small{display:none}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-actions .actions{gap:5px;margin:0}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-actions .btn{min-height:44px;padding:7px 9px;font-size:12px}
:where(body:has(#app>.layout:not(.online-workspace))) .photo-edit-actions p:empty{display:none}
:where(body:has(#app>.layout:not(.online-workspace))) #modal:has(.details-list) .modal-body>.photo-large{height:112px;margin-bottom:9px}
@media(max-width:380px){.receipt-summary-grid>div{padding:8px 6px}.receipt-summary-grid strong{font-size:15px}.receipt-row{padding:8px}.receipt-row-cost{font-size:12px}}

/* The primary search reaches stock products; receipt records stay secondary. */
.receipt-product-results{max-height:360px;overflow:auto;overscroll-behavior:contain;margin:0 0 8px}
.receipt-product-results>.tiny{margin:0 0 4px}
.receipt-product-result{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 9px;margin:4px 0;border:1px solid var(--line);border-radius:10px;background:var(--white)}
.receipt-product-result>div:first-child{min-width:0}
.receipt-product-result strong{display:block;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.receipt-product-result small{display:block;font-size:11px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
.receipt-product-result .actions{display:grid;gap:2px;justify-items:stretch}
.receipt-product-result .btn,.receipt-product-result .text-button{min-height:44px;font-size:11px;justify-content:center;padding:5px 8px}
.receipt-record-search{margin:0 0 8px}
.receipt-record-search>summary{font-size:12px;min-height:36px;padding:8px 0;cursor:pointer;color:var(--action-ink,var(--green))}
.receipt-record-search .receipt-search{margin:3px 0 8px}
.receipt-pending-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;border-top:1px solid var(--line)}
.receipt-pending-item .receipt-pending-row{border-top:0}
.receipt-pending-item>[data-receipt-cancel]{min-height:44px;max-width:88px;font-size:11px;line-height:1.35;white-space:normal;text-align:right}
.receipt-row-details [data-receipt-hide],.receipt-hidden-toggle{min-height:44px;font-size:11px}
