*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:#f4f6fa;color:#172033}
a{color:#4f46e5;text-decoration:none}
.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#eef2ff,#f8fafc)}
.auth-card{width:min(100%,440px);background:#fff;border:1px solid #e6eaf0;border-radius:20px;padding:34px;box-shadow:0 18px 50px #18254a12}
.brand-mark{width:58px;height:58px;border-radius:16px;background:#4f46e5;color:#fff;display:grid;place-items:center;font-weight:800;font-size:20px;margin-bottom:22px}
.brand-mark.small{width:40px;height:40px;margin:0;border-radius:12px}
.eyebrow{font-size:11px;letter-spacing:1.1px;font-weight:700;color:#6366f1}
.auth-card h1{font-size:26px;margin:8px 0}
.muted,.hint{color:#748096;font-size:14px}
.auth-card form{display:grid;gap:10px;margin-top:24px}
.auth-card label{font-size:13px;font-weight:650;margin-top:5px}
.auth-card input{height:46px;border:1px solid #dce2ec;border-radius:10px;padding:0 13px;font:inherit;outline:none}
.auth-card input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f11a}
.btn{min-height:44px;border:0;border-radius:10px;background:#4f46e5;color:#fff;font-weight:700;font-size:14px;padding:0 18px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.btn:hover{background:#4338ca}
.btn:disabled{opacity:.45;cursor:not-allowed}
.alert,.success{padding:11px 13px;border-radius:10px;font-size:13px;margin-top:15px}
.alert{background:#fff1f2;color:#be123c}
.success{background:#ecfdf5;color:#047857}
.hint{font-size:12px;line-height:1.5;margin-top:20px}
.app-shell{min-height:100vh;display:flex}
.sidebar{width:250px;background:#151b35;color:#fff;padding:24px 16px;display:flex;flex-direction:column}
.side-brand{display:flex;align-items:center;gap:12px;padding:0 8px 28px}
.side-brand small{display:block;color:#aab3cc;font-size:11px;margin-top:3px}
.sidebar nav{display:grid;gap:6px}
.sidebar nav a{color:#cbd2e4;padding:12px;border-radius:9px;font-size:13px}
.sidebar nav a.active{background:#343d68;color:#fff}
.sidebar nav a.disabled{opacity:.5;cursor:default}
.side-foot{margin-top:auto;padding:20px 8px 0;color:#8e9ab8;font-size:11px;line-height:1.6}
.main{flex:1;padding:28px 34px;min-width:0}
.main.narrow{width:min(100% - 32px,900px);margin:0 auto;flex:none;padding:28px 0}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px}
.topbar h1{margin:5px 0 0;font-size:27px}
.userbox{display:flex;gap:16px;align-items:center;font-size:13px}
.welcome{margin:26px 0 20px;background:#fff;border:1px solid #e7eaf1;border-radius:16px;padding:22px 24px;display:flex;justify-content:space-between;align-items:center;gap:16px}
.welcome h2{margin:0 0 6px;font-size:19px}
.welcome p,.panel p{color:#718096;font-size:13px;line-height:1.6}
.pill{background:#ecfdf5;color:#047857;padding:7px 11px;border-radius:30px;font-size:12px;font-weight:700}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.stat,.panel{background:#fff;border:1px solid #e7eaf1;border-radius:15px;padding:20px}
.stat span,.stat small{display:block;color:#718096;font-size:12px}
.stat strong{display:block;font-size:30px;margin:10px 0 4px}
.panel{margin-top:18px}
.panel h3{margin:0 0 9px;font-size:16px}
.notice{margin-top:17px;padding:13px 15px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:12px;line-height:1.6}
.page-actions{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}
.page-actions p{margin:0}
.linkbtn{display:inline-flex;align-items:center;justify-content:center;padding:0 16px;height:42px;margin:0}
.secondary{background:#334155}
.table-wrap{overflow:auto;width:100%}
table{width:100%;border-collapse:collapse;min-width:850px;font-size:13px}
th,td{text-align:left;padding:12px 10px;border-bottom:1px solid #edf0f5;white-space:nowrap}
th{color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.4px;background:#fafbfc}
.tag{display:inline-block;background:#eef2ff;color:#4338ca;padding:5px 8px;border-radius:20px;font-size:10px;font-weight:800}
.empty{text-align:center;color:#64748b;padding:30px}
.narrow{max-width:900px;margin:0 auto}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}
.form-grid label{display:block;font-size:13px;font-weight:650;margin:0 0 7px;color:#344054}
.form-grid input,.form-grid select,.form-grid textarea{display:block;width:100%;min-height:44px;border:1px solid #dce2ec;border-radius:9px;padding:10px 12px;font:inherit;font-size:14px;background:#fff;color:#172033}
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{outline:none;border-color:#6366f1;box-shadow:0 0 0 3px #6366f11a}
.form-grid input[type=file]{padding:9px;background:#fafbff}
.form-grid textarea{min-height:90px;resize:vertical}
.form-grid small{display:block;color:#64748b;margin-top:6px;font-size:11px;line-height:1.5}
.full{grid-column:1/-1}
.form-grid .btn{padding:0 20px;min-width:145px}
.detail-stats{margin:22px 0}
.sm-value{font-size:19px!important}
.action-row{display:flex;gap:8px;flex-wrap:wrap}
footer{padding:25px 0;color:#8a94a8;font-size:11px}
@media(max-width:850px){.sidebar{width:205px}.main{padding:22px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.main.narrow{width:auto;margin:0;padding:18px}.page-actions{align-items:flex-start;flex-direction:column}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.action-row{width:100%}.action-row .btn{flex:1}.topbar{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.app-shell{display:block}.sidebar{width:100%;padding:14px}.side-brand{padding-bottom:12px}.sidebar nav{display:flex;overflow:auto}.sidebar nav a{white-space:nowrap}.side-foot{display:none}.main{padding:18px}.welcome{align-items:flex-start;flex-direction:column}.stat-grid{gap:9px}.stat{padding:15px}.stat strong{font-size:25px}.userbox{width:100%;justify-content:space-between}}

.stock-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 26px;border-radius:17px;background:linear-gradient(120deg,#20294e,#39478a);color:#fff;margin:20px 0 16px}
.stock-hero>div{display:flex;align-items:center;gap:15px}.stock-hero h2{margin:0 0 6px;font-size:19px;color:#fff}.stock-hero p{margin:0;color:#dbe2ff;font-size:12px;line-height:1.6;max-width:660px}
.stock-hero-icon{width:48px;height:48px;border-radius:14px;background:#ffffff1c;display:grid;place-items:center;font-size:24px}.virtual-label{font-size:10px;font-weight:800;letter-spacing:.6px;color:#dbeafe;background:#ffffff18;border:1px solid #ffffff2b;padding:8px 11px;border-radius:30px;white-space:nowrap}
.stock-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:17px}.stock-kpi{background:#fff;border:1px solid #e7eaf1;border-radius:14px;padding:18px 20px}.stock-kpi span,.stock-kpi small{display:block;color:#718096;font-size:12px}.stock-kpi strong{display:block;font-size:26px;color:#172033;margin:9px 0 5px}.stock-kpi-primary{background:#eef2ff;border-color:#dfe5ff}.stock-kpi-primary strong{color:#3946a0}
.stock-products,.stock-ledger{padding:21px;margin-top:16px}.stock-section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:17px}.stock-section-head h2{font-size:17px;margin:5px 0}.stock-section-head p{font-size:12px;color:#718096;margin:0}
.product-stock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.product-stock-card{border:1px solid #e9edf4;border-radius:13px;padding:17px;background:#fff;min-width:0}.product-stock-top{display:flex;align-items:center;justify-content:space-between}.product-avatar{width:42px;height:42px;border-radius:12px;background:#eef2ff;color:#3946a0;display:grid;place-items:center;font-size:11px;font-weight:850}.stock-unit{font-size:10px;color:#718096;background:#f1f5f9;padding:6px 9px;border-radius:20px}.product-stock-card h3{font-size:14px;margin:14px 0 7px;color:#344054}.product-stock-card>strong{font-size:28px;color:#172033}.stock-progress{height:6px;border-radius:10px;background:#eef1f6;overflow:hidden;margin:13px 0}.stock-progress span{height:100%;display:block;background:#6366f1;border-radius:10px}.stock-breakdown{display:flex;justify-content:space-between;gap:10px;color:#8490a3;font-size:11px}.stock-breakdown b{color:#344054;margin-left:4px}.product-filter-link{display:inline-block;margin-top:14px;font-size:11px;font-weight:750}
.ledger-heading{align-items:flex-end}.stock-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.stock-filter select{height:38px;min-width:155px;border:1px solid #dce2ec;border-radius:9px;background:#fff;padding:0 10px;color:#344054;font:inherit;font-size:12px}.btn-small{min-height:38px;padding:0 13px;font-size:12px}.clear-filter{font-size:11px;color:#64748b}.stock-table{min-width:850px}.stock-table td{font-size:11px}.movement-chip{display:inline-block;padding:5px 8px;border-radius:20px;font-size:9px;font-weight:750;white-space:nowrap}.movement-in{background:#ecfdf5;color:#047857}.movement-out{background:#fff7ed;color:#c2410c}.stock-in{font-weight:800;color:#047857!important}.stock-out{font-weight:800;color:#c2410c!important}.stock-footnote{margin-top:15px;padding:13px 15px;border-radius:11px;background:#f8fafc;border:1px solid #e8edf4;color:#64748b;font-size:11px;line-height:1.6}.stock-footnote b{color:#344054}
@media(max-width:850px){.stock-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.stock-kpi-primary{grid-column:1/-1}}
@media(max-width:600px){.stock-hero{align-items:flex-start;flex-direction:column;padding:19px}.stock-hero>div{align-items:flex-start}.virtual-label{margin-left:63px}.stock-kpis{grid-template-columns:1fr 1fr;gap:8px}.stock-kpi{padding:14px}.stock-kpi strong{font-size:22px}.stock-products,.stock-ledger{padding:15px;margin-top:12px}.product-stock-grid{grid-template-columns:1fr}.ledger-heading{align-items:flex-start;flex-direction:column}.stock-filter{width:100%}.stock-filter select{flex:1;min-width:0}.stock-footnote{font-size:10px}}
