:root{--staff-yellow:#f7c52b;--staff-dark:#181816;--staff-muted:#77766f;--staff-border:#e8e5da}
body{background:#f5f4ef;color:#20201d}header{background:#151515;padding:13px 22px;border:0}header .top{max-width:1200px}header .brand{font-size:14px;letter-spacing:.1em}header .brand img{width:44px;height:44px}header a{font-size:14px;font-weight:600}
main{max-width:1200px;margin:30px auto 60px}#dashboard{background:transparent;padding:0;border:0;box-shadow:none}#dashboard>.bar:first-child{background:#1d1d1b;color:white;padding:25px 28px;border-radius:18px 18px 0 0}#dashboard>.bar:first-child h1{color:white;margin:0;font-size:26px}#dashboard>.bar:first-child p{color:#c4c1b6;margin:7px 0 0}#logout{background:transparent;border-color:#777;color:#fff}
#dashboard>.bar:nth-child(2){background:white;border:1px solid var(--staff-border);border-top:0;border-radius:0 0 18px 18px;padding:12px;justify-content:flex-start;gap:6px;box-shadow:0 8px 24px rgba(20,20,10,.04)}
#dashboard>.bar:nth-child(2) button{border:0;background:transparent;color:#55534e;padding:11px 16px;font-weight:700;border-radius:10px}#dashboard>.bar:nth-child(2) button:hover{background:#f4f3ed}#dashboard>.bar:nth-child(2) button.active{background:#fff1b4;color:#292200}
#inventoryView,#requestsView,#scanView,#studentsView{margin-top:22px;background:#fff;border:1px solid var(--staff-border);border-radius:18px;padding:24px;box-shadow:0 8px 24px rgba(20,20,10,.035)}#inventoryView .bar{margin:0 0 8px}#inventoryView .bar input{max-width:430px}h2{font-size:22px;margin:0 0 14px}input,select,button{font:inherit}input,select{border:1px solid #dbd9d0;border-radius:10px;padding:11px 12px;background:#fff;color:#222}input:focus,select:focus{outline:2px solid #e8bb25;outline-offset:2px}button{transition:background .15s,border-color .15s}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:3px solid #d4a800;outline-offset:2px}
.wrap{max-height:65vh;border-color:var(--staff-border);border-radius:12px}table{min-width:720px}th{background:#f6f5ef;color:#666158;font-size:13px;font-weight:700;z-index:1}td{padding:14px 10px;color:#34342f}tbody tr:hover{background:#fffdf2}tbody td:first-child{font-weight:700;color:#524313}
#studentsView>select{min-width:190px;margin:0 0 8px}#studentsList,#requestsList{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px}#studentsList .panel,#requestsList .panel,#scanView .panel{padding:18px;background:#fcfbf7;border:1px solid var(--staff-border);box-shadow:none;border-radius:14px}#studentsList h3,#requestsList h3{margin:0 0 8px;font-size:17px}#studentsList p,#requestsList p{font-size:14px;line-height:1.55;color:#65635c}#studentsList select{display:block;width:100%;margin:12px 0}#studentsList button,#requestsList button{margin:5px 6px 0 0;background:#fff;border-color:#dfdcd0;padding:9px 12px;font-weight:600}#studentsList button:hover,#requestsList button:hover{background:#fff5cf}
#scanView{max-width:760px}#scanView input,#scanView select{width:100%;max-width:100%}#scanView label{margin-top:16px}#scanView button{min-height:45px}#scanView #receive{margin-top:15px}#scanView ul{padding-left:22px;line-height:1.8;overflow-wrap:anywhere}#scanStatus{font-weight:600}#login{margin:60px auto;background:white;border-color:var(--staff-border);padding:32px;border-radius:20px}#login h1{font-size:26px;margin:0}#login button{width:100%;min-height:48px}
@media(max-width:720px){main{margin:18px auto 40px;padding:0 12px}header{padding:10px 14px}header .top{flex-direction:row;align-items:center}header .brand{font-size:12px;letter-spacing:.03em}header .brand img{width:39px;height:39px}#dashboard>.bar:first-child{padding:20px;border-radius:15px 15px 0 0}#dashboard>.bar:first-child h1{font-size:22px}#dashboard>.bar:nth-child(2){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:8px}#dashboard>.bar:nth-child(2) button{padding:10px 6px;font-size:13px;min-height:44px}#inventoryView,#requestsView,#scanView,#studentsView{padding:17px;margin-top:14px;border-radius:15px}#studentsView>select{width:100%}#login{margin:32px auto;padding:24px}#scanView #issue,#scanView #receive{width:100%;margin-top:10px}}
#scanView{max-width:none}
.scan-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(250px,.8fr);gap:18px;align-items:start;margin-top:22px}
.scan-controls{display:grid;gap:14px;min-width:0}.scan-block{padding:20px;border:1px solid var(--staff-border);border-radius:14px;background:#fcfbf7;min-width:0}.scan-block h3,.scan-history h3{margin:0 0 12px;font-size:16px}.scan-block label{margin:14px 0 6px}.scan-block input,.scan-block select{width:100%}.scan-block .muted{margin:8px 0;line-height:1.5}.scan-block>div:not(.panel){display:flex;gap:10px;flex-wrap:wrap}.scan-block #issue,.scan-block #receive{flex:1;min-width:140px;margin-top:16px}.scan-block #scanStatus:empty{display:none}
#scanView #scanRequestDetails{margin:12px 0 0!important;background:#fff;border:1px solid var(--staff-border);padding:14px}#scanRequestDetails p{margin:4px 0}#scanRequestDetails h3{margin-bottom:8px}#scanView .scan-history{margin:0!important;position:sticky;top:16px;background:#fcfbf7;border-color:var(--staff-border)}.scan-history ul{margin-bottom:0}.scan-history p{margin:0}
@media(max-width:720px){.scan-layout{grid-template-columns:1fr;gap:12px;margin-top:16px}.scan-block{padding:16px}.scan-block>div:not(.panel){display:grid;grid-template-columns:1fr 1fr}.scan-block #issue,.scan-block #receive{width:100%;min-width:0;margin-top:10px}#scanView .scan-history{position:static}}

/* The quantity-based issue and return section. */
#scanView .scan-block:has(#bulkItem){background:#fcfbf7;border:1px solid var(--staff-border);padding:24px;box-shadow:0 8px 22px rgba(38,30,9,.06)}
#scanView .scan-block:has(#bulkItem) h3{color:#201d14;font-size:18px;line-height:1.45;margin:0 0 8px}
#scanView .scan-block:has(#bulkItem) .muted{color:#6c6759;font-size:14px;line-height:1.6;margin:0 0 18px}
#scanView .scan-block:has(#bulkItem) label{display:block;color:#373329;font-weight:700;font-size:14px;margin:16px 0 7px}
#scanView .scan-block:has(#bulkItem) select,#scanView .scan-block:has(#bulkItem) input{min-height:48px;background:#faf9f5;border-color:#dcd7c9}
#scanView .scan-block:has(#bulkItem) #bulkQuantity{max-width:180px}
#scanView .scan-block:has(#bulkItem)>div:last-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:20px}
#scanView .scan-block:has(#bulkItem)>div:last-child button{min-height:48px;margin:0;padding:10px 14px;border:1px solid #d3c9a8;border-radius:10px;font-weight:700;line-height:1.4;background:#fff;color:#29251a}
#scanView .scan-block:has(#bulkItem)>div:last-child button:first-child{background:#f7c52b;border-color:#e2b21b;color:#1d190d}
#scanView .scan-block:has(#bulkItem)>div:last-child button:not(:disabled):hover{filter:brightness(.96)}
@media(max-width:480px){#scanView .scan-block:has(#bulkItem){padding:18px}#scanView .scan-block:has(#bulkItem) #bulkQuantity{max-width:none}#scanView .scan-block:has(#bulkItem)>div:last-child{grid-template-columns:1fr}}
