/* Smart Supply Hub V4 — premium corporate design layer. Retains all V3 business logic. */
:root{--blue:#123f83;--light:#edf3fb;--ink:#17253c;--muted:#718097;--line:#e5eaf1;--green:#118252;--red:#c2394c;--orange:#bd7b13;font-family:'Noto Sans Thai','Segoe UI',Tahoma,system-ui,sans-serif;color:var(--ink);background:#f5f7fa}
body{background:#f5f7fa;font-size:14px;letter-spacing:0}
.sidebar{width:262px;padding:28px 15px 19px;border-right:1px solid #e3e8ef;background:#fff;box-shadow:2px 0 16px #1a355007}
.sidebar .brand{margin:4px 7px 45px;align-items:center}
.brand{font-size:16px;letter-spacing:-.35px;line-height:1.35}
.brand small{letter-spacing:.55px;color:#8694a7;font-size:10px;font-weight:500}
.brand-icon{width:42px;height:42px;border-radius:13px;background:#123f83;box-shadow:none;font-weight:700}
.nav-caption{font-size:11px;color:#97a2b3;letter-spacing:.4px;padding:0 15px 13px}
.nav-entry{border-radius:9px;margin:3px 0;padding:12px 14px;color:#4f5e74;font-size:13px;font-weight:650;gap:13px}
.nav-entry:hover{background:#f0f4fa;color:#153f7d}
.nav-entry.active{color:#fff;background:#144483;box-shadow:0 4px 9px #123f8324}
.nav-entry.active .tag{background:#ffffff2c;color:white}
.nav-icon{width:23px;font-size:20px;font-weight:500}
.sidebar-foot{padding:17px 8px 0}
.avatar{border-radius:50%;background:#dce9fa;color:#17447f}
.main{margin-left:262px}
.topbar{height:73px;padding:0 32px;background:#fff;border-bottom:1px solid #e9edf2;box-shadow:0 2px 8px #1b34500b}
.breadcrumbs{font-size:12px;font-weight:600;color:#8793a5}
.pill.online{background:#eaf8f0;color:#147f50}
.userchip{color:#394d6a;font-weight:700}
.page{max-width:1560px;padding:31px 31px 75px}
h1,h2,h3{color:#142238;letter-spacing:-.65px}
h2{font-size:27px;font-weight:800}
h3{font-size:17px;font-weight:800}
.pagehead{margin-bottom:23px}
.eyebrow{color:#2a60a6;letter-spacing:1.1px;font-size:10px;font-weight:800}
.subtitle{color:#7d899b;margin-top:8px;font-size:13px}
.btn{border-color:#e1e6ed;color:#47566c;border-radius:9px;font-size:12px;padding:10px 15px;box-shadow:none;background:white}
.btn:hover:not(:disabled){box-shadow:0 5px 14px #102c5012;border-color:#bbcee2}
.btn.primary,.primary{background:#144483;color:#fff;border-color:#144483}
.btn.primary:hover:not(:disabled){background:#0e3569;color:#fff}
.btn.soft{background:#f8fafc}
.panel{border:1px solid #e4e8ef;border-radius:14px;padding:22px;box-shadow:0 4px 16px #243a5307;margin-bottom:19px}
.stats{gap:14px;margin-bottom:21px}
.stat{border-radius:13px;border:1px solid #e3e8ef;box-shadow:0 3px 13px #263e5d07;padding:21px 22px;min-height:118px}
.stat span{font-size:12px;color:#66768c}
.stat b{font-size:30px;font-weight:800;color:#16283e}
.stat-icon{border-radius:12px;background:#eaf1fc;color:#144483}
.stat-icon.green{color:#12875b;background:#e9f8f0}
.stat-icon.amber{color:#c08313;background:#fff7e8}
.stat-icon.red{color:#c43b51;background:#fff0f2}
.filters{grid-template-columns:minmax(210px,2fr) minmax(130px,1fr) minmax(130px,1fr) auto;gap:11px}
.filters input,.filters select{margin-top:3px}
input,select,textarea{background:#fbfcfe;border-color:#e2e7ef;border-radius:9px;min-height:43px;color:#1f344e}
input:focus,select:focus,textarea:focus{border-color:#7399c8;box-shadow:0 0 0 3px #3365a512}
.resultbar{margin:27px 1px 17px}
.products{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.product{border-radius:14px;box-shadow:0 3px 13px #263e5c07;border-color:#e2e7ef}
.product:hover{transform:translateY(-3px);box-shadow:0 12px 27px #1c3c5b14}
.product-visual{height:197px;background:linear-gradient(145deg,#f4f6f8,#eef2f5);margin:11px 11px 0;border-radius:11px}
.product-visual img{padding:15px;object-fit:contain;transition:transform .25s}
.product:hover .product-visual img{transform:scale(1.04)}
.product-body{padding:16px 17px 17px}
.product-name{font-size:14px;font-weight:750;min-height:41px;line-height:1.52}
.sku{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-size:10px;color:#8290a2;letter-spacing:0;margin:8px 0 17px}
.sku-pill{font-size:10px;background:#eef3fa;color:#24598c;border-radius:5px;padding:4px 6px;font-weight:750}
.product-foot{border-top:1px solid #eef1f5;padding:13px 0 13px}
.product-foot b{color:#1b3653;font-size:16px}
.product-foot b small{font-size:11px;color:#68788d}
.product-actions .btn{padding:11px 10px}
.stock-badge{padding:5px 10px;font-size:10px;font-weight:750}
.good{background:#e6f7ed;color:#128152}.low{background:#fff4df;color:#af7412}.out{background:#ffecef;color:#bb3850}
.section-top{margin-bottom:18px}.table-wrap{border-radius:10px;overflow:auto}
table{border-collapse:separate;border-spacing:0;font-size:12px}
th{background:#f7f9fc;color:#718096;font-size:11px;letter-spacing:0;text-transform:none;font-weight:750}
tr:hover td{background:#fbfcfe}th,td{padding:15px 14px;border-color:#e9edf2}
.admin-tabs{background:white;border:1px solid #e4e8ee;border-radius:12px;padding:8px;gap:7px;display:flex;flex-wrap:wrap}
.admin-tabs .btn{border-color:transparent;background:transparent}
.admin-tabs .btn.selected{background:#e8f0fc;border-color:transparent;color:#114481}
.bar-track{background:#edf2f8;height:11px}
.bar-fill{background:linear-gradient(90deg,#3277c5,#123f83)}
.tag{color:#63758a;background:#f0f3f7}
.notice{background:#edf4fc;border-color:#dce8f7;color:#395e8c}
.login-screen{background:radial-gradient(circle at 85% 15%,#dfeaf8,transparent 40%),#f6f8fb}
.login-panel{border-radius:20px;box-shadow:0 25px 60px #1f35531a}
.login-art{background:linear-gradient(135deg,#eaf1fa,#f6f9fc)}
.modal{border-radius:17px}
.cart-float{box-shadow:0 9px 23px #123f8330}
/* Home dashboard */
.home-hero{min-height:290px;position:relative;display:flex;align-items:center;overflow:hidden;border-radius:17px;background:linear-gradient(105deg,#102d56 0%,#164782 62%,#2c67a3 100%);color:#fff;margin-bottom:31px;box-shadow:0 10px 24px #112d5116}
.home-hero::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 92% 10%,#ffffff21,transparent 39%),linear-gradient(135deg,transparent 50%,#ffffff09 50%,transparent 72%);pointer-events:none}
.home-hero-inner{padding:36px 44px;position:relative;z-index:1;max-width:70%}
.home-hero h1{color:#fff;font-size:33px;line-height:1.36;letter-spacing:-1px;margin:10px 0 10px}
.home-hero p{line-height:1.85;color:#dce9f9;font-size:13px;margin:0 0 20px}
.hero-kicker{color:#bad4f4;font-size:10px;letter-spacing:1.4px;font-weight:800}
.hero-actions{display:flex;gap:9px;flex-wrap:wrap}
.hero-primary{background:#fff;color:#123f83;border-color:white;font-weight:800}
.hero-secondary{color:#fff;border-color:#ffffff55;background:#ffffff13}
.hero-illustration{position:absolute;right:5%;top:0;bottom:0;width:32%;display:grid;place-items:center;opacity:.74}
.hero-icon-circle{width:170px;height:170px;border-radius:46px;display:grid;place-items:center;font-size:100px;color:#ffffffb6;border:1px solid #ffffff4c;transform:rotate(-12deg);background:#ffffff0d;box-shadow:0 0 0 30px #ffffff08}
.hero-ill-caption{position:absolute;bottom:34px;right:5px;letter-spacing:3px;font-size:10px;color:#c9dcf2;text-align:right}
.home-section-title{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:0 0 17px}
.home-section-title h3{font-size:19px;margin-top:5px}
.soft-caption{font-size:12px;color:#8492a4}
.home-two{display:grid;grid-template-columns:1.25fr .85fr;gap:19px;margin:12px 0 17px}
.home-two .panel{margin:0}
.action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.action-tile{border:1px solid #e4eaf1;border-radius:12px;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:22px 10px;min-height:145px;color:#1d3859;transition:.18s}
.action-tile:hover{border-color:#adc5df;background:#f1f6fd;transform:translateY(-2px)}
.action-tile-icon{font-size:27px;color:#144483}
.action-tile strong{font-size:12px}
.action-tile small{font-size:10px;color:#8a98aa;text-align:center}
.status-row{display:flex;justify-content:space-between;padding:11px 0;color:#6e7f93;font-size:12px}
.status-row strong{color:#18304c}
.status-progress{height:8px;border-radius:10px;background:#e8eef5;overflow:hidden}
.status-progress i{display:block;height:100%;background:#24a16d;border-radius:10px}
.status-note{font-size:11px;margin-top:15px}
@media(max-width:1220px){.products{grid-template-columns:repeat(3,minmax(0,1fr))}.home-two{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.main{margin:0}.page{padding:24px 18px 108px}.topbar{padding:0 19px}.products{grid-template-columns:repeat(2,minmax(0,1fr))}.home-hero-inner{max-width:83%}.home-hero h1{font-size:29px}.hero-illustration{opacity:.3}.home-two{grid-template-columns:1fr}}
@media(max-width:600px){.home-hero{min-height:290px}.home-hero-inner{padding:26px;max-width:100%}.home-hero h1{font-size:26px}.home-hero p{font-size:12px}.hero-illustration{display:none}.action-grid{gap:8px}.action-tile{min-height:118px;padding:13px 5px}.action-tile strong{font-size:11px}.action-tile small{font-size:9px}.product-visual{height:145px;margin:7px 7px 0}.product-body{padding:11px}.products{gap:11px}.product-name{font-size:12px}.sku{gap:4px;margin-bottom:10px}.product-foot{padding:9px 0}.stat{padding:14px;min-height:94px}.stat b{font-size:25px}.pagehead h2{font-size:24px}.userchip{display:none}.home-section-title h3{font-size:17px}}

/* V5 stocked sample visuals (editable by uploading product photo) */
.product-visual:has(.product-symbol){background:linear-gradient(150deg,#f0f5ff,#f8fbff 70%,#e4edff)}
.product-symbol{font-family:system-ui,sans-serif;font-size:clamp(64px,7vw,112px)!important;line-height:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;filter:drop-shadow(0 9px 8px rgba(13,38,86,.12));}
.mini-icon{display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;background:#eef5ff;border-radius:10px;font-size:24px;flex-shrink:0}
