/* Happy Manufacturing ERP v93 - Modern Demo UI
   Visual-only upgrade. Business logic remains unchanged. */
:root{
  --ink:#172033;
  --muted:#68758a;
  --line:#e3e8f0;
  --soft:#f6f8fb;
  --card:#ffffff;
  --accent:#e1282f;
  --accent2:#b71924;
  --green:#07865d;
  --amber:#b86a00;
  --blue:#2563eb;
  --shadow:0 12px 34px rgba(22,32,51,.07);
  --shadow-sm:0 3px 12px rgba(22,32,51,.06);
  --radius:16px;
}
html{scroll-behavior:smooth}
body{background:linear-gradient(180deg,#f6f8fb 0,#f2f5f9 100%);font-size:14px;-webkit-font-smoothing:antialiased}
.app-shell{grid-template-columns:272px minmax(0,1fr)}
.sidebar{
  background:linear-gradient(180deg,#0d1522 0%,#111c2c 52%,#0d1724 100%);
  border-right:1px solid rgba(255,255,255,.055);
  padding:18px 14px 16px;
  box-shadow:12px 0 40px rgba(15,23,42,.08);
  overflow-y:auto;
}
.brand{padding:7px 8px 22px;gap:12px}
.brand-mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#f14549,#c31520);box-shadow:0 8px 22px rgba(225,40,47,.28);font-size:17px}
.brand strong{font-size:14px;letter-spacing:.01em}.brand span{display:block;margin-top:2px;font-size:10.5px;color:#93a4ba}.brand .erp-version{margin-top:7px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.1);color:#dbe6f4!important}
.nav-label{font-size:9px;letter-spacing:.18em;color:#667b95;margin:18px 11px 6px;font-weight:800}
.nav-item{min-height:42px;border-radius:11px;padding:10px 11px;margin:3px 0;color:#afbdce;font-weight:620;transition:background .16s ease,color .16s ease,transform .16s ease;position:relative}
.nav-item span{width:24px;height:24px;border-radius:8px;background:rgba(255,255,255,.035);display:grid;place-items:center;font-size:13px;transition:.16s ease}
.nav-item:hover{background:rgba(255,255,255,.065);color:#fff;transform:translateX(2px)}
.nav-item:hover span{background:rgba(255,255,255,.09)}
.nav-item.active{background:linear-gradient(90deg,rgba(225,40,47,.18),rgba(255,255,255,.065));box-shadow:none;color:#fff}
.nav-item.active:before{content:"";position:absolute;left:-14px;top:8px;bottom:8px;width:4px;border-radius:0 4px 4px 0;background:#f0444b;box-shadow:0 0 12px rgba(240,68,75,.5)}
.nav-item.active span{background:rgba(225,40,47,.22);color:#ffb9bc}
.demo-note{border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.035);border-radius:14px;padding:13px 14px;box-shadow:none}.demo-note b{font-size:11px}.demo-note span{font-size:10px;color:#8395ab}
main{background:transparent}
.topbar{height:78px;background:rgba(255,255,255,.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid rgba(218,224,233,.88);padding:0 28px;box-shadow:0 1px 0 rgba(255,255,255,.5);z-index:20}
.topbar h1{font-size:20px;letter-spacing:-.02em;font-weight:780}.topbar p{font-size:11px;margin-top:3px}.top-actions{gap:9px}.top-version{background:#e1282f!important;padding:6px 10px!important;box-shadow:0 3px 10px rgba(225,40,47,.16)}
.plant{height:38px;display:inline-flex;align-items:center;border:1px solid #dde3ec;border-radius:11px;padding:0 13px;background:#fff;box-shadow:var(--shadow-sm);font-weight:650;color:#344054}.avatar{width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,#1f2937,#0f172a);box-shadow:0 5px 14px rgba(15,23,42,.18);font-size:11px}
.content{max-width:1680px;padding:30px 32px 56px}
.section-title{margin-bottom:18px;align-items:center;gap:14px}.section-title h2{font-size:24px;letter-spacing:-.025em;font-weight:790;color:#182233}.section-title p{font-size:12px;line-height:1.5;color:#6f7c90}.section-title>.btn{margin-left:auto}
.hero{border-radius:20px;padding:30px 32px;margin-bottom:22px;background:radial-gradient(circle at 88% 20%,rgba(239,68,68,.24),transparent 30%),linear-gradient(135deg,#111b2a,#21334a);box-shadow:0 16px 42px rgba(15,23,42,.18);border:1px solid rgba(255,255,255,.045)}
.hero:after{opacity:.25}.hero h2{font-size:27px;letter-spacing:-.03em}.hero p{font-size:12.5px;line-height:1.55;color:#c2ccda}
.card,.stat{border:1px solid #e3e8f0;border-radius:var(--radius);box-shadow:var(--shadow);background:rgba(255,255,255,.98)}
.card{padding:21px 22px}.card:hover{border-color:#dce3ed}.card-head{gap:12px;margin-bottom:17px}.card-head h3{font-size:15px;letter-spacing:-.01em;font-weight:780}.card-head p{font-size:11px;line-height:1.45;color:#748195}
.stats{gap:14px}.stat{padding:18px 19px;position:relative;overflow:hidden}.stat:after{content:"";position:absolute;right:-18px;top:-18px;width:58px;height:58px;border-radius:50%;background:linear-gradient(145deg,rgba(37,99,235,.06),rgba(225,40,47,.04))}.stat .k{font-size:10px;font-weight:800;letter-spacing:.075em;color:#7b8798}.stat strong{font-size:27px;letter-spacing:-.03em;margin:6px 0 2px}.stat small{font-size:10.5px}
.grid-2{gap:18px}
.btn{min-height:38px;border-radius:10px;padding:9px 14px;font-size:11.5px;font-weight:750;letter-spacing:.005em;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border .14s ease;color:inherit}
.btn:hover:not(:disabled){filter:none;transform:translateY(-1px)}
.btn-primary{background:linear-gradient(180deg,#ec343b,#d61f27);color:#fff;border:1px solid #cf1c24;box-shadow:0 5px 13px rgba(225,40,47,.18)}
.btn-primary:hover:not(:disabled){background:linear-gradient(180deg,#e42a32,#c91c24);box-shadow:0 7px 17px rgba(225,40,47,.24)}
.btn-secondary{background:#fff;border:1px solid #dbe2ec;color:#2f3b4d;box-shadow:0 1px 2px rgba(16,24,40,.03)}
.btn-secondary:hover:not(:disabled){border-color:#c9d3e0;background:#fbfcfe;box-shadow:var(--shadow-sm)}
.btn-ghost{background:#f7f9fc;border:1px solid #edf1f6;color:#344054}.btn-ghost:hover:not(:disabled){background:#eef3f8;border-color:#e0e7f0}
.btn-danger{background:#fff1f2!important;color:#b4232c!important;border:1px solid #fecdd3!important;box-shadow:none!important}.btn-danger:hover{background:#ffe4e6!important}
button:disabled,.btn:disabled{opacity:.52;cursor:not-allowed;transform:none!important;box-shadow:none!important}
.badge{font-size:9.5px;padding:5px 9px;border-radius:999px;font-weight:800;letter-spacing:.015em;border:1px solid transparent}.green{background:#eafaf2;color:#08734d;border-color:#d5f4e4}.amber{background:#fff7df;color:#9a5a00;border-color:#fae9b5}.blue{background:#eef4ff;color:#2456bf;border-color:#dce7ff}.grey{background:#f1f4f8;color:#526072;border-color:#e5eaf0}.red{background:#fff0f0;color:#b4232c;border-color:#ffd9da}
.field{gap:7px}.field label{font-size:9.5px;color:#647086;font-weight:820;letter-spacing:.07em}.field input,.field select,.field textarea{border:1px solid #d8e0ea;border-radius:10px;background:#fff;color:#1f2937;box-shadow:0 1px 2px rgba(16,24,40,.025);transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}.field input,.field select{height:42px;padding:0 12px;font-size:12px}.field textarea{min-height:92px;padding:11px 12px;font:inherit;font-size:12px;resize:vertical}.field input:hover,.field select:hover,.field textarea:hover{border-color:#c9d3df}.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:#7aa7f7;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
input.auto-code{background:#f5f7fa!important;color:#667085!important;font-weight:760}
.form-grid{gap:15px 16px}.form-actions{margin-top:20px;padding-top:17px;border-top:1px solid #e9edf3;gap:9px;align-items:center}.document-total{margin-right:auto;background:#f7f9fc;border:1px solid #e8edf3;padding:9px 12px;border-radius:10px;color:#667085;font-size:11px}.document-total b{color:#182233;font-size:14px;margin-left:8px}
.callout{border-radius:12px;padding:13px 15px;font-size:11px;line-height:1.55;box-shadow:inset 0 1px rgba(255,255,255,.6)}.callout.bluebox{background:#f3f7ff;border-color:#cdddff;color:#244a9b}.callout:not(.bluebox){background:#fffaf0;border-color:#f1dfb4;color:#755006}
.table-wrap{border-radius:12px;overflow:auto;border:1px solid #edf0f4;background:#fff}
table{border-collapse:separate;border-spacing:0;background:#fff}th{position:sticky;top:0;z-index:1;background:#f8fafc;color:#6e7b8f;font-size:9.5px;font-weight:840;letter-spacing:.065em;padding:11px 10px;border-bottom:1px solid #e2e8f0}td{font-size:11.5px;padding:12px 10px;border-bottom:1px solid #eef2f6;vertical-align:middle}tbody tr{transition:background .12s ease}tbody tr:hover td{background:#fbfcfe}tbody tr:last-child td{border-bottom:0}td b{color:#1d2939}
.table-wrap input,.table-wrap select{height:37px;border:1px solid #dce3ec;border-radius:9px;background:#fff;padding:0 9px;font-size:11px}.table-wrap input:focus,.table-wrap select:focus{outline:none;border-color:#7aa7f7;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.tabs{gap:3px;border-bottom:1px solid #e7ecf2;margin:20px 0 17px}.tab{padding:10px 13px;border-radius:9px 9px 0 0}.tab.active{color:#c91c24;border-color:#e1282f;background:#fff7f7}
.metric-row{gap:11px}.metric{background:#f7f9fc;border:1px solid #edf1f5;border-radius:11px;padding:12px 13px}.metric span{font-size:9.5px;font-weight:700}.metric b{font-size:16px;letter-spacing:-.01em}
.flow-lanes{gap:12px}.flow-card{border-radius:13px;padding:15px 14px;border-color:#e3e8ef;box-shadow:0 3px 10px rgba(16,24,40,.035)}.flow-card .n{color:#d9242c}.flow-card b{font-size:11.5px}.flow-card span{font-size:10px;line-height:1.5}.flow-card:not(:last-child):after{color:#d8a3a6;font-size:16px}
.node{border-radius:10px;border-color:#e2e8f0;box-shadow:0 2px 8px rgba(16,24,40,.035)}
.v34-module-search{height:42px;border-color:#dce3ec;border-radius:11px;box-shadow:var(--shadow-sm);min-width:285px}.v34-module-search input{font-size:11.5px}.v34-module-search:focus-within{border-color:#aac6f8;box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.progress{height:7px;background:#edf1f5}.progress i{background:linear-gradient(90deg,#e1282f,#f05256)}
.steps{gap:4px}.step{border-radius:11px;padding:11px 10px}.step:hover{background:#f7f9fc}.step-no{background:#f1f4f8;border:1px solid #e5eaf0;border-radius:9px}
.empty-pad{padding:38px 28px;color:#78869a;font-size:12px;background:linear-gradient(180deg,#fff,#fcfdff)}
.toast{right:24px;bottom:24px;border-radius:12px;padding:13px 16px;background:#142033;box-shadow:0 16px 34px rgba(15,23,42,.26);font-size:11.5px}
.v92-po-btn{border-radius:9px!important;min-width:94px!important;height:35px!important;padding:0 11px!important;font-size:11px!important;box-shadow:none!important}.v92-po-plus{width:18px!important;height:18px!important;border-radius:5px!important}.v92-po-bulk{min-width:150px!important}
.v92-permission-note{border-radius:12px!important;background:#f3f7ff!important;border-color:#d4e2ff!important;color:#244a9b!important}
.v26-lock-dialog{border-radius:20px;box-shadow:0 26px 70px rgba(15,23,42,.32)}
@media(max-width:1180px){.app-shell{grid-template-columns:248px minmax(0,1fr)}.content{padding-left:24px;padding-right:24px}}
@media(max-width:1000px){.content{padding:24px 20px 48px}.section-title h2{font-size:22px}}
@media(max-width:720px){.app-shell{display:block}.sidebar{width:270px}.topbar{height:70px;padding:0 14px}.content{padding:18px 12px 42px}.section-title{align-items:flex-start}.section-title>.btn{margin-left:0}.hero{padding:23px 20px;border-radius:16px}.hero h2{font-size:22px}.card{padding:16px;border-radius:14px}.stat{padding:15px}.stats{gap:9px}.field input,.field select{height:41px}.v34-module-search{min-width:0}.top-actions{gap:6px}.avatar{width:34px;height:34px;border-radius:10px}}
@media print{.table-wrap{border:0!important}.card{box-shadow:none!important}.topbar{backdrop-filter:none!important}}
