/* SanAi MDM v2.3.3 — user-friendly received-material bulk entry */
/* v2.3.2 — प्राप्त साहित्य पावती */
.receipt-tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 14px}
.receipt-tool{border:1px solid #cfe0df;background:#fff;border-radius:16px;padding:12px 10px;min-height:86px;text-align:left;display:flex;flex-direction:column;gap:5px;justify-content:center;box-shadow:0 5px 16px #163a3a10;color:#183f3e}
.receipt-tool strong{font-size:14px;line-height:1.25}.receipt-tool small{font-size:11px;color:#6d7d7c;line-height:1.25}.receipt-tool .ico{font-size:23px}
.receipt-tool.primary{background:linear-gradient(145deg,#e8fbf8,#f7fffe);border-color:#9edbd4}
.receipt-modal{position:fixed;inset:0;background:#102d2d99;z-index:10070;display:none;align-items:flex-end;justify-content:center;padding:0}
.receipt-modal.open{display:flex}.receipt-sheet{width:min(680px,100%);max-height:94vh;overflow:auto;background:#f8fbfb;border-radius:24px 24px 0 0;padding:18px 16px 24px;box-shadow:0 -18px 50px #0003}
.receipt-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.receipt-head h3{margin:0;font-size:19px;color:#163d3b}.receipt-head p{margin:4px 0 0;color:#6e7f7e;font-size:12px;line-height:1.4}.receipt-close{border:0;background:#e9f1f0;width:38px;height:38px;border-radius:50%;font-size:22px;color:#294b49}
.receipt-photo-box{border:1px dashed #9dbdb9;border-radius:17px;background:#fff;padding:12px}.receipt-photo-actions{display:flex;gap:8px;flex-wrap:wrap}.receipt-photo-actions label,.receipt-photo-actions button{flex:1;min-width:130px}
.receipt-previews{display:flex;gap:8px;overflow:auto;margin-top:10px}.receipt-preview{position:relative;min-width:90px;width:90px;height:112px;border-radius:12px;overflow:hidden;border:1px solid #d8e4e2;background:#eef4f3}.receipt-preview img{width:100%;height:100%;object-fit:cover}.receipt-preview button{position:absolute;top:4px;right:4px;border:0;border-radius:50%;width:24px;height:24px;background:#fff;color:#b42318;font-weight:900}
.receipt-ocr-status{margin:10px 0 0;padding:9px 10px;border-radius:12px;background:#eff8f7;color:#315b57;font-size:12px;line-height:1.45;display:none}.receipt-ocr-status.show{display:block}.receipt-ocr-status.warn{background:#fff6df;color:#765b11}
.receipt-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.receipt-grid .full{grid-column:1/-1}.receipt-grid label{font-size:12px;font-weight:700;color:#435c5a;display:block;margin-bottom:5px}.receipt-grid input{width:100%;box-sizing:border-box;border:1px solid #bfd0ce;border-radius:12px;padding:11px;background:#fff;font-size:14px}
.receipt-items{margin-top:14px}.receipt-items-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.receipt-item-row{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(100px,.8fr) 38px;gap:8px;margin-bottom:8px;align-items:center}.receipt-item-row select,.receipt-item-row input{width:100%;box-sizing:border-box;border:1px solid #bfd0ce;border-radius:11px;padding:10px;background:#fff}.receipt-item-row button{border:0;border-radius:10px;height:40px;background:#fff0ef;color:#b42318;font-weight:800}
.receipt-review-note{padding:10px 11px;border-radius:12px;background:#fff8e7;border:1px solid #f2daa1;font-size:12px;line-height:1.45;color:#6d581d;margin:12px 0}.receipt-actions{display:flex;gap:9px;flex-wrap:wrap}.receipt-actions .btn{flex:1;min-width:150px}
.receipt-archive-list{display:flex;flex-direction:column;gap:10px}.receipt-card{background:#fff;border:1px solid #d8e5e3;border-radius:16px;padding:12px;box-shadow:0 5px 15px #163a3a0d}.receipt-card-top{display:flex;justify-content:space-between;gap:10px}.receipt-card strong{color:#173f3d}.receipt-card small{display:block;color:#71817f;margin-top:3px;line-height:1.4}.receipt-card-items{margin-top:8px;padding-top:8px;border-top:1px dashed #d8e3e2;font-size:12px;color:#395653;line-height:1.55}.receipt-card-actions{display:flex;gap:8px;margin-top:10px}.receipt-card-actions button{border:1px solid #cbdcda;background:#fff;border-radius:10px;padding:8px 11px;color:#315653;font-weight:700}.receipt-card-actions .danger{color:#b42318;border-color:#f2c8c4}.receipt-empty{padding:22px 12px;text-align:center;color:#73817f;background:#fff;border:1px dashed #d3e1df;border-radius:15px}
.receipt-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;background:#e7f7f4;color:#176e65;font-size:10px;font-weight:800}
@media(max-width:520px){.receipt-tool-grid{grid-template-columns:1fr 1fr}.receipt-tool:first-child{grid-column:1/-1;min-height:82px}.receipt-grid{grid-template-columns:1fr}.receipt-grid .full{grid-column:auto}.receipt-item-row{grid-template-columns:minmax(0,1.35fr) minmax(92px,.8fr) 36px}.receipt-sheet{max-height:96vh}}
/* v2.3.2 — Crop + visible Auto Scan progress */
.receipt-preview .crop-btn{position:absolute;left:4px;bottom:4px;right:auto;top:auto;width:auto;height:auto;border-radius:8px;padding:5px 7px;background:#ffffffed;color:#176e65;font-size:10px;font-weight:800;box-shadow:0 2px 8px #0002}
.receipt-scan-progress{margin-top:10px;padding:11px;border:1px solid #d3e5e2;border-radius:14px;background:#fbfefe;display:none}
.receipt-scan-progress.active,.receipt-scan-progress.done,.receipt-scan-progress.failed,.receipt-scan-progress.partial{display:block}
.receipt-scan-progress-top{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#244d49;font-size:12px}
.receipt-scan-track{height:8px;border-radius:999px;background:#e4eeed;overflow:hidden;margin-top:8px}
.receipt-scan-bar{height:100%;width:0;background:linear-gradient(90deg,#1d8d80,#41b6a7);border-radius:999px;transition:width .25s ease}
.receipt-scan-hint{font-size:11px;color:#6b7f7c;margin-top:7px;line-height:1.4}
.receipt-scan-progress.done{border-color:#a8ddd3;background:#effbf8}.receipt-scan-progress.failed{border-color:#f2c8c4;background:#fff5f4}.receipt-scan-progress.partial{border-color:#f2d79b;background:#fff9ea}
.receipt-scan-progress.done .receipt-scan-progress-top{color:#137163}.receipt-scan-progress.failed .receipt-scan-progress-top{color:#a33b31}.receipt-scan-progress.partial .receipt-scan-progress-top{color:#82631a}
.receipt-scan-retry{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.receipt-scan-retry .btn{flex:1;min-width:120px;font-size:11px;padding:8px}
.receipt-crop-modal{z-index:10110;align-items:center;padding:12px}.receipt-crop-sheet{border-radius:22px;max-height:96vh}
.receipt-crop-stage{position:relative;width:100%;height:min(62vh,620px);background:#152322;border-radius:16px;overflow:hidden;touch-action:none;display:flex;align-items:center;justify-content:center}
.receipt-crop-stage img{max-width:100%;max-height:100%;display:block;user-select:none;-webkit-user-drag:none}
.receipt-crop-box{position:absolute;border:2px solid #55e0ca;box-shadow:0 0 0 9999px #0007;touch-action:none;cursor:move}
.receipt-crop-box .h{position:absolute;width:22px;height:22px;border-radius:50%;background:#fff;border:3px solid #1a9a8a;box-shadow:0 2px 6px #0004}
.receipt-crop-box .nw{left:-12px;top:-12px}.receipt-crop-box .ne{right:-12px;top:-12px}.receipt-crop-box .sw{left:-12px;bottom:-12px}.receipt-crop-box .se{right:-12px;bottom:-12px}
.receipt-crop-help{font-size:11px;color:#667b78;line-height:1.45;margin:9px 2px 11px}
@media(max-width:520px){.receipt-crop-stage{height:58vh}.receipt-scan-retry .btn{min-width:100%}}

/* v2.3.3 — simplified all-items received material entry */
.received-bulk-card{margin:14px 0;padding:14px;border:1px solid #cfe4df;border-radius:20px;background:linear-gradient(180deg,#fff,#f7fbfa);box-shadow:0 8px 24px rgba(20,90,80,.06)}
.received-bulk-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.received-bulk-head b{display:block;font-size:17px;color:#183f3b}.received-bulk-head small{display:block;color:#71807e;margin-top:3px;line-height:1.35}.received-bulk-badge{background:#e5f5f1;color:#167c70;font-weight:800;border-radius:999px;padding:6px 10px;font-size:12px}
.received-bulk-list{border:1px solid #dbe7e5;border-radius:16px;overflow:hidden;background:#fff}.received-bulk-row{display:grid;grid-template-columns:minmax(110px,1fr) minmax(130px,170px);gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #edf2f1}.received-bulk-row:last-child{border-bottom:0}.received-bulk-name{font-weight:750;color:#263b39}.received-bulk-inputwrap{display:flex;flex-direction:column;align-items:stretch;gap:4px}.received-bulk-input{width:100%;box-sizing:border-box;text-align:right;font-size:17px;font-weight:800;padding:10px 12px;border:1.5px solid #bad6d1;border-radius:13px;background:#fbfefd;color:#173f3a}.received-bulk-input:focus{outline:none;border-color:#178a7d;box-shadow:0 0 0 3px rgba(23,138,125,.10)}.received-bulk-source{font-size:10px;color:#7b8b89;text-align:right;min-height:12px}.received-bulk-source.auto{color:#167c70;font-weight:700}.received-bulk-save{width:100%;margin-top:12px}.received-bulk-msg{margin-top:8px}.received-tools-compact{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0 14px}.receipt-quick{border:1px solid #d4e3e0;background:#fff;border-radius:15px;padding:10px 7px;min-height:86px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#29413e}.receipt-quick.primary{background:#eaf8f5;border-color:#9fd7cd;color:#126d64}.receipt-quick span{font-size:22px}.receipt-quick b{font-size:12px;margin-top:4px}.receipt-quick small{font-size:10px;color:#778683;margin-top:2px}.received-history-details{margin-top:8px;border:1px solid #e0e9e7;border-radius:14px;background:#fff;overflow:hidden}.received-history-details summary{padding:12px 14px;font-weight:700;color:#3d5955;cursor:pointer}.received-history-details .inward-list{padding:0 10px 10px}
@media(max-width:520px){.received-bulk-row{grid-template-columns:1fr 145px;padding:9px 10px}.received-tools-compact{grid-template-columns:repeat(3,1fr)}.receipt-quick{min-height:80px;padding:8px 5px}.receipt-quick b{font-size:11px}}
