:root{color-scheme:light;--canvas:#f4f7fd;--paper:#fff;--text:#142443;--muted:#526582;--quiet:#60718c;--line:#dfe7f3;--deep:#102143;--accent:#225dcc;--accent-dark:#1748a3;--accent-soft:#e4eeff;--yellow:#fff3d5;--amber:#80591b;--red:#9b3d3a;--rail:231px;--shadow:0 1px 2px #10214310;--radius:15px;font-family:Inter,system-ui,sans-serif;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;background:var(--canvas);color:var(--text);font-size:14px}
button,input,select,textarea{font:inherit;color:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.48}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid #4c8ee8;outline-offset:3px}
[hidden]{display:none!important}
svg{display:block;width:20px;height:20px;flex:none}
.skip{position:fixed;z-index:20;top:8px;left:12px;transform:translateY(-150%);background:#fff;padding:10px;border-radius:8px}
.skip:focus{transform:translateY(0)}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--rail);z-index:4;display:flex;flex-direction:column;background:linear-gradient(168deg,#142b55 0%,var(--deep) 65%);color:#d4e1f5;padding:29px 17px 19px}
.brand{display:flex;align-items:center;gap:12px;padding:0 8px;margin-bottom:48px;color:#fcfdff;font-size:18px;line-height:1.12;font-weight:760;letter-spacing:-.35px}
.brand small{display:block;font-size:10.5px;font-weight:550;color:#c0d2ec;letter-spacing:.1em;margin-top:6px}
.brand-mark{flex:none;display:grid;place-items:center;height:42px;width:42px;border-radius:12px;background:#95c8ff;color:#12346d;box-shadow:inset 0 0 0 1px #fff3}
.brand-mark svg{width:24px;height:24px}
.workspace-heading{color:#a8bcda;font-size:11px;font-weight:650;letter-spacing:.1em;padding:0 11px;margin-bottom:12px}
.nav-link{display:flex;align-items:center;gap:11px;min-height:45px;padding:0 12px;border-radius:9px;margin:4px 0;font-size:13px;font-weight:550;transition:background .15s,color .15s}
.nav-link svg{width:18px;height:18px}
.nav-link:hover{background:#1c3863;color:#fff}
.nav-link[aria-current="page"]{color:#edf5ff;background:#24487d;font-weight:700}
.nav-link[aria-current="page"] svg{color:#95c8ff}
.nav-link .nav-count{font-size:11px;margin-left:auto;color:#dbeaff;background:#ffffff12;border:1px solid #ffffff14;border-radius:6px;padding:1px 6px;font-variant-numeric:tabular-nums}
.sidebar-bottom{margin-top:auto;border-top:1px solid #ffffff20;padding:17px 7px 2px;display:flex;align-items:center;gap:10px;font-size:12px}
.sidebar-bottom strong,.sidebar-bottom small{display:block}
.sidebar-bottom small{color:#aec1de;font-size:10.5px;margin-top:3px}
.side-avatar{display:grid;place-items:center;width:34px;height:34px;background:#20385f;border:1px solid #ffffff18;border-radius:9px;color:#d3e5ff}
.side-avatar svg{width:17px;height:17px}
.layout{margin-left:var(--rail);min-height:100vh}
.topbar{height:65px;display:flex;align-items:center;justify-content:space-between;padding:0 36px;border-bottom:1px solid var(--line);background:#fbfdff}
.breadcrumbs,.topbar-right,.live-status{display:flex;align-items:center;gap:11px}
.breadcrumbs{font-size:12px;color:var(--muted)}
.breadcrumbs svg{width:16px;height:16px}
.breadcrumbs strong{font-weight:690;color:var(--text)}
.crumb-arrow{color:#657da4}
.crumb-arrow svg{width:13px;height:13px}
.topbar-right{gap:15px}
.live-status{gap:7px;color:#36517d;font-size:11.5px}
.live-status i{width:7px;height:7px;border-radius:100%;background:#3878db;box-shadow:0 0 0 3px #deebff}
.live-status[data-error] i{background:#b76d43;box-shadow:0 0 0 3px #f6e9db}
.top-separator{background:var(--line);height:24px;width:1px}
.avatar{display:grid;place-items:center;width:32px;height:32px;background:#e5eeff;color:#244780;border:1px solid #d1e1fa;border-radius:50%;font-size:11px;font-weight:750}
.menu-toggle{display:none!important}
main{padding:28px 36px 38px;max-width:1720px;margin:auto}
.hero{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;min-height:140px;border:1px solid #cfdff7;border-radius:18px;padding:25px 27px;background:linear-gradient(112deg,#edf5ff 7%,#e3efff 59%,#c7dfff 100%);margin-bottom:21px}
.hero-copy,.hero-actions{position:relative;z-index:1}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(29px,3.2vw,39px);line-height:1.16;letter-spacing:-.055em;font-weight:770}
.hero p,.page-head p{color:#405b85;font-size:13px;line-height:1.5;margin-top:9px}
.hero-kicker{display:flex;align-items:center;gap:6px;color:#2855a0;font-size:10px;font-weight:750;letter-spacing:.09em;margin-bottom:7px}
.hero-kicker svg{width:13px;height:13px}
.hero-actions,.button-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hero-art{position:absolute;z-index:-1;right:25px;top:0;width:390px;height:100%;overflow:hidden;color:#5083cb;opacity:.65;pointer-events:none;mask-image:linear-gradient(90deg,transparent 0%,black 43%)}
.hero-art svg{width:100%;height:100%}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;min-height:37px;padding:0 13px;border-radius:8px;border:1px solid #d6e1f1;background:#fff;color:#213a63;font-size:12px;font-weight:680;line-height:1.25;white-space:nowrap;transition:background .15s,border-color .15s}
.btn svg,.icon-button svg{width:16px;height:16px}
.btn:hover:not(:disabled),.icon-button:hover:not(:disabled){background:#eef5ff;border-color:#cadbf1}
.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn.primary:hover:not(:disabled){background:var(--accent-dark);border-color:var(--accent-dark)}
.btn.compact{min-height:32px;padding:0 10px}
.icon-button{display:inline-grid;place-items:center;width:33px;height:33px;border:1px solid transparent;border-radius:8px;background:transparent;color:#4a6086;padding:0}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 22px}
.metric{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 9px;text-align:left;padding:15px 15px 14px 16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);box-shadow:var(--shadow);min-height:110px;align-content:start}
.metric:is(button):hover{border-color:#a0bde8;background:#f9fbff}
.metric-label{font-size:12px;font-weight:650;color:#4b6184;align-self:center}
.metric-value{grid-column:1;font-size:30px;font-weight:760;line-height:1.05;letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.metric-caption{grid-column:1/-1;font-size:10.5px;color:var(--muted);margin-top:4px}
.metric-icon{grid-column:2;grid-row:1/3;align-self:start;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;color:#275ab0;background:#eaf2ff}
.metric-icon svg{width:17px;height:17px}
.metric-icon.amber{color:#8c651f;background:#fbf0d9}
.metric-icon.blue{color:#2362a2;background:#e3efff}
.metric-icon.lilac{color:#4c58a1;background:#edf0ff}
.panel{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);box-shadow:var(--shadow);overflow:hidden}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px 13px}
.panel-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
h2{font-size:17px;letter-spacing:-.015em;font-weight:740}
.count-tag{border:1px solid #dbe7fb;border-radius:999px;color:#35548b;background:#eff5ff;font-size:10px;font-weight:660;padding:3px 8px;white-space:nowrap}
.tabs{display:flex;gap:19px;padding:0 18px;border-bottom:1px solid var(--line);overflow:auto}
.tab{position:relative;min-height:39px;display:inline-flex;align-items:center;gap:6px;border:0;background:none;color:#4f6280;padding:0 1px;font-size:12px;font-weight:640;white-space:nowrap}
.tab[aria-pressed="true"]{color:var(--accent-dark);font-weight:740}
.tab[aria-pressed="true"]:after{content:"";position:absolute;inset:auto 0 0;height:2px;background:#3167cb;border-radius:2px}
.tab-count{font-size:10px;color:#566a8a;background:#edf2fa;padding:2px 6px;border-radius:5px;font-variant-numeric:tabular-nums}
.tab[aria-pressed="true"] .tab-count{color:#2154a9;background:#e4eeff}
.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 18px}
.search-field{position:relative;min-width:210px;max-width:380px;flex:1}
.search-field svg{position:absolute;left:10px;top:10px;width:15px;height:15px;color:#526b91;pointer-events:none}
.search-field input{width:100%;min-height:36px;padding:0 10px 0 32px;border:1px solid #dbe5f4;border-radius:8px;background:#fbfdff;font-size:12px}
.search-field input::placeholder{color:#546785}
.filter-select{min-height:36px;min-width:114px;max-width:100%;border:1px solid #dbe5f4;border-radius:8px;background:#fff;padding:0 9px;font-size:12px;font-weight:560}
.filter-clear{color:#2456a9}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}
.inventory-table{min-width:745px}
th{font-size:10.5px;letter-spacing:.02em;color:#455b7d;font-weight:720;background:#f0f5fc;text-align:left;white-space:nowrap;padding:10px 11px;border-block:1px solid #e7eef8}
th:first-child,td:first-child{padding-left:18px}
th:last-child,td:last-child{padding-right:18px}
td{padding:9px 11px;border-bottom:1px solid #ebf0f7;line-height:1.3;vertical-align:middle}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:#f8fbff}
.product-button{border:0;background:none;padding:0;text-align:left;font-size:12px;font-weight:725;color:#173059;display:inline-flex;align-items:center;gap:9px}
.product-button:hover .product-label{text-decoration:underline;text-underline-offset:3px}
.product-label{display:block}
.product-icon{display:grid;place-items:center;width:31px;height:31px;border-radius:8px;background:#edf3ff;color:#385e9f;flex:none}
.product-icon svg{width:15px;height:15px}
.product-icon.vfd{background:#eaf0ff;color:#4064a5}
.product-icon.plc{background:#edf0ff;color:#505da6}
.product-icon.hmi{background:#e4f2fc;color:#17678d}
.product-icon.other{background:#eaf0fa;color:#4c668d}
.product-copy{min-width:0}
.product-copy small{display:block;font-size:10px;font-weight:500;margin-top:3px;color:var(--muted);overflow-wrap:anywhere}
.category-pill{font-size:10.5px;padding:3px 6px;background:#edf2f9;color:#435677;border-radius:5px;white-space:nowrap}
.cell-muted{color:#495f82}
.numeric{font-variant-numeric:tabular-nums;font-weight:730}
.cell-right{text-align:right}
.status-pill{border-radius:999px;padding:4px 7px;white-space:nowrap;display:inline-flex;align-items:center;gap:5px;font-size:10px;color:#204d97;background:var(--accent-soft);font-weight:660}
.status-pill i{width:5px;height:5px;border-radius:50%;background:currentColor}
.status-pill.low{color:var(--amber);background:var(--yellow)}
.status-pill.out{color:var(--red);background:#f9e7e3}
.status-pill.neutral{color:var(--muted);background:#edf2fa}
.sort{display:inline-flex;align-items:center;gap:4px;background:none;border:0;padding:0;color:inherit;font:inherit}
.sort svg{width:13px;height:13px}
.table-foot{min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 18px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
.pagination{display:flex;align-items:center;gap:5px}
.page-button{border:1px solid var(--line);border-radius:7px;background:#fff;width:29px;height:28px;display:grid;place-items:center;padding:0;font-size:11px;font-variant-numeric:tabular-nums}
.page-button svg{width:14px;height:14px}
.page-button[aria-current="page"]{color:var(--accent-dark);background:#eaf2ff;border-color:#dceaff;font-weight:750}
.page-button:hover:not(:disabled){background:#eaf2ff}
.empty,.loading{min-height:180px;display:grid;justify-items:center;align-content:center;gap:9px;text-align:center;padding:25px;color:var(--muted)}
.empty>svg{width:28px;height:28px;color:#5b7db1}
.empty h3{color:var(--text);font-size:15px}
.empty p{font-size:12px;max-width:320px}
.spinner{width:21px;height:21px;border:2px solid #dce8fa;border-top-color:#426fbd;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(1turn)}}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin:3px 0 23px}
.page-head h1{font-size:33px}
.summary-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:14px}
.summary-card{display:block;text-align:left;padding:17px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.summary-card:hover{border-color:#9ab7e1}
.summary-card h2{margin:12px 0 6px}
.summary-card p{color:var(--muted);font-size:12px}
.summary-card .summary-arrow{margin-left:auto;color:#44669c}
.summary-top{display:flex;align-items:center}
.summary-top .metric-icon{display:grid}
.history-table{min-width:690px}
.history-table td{padding-block:13px}
.history-table strong{display:block}
.history-table small{display:block;margin-top:3px}
.exdemo-table{min-width:810px}
.exdemo-table td{overflow-wrap:anywhere}
.exdemo-date{white-space:nowrap}
.exdemo-note{min-width:110px;max-width:220px;white-space:pre-wrap}
.change-in{color:var(--accent-dark)}
.change-out{color:var(--red)}
.dialog{border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 64px #0e204730;color:var(--text);width:min(95vw,610px);max-height:90dvh;padding:0;overscroll-behavior:contain}
.dialog::backdrop{background:#0a1732b0}
.dialog.drawer{position:fixed;inset:0 0 0 auto;margin:0;max-height:100dvh;height:100dvh;width:min(100vw,490px);border-radius:17px 0 0 17px}
.dialog-head,.dialog-body,.dialog-foot{padding:17px 20px}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:9px;border-bottom:1px solid var(--line)}
.dialog-head h2{font-size:20px}
.dialog-head .icon-button{flex:none}
.dialog-foot{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line)}
.details-title{font-size:22px;letter-spacing:-.025em;font-weight:750;overflow-wrap:anywhere}
.details-sub{line-height:1.5;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}
.detail-qty{border:1px solid var(--line);background:#f3f7ff;border-radius:12px;margin:18px 0;padding:14px;display:flex;align-items:center;gap:9px}
.detail-qty strong{font-size:28px;line-height:1;letter-spacing:-.03em}
.detail-qty .status-pill{margin-left:auto}
.details-list{display:grid;grid-template-columns:1fr 1fr;gap:14px 15px;margin:0}
.details-list .full{grid-column:1/-1}
.details-list dt{font-size:11px;color:var(--muted);margin-bottom:4px}
.details-list dd{margin:0;font-size:13px;overflow-wrap:anywhere;white-space:pre-wrap}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.form-grid .full{grid-column:1/-1}
.form-grid label{display:grid;gap:5px;font-size:12px;font-weight:650}
.form-grid input,.form-grid select,.form-grid textarea{width:100%;padding:8px 9px;border-radius:7px;border:1px solid #d8e4f5;min-height:37px;background:#fbfdff;font-weight:480}
.form-grid textarea{min-height:72px;resize:vertical}
.form-help{font-size:12px;color:var(--muted);line-height:1.5;margin-bottom:13px}
.form-error{padding-top:9px;color:var(--red);font-size:12px}
.import-box{background:#f2f7ff;border:1px solid #dfe8f5;border-radius:10px;padding:12px;line-height:1.65;overflow-wrap:anywhere}
.import-box strong{display:block}
.toast{position:fixed;z-index:8;bottom:22px;right:23px;max-width:min(420px,90vw);background:var(--deep);color:#fff;border:1px solid #3f5f95;border-radius:10px;padding:12px 16px;box-shadow:0 5px 22px #10214340;font-size:13px}
.toast.error{background:#743d37;border-color:#924f46}
@media(max-width:1120px){:root{--rail:199px}.topbar{padding-inline:24px}main{padding-inline:24px}.metrics{gap:10px}.metric{padding-inline:12px}.hero{padding:21px}.filters{padding-inline:14px}}
@media(max-width:830px){:root{--rail:195px}.sidebar{transform:translateX(-100%);transition:transform .2s}.sidebar.open{transform:translateX(0);box-shadow:18px 0 45px #10214340}.layout{margin-left:0}.menu-toggle{display:inline-grid!important}.topbar{padding-inline:17px;height:58px}main{padding:18px 17px}.hero{min-height:125px}}
@media(max-width:550px){main{padding:13px 11px 26px}.topbar{padding-inline:10px}.breadcrumbs{gap:7px}.topbar-right{gap:9px}.breadcrumb-home{display:none}.hero{display:block;padding:17px;margin-bottom:13px}.hero-actions{margin-top:14px}.hero-art{right:0;width:70%;opacity:.48}.metrics{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}.metric{min-height:94px;padding:11px}.metric-value{font-size:25px}.metric-icon{width:29px;height:29px}.page-head{align-items:flex-start}.page-head h1{font-size:26px}.panel-head,.tabs,.table-foot{padding-inline:12px}.filters{padding:8px 12px}.search-field{flex-basis:100%;max-width:none}.filter-select{flex:1;min-width:95px}.table-foot{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0s!important;transition-duration:0s!important;scroll-behavior:auto!important}}

/* Shared register and access controls */
:is(.live-status,.breadcrumbs,.btn,.nav-link,table,.cell-muted,.sidebar-bottom,.brand small,.sidebar-bottom small,
  .hero-kicker,.tabs,.tab,.tab-count,.count-tag,.filter-select,.search-field input,.status-pill) { font-size: 14px; }
.hero p,.page-head p,.dialog-body,.account-panel { font-size:16px; }
body[data-role="viewer"] :is([data-action="add"],[data-action="add-exdemo"],[data-action="edit-exdemo"],
  [data-action="edit"],[data-action="adjust"],[data-action="import"]) { display:none; }
.topbar-right .btn { min-height:36px; padding-inline:10px; }
.topbar-right .btn[aria-current="page"] { background:var(--accent-soft); border-color:#c1d7fa; }
.account-panel { padding:18px 20px; margin-bottom:16px; }
.account-panel h2 { font-size:18px; margin-bottom:12px; }
.account-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.account-heading h2 { margin:0; }
.table-wrap { position:relative; }
.stock-team-list { list-style:none; margin:12px 0 0; padding:0; }
.stock-team-list li { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; border-top:1px solid var(--line); padding:12px 0; overflow-wrap:anywhere; }
.stock-team-list p { margin-top:3px; color:var(--muted); font-size:14px; }
#account-form { display:grid; gap:12px; }
#account-form label,.dialog-body > label { font-size:14px; display:grid; gap:5px; }
.sign-in { display:grid; place-items:center; min-height:100vh; min-height:100dvh; padding:18px; }
.sign-in-panel { width:min(100%,440px); border:1px solid var(--line); border-radius:16px; padding:clamp(22px,5vw,34px); background:var(--paper); }
.stock-auth-brand { color:var(--accent-dark); font-size:16px; font-weight:700; margin-bottom:14px; }
.sign-in-panel h1 { font-size:32px; letter-spacing:-.025em; }
.sign-in-panel p { margin:12px 0; font-size:16px; line-height:1.5; color:var(--muted); }
.sign-in-panel #account-help,.sign-in-panel #password-hint { font-size:14px; margin-bottom:0; }
.sign-in-panel form { display:grid; gap:6px; padding-top:7px; }
.sign-in-panel label { margin-top:5px; font-weight:650; }
.sign-in-panel input,.dialog-body > label input,#account-form :is(input:not([type=hidden]),select) {
  width:100%; min-width:0; min-height:43px; border:1px solid #b9c9e2; border-radius:8px; padding:8px 10px;
}
.sign-in-panel .btn { min-height:44px; margin-top:10px; }
.sign-in-panel .form-error { margin:4px 0; color:var(--red); }
@media(max-width:830px) {
  .sidebar { visibility:hidden; }
  .sidebar.open { visibility:visible; }
}
@media(max-width:550px) {
  .topbar-right .live-status,.crumb-arrow { display:none; }
  .topbar-right { gap:5px; }
  .topbar-right .btn { min-height:40px; padding-inline:7px; }
  .account-panel { padding:14px; }
  .tabs { flex-wrap:wrap; gap:0 13px; overflow:visible; }
  .tab { min-height:34px; }
}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
