:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#172033;background:#f5f7fb}*{box-sizing:border-box}body{margin:0}.layout{display:flex;min-height:100vh}.sidebar{width:245px;background:#10233f;color:#fff;padding:22px 14px}.brand{padding:6px 12px 24px}.brand-title{font-weight:800;font-size:20px}.brand-sub{font-size:11px;opacity:.65;margin-top:4px}nav{display:grid;gap:5px}nav a{color:#dce6f5;text-decoration:none;padding:12px;border-radius:9px;display:flex;gap:10px;align-items:center}nav a:hover,nav a.active{background:#24466f;color:#fff}.main{flex:1;min-width:0}.topbar{height:70px;background:#fff;border-bottom:1px solid #e7ebf2;display:flex;align-items:center;gap:25px;padding:0 28px}.top-search{flex:1;color:#8893a7;background:#f6f8fb;border:1px solid #edf0f5;border-radius:9px;padding:10px 14px}.user-pill{font-size:13px;color:#556175}.content{padding:28px;display:grid;gap:18px}.card{background:#fff;border:1px solid #e8edf4;border-radius:12px;padding:20px;box-shadow:0 3px 14px #10233f08}.card h2{font-size:17px;margin:0 0 16px}.kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:16px}.kpi small{display:block;color:#778298}.kpi strong{display:block;font-size:30px;margin-top:10px}.two-col{display:grid;grid-template-columns:1.4fr 1fr;gap:18px}.filters,.toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:18px}.filters input,.filters select,.settings input{padding:10px 12px;border:1px solid #d9e0eb;border-radius:8px;background:#fff;min-width:150px}.settings{max-width:700px}.settings label{display:block;margin:14px 0 6px;font-size:13px;color:#59657a}.settings input{width:100%}button{border:0;border-radius:8px;padding:10px 14px;background:#1769e0;color:#fff;cursor:pointer}button.secondary{background:#e9eef6;color:#25344d}.notice{padding:12px;border-radius:8px;background:#f0f5ff;margin:10px 0}.notice.error{background:#fff0f0;color:#9e2222}.notice.success{background:#eefaf2;color:#176c37}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:11px 9px;border-bottom:1px solid #edf0f5}th{color:#657086;font-weight:600;background:#fafbfc}.mono{font-family:ui-monospace,SFMono-Regular,monospace;font-size:12px}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#edf2f8;color:#44516a;font-size:11px}.link-btn{background:none;color:#1769e0;padding:4px}.inline-btn{margin-left:12px}.bars{display:flex;align-items:end;gap:18px;min-height:220px}.bar-item{display:flex;flex-direction:column;align-items:center;gap:6px}.bar{width:28px;background:#2e6fd8;border-radius:5px 5px 0 0}.bar-item span{font-size:11px}.status-row{display:flex;justify-content:space-between;padding:12px 4px;border-bottom:1px solid #edf0f5}.json{white-space:pre-wrap;background:#111827;color:#e6edf7;padding:16px;border-radius:9px;overflow:auto}.muted{color:#718096;font-size:13px}@media(max-width:1000px){.sidebar{width:190px}.kpis{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}}@media(max-width:700px){.layout{display:block}.sidebar{width:100%}nav{grid-template-columns:repeat(2,1fr)}.content{padding:14px}.kpis{grid-template-columns:1fr}}.login-page{min-height:100vh;display:grid;place-items:center;background:#eef3f8}.login-card{width:min(420px,92vw);background:#fff;padding:32px;border-radius:16px;box-shadow:0 12px 40px #0001}.login-card h1{margin:0 0 6px}.login-card p{color:#64748b;margin:0 0 24px}.login-card label{display:block;margin:14px 0;font-weight:600}.login-card input{display:block;width:100%;box-sizing:border-box;margin-top:7px;padding:11px;border:1px solid #cbd5e1;border-radius:8px}.login-card button{width:100%;padding:12px;border:0;border-radius:8px;cursor:pointer}.error{padding:10px;border-radius:8px;margin:12px 0;background:#fee2e2;color:#991b1b}.user-pill button{margin-left:10px}.filters{display:flex;gap:10px;margin:15px 0}.filters input{padding:9px;border:1px solid #cbd5e1;border-radius:7px}.table-wrap{overflow:auto}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;display:flex;align-items:center;justify-content:center;z-index:20}.modal{background:#fff;border-radius:12px;padding:24px;width:min(520px,92vw);box-shadow:0 20px 60px #0003;display:grid;gap:10px}.modal h3{margin:0 0 8px}.modal input,.modal select{padding:10px;border:1px solid #d7dce5;border-radius:7px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.small{padding:6px 9px;margin-right:5px}.danger-btn{border:1px solid #d55}.badge{display:inline-block;padding:4px 8px;border-radius:12px;font-size:12px}.badge.ok{background:#e8f7ed}.badge.danger{background:#fdecec}.pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px}.audit-filters{grid-template-columns:repeat(3,minmax(150px,1fr))}.notice.error{background:#fdecec;color:#9b1c1c}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.page-head h2{margin-bottom:5px}.workflow,.wizard{display:flex;gap:8px;margin:10px 0 18px}.step,.wizard>div{flex:1;padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;text-align:center;font-size:12px;color:#64748b}.step.active,.wizard>div.on{background:#eaf2ff;border-color:#9fc2f5;color:#1459ad;font-weight:700}.import-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:16px 0}.import-summary>div{padding:14px;border:1px solid #e7ebf2;border-radius:9px}.import-summary small{display:block;color:#718096}.import-summary strong{display:block;margin-top:5px;font-size:20px}.danger-text{color:#b42318}.commit-bar{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding:14px;border-top:1px solid #edf0f5}.error-list{margin-top:18px}.modal-wide{width:min(900px,94vw);max-height:88vh;overflow:auto}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h3{margin:0}.icon-btn{background:none;color:#64748b;font-size:24px;padding:2px 8px}.modal label{display:grid;gap:6px;font-size:13px;font-weight:600;color:#4b5563}.modal input,.modal select,.modal textarea{font:inherit;padding:10px;border:1px solid #d7dce5;border-radius:7px}.modal textarea{min-height:70px;resize:vertical}.select-list{max-height:250px;overflow:auto;border:1px solid #e5e7eb;border-radius:8px;padding:5px}.select-list label{display:flex;align-items:center;gap:8px;padding:8px;font-weight:400;border-bottom:1px solid #f0f2f5}.select-list label:last-child{border-bottom:0}.select-list small{margin-left:auto;color:#7a8598}.detail-form{display:grid;grid-template-columns:1.4fr 1.4fr .6fr auto;gap:8px;margin-bottom:14px}.detail-head{padding:10px;background:#f7f9fc;border-radius:8px;margin-bottom:12px}.review-box{display:flex;gap:18px;margin-top:14px;padding:12px;background:#f8fafc;border-radius:8px}.badge.validated,.badge.valid{background:#e8f7ed;color:#176c37}.badge.invalid,.badge.error{background:#fdecec;color:#9b1c1c}.badge.finalized{background:#e8f7ed;color:#176c37}.badge.open{background:#eaf2ff;color:#1459ad}.badge.closed,.badge.exchanged{background:#f1f3f6}.badge.issued{background:#eaf2ff;color:#1459ad}.badge.assigned{background:#fff6db;color:#8a5a00}.badge.in-stock{background:#e8f7ed;color:#176c37}.badge.returned,.badge.draft{background:#f1f3f6}@media(max-width:800px){.import-summary{grid-template-columns:repeat(2,1fr)}.detail-form{grid-template-columns:1fr}.commit-bar{display:grid;gap:10px}.workflow,.wizard{display:grid;grid-template-columns:1fr}}.receipt-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:12px;background:#f8fafc;border:1px solid #e8edf4;border-radius:8px;margin-bottom:14px}.receipt-meta span{font-size:13px}.print-area input,.print-area select{border:0}.print-area table,.print-area th,.print-area td{border:1px solid #cbd5e1}.print-area h2{text-align:center}.danger-btn{background:#fff;color:#b42318;border:1px solid #efb5b5}@media print{body{background:#fff}.sidebar,.topbar,.no-print{display:none!important}.main{width:100%}.content{padding:0}.card{border:0;box-shadow:none;padding:0}.print-area{display:block}.print-area h2{font-size:20px}.print-area table{font-size:12px}.receipt-meta{border:0}.receipt-meta span{font-size:12px}}.engine-cell{min-width:300px}.engine-autocomplete{position:relative}.engine-autocomplete>input{width:100%;min-width:260px;padding:9px 10px;border:1px solid #cfd8e6;border-radius:7px;background:#fff;font:inherit}.engine-autocomplete>input:focus{outline:none;border-color:#1769e0;box-shadow:0 0 0 3px #1769e01a}.engine-dropdown{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:1000;background:#fff;border:1px solid #cfd8e6;border-radius:9px;box-shadow:0 14px 30px #10233f20;max-height:300px;overflow:auto}.engine-hint{padding:7px 10px;font-size:11px;color:#718096;background:#f8fafc;border-bottom:1px solid #edf0f5}.engine-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px 12px;border-radius:0;background:#fff;color:#172033;text-align:left;border-bottom:1px solid #f0f2f5}.engine-option:hover,.engine-option.active{background:#eaf2ff;color:#1459ad}.engine-option small{color:#718096;font-size:11px;white-space:nowrap}.engine-empty{padding:12px;color:#718096;font-size:12px}.engine-option .mono{font-size:12px}.engine-dropdown-fixed{position:fixed!important;overflow-y:auto;overflow-x:hidden;min-width:360px;max-width:min(620px,calc(100vw - 16px))}.engine-dropdown-fixed .engine-option{white-space:nowrap}.engine-dropdown-fixed .engine-option .mono{overflow:hidden;text-overflow:ellipsis}@media(max-width:700px){.engine-dropdown-fixed{min-width:280px;max-width:calc(100vw - 16px)}}.receipt-entry-page,.receipt-history-page{max-width:1500px;margin:0 auto;width:100%}.module-header{display:flex;justify-content:space-between;align-items:flex-start;gap:28px;margin-bottom:18px;padding:4px 2px}.module-header h1{margin:3px 0 7px;font-size:24px;line-height:1.2;color:#14233b;letter-spacing:-.2px}.module-header p{margin:0;max-width:1050px;color:#718096;font-size:13px;line-height:1.65}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.08em;color:#1769e0;margin-bottom:5px}.primary-btn{min-width:130px;white-space:nowrap;box-shadow:0 5px 12px #1769e01c}.module-tabs{display:flex;gap:6px;border-bottom:1px solid #dfe6ef;margin-bottom:18px}.module-tab{position:relative;display:flex;align-items:center;gap:8px;padding:11px 18px;background:transparent;color:#66758c;border:0;border-bottom:2px solid transparent;border-radius:7px 7px 0 0;font-weight:600}.module-tab span{font-size:13px}.module-tab small{font-size:11px;font-weight:400;color:#97a2b3}.module-tab:hover{background:#f7f9fc;color:#1769e0}.module-tab.active{background:#f0f6ff;color:#1459ad;border-bottom-color:#1769e0}.receipt-editor,.receipt-detail-card{margin-top:0}.receipt-entry-page>.card{box-shadow:0 2px 10px #10233f0a}.receipt-editor{padding:22px}.receipt-editor>.page-head h2{font-size:18px}.receipt-editor .detail-form{grid-template-columns:1.05fr .9fr 1fr .7fr;gap:15px 18px;margin:18px 0}.receipt-editor label{font-size:12px;font-weight:700;color:#526176}.receipt-editor input,.receipt-editor select,.receipt-editor textarea{margin-top:7px;width:100%;min-height:40px;padding:9px 11px;border:1px solid #d4ddea;border-radius:7px;background:#fff;color:#1f2f46;font:inherit;transition:border-color .15s,box-shadow .15s}.receipt-editor textarea{min-height:70px;resize:vertical}.receipt-editor input:focus,.receipt-editor select:focus,.receipt-editor textarea:focus{outline:0;border-color:#6fa4ec;box-shadow:0 0 0 3px #1769e014}.receipt-editor .page-head{align-items:center}.receipt-editor .page-head h2{margin:0}.receipt-editor .table-wrap{border:1px solid #e1e7ef;border-radius:9px;overflow:auto}.receipt-editor table th{background:#f7f9fc;color:#617087;font-size:11px;text-transform:uppercase;letter-spacing:.02em}.receipt-editor table td{vertical-align:middle}.receipt-editor table input,.receipt-editor table select{margin:0;min-height:38px}.receipt-editor .engine-autocomplete>input{min-width:260px}.receipt-editor .commit-bar{margin-top:16px;padding:15px 0 0;border-top:1px solid #e8edf4}.receipt-detail-card{padding:24px}.receipt-detail-card>.page-head h2{font-size:19px}.receipt-detail-card>.page-head p{margin:5px 0;color:#617087;font-size:13px}.receipt-detail-card .toolbar{margin:16px 0}.receipt-detail-card .toolbar button{box-shadow:none}.receipt-detail-card table{border:1px solid #dfe6ef;border-radius:8px;overflow:hidden}.receipt-detail-card th{background:#f7f9fc}.receipt-detail-card td,.receipt-detail-card th{border:1px solid #dfe6ef}.receipt-detail-card .receipt-meta{background:#f7f9fc;border-color:#e2e8f0}.receipt-detail-card .review-box{background:#f8fafc;border:1px solid #e7ecf3}.receipt-history-page .history-card{padding:0;overflow:hidden}.history-toolbar{display:flex;align-items:center;gap:10px;padding:18px;border-bottom:1px solid #e7ecf3;background:#fff}.search-box{display:flex;align-items:center;flex:1;min-width:320px;border:1px solid #d4ddea;border-radius:8px;background:#fff;overflow:hidden}.search-icon{padding-left:12px;color:#8b97a9;font-size:18px}.search-box input{flex:1;border:0;outline:0;padding:10px;font:inherit;color:#1f2f46;min-width:0}.search-btn{border-radius:0;padding:10px 17px}.status-filter,.refresh-btn{height:40px;border:1px solid #d4ddea;border-radius:8px;background:#fff;color:#34445c;padding:0 12px;font:inherit}.refresh-btn{background:#f6f8fb}.refresh-btn:disabled{opacity:.6;cursor:default}.history-summary{display:flex;align-items:center;gap:35px;padding:14px 18px;background:#fbfcfe;border-bottom:1px solid #edf1f5}.history-summary>div:not(.summary-note){min-width:120px}.summary-label{display:block;font-size:11px;color:#8a96a8;text-transform:uppercase;letter-spacing:.04em}.history-summary strong{display:block;margin-top:3px;font-size:17px;color:#1b2b43}.summary-note{margin-left:auto;font-size:12px;color:#8995a7}.history-table-wrap{overflow:auto}.history-table{min-width:900px}.history-table th{height:46px;background:#f7f9fc;color:#617087;font-size:11px;text-transform:uppercase;letter-spacing:.03em;border-bottom:1px solid #dfe6ef}.history-table td{padding:13px 12px;border-bottom:1px solid #edf1f5;vertical-align:middle}.history-table tbody tr:hover{background:#fbfdff}.col-number{width:150px}.col-qty{width:70px;text-align:center}.col-action{width:125px}.receipt-link{padding:0;background:none;color:#1459ad;font-weight:800;border:0}.receipt-link:hover{text-decoration:underline}.model-cell{display:flex;flex-direction:column;gap:3px}.model-cell b{font-weight:650;color:#26364e}.model-cell small{font-size:11px;color:#8a96a8}.lot-pill{display:inline-block;padding:4px 8px;border-radius:6px;background:#f0f4f8;color:#526176;font-size:11px;font-weight:700}.qty-cell{text-align:center;font-weight:700;color:#26364e}.status-text{font-size:12px;color:#526176}.action-cell{text-align:right}.open-btn{padding:7px 10px;background:#eef5ff;color:#1459ad;border:1px solid #cfe0fa;font-size:12px;font-weight:650}.open-btn:hover{background:#e4efff}.history-footer{display:flex;align-items:center;justify-content:space-between;padding:13px 18px;border-top:1px solid #e7ecf3;color:#7a8799;font-size:12px}.pager{display:flex;align-items:center;gap:8px}.pager button{padding:7px 11px;background:#fff;color:#40506a;border:1px solid #d7dfeb}.pager button:disabled{opacity:.45;cursor:default}.empty-state{height:230px;text-align:center;color:#7b8799}.empty-state b,.empty-state span{display:block}.empty-state b{margin-top:8px;color:#4b5a70}.empty-icon{font-size:28px;color:#a6b0bf;margin-top:40px}@media(max-width:1050px){.receipt-editor .detail-form{grid-template-columns:repeat(2,1fr)}.module-header{gap:16px}.history-toolbar{flex-wrap:wrap}.search-box{min-width:280px}.status-filter{flex:1}.refresh-btn{flex:none}}@media(max-width:700px){.module-header{display:block}.module-header .primary-btn{margin-top:14px}.module-tabs{overflow:auto}.module-tab{white-space:nowrap;padding:10px 13px}.module-tab small{display:none}.receipt-editor .detail-form{grid-template-columns:1fr}.history-toolbar{padding:12px}.search-box{min-width:100%;order:1}.status-filter{min-width:0;width:100%;order:2}.refresh-btn{order:3}.history-summary{gap:16px;flex-wrap:wrap}.summary-note{width:100%;margin-left:0}.history-footer{display:block}.pager{margin-top:10px;justify-content:flex-end}}@media print{.module-header,.module-tabs{display:none!important}}
