/* Confirmed totals remain visible below the keypad, without moving its controls. */
.inventory-confirmed-recent{display:flex;flex-direction:column;min-width:0;min-height:0;box-sizing:border-box;border-top:1px solid #d9e5dc;padding-top:9px;color:#234733;overflow:hidden}
.inventory-confirmed-recent>header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex:none;margin:0 0 6px!important;min-height:18px}
.inventory-confirmed-recent>header h3{margin:0;font-size:13px;line-height:1.35;font-weight:650;color:#2c5740}
.inventory-confirmed-recent>header>span{font-size:10px;line-height:1.35;color:#667f6d;white-space:nowrap}
.inventory-confirmed-recent-list{flex:1;min-height:0;min-width:0;margin:0;padding:0;list-style:none;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
.inventory-confirmed-recent-list:focus-visible{outline:2px solid #5b9770;outline-offset:-2px;border-radius:8px}
.inventory-confirmed-recent-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;min-height:45px;box-sizing:border-box;margin:0;padding:6px 8px;border-bottom:1px solid #e6ece8;border-radius:7px}
.inventory-confirmed-recent-row.is-latest{background:#e8f3ec;border-bottom-color:transparent}
.inventory-confirmed-recent-product{flex:1;min-width:0}
.inventory-confirmed-recent-product>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.35;font-weight:600}
.inventory-confirmed-recent-product>small{display:block;margin-top:2px;color:#5c7565;font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.inventory-confirmed-recent-qty{flex:none;min-width:42px;text-align:right;white-space:nowrap;font-size:17px;line-height:1.2;font-variant-numeric:tabular-nums;color:#1f5d3a}
.inventory-confirmed-recent-qty>span{font-size:10px;font-weight:400}
.inventory-confirmed-recent-empty{margin:0;padding:8px;font-size:12px;line-height:1.4;color:#6c8273}

#inventory-manual-entry{height:min(760px,calc(100dvh - 16px));overflow:hidden}
#inventory-manual-count{gap:8px}
#inventory-manual-count>.inventory-manual-context{flex:1 1 auto;min-height:36px;max-height:126px}
#inventory-manual-count>.inventory-confirmed-recent{flex:0 0 clamp(128px,calc(100dvh - 570px),272px)}
#inventory-manual-count .inventory-manual-pad button,#inventory-manual-count header .btn,#inventory-manual-count [data-manual-next],#inventory-manual-count [data-manual-abc]{min-height:44px}
#inventory-manual-count>.inventory-confirmed-recent>header{flex-shrink:0}
#inventory-camera-quantity .inventory-confirmed-recent{height:clamp(128px,calc(100dvh - 620px),220px);margin-top:14px}
#inventory-camera-quantity.inventory-has-recent header .btn{min-height:44px}
#inventory-camera-quantity.inventory-has-recent #inventory-camera-count>header{position:sticky;top:0;z-index:3;background:#f7faf8;padding:6px 0;margin:0;box-shadow:0 -18px 0 #f7faf8}

@media(max-height:620px){
 #inventory-manual-entry{padding:8px}
 #inventory-manual-count{gap:6px}
 #inventory-manual-count>.inventory-manual-context{min-height:30px}
 #inventory-manual-count .inventory-manual-pad{gap:5px}
 #inventory-manual-count .inventory-manual-pad button{min-height:44px;padding:4px}
 #inventory-manual-count>.inventory-confirmed-recent{padding-top:6px}
}
@media(max-height:500px){
 #inventory-manual-entry{overflow:auto}
 #inventory-manual-count{height:auto;min-height:100%}
 #inventory-manual-count>.inventory-manual-context{flex:none;max-height:90px;min-height:36px}
 #inventory-manual-count>.inventory-confirmed-recent{height:128px;flex-basis:128px}
}
@media print{.inventory-confirmed-recent{display:none!important}}

/* Stable message area: text wraps without collapsing its line boxes. */
#inventory-manual-count>.inventory-manual-context{flex:0 0 80px;min-height:80px;max-height:80px;scroll-padding:4px;padding-bottom:3px;box-sizing:border-box}
#inventory-manual-count>.inventory-manual-context>*{flex-shrink:0;white-space:normal;overflow-wrap:anywhere}
#inventory-manual-count>.inventory-confirmed-recent{flex:1 1 128px;min-height:0;max-height:272px}
@media(max-height:620px){#inventory-manual-count{gap:5px}#inventory-manual-count>.inventory-manual-context{flex-basis:64px;min-height:64px;max-height:64px}}
@media(max-height:500px){#inventory-manual-count>.inventory-confirmed-recent{flex:0 0 128px}}
