:root{
  --ink:#172033;--muted:#718096;--line:#e7eaf0;--surface:#fff;--canvas:#f3f5f9;
  --nav:#101827;--nav-soft:#192337;--blue:#2563eb;--blue-dark:#1d4ed8;
  --violet:#7c3aed;--green:#059669;--orange:#e7860b;--red:#dc3545;
  --shadow:0 12px 34px rgba(32,48,78,.08);--radius:18px
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{background:var(--canvas)}
body{margin:0;min-height:100vh;background:var(--canvas);color:var(--ink);font:14px Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select,textarea{font:inherit}
button{cursor:pointer}

.sidebar{position:fixed;inset:0 auto 0 0;width:268px;padding:26px 18px 20px;display:flex;flex-direction:column;color:#d7deea;background:
  radial-gradient(circle at 10% 0%,rgba(37,99,235,.19),transparent 31%),linear-gradient(180deg,#111a2b 0%,#0c1320 100%);z-index:10}
.brand{display:flex;align-items:center;gap:13px;padding:0 8px;margin-bottom:38px}
.brandMark{width:45px;height:45px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,#3579f6,#1e55c8);box-shadow:0 10px 24px #1350c342;color:white;font-weight:900;letter-spacing:-.5px}
.brandText{display:grid;gap:3px}.brandText b{font-size:17px;color:white}.brandText small{font-size:9px;color:#7184a3;font-weight:800;letter-spacing:1.6px}
.navLabel{padding:0 13px;margin-bottom:10px;color:#52627d;font-size:9px;font-weight:900;letter-spacing:1.5px}
nav{display:grid;gap:7px}
nav button,.sidebarBottom>button{width:100%;border:1px solid transparent;background:transparent;color:#8493aa;border-radius:12px;padding:12px 13px;display:flex;align-items:center;gap:12px;text-align:left;font-weight:700;transition:.18s ease}
nav button:hover{background:#ffffff0b;color:#dfe7f4}
nav button.active{background:linear-gradient(100deg,#2563eb,#3878f2);color:white;box-shadow:0 10px 24px #0b3d9f4d}
.navIcon{width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:#ffffff0a;font-size:17px}
nav button.active .navIcon{background:#ffffff1c}
.sidebarBottom{margin-top:auto;display:grid;gap:11px}
.localStatus{padding:12px 13px;display:flex;align-items:center;gap:10px;border:1px solid #ffffff0b;border-radius:12px;background:#ffffff06}
.localStatus>span,.onlinePill>span{width:8px;height:8px;border-radius:50%;background:#2ed49a;box-shadow:0 0 0 5px #2ed49a18}
.localStatus div{display:grid;gap:2px}.localStatus b{font-size:12px;color:#c8d3e3}.localStatus small{font-size:10px;color:#63738b}
.sidebarBottom>button{background:#ffffff09;color:#b8c4d5}.sidebarBottom>button:hover{background:#ffffff12;color:white}
#authButton.connected{background:#0b493c;color:#8df0cc;border-color:#19745e}
.sidebarFoot{padding:9px 13px 0;border-top:1px solid #ffffff0b;color:#53627a;font-size:10px}.sidebarFoot b{color:#8090a8}

main{margin-left:268px;width:calc(100% - 268px);padding:36px 42px 55px}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:25px;margin-bottom:30px}
.eyebrow,.sectionTag{display:block;margin-bottom:7px;color:#4770b5;font-size:9px;font-weight:900;letter-spacing:1.6px}
h1,h2,p{margin-top:0}.titleBlock h1{margin-bottom:6px;font-size:30px;letter-spacing:-.8px}.titleBlock p,.panelhead p,.sectionIntro p,.formHeader p,.cameraHeader p,.modalHead p{margin-bottom:0;color:var(--muted)}
.headerActions{display:flex;align-items:center;gap:13px}.onlinePill{display:flex;align-items:center;gap:10px;padding:10px 13px;border:1px solid var(--line);border-radius:99px;background:#fff;color:#657386;font-size:11px;font-weight:700}
.primary,.secondary,.danger,.warningConfirm{border:0;border-radius:10px;padding:11px 16px;font-weight:800;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.primary{background:linear-gradient(135deg,var(--blue),#397af4);color:white;box-shadow:0 8px 18px #2563eb28}.primary:hover{transform:translateY(-1px);box-shadow:0 11px 24px #2563eb38}.primary:active,.secondary:active,.danger:active,.warningConfirm:active{transform:scale(.98)}
.secondary{background:#eef1f6;color:#46536a}.secondary:hover{background:#e5e9f0}
.danger{background:#fff0f2;color:#c62d3a}.danger:hover{background:#dc3545;color:white}
.scanCta{display:flex;align-items:center;gap:9px;padding:13px 18px}.scanCta span{font-size:18px}

.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:22px}
.statCard{position:relative;overflow:hidden;min-height:144px;padding:22px;display:flex;align-items:center;gap:18px;border:1px solid #e5e9f0;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.statCard:after{content:"";position:absolute;width:110px;height:110px;border-radius:50%;right:-46px;top:-52px;opacity:.08;background:currentColor}
.statIcon{width:52px;height:52px;flex:0 0 auto;display:grid;place-items:center;border-radius:15px;font-size:23px;font-weight:800}
.statCard>div:last-child{display:grid}.statCard small{font-size:9px;font-weight:900;letter-spacing:1.2px;color:#8591a3}.statCard strong{font-size:33px;line-height:1.05;margin:8px 0 4px;letter-spacing:-1px}.statCard span{font-size:11px;color:#8691a1}
.statCard.blue{color:var(--blue)}.statCard.blue .statIcon{background:#eaf1ff}.statCard.violet{color:var(--violet)}.statCard.violet .statIcon{background:#f2eaff}.statCard.green{color:var(--green)}.statCard.green .statIcon{background:#e5f8f1}

.panel{border:1px solid #e5e9f0;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.stockPanel,.historyPanel{overflow:hidden}.panelhead{padding:23px 25px 20px;display:flex;justify-content:space-between;align-items:center;gap:25px;border-bottom:1px solid #edf0f4}
.panelhead h2,.sectionIntro h2,.formHeader h2,.cameraHeader h2{margin-bottom:5px;font-size:20px;letter-spacing:-.35px}
.searchBox{width:min(360px,40%);height:44px;padding:0 13px;display:flex;align-items:center;gap:9px;border:1px solid #dce2ea;border-radius:12px;background:#f8f9fb;transition:.15s}
.searchBox:focus-within{border-color:#8bb0ff;box-shadow:0 0 0 4px #2563eb12;background:white}.searchBox>span{color:#8a96a7;font-size:19px}.searchBox input{border:0;padding:0;background:transparent;outline:0;width:100%}
.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse}thead{background:#fafbfc}th{padding:13px 14px;text-align:left;color:#8893a3;font-size:9px;font-weight:900;letter-spacing:.9px;border-bottom:1px solid #e9edf2;white-space:nowrap}td{padding:15px 14px;border-bottom:1px solid #edf0f4;vertical-align:middle}tbody tr{transition:background .15s}tbody tr:hover{background:#f8faff}tbody tr:last-child td{border-bottom:0}
.ref{font-weight:850;color:#1f63da;letter-spacing:.2px}.refLink{padding:5px 0;border:0;background:none;text-decoration:none}.refLink:hover{text-decoration:underline;text-underline-offset:3px}.badge{display:inline-block;margin:2px;padding:5px 8px;border:1px solid #d9e5ff;border-radius:7px;background:#edf4ff;color:#2d65c4;font-size:11px}.qty{font-size:15px;font-weight:900}
.photoButton{width:60px;height:46px;padding:0;border:1px solid #dbe2eb;border-radius:10px;background:#f4f6f9;overflow:hidden;cursor:zoom-in;transition:.15s}.photoButton:hover{transform:scale(1.05);border-color:#6f9cf7;box-shadow:0 7px 16px #2563eb20}.photoButton img{width:100%;height:100%;display:block;object-fit:cover}.noPhoto{color:#b2bac5}
.partComment{display:-webkit-box;width:210px;max-width:210px;max-height:34px;overflow:hidden;color:#667387;font-size:12px;line-height:17px;white-space:normal;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
.actions{white-space:nowrap}.actionGroup{display:flex;align-items:center;gap:6px}.mini{border:1px solid transparent;border-radius:9px;padding:8px 10px;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;font-size:11px;font-weight:800;transition:.15s}.mini:hover{transform:translateY(-1px)}.mini:active{transform:scale(.97)}
.quantityButton{min-width:40px;background:#f5f7fa;border-color:#dfe4eb;color:#3f4b5d}.quantityButton span{font-size:16px;line-height:10px}.quantityButton b{font-size:10px}.qtyAdd:hover{background:#e6f8f0;border-color:#a7dfc6;color:#087347}.qtyRemove:hover{background:#fff5df;border-color:#efce8c;color:#9d5b05}
.view{background:#f1edff;border-color:#ddd2ff;color:#6842c2}.view:hover{background:#7149ce;border-color:#7149ce;color:white;box-shadow:0 7px 16px #7149ce26}.view span{font-size:13px}
.edit{background:#eaf2ff;border-color:#cbdcff;color:#1e61d6}.edit:hover{background:#2563eb;border-color:#2563eb;color:white;box-shadow:0 7px 16px #2563eb2a}.edit span,.dangerText span{font-size:14px}.dangerText{background:#fff0f2;border-color:#f1cbd0;color:#bd2b38}.dangerText:hover{background:#dc3545;border-color:#dc3545;color:#fff;box-shadow:0 7px 16px #dc35452b}
.empty{min-height:285px;padding:45px 20px;display:grid;place-items:center;align-content:center;gap:8px;text-align:center;color:#8692a3}.emptyIcon{width:56px;height:56px;display:grid;place-items:center;margin-bottom:5px;border-radius:16px;background:#eef3ff;color:#3870da;font-size:27px}.empty b{color:#374357;font-size:16px}.empty .primary{margin-top:10px}

.sectionIntro{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin-bottom:21px}.sectionIntro>div:first-child{max-width:720px}.stepPill{padding:10px 14px;display:flex;align-items:center;gap:8px;border:1px solid #dfe4eb;border-radius:99px;background:white;color:#7a8799;font-size:10px;font-weight:750}.stepPill b{width:20px;height:20px;display:grid;place-items:center;border-radius:50%;background:#e9f1ff;color:#2563eb}.stepPill i{width:20px;height:1px;background:#d9dfe8}
.scanGrid{display:grid;grid-template-columns:minmax(360px,.9fr) minmax(460px,1.1fr);gap:21px;align-items:start}
.camera,.validationPanel{padding:24px}.cameraHeader,.formHeader{display:flex;align-items:center;gap:14px;margin-bottom:22px}.cameraHeader .scanIcon,.modalTitleIcon{width:48px;height:48px;flex:0 0 auto;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,#e9f1ff,#f5f8ff);color:#2563eb;font-size:24px;font-weight:800}.formHeader{justify-content:space-between;align-items:flex-start}.secureBadge{padding:7px 9px;border-radius:99px;background:#e9f8f1;color:#08764a;font-size:9px;font-weight:850;white-space:nowrap}
.uploadZone{min-height:220px;padding:30px 20px;display:grid;place-items:center;align-content:center;gap:8px;border:1.5px dashed #9bb8ed;border-radius:15px;background:linear-gradient(145deg,#f8fbff,#eef4ff);color:#3d4b61;text-align:center;cursor:pointer;transition:.18s}.uploadZone:hover{transform:translateY(-2px);border-color:#2563eb;box-shadow:0 12px 25px #2563eb12}.uploadZone .uploadIcon{width:58px;height:58px;display:grid;place-items:center;margin-bottom:4px;border-radius:17px;background:white;box-shadow:0 9px 22px #2e5da91b;font-size:25px}.uploadZone b{font-size:14px}.uploadZone small{color:#8793a4}
.camera #preview{display:block;width:100%;max-height:360px;margin:18px auto 14px;border-radius:14px;object-fit:contain;background:#eef1f5}.hint{margin-top:14px;color:#7e8999;font-size:11px;text-align:center}.progress{height:7px;margin-top:12px;border-radius:99px;background:#e8ecf2;overflow:hidden}.progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2563eb,#6a8fff);transition:width .2s}.camera details{margin-top:16px;color:#68768a}.camera summary{cursor:pointer;font-size:11px;font-weight:700}.camera pre{max-height:170px;padding:12px;overflow:auto;border-radius:10px;background:#f5f7fa;white-space:pre-wrap;font-size:10px}
.photoCount{width:max-content;margin:0 auto 7px;padding:6px 10px;border-radius:99px;background:#e9f8f1;color:#08764a;font-size:10px;font-weight:850}
.form{display:grid;gap:14px}.form label,.editForm label{display:grid;gap:7px;color:#4d596b;font-size:12px;font-weight:750}.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:13px}
input,select,textarea{width:100%;min-width:0;padding:11px 12px;border:1px solid #dce2ea;border-radius:10px;background:#fbfcfd;color:var(--ink);outline:0;transition:.15s}input:focus,select:focus,textarea:focus{border-color:#7fa8fa;box-shadow:0 0 0 4px #2563eb11;background:white}textarea{resize:vertical}.full{width:100%}.saveStock{margin-top:4px;padding:14px}.saveStock span{margin-right:5px}
#msg,#editMsg,#loginMsg{font-weight:750}.ok{color:#07804e}.err{color:#c83340}.warn{color:#9b6209}
.confidence{padding:11px 13px;border-radius:10px;background:#f1f6ff;font-size:11px;font-weight:800}.confidence.ok{color:#087247;background:#e9f8f1}.confidence.warn{color:#9b6209;background:#fff5dd}.refreshButton{border:1px solid #dce2ea;background:white}.historyPanel{min-height:330px}

.modal{position:fixed;inset:0;z-index:30;padding:20px;display:grid;place-items:center;background:rgba(8,15,27,.72);backdrop-filter:blur(5px)}
.modalCard{width:min(650px,100%);max-height:calc(100vh - 40px);padding:26px;overflow:auto;border:1px solid #ffffff5c;border-radius:20px;background:white;box-shadow:0 28px 90px #0006;animation:modalEnter .22s ease-out}.loginCard{width:min(460px,100%)}.editCard{width:min(680px,100%)}
.modalHead{display:flex;align-items:flex-start;gap:13px;margin-bottom:22px}.modalHead>div:nth-child(2){flex:1}.modalHead h2{margin-bottom:5px}.close{width:37px;height:37px;flex:0 0 auto;border:0;border-radius:10px;background:#eef1f5;color:#536074;font-size:23px;line-height:1}.close:hover{background:#e2e7ee;color:#1f2937}.editForm{display:grid;gap:14px}.modalActions{display:grid;grid-template-columns:auto 1fr auto auto;gap:9px;margin-top:7px}
.editPhotoBox{padding:13px;display:flex;align-items:center;gap:14px;border:1px solid #e6eaf0;border-radius:13px;background:#f7f9fb}.editPhotoBox>img{width:126px;height:92px;object-fit:cover;border-radius:10px;background:#e6eaf0;cursor:zoom-in}.editPhotoBox>div{display:grid;gap:8px}.photoChoice{display:inline-block;text-align:center;font-size:11px}.editPhotoBox button{font-size:11px}
.photoManager{padding:14px;border:1px solid #e2e7ee;border-radius:14px;background:#f7f9fb}.photoManagerHead{display:flex;align-items:center;justify-content:space-between;gap:15px}.photoManagerHead>div{display:grid;gap:3px}.photoManagerHead b{font-size:12px}.photoManagerHead small{color:#8b96a6;font-size:9px}.photoChoice{cursor:pointer}.editPhotoGallery{margin-top:13px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.editPhotoItem{position:relative;height:90px;overflow:hidden;border:1px solid #dfe4eb;border-radius:10px;background:white}.editPhotoItem img{width:100%;height:100%;display:block;object-fit:cover;cursor:zoom-in}.editPhotoItem>button{position:absolute;right:5px;top:5px;width:25px;height:25px;padding:0;border:0;border-radius:8px;background:#172033d9;color:white;font-size:18px;line-height:1}.editPhotoItem>button:hover{background:#dc3545}.editPhotoItem>small{position:absolute;left:5px;bottom:5px;padding:3px 5px;border-radius:5px;background:#2563eb;color:white;font-size:7px;font-weight:900;letter-spacing:.5px}.editPhotoEmpty{margin-top:13px;padding:20px;border:1px dashed #ccd4df;border-radius:10px;color:#909baa;text-align:center;font-size:10px}

.duplicateModal{z-index:35}.duplicateCard{width:min(530px,100%);padding:30px;border-radius:21px;background:white;text-align:center;box-shadow:0 28px 90px #0006;animation:modalEnter .22s ease-out}.warningIcon{width:62px;height:62px;margin:0 auto 12px;display:grid;place-items:center;border:6px solid #fff6e6;border-radius:50%;background:#ffe8bd;color:#c66c00;font-size:31px;font-weight:900;animation:warningPulse 1.5s ease-in-out infinite}.warningEyebrow{margin-bottom:7px;color:#bf6800;font-size:10px;font-weight:900;letter-spacing:1.8px}.duplicateCard h2{margin-bottom:9px;font-size:25px}.duplicateCard>p{color:#718096;line-height:1.5}.duplicateCard>p strong{color:#2563eb}.duplicateSummary{margin:22px 0;padding:15px;display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:9px;border:1px solid #e6eaf0;border-radius:13px;background:#f7f9fb}.duplicateSummary div{display:grid;gap:5px}.duplicateSummary small{color:#8793a4;font-size:8px;font-weight:900}.duplicateSummary strong{font-size:25px}.duplicateSummary>span{color:#a0aaba;font-size:19px}.duplicateSummary .duplicateTotal{padding:9px 5px;border-radius:9px;background:#fff0d3}.duplicateTotal strong{color:#bc6500}.duplicateQuestion{font-size:12px}.duplicateActions{margin-top:21px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.warningConfirm{background:linear-gradient(135deg,#ec941d,#dd7903);color:white;box-shadow:0 8px 18px #df82032a}
.deleteModal{z-index:36}.deleteCard{width:min(550px,100%);padding:30px;border:1px solid #ffffff70;border-radius:21px;background:white;text-align:center;box-shadow:0 28px 90px #0007;animation:modalEnter .22s ease-out}.deleteIcon{width:64px;height:64px;margin:0 auto 13px;display:grid;place-items:center;border:6px solid #fff0f2;border-radius:50%;background:#ffdce1;color:#c82f3d;animation:deletePulse 1.7s ease-in-out infinite}.deleteIcon span{font-size:36px;font-weight:300;line-height:1;transform:translateY(-2px)}.deleteEyebrow{margin-bottom:7px;color:#c42d3b;font-size:9px;font-weight:900;letter-spacing:1.8px}.deleteCard h2{margin-bottom:8px;font-size:25px}.deleteCard>p{margin-bottom:20px;color:#718096;line-height:1.5}.deletePartSummary{padding:4px 15px;border:1px solid #e7eaf0;border-radius:13px;background:#f8f9fb;text-align:left}.deletePartSummary>div{padding:12px 0;display:grid;grid-template-columns:105px 1fr;align-items:center;gap:12px;border-bottom:1px solid #e7eaf0}.deletePartSummary>div:last-child{border-bottom:0}.deletePartSummary small{color:#8994a4;font-size:8px;font-weight:900;letter-spacing:.8px}.deletePartSummary strong{overflow:hidden;color:#273247;text-overflow:ellipsis;white-space:nowrap}.deletePartSummary>div:first-child strong{color:#2563eb}.deleteWarning{margin-top:13px;padding:11px 12px;display:flex;align-items:center;gap:10px;border-radius:10px;background:#fff4f5;color:#a82b36;text-align:left}.deleteWarning>span{width:24px;height:24px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:#ffd9dd;font-weight:900}.deleteWarning p{margin:0;font-size:10px;line-height:1.4}.deleteActions{margin-top:21px;display:grid;grid-template-columns:1fr 1.25fr;gap:10px}.deleteConfirm{border:0;padding:12px 15px;border-radius:10px;background:linear-gradient(135deg,#e04451,#c92f3c);color:white;font-weight:850;box-shadow:0 8px 18px #d333402b;transition:.15s}.deleteConfirm:hover{transform:translateY(-1px);box-shadow:0 12px 23px #d3334038}.deleteConfirm span{margin-right:5px;font-size:18px;font-weight:400}
.detailModal{z-index:34;align-items:start;overflow:auto}.detailCard{width:min(850px,100%);margin:auto;padding:27px;border:1px solid #ffffff70;border-radius:22px;background:#f7f9fc;box-shadow:0 30px 100px #0008;animation:modalEnter .22s ease-out}.detailTop{padding:2px 2px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.detailTop h2{margin-bottom:5px;color:#1e61d6;font-size:27px;letter-spacing:-.5px}.detailTop p{margin:0;color:#58667a;font-size:15px;font-weight:700}.detailTopActions{display:flex;align-items:center;gap:8px}.detailEdit,.detailDelete{border:1px solid transparent;border-radius:10px;padding:10px 13px;font-size:11px;font-weight:850;transition:.15s}.detailEdit{border-color:#cbdcff;background:#eaf2ff;color:#1e61d6}.detailEdit:hover{background:#2563eb;color:white}.detailDelete{border-color:#f1cbd0;background:#fff0f2;color:#bd2b38}.detailDelete:hover{background:#dc3545;color:white}.detailHero{display:grid;grid-template-columns:minmax(250px,.9fr) minmax(300px,1.1fr);gap:15px}.detailPhotoBox{min-height:235px;display:grid;place-items:center;overflow:hidden;border:1px solid #e1e6ee;border-radius:16px;background:white}.detailPhotoBox>img{display:block;width:100%;height:235px;object-fit:contain;background:#edf0f4;cursor:zoom-in}.detailGallery{margin-top:8px;display:flex;gap:7px;overflow:auto;padding-bottom:2px}.detailGallery:empty{display:none}.detailGallery button{position:relative;width:54px;height:45px;flex:0 0 auto;padding:0;overflow:hidden;border:2px solid transparent;border-radius:8px;background:#e8ecf2;opacity:.72}.detailGallery button.active{border-color:#2563eb;opacity:1;box-shadow:0 4px 10px #2563eb26}.detailGallery img{width:100%;height:100%;display:block;object-fit:cover}.detailGallery span{position:absolute;right:2px;bottom:2px;min-width:15px;height:15px;padding:0 3px;display:grid;place-items:center;border-radius:5px;background:#172033d9;color:white;font-size:7px;font-weight:900}.detailNoPhoto{display:grid;place-items:center;gap:8px;color:#98a3b2}.detailNoPhoto span{width:60px;height:60px;display:grid;place-items:center;border-radius:17px;background:#eef3ff;color:#3870da;font-size:26px}.detailMetrics{display:grid;grid-template-columns:1fr 1fr;gap:15px}.detailMetrics article{position:relative;overflow:hidden;padding:23px;display:grid;align-content:center;border:1px solid #e1e6ee;border-radius:16px;background:white}.detailMetrics article:first-child{background:linear-gradient(145deg,#ffffff,#edf4ff)}.detailMetrics article:last-child{background:linear-gradient(145deg,#ffffff,#f3efff)}.detailMetrics small,.detailInfoGrid small{color:#8994a4;font-size:8px;font-weight:900;letter-spacing:1px}.detailMetrics strong{margin:10px 0 4px;color:#2563eb;font-size:34px;line-height:1}.detailMetrics article:last-child strong{color:#7044c8;font-size:22px}.detailMetrics span{color:#8793a4;font-size:10px}.detailInfoGrid{margin-top:15px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.detailInfoGrid article{min-width:0;padding:15px;border:1px solid #e3e7ee;border-radius:13px;background:white}.detailInfoGrid strong{display:block;margin-top:8px;overflow:hidden;color:#344157;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.detailComment,.detailHistory{margin-top:15px;padding:18px;border:1px solid #e1e6ee;border-radius:16px;background:white}.detailSectionTitle{display:flex;align-items:center;gap:10px}.detailSectionTitle>span{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#edf3ff;color:#2765d8;font-size:17px}.detailSectionTitle>div{display:grid;gap:2px}.detailSectionTitle b{font-size:13px}.detailSectionTitle small{color:#909baa;font-size:9px}.detailComment>p{margin:14px 0 0;padding:13px;border-radius:10px;background:#f7f9fb;color:#5f6d80;line-height:1.55;white-space:pre-wrap}.detailTimeline{margin-top:15px}.timelineItem{position:relative;padding:10px 0 10px 28px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:15px;border-bottom:1px solid #edf0f4}.timelineItem:last-child{border-bottom:0}.timelineDot{position:absolute;left:3px;width:11px;height:11px;border:3px solid white;border-radius:50%;box-shadow:0 0 0 2px currentColor}.timelineDot.plus{color:#0a9a63;background:#0a9a63}.timelineDot.minus{color:#dc3545;background:#dc3545}.timelineDot.neutral{color:#8793a4;background:#8793a4}.timelineItem>div{display:grid;gap:3px}.timelineItem b{font-size:11px}.timelineItem small{color:#8a95a5;font-size:9px}.timelineItem>strong{min-width:40px;padding:5px 7px;border-radius:7px;text-align:center}.timelineItem>strong.plus{background:#e6f8f0;color:#07804e}.timelineItem>strong.minus{background:#fff0f2;color:#c62f3c}.timelineItem>strong.neutral{background:#eef1f5;color:#667386}.detailHistoryEmpty{padding:25px 0 8px;color:#929cab;text-align:center;font-size:11px}
.photoModal{z-index:40;padding:14px}.largePhotoCard{width:min(1120px,100%);max-height:calc(100vh - 28px);display:flex;flex-direction:column;overflow:hidden;border-radius:17px;background:#0b1019;box-shadow:0 28px 95px #000b}.largePhotoHead{padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:white}.largePhotoHead strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.largePhotoCard>img{display:block;width:100%;max-height:calc(100vh - 88px);object-fit:contain;background:#070a0f}

@keyframes modalEnter{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes warningPulse{0%,100%{transform:scale(1);box-shadow:0 0 0 0 #e99a2444}50%{transform:scale(1.06);box-shadow:0 0 0 10px #e99a2400}}
@keyframes deletePulse{0%,100%{transform:scale(1);box-shadow:0 0 0 0 #dc35452e}50%{transform:scale(1.055);box-shadow:0 0 0 10px #dc354500}}

@media(max-width:1100px){
  main{padding:30px 25px 45px}.stats{gap:12px}.statCard{padding:18px;gap:12px}.statIcon{width:45px;height:45px}.scanGrid{grid-template-columns:1fr}.camera #preview{max-height:420px}.actionGroup{gap:4px}.mini{padding:8px}.view,.edit,.dangerText{font-size:0}.view span,.edit span,.dangerText span{font-size:15px}.detailInfoGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:780px){
  body{display:block}.sidebar{width:100%;height:72px;bottom:auto;padding:10px 13px;flex-direction:row;align-items:center}.brand{margin:0;padding:0}.brandMark{width:41px;height:41px;border-radius:12px}.brandText{display:none}.navLabel,.localStatus,.sidebarFoot{display:none}nav{margin-left:auto;display:flex;gap:4px}nav button{width:auto;padding:9px;gap:0}nav button>span:last-child{display:none}.navIcon{font-size:18px}.sidebarBottom{margin:0 0 0 4px}.sidebarBottom>button{width:auto;padding:10px;font-size:0}.sidebarBottom>button:first-letter{font-size:16px}.sidebarBottom>button span{display:none}
  main{width:100%;margin:72px 0 0;padding:22px 14px 38px}.topbar{align-items:flex-start;margin-bottom:23px}.titleBlock .eyebrow,.titleBlock p,.onlinePill{display:none}.titleBlock h1{font-size:24px;margin:4px 0}.scanCta{padding:10px 12px;font-size:11px}.scanCta span{font-size:15px}
  .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.statCard{min-height:116px;padding:13px 9px;display:block}.statIcon{width:33px;height:33px;margin-bottom:9px;border-radius:10px;font-size:16px}.statCard strong{font-size:25px;margin:5px 0 2px}.statCard small{font-size:7px}.statCard span{font-size:9px;line-height:1.2}
  .panel{border-radius:15px}.panelhead{padding:18px 15px;display:block}.panelhead h2{font-size:18px}.searchBox{width:100%;margin-top:14px}.tablewrap{font-size:11px}th,td{padding:12px 9px}#stock th:nth-child(4),#stock td:nth-child(4),#stock th:nth-child(5),#stock td:nth-child(5){display:none}.partComment{max-width:150px}
  .sectionIntro{display:block}.stepPill{margin-top:13px;width:max-content;max-width:100%}.scanGrid{grid-template-columns:minmax(0,1fr)}.camera,.validationPanel{padding:17px}.cameraHeader,.formHeader{align-items:flex-start}.secureBadge{display:none}.uploadZone{min-height:190px}.two{grid-template-columns:minmax(0,1fr)}.sectionIntro h2{font-size:19px}
  .actionGroup{gap:4px}.quantityButton{min-width:36px}.mini{padding:7px}.edit,.dangerText{font-size:0}.edit span,.dangerText span{font-size:15px}
  .modal{padding:12px}.modalCard,.duplicateCard,.deleteCard{padding:20px 16px;border-radius:16px}.modalTitleIcon{display:none}.modalActions{grid-template-columns:1fr 1fr}.modalActions span{display:none}.modalActions button{width:100%}.editPhotoBox{align-items:flex-start}.editPhotoBox>img{width:98px;height:76px}.photoManagerHead{align-items:flex-start}.photoManagerHead>div{max-width:55%}.editPhotoGallery{grid-template-columns:repeat(3,minmax(0,1fr))}.duplicateSummary{padding:11px 7px;gap:4px}.duplicateSummary small{font-size:7px}.duplicateSummary strong{font-size:20px}.duplicateSummary>span{font-size:15px}.deletePartSummary>div{grid-template-columns:90px 1fr}.deleteActions{grid-template-columns:1fr}.detailCard{padding:19px 14px;border-radius:17px}.detailTop{display:block}.detailTopActions{margin-top:14px}.detailHero{grid-template-columns:1fr}.detailPhotoBox,.detailPhotoBox>img{min-height:200px;height:200px}.detailMetrics{grid-template-columns:1fr 1fr}.detailMetrics article{padding:17px}.detailInfoGrid{grid-template-columns:1fr 1fr}.detailComment,.detailHistory{padding:14px}
}
@media(max-width:440px){
  .scanCta{font-size:0}.scanCta span{font-size:19px}.stats span{display:none}.statCard{min-height:102px}.tablewrap{margin:0 -1px}#stock th:nth-child(3),#stock td:nth-child(3),#stock th:nth-child(6),#stock td:nth-child(6){display:none}.duplicateActions{grid-template-columns:1fr}.stepPill{font-size:8px;gap:5px}
}

/* Finitions de l’interface de production */
.uiIcon,.navIcon svg,.statIcon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.statIcon svg{width:24px;height:24px}
.stockPanel .tablewrap{max-height:58vh}.stockPanel thead{position:sticky;top:0;z-index:3;box-shadow:0 1px 0 var(--line)}tbody tr:not(.skeletonRow){animation:rowReveal .28s both;animation-delay:calc(var(--row,0)*28ms)}
.qty{display:grid!important;gap:6px;justify-items:start}.qty>b{font-size:16px}.stockBadge{width:max-content;padding:4px 7px;display:inline-flex;align-items:center;gap:5px;border-radius:99px;font-size:8px;font-weight:900;white-space:nowrap}.stockBadge i{width:6px;height:6px;border-radius:50%;background:currentColor}.stockBadge.available{background:#e5f8f0;color:#08764a}.stockBadge.low{background:#fff2d7;color:#a76100}.stockBadge.out{background:#fff0f2;color:#bd2b38}
.mobileCards{display:none}.partCard{padding:14px;border:1px solid var(--line);border-radius:15px;background:var(--surface);box-shadow:0 8px 22px #2332510b;animation:rowReveal .25s both}.partCardTop{display:grid;grid-template-columns:64px 1fr auto;align-items:center;gap:12px}.partCardTop>img,.cardNoPhoto{width:64px;height:58px;border-radius:11px;object-fit:cover;background:#eef2f7}.cardNoPhoto{display:grid;place-items:center;color:#8793a4}.partCardTop>div:nth-child(2){min-width:0;display:grid;justify-items:start;gap:4px}.partCardTop>div:nth-child(2)>b{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.cardQty{display:grid;justify-items:center;color:var(--blue);font-size:23px}.cardQty small{color:var(--muted);font-size:7px}.partCardMeta{margin:12px 0;padding:10px 0;display:grid;grid-template-columns:1fr 1.4fr;gap:12px;border-block:1px solid var(--line);color:#536176;font-size:10px}.partCardMeta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.partCardMeta small{display:block;margin-bottom:4px;color:#909baa;font-size:7px;font-weight:900}.partCardActions{display:flex;align-items:center;gap:6px}.partCardActions .view{margin-right:auto}
.toastContainer{position:fixed;right:22px;top:22px;z-index:100;display:grid;gap:10px;pointer-events:none}.toast{width:min(370px,calc(100vw - 28px));padding:13px 12px;display:grid;grid-template-columns:38px 1fr 28px;align-items:center;gap:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 18px 50px #17203332;pointer-events:auto;animation:toastIn .28s ease-out}.toast>span{width:36px;height:36px;display:grid;place-items:center;border-radius:11px}.toast.success>span{background:#e5f8f0;color:#07804e}.toast.error>span{background:#fff0f2;color:#c62f3c}.toast.warning>span{background:#fff2d7;color:#a76100}.toast.info>span{background:#eaf2ff;color:#2563eb}.toast>div{display:grid;gap:2px}.toast b{font-size:11px}.toast p{margin:0;color:var(--muted);font-size:10px;line-height:1.4}.toast>button{border:0;background:transparent;color:#8c97a6;font-size:19px}.toast.leaving{animation:toastOut .25s forwards}
.detailPhotoBox{position:relative}.galleryArrow{position:absolute;top:50%;z-index:2;width:36px;height:44px;border:0;border-radius:10px;background:#111827c7;color:white;font-size:28px;line-height:1;transform:translateY(-50%);backdrop-filter:blur(5px);transition:.15s}.galleryArrow:hover{background:#2563eb}.galleryArrow.prev{left:9px}.galleryArrow.next{right:9px}.galleryCounter{position:absolute;right:10px;bottom:9px;padding:5px 8px;border-radius:8px;background:#111827cf;color:white;font-size:9px;font-weight:900;backdrop-filter:blur(5px)}.detailPhotoBox>img{transition:opacity .16s,transform .16s}.detailGallery button{transition:.15s}
.largePhotoHead{display:grid;grid-template-columns:1fr auto 37px}.largePhotoHead>span{padding:5px 8px;border-radius:7px;background:#ffffff12;color:#bfc9d8;font-size:10px}.largePhotoStage{position:relative;min-height:300px;display:grid;place-items:center}.largePhotoStage>img{display:block;width:100%;max-height:calc(100vh - 88px);object-fit:contain;background:#070a0f}.largePhotoStage>button{position:absolute;top:50%;z-index:2;width:44px;height:55px;border:0;border-radius:12px;background:#ffffff1a;color:white;font-size:34px;transform:translateY(-50%);backdrop-filter:blur(6px)}.largePhotoStage>button:first-child{left:14px}.largePhotoStage>button:last-child{right:14px}.largePhotoStage>button:hover{background:#2563eb}
.skeletonRow i,.skeletonCard i{display:block;height:13px;border-radius:7px;background:linear-gradient(90deg,#edf0f4 25%,#f7f8fa 50%,#edf0f4 75%);background-size:220% 100%;animation:shimmer 1.2s infinite}.skeletonRow td:first-child i{height:45px}.skeletonCard{min-height:150px}.skeletonCard i{margin:9px}.skeletonCard i:first-child{height:55px}.skeletonCard i:nth-child(2){width:70%}.skeletonCard i:nth-child(3){width:45%}
@keyframes rowReveal{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}@keyframes toastIn{from{opacity:0;transform:translateX(20px) scale(.97)}to{opacity:1;transform:none}}@keyframes toastOut{to{opacity:0;transform:translateX(20px)}}@keyframes shimmer{to{background-position:-220% 0}}


@media(max-width:780px){#stock .tablewrap{display:none}.mobileCards{display:grid;gap:10px;padding:12px;background:var(--canvas)}.stockPanel{background:transparent;border:0;box-shadow:none}.stockPanel .panelhead{border:1px solid var(--line);border-radius:15px;background:var(--surface)}.stockPanel .empty{border:1px solid var(--line);border-radius:15px;background:var(--surface)}.toastContainer{top:82px;right:14px}.largePhotoStage>button{width:37px;height:48px}.largePhotoStage>button:first-child{left:7px}.largePhotoStage>button:last-child{right:7px}}
