:root{--bg:#f4f7fb;--panel:#ffffff;--panel2:#f8fafc;--line:#e5eaf1;--text:#1f2937;--muted:#6b7280;--blue:#2563eb;--blue2:#4f7df3;--green:#16a36a;--red:#dc4c5c;--shadow:0 10px 32px rgba(31,41,55,.07)}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;min-height:100%}body{min-height:100vh}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh;display:flex}.sidebar{width:252px;position:fixed;inset:0 auto 0 0;padding:24px 16px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:20}.brand{display:flex;gap:12px;align-items:center;padding:4px 10px 22px}.brand-mark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-weight:900;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;box-shadow:0 8px 20px rgba(37,99,235,.18)}.brand b{font-size:14px;letter-spacing:1.2px;color:#172033}.brand span{display:block;color:#8a94a5;font-size:11px;margin-top:4px}.sidebar nav{display:flex;flex-direction:column;gap:6px}.sidebar nav a{padding:11px 12px;border-radius:12px;color:#526071;font-size:14px;display:flex;align-items:center;gap:11px;border:1px solid transparent;transition:.18s}.sidebar nav a span{width:24px;color:#4775e8;font-size:12px}.sidebar nav a:hover,.sidebar nav a.active{background:#eef4ff;border-color:#dce7ff;color:#1f5bd7}.nav-title{font-size:10px;letter-spacing:1.6px;color:#a1a9b6;padding:18px 12px 6px}.sidebar-foot{margin-top:auto;border-top:1px solid var(--line);padding:18px 10px 4px;font-size:12px;color:#687487;display:flex;align-items:center;gap:8px}.sidebar-foot a{margin-left:auto;color:#2563eb}.online-dot{width:7px;height:7px;border-radius:50%;background:#20b978;box-shadow:0 0 0 4px rgba(32,185,120,.10)}.main{margin-left:252px;width:calc(100% - 252px);padding:28px 34px 60px;background:var(--bg)}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.eyebrow{font-size:10px;letter-spacing:2.2px;color:#9aa4b3;margin-bottom:6px}.topbar h1{font-size:28px;margin:0;font-weight:750;letter-spacing:.2px;color:#172033}.top-actions{display:flex;gap:10px}.card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.stat{padding:20px}.stat .k{font-size:12px;color:var(--muted);margin-bottom:10px}.stat .v{font-size:30px;font-weight:800;letter-spacing:-1px;color:#1d2738}.stat .sub{font-size:11px;color:#9aa4b3;margin-top:8px}.accent{color:#2563eb}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #2563eb;border-radius:11px;padding:10px 14px;font-size:13px;cursor:pointer;transition:.18s;background:#2563eb;color:#fff;font-weight:700;box-shadow:0 5px 15px rgba(37,99,235,.16)}.btn:hover{transform:translateY(-1px);background:#1f5bd7}.btn.ghost{background:#fff;color:#3f4a5a;border:1px solid #dce2ea;box-shadow:none}.btn.ghost:hover{background:#f7f9fc;color:#1f5bd7;border-color:#c9d7f8}.btn.danger{background:#fff5f5;color:#d64555;border:1px solid #ffd6da;box-shadow:none}.btn.green{background:#effaf5;color:#12865a;border:1px solid #ccefe0;box-shadow:none}.btn.sm{padding:7px 10px;border-radius:9px;font-size:12px}.toolbar{padding:15px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.toolbar .grow{flex:1}.input,.select,.textarea{width:100%;background:#fff;border:1px solid #dce2ea;color:#253044;border-radius:11px;padding:10px 12px;outline:none;font-size:13px;transition:.18s}.input::placeholder,.textarea::placeholder{color:#a6aebb}.input:focus,.select:focus,.textarea:focus{border-color:#7ba3ff;box-shadow:0 0 0 3px rgba(37,99,235,.08)}.select option{background:#fff;color:#253044}.search{max-width:320px}.table-card{overflow:hidden}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;min-width:1020px;background:#fff}.table th{position:sticky;top:0;background:#f8fafc;color:#758093;font-size:11px;letter-spacing:.35px;text-align:left;padding:12px 13px;border-bottom:1px solid var(--line);white-space:nowrap}.table td{padding:13px;border-bottom:1px solid #edf0f4;font-size:13px;color:#374151;vertical-align:middle;white-space:nowrap}.table tr:hover td{background:#fbfcfe}.code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1.5px;color:#2563eb;font-weight:800}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eef4ff;border:1px solid #dae6ff;color:#2b61d4;font-size:11px}.qty{font-weight:750;color:#263247}.zero{color:#dc4c5c}.ops{display:flex;gap:7px}.pager{display:flex;justify-content:flex-end;gap:7px;padding:14px}.pager a,.pager span{min-width:34px;height:34px;border-radius:9px;display:grid;place-items:center;border:1px solid #dfe4eb;font-size:12px;background:#fff;color:#5d6879}.pager .on{background:#2563eb;color:#fff;border-color:#2563eb;font-weight:800}.form-card{padding:22px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.field label{display:block;color:#667085;font-size:12px;margin:0 0 7px}.field.span2{grid-column:span 2}.field.span3{grid-column:span 3}.form-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);margin-top:22px;padding-top:18px}.barcode-preview{background:#fff;border:1px solid #e6eaf0;border-radius:12px;padding:12px;display:flex;justify-content:center}.barcode-preview img{max-width:100%;height:84px}.section-title{font-size:15px;margin:0 0 14px;color:#253044}.hint{font-size:11px;color:#8791a1;line-height:1.7}.toast-ok{position:fixed;top:22px;right:28px;z-index:100;background:#effaf5;border:1px solid #ccefe0;color:#12865a;padding:12px 16px;border-radius:12px;box-shadow:var(--shadow);transition:.3s}.toast-ok.hide{opacity:0;transform:translateY(-8px);pointer-events:none}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#f4f7fb}.login-card{width:min(420px,100%);padding:36px 34px;border-radius:20px;background:#fff;border:1px solid #e3e8ef;box-shadow:0 20px 60px rgba(31,41,55,.10)}.login-card h1{font-size:26px;margin:0 0 28px;color:#182235;text-align:center}.login-card .field{margin-bottom:15px}.login-card .btn{width:100%;height:44px;margin-top:8px}.error{padding:10px 12px;border-radius:10px;background:#fff4f5;color:#d64555;border:1px solid #ffd8dc;font-size:12px;margin-bottom:14px}.two-col{display:grid;grid-template-columns:1.3fr .7fr;gap:16px}.list-simple{padding:8px 18px}.list-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.list-row:last-child{border-bottom:0}.list-row .meta{flex:1}.list-row .meta b{display:block;font-size:13px;color:#2d3748}.list-row .meta span{color:#8691a1;font-size:11px;margin-top:4px;display:block}.number-pill{font-family:ui-monospace,monospace;color:#2563eb;background:#eef4ff;padding:5px 8px;border-radius:8px}.print-only{display:none}
@media(max-width:1050px){.stats-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:repeat(2,1fr)}.field.span3{grid-column:span 2}.two-col{grid-template-columns:1fr}}
@media(max-width:760px){.sidebar{display:none}.main{margin-left:0;width:100%;padding:18px}.topbar h1{font-size:22px}.stats-grid{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.field.span2,.field.span3{grid-column:span 1}.top-actions{display:none}}
.brand-mark.has-logo{background:#fff;border:1px solid #e3e8ef;box-shadow:none;overflow:hidden;padding:0}.brand-mark img{width:100%;height:100%;display:block;object-fit:cover}.settings-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:18px}.settings-card{padding:24px}.settings-card .field{margin-bottom:18px}.settings-card .field:last-child{margin-bottom:0}.logo-setting-row{display:flex;align-items:center;gap:18px;padding:16px;border:1px solid var(--line);background:#f8fafc;border-radius:15px}.logo-preview-lg{width:86px;height:86px;flex:0 0 86px;border-radius:18px;display:grid;place-items:center;background:#fff;border:1px solid #dfe5ed;overflow:hidden;color:#2563eb;font-size:30px;font-weight:900}.logo-preview-lg img{width:100%;height:100%;object-fit:cover;display:block}.settings-note{padding:20px}.settings-note h3{margin:0 0 12px;font-size:15px;color:#253044}.settings-note p{margin:0;color:#7f8a9a;font-size:12px;line-height:1.9}.file-input{padding:9px 10px}.checkbox-line{display:flex;align-items:center;gap:8px;color:#667085;font-size:12px;margin-top:10px}@media(max-width:920px){.settings-layout{grid-template-columns:1fr}}

/* V1.5 批量导入页面 */
.import-hero{padding:24px 26px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(135deg,#fff 0%,#f5f9ff 100%);border-color:#dfe9f8}.import-kicker{font-size:10px;letter-spacing:2px;color:#7e91ad;font-weight:800;margin-bottom:7px}.import-hero h2{margin:0;color:#1d2c42;font-size:23px}.import-hero p{margin:10px 0 0;max-width:720px;color:#758197;font-size:12px;line-height:1.8}.auto-code-card{min-width:245px;padding:17px 19px;border:1px solid #d8e5fb;border-radius:15px;background:#fff;box-shadow:0 8px 22px rgba(37,99,235,.07)}.auto-code-card span,.auto-code-card small{display:block;color:#8a97aa;font-size:10px}.auto-code-card b{display:block;margin:6px 0;color:#255fc8;font-size:15px}.import-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;margin-bottom:18px}.import-panel{padding:22px}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.panel-head h3{margin:0;color:#25344b;font-size:16px}.panel-head p{margin:7px 0 0;color:#8a96a7;font-size:11px;line-height:1.7}.upload-box{position:relative;min-height:154px;border:1.5px dashed #b9cae4;background:#f8fbff;border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;cursor:pointer;transition:.18s}.upload-box:hover{border-color:#6e9df0;background:#f3f8ff}.upload-box input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.upload-icon{width:42px;height:42px;border-radius:13px;background:#eaf2ff;color:#2764d3;display:grid;place-items:center;font-size:22px;font-weight:900;margin-bottom:10px}.upload-box b{font-size:13px;color:#33445d}.upload-box small{margin-top:6px;color:#909cac;font-size:10px}.import-rules{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.import-rules>div{padding:13px;border:1px solid #e6ebf2;background:#fbfcfe;border-radius:13px}.import-rules b{display:block;color:#3170dd;font-size:10px;letter-spacing:1px}.import-rules span{display:block;margin-top:5px;color:#46556a;font-size:11px;font-weight:700}.import-rules small{display:block;margin-top:4px;color:#98a2b1;font-size:9px;line-height:1.55}.import-side-note{padding:20px}.side-note-title{font-size:14px;font-weight:800;color:#2d3c51;margin-bottom:14px}.field-tags{display:flex;flex-wrap:wrap;gap:8px}.field-tags span{display:inline-flex;padding:6px 9px;border:1px solid #e1e7ef;background:#f8fafc;border-radius:8px;color:#647186;font-size:10px}.field-tags span.required{color:#255fc8;border-color:#cfddf6;background:#f0f6ff}.import-side-note p{margin:16px 0 0;padding-top:14px;border-top:1px solid #edf0f4;color:#8995a6;font-size:10px;line-height:1.75}.import-side-note p b{color:#2563eb}.example-card{padding:22px}.example-badge{display:inline-flex;padding:6px 10px;border-radius:999px;background:#eff5ff;color:#2764d3;font-size:10px;font-weight:800}.example-table-wrap{overflow:auto;border:1px solid #e5eaf1;border-radius:13px}.example-table{width:100%;min-width:900px;border-collapse:separate;border-spacing:0;background:#fff}.example-table th{padding:11px 12px;background:#edf4ff;color:#42638f;font-size:10px;text-align:left;border-right:1px solid #dce7f5;border-bottom:1px solid #d7e3f2;white-space:nowrap}.example-table th:last-child{border-right:0}.example-table td{padding:11px 12px;color:#536176;font-size:11px;border-right:1px solid #edf0f4;border-bottom:1px solid #edf0f4;white-space:nowrap}.example-table tr:last-child td{border-bottom:0}.example-table td:last-child{border-right:0}.example-table tbody tr:nth-child(even) td{background:#fafcff}.import-errors{margin-top:16px;padding:14px 16px;background:#fff8f8;border:1px solid #ffdfe2;border-radius:12px;color:#b94a55;font-size:11px;line-height:1.8}.import-errors b{display:block;margin-bottom:5px;color:#a93845}@media(max-width:1000px){.import-layout{grid-template-columns:1fr}.import-rules{grid-template-columns:1fr}.auto-code-card{min-width:210px}}@media(max-width:720px){.import-hero{align-items:flex-start;flex-direction:column}.auto-code-card{width:100%}.panel-head{flex-direction:column}.panel-head .btn{width:100%}}

/* V1.6 左侧菜单当前页高亮：当前库存分类、业务页、系统页都明显显示选中状态 */
.sidebar nav a.active{
    position:relative;
    background:#f1f5f9;
    border-color:#d7dde5;
    color:#111827;
    font-weight:800;
    box-shadow:inset 4px 0 0 #334155,0 2px 8px rgba(15,23,42,.04);
}
.sidebar nav a.active span{
    width:28px;
    height:25px;
    border-radius:8px;
    display:grid;
    place-items:center;
    background:#334155;
    color:#fff;
    font-weight:800;
}
.sidebar nav a:hover:not(.active){background:#f8fafc;border-color:#e5e7eb;color:#1f2937}

/* V1.6 导入页面颜色收敛，和新 Excel 模板保持浅白/黑灰风格 */
.import-hero{background:linear-gradient(135deg,#fff 0%,#f8fafc 100%);border-color:#e2e8f0}
.auto-code-card{border-color:#e1e5ea;box-shadow:0 8px 22px rgba(15,23,42,.05)}
.auto-code-card b{color:#1f2937}.import-kicker{color:#7b8491}.upload-box{border-color:#c9d0d9;background:#fafbfc}.upload-box:hover{border-color:#8f99a6;background:#f7f8fa}.upload-icon{background:#eef1f4;color:#334155}.field-tags span.required{color:#7a5b00;border-color:#eadca7;background:#fff8d9}.example-badge{background:#f1f3f5;color:#374151}.example-table th{background:#f0f2f4;color:#1f2937;border-color:#d9dde2}.example-table tbody tr:nth-child(even) td{background:#fafafa}
