:root {
  color-scheme:light;--ink:#20362d;--muted:#67766b;--green:#0f4d3a;--dark:#103f31;--paper:#fefaf4;
  --canvas:#f7f6f0;--rail:#fbf6ef;--line:#e1e2d5;--pale:#eaf0e6;--gold:#ab8141;
  --warn:#87541d;--danger:#934735;--white:#fffefa;
  font-family:"DM Sans","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  font-size:16px;color:var(--ink);background:var(--canvas);font-synthesis:none;
}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.48;cursor:default}button{border:0;background:transparent}button:focus-visible,a:focus-visible{outline:3px solid #aa8547;outline-offset:2px}
[hidden]{display:none!important}h1,h2,h3,p{margin:0}a{color:var(--green);text-decoration:none}
i[data-icon],.ico{display:inline-flex;flex:none;align-items:center;justify-content:center;width:20px;height:20px}
.ico svg,i svg{width:100%;height:100%;display:block;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.app{min-height:100vh;display:grid;grid-template-columns:212px minmax(0,1fr)}
.rail{position:sticky;top:0;height:100vh;border-right:1px solid var(--line);background:var(--rail);padding:34px 18px 22px;display:flex;flex-direction:column}
.rail-brand {
  display:grid; justify-items:center; gap:16px; margin:0 0 32px; text-align:center;
}
.rail-brand img,.login-logo { display:block; width:160px; height:auto; }
.rail-brand span {
  font:500 15px/22px "Noto Sans CJK SC","PingFang SC","Microsoft YaHei",sans-serif;
  color:#635440; letter-spacing:.06em; text-indent:.06em;
}
.side-nav,.rail-foot{display:grid;gap:8px}.side-nav button,.rail-foot button{display:flex;align-items:center;gap:12px;text-align:left;padding:13px 17px;font-size:15px;font-weight:570;border-radius:8px;color:#526458}
.side-nav button.active,.rail-foot button.active{color:var(--green);background:#e3eadc;font-weight:700}.side-nav button:hover,.rail-foot button:hover{background:var(--pale)}.rail-foot{margin-top:auto;border-top:1px solid var(--line);padding-top:18px}
.main{min-width:0}.topbar{height:63px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,3.3vw,58px);background:#fcfaf5}.mast,.top-right,.sync,.user-chip{display:flex;align-items:center;gap:9px}.mast{color:#496354;font-size:15px;font-weight:650}.mast i{width:18px}.top-right{gap:17px}.sync{color:#526957;font-size:13px;font-weight:550}.sync b{width:7px;height:7px;border-radius:50%;background:#69875b}.sync.off b{background:#a76642}.sync.off{color:var(--danger)}.user-chip{border-left:1px solid var(--line);padding:4px 0 4px 16px;font-size:14px}.user-chip i{width:16px}
.content{padding:30px clamp(20px,3.3vw,58px) 46px;max-width:1710px;margin:auto}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:23px}.title-row{display:flex;align-items:center;gap:12px}.page-head h1{font-size:clamp(28px,2.7vw,40px);font-family:"Songti SC","STSong","SimSun",serif;letter-spacing:.015em;font-weight:700;line-height:1.2}.sub{font-size:14px;color:var(--muted);line-height:1.6;margin-top:8px}.actions,.inline,.modal-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.btn,.small-btn,.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:7px;min-height:42px;line-height:1.3;font-weight:600}.btn{padding:10px 16px;font-size:14px;border:1px solid #cfd5c9;background:var(--white)}.btn:hover,.small-btn:hover,.icon-btn:hover{filter:brightness(.97)}.btn.primary{color:#fff;background:var(--green);border-color:var(--green)}.btn.soft{color:var(--green);background:#ebefe4;border-color:#d1dbc9}.btn i,.btn .ico,.small-btn .ico{width:17px;height:17px}.small-btn{min-height:32px;font-size:14px;padding:4px 10px;border:1px solid #d3d9ca;color:var(--green);background:#f6f8f1}.icon-btn{width:36px;height:36px;min-height:36px;color:var(--muted);border:1px solid var(--line);background:var(--white)}.wide{width:100%}
.metrics{display:grid;grid-template-columns:1.22fr repeat(3,1fr);gap:13px;margin-bottom:24px}.metric{min-width:0;min-height:111px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;background:var(--white);border:1px solid var(--line);border-radius:11px;padding:17px 20px 13px;position:relative}.metric.primary{background:var(--dark);border-color:var(--dark);color:#fff}.metric-top{display:flex;gap:8px;align-items:center;font-size:14px;color:#596a58}.metric.primary .metric-top{color:#e5ece0}.metric-top .ico{width:17px;height:17px}.metric strong{font-size:38px;line-height:1.1;font-weight:620;letter-spacing:-.045em;font-variant-numeric:tabular-nums;margin:8px 0 0}.metric strong em{font:500 14px/1 sans-serif;letter-spacing:0;color:var(--muted);margin-left:8px}.metric.primary em{color:#cbd8ca}.metric:focus-visible{z-index:1}.metric:hover{border-color:#a8b8a3}.metric-foot{color:var(--muted);font-size:13px}.metric.primary .metric-foot{color:#d5e1d2}
.panel{background:var(--white);border:1px solid var(--line);border-radius:12px;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:17px 20px}.panel-head h2,.section-title{font-size:19px}.panel-title{display:flex;gap:9px;align-items:center}.panel-title .ico{color:var(--green)}.panel-title small{color:var(--muted);font-size:13px;font-weight:400}.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:0 20px 14px}.cats{display:flex;gap:5px;overflow:auto;scrollbar-width:thin;max-width:100%}.chip{border:1px solid transparent;border-radius:6px;padding:6px 10px;white-space:nowrap;color:var(--muted);font-size:14px}.chip.on{background:#e8edde;border-color:#d4ddc6;color:var(--green);font-weight:650}.chip:hover{background:#f1f3e9}
label.search{display:flex;align-items:center;gap:7px;border:1px solid #d9ddce;border-radius:7px;padding:0 10px;background:white}.search .ico{color:var(--muted);width:16px;height:16px}.search input{height:36px;min-width:0;width:155px;border:0;background:none;padding:0;font-size:14px}.search:focus-within{outline:2px solid #9eb294}.search input:focus{outline:0}.select,select{appearance:none;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23596958' stroke-width='1.4'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 11px center;padding-right:30px!important}.filter-select{height:37px;border:1px solid #d9ddce;border-radius:7px;padding:0 10px;font-size:14px}
.stock-table{width:100%;border-collapse:collapse;text-align:left}.stock-table th{background:#f3f4eb;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-weight:550;color:#61705e;font-size:13px;white-space:nowrap;padding:10px 13px}.stock-table td{padding:11px 13px;border-bottom:1px solid #ebece2;font-size:14px}.stock-table tr:last-child td{border-bottom:0}.stock-table th:first-child,.stock-table td:first-child{padding-left:20px}.stock-table th:last-child,.stock-table td:last-child{padding-right:20px;text-align:right}.stock-table tbody tr:hover{background:#fafbf5}.prod-name{display:flex;align-items:center;gap:11px}.thumb{width:39px;height:39px;background:#fbf6ef;border:1px solid #eee6d7;border-radius:9px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none}.thumb img{width:92%;height:92%;object-fit:contain;mix-blend-mode:multiply}.thumb .ico{color:#aa915e}.product-txt{display:grid;gap:4px}.product-txt strong{font-weight:620;font-size:15px;line-height:1.35}.sku-code{font-size:12px;color:#748073;letter-spacing:.045em;font-variant-numeric:tabular-nums}.stock-num{font-size:20px;font-variant-numeric:tabular-nums;line-height:1.2}.num-unit{font-size:13px;color:var(--muted);margin-left:4px}.muted{color:var(--muted)}.badge{font-size:13px;border-radius:4px;display:inline-flex;align-items:center;padding:3px 7px;white-space:nowrap;background:#f1efe6;color:#776d53}.badge.ok,.badge.in{background:#e8f1e5;color:#3d6846}.badge.low,.badge.count{background:#fbefd7;color:#83561c}.badge.empty,.badge.out{background:#f5e7df;color:#944b38}.badge.unknown{background:#eeeee8;color:#626c60}.panel-foot{padding:12px 20px;background:#fcfcf7;border-top:1px solid var(--line);color:var(--muted);display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px}.pagination{display:flex;align-items:center;gap:8px}.pagination .small-btn{min-height:28px;font-size:13px}.empty-state{padding:40px 20px;text-align:center;color:var(--muted);line-height:1.8}.empty-state strong{display:block;color:var(--ink);font-size:17px}.mobile-stock{display:none}.settings-grid{display:grid;gap:15px;grid-template-columns:repeat(2,minmax(0,1fr))}.setting-card{padding:22px;display:flex;flex-direction:column;align-items:flex-start;gap:15px}.setting-card h2{display:flex;align-items:center;gap:9px;font-size:18px}.setting-card h2 .ico{color:var(--green)}.setting-card p,.hint{font-size:14px;line-height:1.65;color:var(--muted)}.danger-text{color:var(--danger)}.tag-line{display:flex;align-items:center;gap:10px}
.ledger-list{display:grid}.ledger-entry{width:100%;display:grid;grid-template-columns:64px 1fr auto;align-items:center;gap:10px;text-align:left;padding:15px 20px;border-top:1px solid var(--line)}.ledger-entry:hover{background:#f8f9f0}.ledger-entry .badge{justify-self:start}.ledger-entry strong{display:block;font-size:15px}.ledger-entry small{display:block;font-size:13px;color:var(--muted);margin-top:5px}.ledger-time{font-size:13px;color:var(--muted);text-align:right}.doc-number{font-variant-numeric:tabular-nums}.drawer-list{display:grid;gap:10px}.line-card{border:1px solid var(--line);background:#f9faf3;border-radius:8px;padding:12px}.line-card strong{font-size:15px}.line-card p{font-size:14px;margin-top:6px}
dialog{padding:0;max-height:min(90vh,920px);max-height:min(90dvh,920px);width:min(640px,calc(100% - 26px));border:1px solid #cbd4c3;border-radius:14px;box-shadow:0 16px 65px #1e372e30;color:var(--ink);background:var(--white);overscroll-behavior:contain}
dialog::backdrop{background:#1a2f265c}.dialog-head{position:sticky;z-index:2;top:0;background:var(--white);padding:18px 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.dialog-head h2{font-size:23px;font-family:"Songti SC","SimSun",serif}.kicker{color:var(--gold);font-size:13px}.kicker:empty{display:none}.dialog-body{padding:20px 22px}.stack{display:grid;gap:15px}.stack label,.field{display:grid;gap:6px;font-size:14px;font-weight:600}.stack input,.stack textarea,.stack select,.field input,.field select,.field textarea{width:100%;border:1px solid #cad3c2;border-radius:7px;background-color:white;padding:10px 11px;min-height:42px;color:var(--ink);font-weight:450;font-size:16px}.stack input:focus,.stack textarea:focus,.stack select:focus,.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #9db093;outline-offset:1px}.stack textarea,.field textarea{resize:vertical;line-height:1.6}.stack input:disabled{background:#f1f2ea}
.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}.segments{display:flex;padding:4px;border-radius:8px;background:#f0f1e8;gap:4px}.segments button{padding:9px;border-radius:6px;flex:1;font-size:15px;font-weight:600;color:var(--muted)}.segments button.on{background:var(--white);color:var(--green);box-shadow:0 1px 4px #2434221a}.notice{border:1px solid #e0deca;border-radius:7px;padding:9px 12px;background:#f7f4e9;font-size:14px;line-height:1.5}.err{font-size:14px;color:var(--danger);line-height:1.6;white-space:pre-line}.err:empty{display:none}.modal-actions{border-top:1px solid var(--line);padding-top:14px;justify-content:flex-end}.draft-row{padding:12px;background:#fafaf3;border:1px solid var(--line);border-radius:8px;display:grid;gap:7px}.draft-inputs{display:grid;grid-template-columns:minmax(0,1fr) 100px 32px;gap:7px;align-items:end}.draft-inputs .icon-btn{min-height:39px;width:32px}.row-meta,.raw-line{color:var(--muted);font-size:13px;line-height:1.5}.raw-line{overflow-wrap:anywhere}.row-problem{color:var(--danger);font-size:13px}.row-problem:empty{display:none}.draft-rows{display:grid;gap:8px}.modal-minor{display:flex;justify-content:space-between;gap:8px;align-items:center}.draft-inputs select{font-size:14px}.check-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.qr-wrap{display:flex;align-items:center;gap:18px}.qr-wrap img{width:148px;height:148px;border:1px solid var(--line);border-radius:7px}.long-url{font-family:ui-monospace,monospace;word-break:break-all;font-size:14px}.ex-table{width:100%;border-collapse:collapse;font-size:14px}.ex-table td{padding:7px 0;border-bottom:1px solid var(--line)}.ex-table td:last-child{text-align:right}.sr-only{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}.mobile-nav{display:none}
#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);max-width:90vw;background:#17392d;color:#fff;padding:11px 18px;border-radius:9px;font-size:14px;box-shadow:0 5px 24px #1d38251f;z-index:10}
@media(min-width:1500px){.app{grid-template-columns:220px minmax(0,1fr)}.stock-table td{padding-top:13px;padding-bottom:13px}}
@media(max-width:1100px){.app{grid-template-columns:194px minmax(0,1fr)}.rail{padding:28px 12px 16px}.content{padding:25px 22px}.topbar{padding:0 22px}.metrics{gap:8px}.metric{padding:13px;min-height:99px}.metric strong{font-size:33px}.stock-table th,.stock-table td{padding-left:8px;padding-right:8px}.search input{width:130px}.panel-head{align-items:flex-start}.panel-head .filters{justify-content:flex-end}.panel-head{padding:15px}.toolbar{padding:0 15px 12px}.stock-table td:first-child,.stock-table th:first-child{padding-left:15px}.metric-top{gap:5px}}
@media(max-width:760px){.app{display:block}.rail{display:none}.topbar{height:51px;padding:0 16px;position:sticky;top:0;z-index:3}.mast{font-size:14px}.content{padding:22px 13px calc(84px + env(safe-area-inset-bottom))}.top-right{gap:8px}.user-chip{padding-left:9px}.page-head{align-items:flex-start;margin-bottom:15px;flex-wrap:wrap;gap:12px}.page-head h1{font-size:30px}.page-head .actions{gap:7px}.btn{min-height:40px;padding:9px 12px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}.metric{padding:11px 13px;min-height:79px}.metric strong{font-size:28px;margin-top:5px}.metric-top{font-size:13px}.metric-top .ico{width:15px;height:15px}.metric strong em{font-size:13px}.metric-foot{display:none}.panel-head{padding:13px 12px;display:grid;gap:10px}.panel-title h2{font-size:17px}.filters{gap:6px;justify-content:flex-start!important}.filters .search{flex:1}.search input{width:100%}.toolbar{padding:0 10px 10px}.chip{padding:5px 8px;font-size:14px}.cats{width:100%;overflow-y:hidden}.stock-table{display:none}.mobile-stock{display:block}.mobile-row{border-top:1px solid var(--line);width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;padding:11px 12px;text-align:left}.mobile-row .prod-name{gap:8px}.mobile-row .thumb{width:34px;height:34px}.mobile-row .product-txt{gap:4px}.mobile-row .product-txt strong{font-size:14px}.mobile-row .sku-code{font-size:12px}.mobile-qty{text-align:right;display:grid;justify-items:end;gap:3px}.mobile-qty .badge{font-size:12px;padding:2px 5px}.mobile-row .stock-num{font-size:17px}.panel-foot{padding:9px 10px}.settings-grid{grid-template-columns:1fr}.setting-card{padding:17px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:4;display:flex;border-top:1px solid var(--line);padding:5px 1px calc(5px + env(safe-area-inset-bottom));background:#fdfbf5}.mobile-nav button{flex:1;display:grid;justify-items:center;align-items:center;gap:3px;color:#6f7b6c;font-size:12px;min-height:44px}.mobile-nav button.active{color:var(--green);font-weight:750}.mobile-nav .active i{stroke-width:2}.ledger-entry{grid-template-columns:44px 1fr auto;padding:12px 10px;gap:7px}.ledger-entry strong{font-size:14px}.ledger-time{font-size:12px}.dialog-body,.dialog-head{padding:15px}.dialog-head h2{font-size:21px}.draft-row{padding:9px}.draft-inputs{grid-template-columns:minmax(0,1fr) 65px 28px;gap:4px}.draft-inputs .icon-btn{width:27px}.draft-inputs select{padding-left:7px}.qr-wrap{flex-direction:column;text-align:center}.mobile-hidden{display:none}.sub{font-size:13px}.two-cols{gap:9px}#toast{bottom:80px}.dialog-body .modal-actions{padding-bottom:4px}}
@media(max-width:400px){.draft-inputs{grid-template-columns:minmax(0,1fr) 58px 26px}.btn{padding:9px}.filter-select{max-width:113px}.ledger-time{max-width:73px}.settings-grid .btn{font-size:13px}.top-right .user-chip{max-width:85px;overflow:hidden}.metric{min-height:72px}.sub{margin-top:5px}.panel-head{gap:8px}}
.cats .chip{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:5px 11px;min-height:33px}.cats .chip img{width:31px;height:23px;object-fit:contain;mix-blend-mode:multiply}.cats .chip .ico{width:16px;height:16px}
@media(max-width:760px){.cats .chip{gap:4px;padding:5px 7px}.cats .chip img{width:24px;height:20px}.cats .chip .ico{width:14px}}
.lan-qr { padding:14px; background:#f8f8f1; border:1px solid var(--line); border-radius:10px; }
.lan-qr img { flex:none; width:192px; height:192px; max-width:100%; border:0; border-radius:0; }
.lan-qr .hint,.home-guide .hint { line-height:1.65; }
.home-guide[open] > .hint,.home-guide[open] > ol { margin-top:10px; }
@media(max-width:760px){.lan-qr .remote-details{justify-items:center;}}
.remote-card{padding:14px;border:1px solid var(--line);border-radius:9px;background:#f7f8ef}
.remote-details,.connect-setup{display:grid;gap:9px;justify-items:start;min-width:0}
.remote-url{font-family:ui-monospace,monospace;font-size:16px;overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:3px}
.connect-steps{margin:0;padding-left:1.5rem;font-size:15px;line-height:1.65}.connect-steps li+li{margin-top:4px}
.remote-manual{padding:10px 13px;border:1px solid var(--line);border-radius:7px}.remote-manual summary{cursor:pointer;font-size:14px;font-weight:600}.remote-manual form{padding-top:12px}.remote-manual button{justify-self:start}
.remote-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:12px;border-top:1px solid var(--line)}.remote-foot button{flex:none}
@media(max-width:760px){.remote-details{justify-items:center}.remote-foot{align-items:flex-start;flex-direction:column;gap:8px}}

/* Use the full original lockup at its specified screen minimum. */
.login-screen {
  min-height:100vh; min-height:100svh; display:grid; place-items:center;
  padding:clamp(24px,5vh,60px) 20px;
  background:radial-gradient(ellipse at 50% 32%,#fffdf8 0%,#fbf8f1 54%,#f3f2e9 100%);
}
.login-shell {
  width:min(100%,446px); overflow:hidden; border:1px solid #e1dfd2; border-radius:22px;
  background:#fffefa; box-shadow:0 16px 54px -24px #3b46332e;
}
.login-head { background:var(--paper); text-align:center; padding:26px 24px 21px; border-bottom:1px solid #e8e1d4; }
.login-logo { margin:0 auto 18px; }
.login-head h1 {
  font:600 25px/34px "Noto Serif CJK SC","Songti SC","STSong","SimSun",serif;
  color:var(--green); letter-spacing:.025em; text-indent:.025em;
}
.brand-motto {
  margin:4px 0 0; color:#74654e;
  font:400 13px/21px "Noto Serif CJK SC","Songti SC","STSong","SimSun",serif;
  letter-spacing:.03em; text-indent:.03em;
}
.login-form { padding:24px 32px 21px; }
.login-form h2 { margin:0 0 16px; font-size:19px; line-height:27px; font-weight:650; color:#183f32; }
.login-field + .login-field { margin-top:14px; }
.login-field label { display:block; margin-bottom:5px; color:#374d41; font-size:14px; line-height:21px; font-weight:600; }
.login-input { min-height:48px; display:flex; align-items:center; border:1px solid #d8ded2; border-radius:10px; background:white; }
.login-input:focus-within { border-color:#4a7964; box-shadow:0 0 0 3px #0f4d3a10; }
.login-input input { flex:1 1 0; min-width:0; width:100%; height:46px; padding:0 13px; border:0; border-radius:10px; background:transparent; font-size:16px; color:#203e2f; line-height:1.4; }
.login-input input:focus { outline:0; }
.login-input input::placeholder { color:#788479; opacity:1; }
.login-submit { width:100%; min-height:48px; margin-top:22px; border-radius:11px; background:var(--green); color:white; font-size:16px; font-weight:650; letter-spacing:.025em; }
.login-submit:hover { background:#103f31; }
.login-submit:active { transform:translateY(1px); }
.login-status,.login-form .err { margin:10px 0 0; font-size:14px; line-height:1.5; }
.login-status { color:#58695e; }
.login-status:empty,.login-form .err:empty { display:none; }
.members-note { display:flex; align-items:center; justify-content:center; gap:6px; color:#647063; font-size:12px; line-height:19px; margin-top:15px; }
.members-note i { width:15px; height:15px; }
@media (max-width:550px) {
  .login-screen { display:block; padding:0 16px max(24px,env(safe-area-inset-bottom)); background:var(--paper); }
  .login-shell { margin:auto; max-width:430px; border:none; background:transparent; box-shadow:none; overflow:visible; }
  .login-head { border:none; padding:max(22px,env(safe-area-inset-top)) 10px 22px; }
  .login-logo { margin-bottom:16px; }
  .login-head h1 { font-size:24px; line-height:32px; }
  .login-form { background:#fffefa; padding:20px 18px 18px; border:1px solid #e3dfd2; border-radius:18px; box-shadow:0 9px 28px -22px #283e35a0; }
}
@media (max-width:345px) {
  .login-screen { padding-inline:11px; }
  .login-form { padding-inline:15px; }
}

.show-pass { align-self:stretch; flex:none; padding:0 14px; font-size:14px; color:var(--green); border-radius:0 10px 10px 0; }
.show-pass:hover { background:#eff5ed; }
.login-form .login-status:not(:empty) { margin:-8px 0 16px; font-size:13px; line-height:20px; }
.login-form .login-submit:disabled { opacity:.65; }
.admin-list { padding:0; margin:0; list-style:none; border-top:1px solid var(--line); }
.admin-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.admin-row strong { overflow-wrap:anywhere; }
.admin-row small { display:block; color:var(--muted); font-size:13px; margin-top:4px; }

/* Keep sale activity beside stock status on the overview. */
.metrics { grid-template-columns:1.22fr .84fr 1.28fr repeat(3,minmax(0,1fr)); }
.amount-metric strong { font-size:clamp(22px,2.25vw,32px); letter-spacing:-.035em; line-height:1.28; overflow-wrap:anywhere; }
.row-actions,.scope-note { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.row-actions { justify-content:flex-end; }
.text-btn { display:inline-flex; align-items:center; justify-content:center; color:var(--green); font-size:14px; font-weight:650; padding:5px 2px; }
.text-btn:hover { text-decoration:underline; text-underline-offset:3px; }
.scope-note { margin:0 0 13px; color:var(--green); font-size:14px; }
.scope-note .btn { min-height:32px; padding:5px 10px; }
.variant-picker,.purpose-fields,.qty-line { display:grid; gap:10px; align-items:end; }
.variant-picker { grid-template-columns:1fr 1fr 1fr; }
.variant-picker label,.purpose-fields label,.two-cols label { min-width:0; }
.variant-picker select,.purpose-fields input,.two-cols input { min-width:0; }
.variant-picker select:disabled { color:#70796f; background-color:#efefe7; }
.purpose-fields,.qty-line { grid-template-columns:repeat(2,minmax(0,1fr)); }
.qty-line { grid-template-columns:minmax(105px,32%) auto; }
.qty-line .icon-btn { justify-self:end; }
.variant-advanced { border-top:1px solid var(--line); padding-top:10px; }
.variant-advanced summary { color:var(--green); cursor:pointer; font-size:14px; font-weight:600; }
.variant-advanced > .stack { padding-top:14px; }

.report-controls,.report-caption,.report-explain,.report-legacy { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.report-controls { padding-bottom:16px; border-bottom:1px solid var(--line); margin-bottom:20px; }
.report-tabs,.date-controls { display:flex; align-items:center; gap:5px; }
.report-tabs { padding:3px; background:#e9ede1; border:1px solid #dce2d2; border-radius:9px; }
.report-tabs button { padding:6px 19px; min-height:34px; border-radius:6px; font-size:14px; font-weight:600; color:#626e60; }
.report-tabs button[aria-pressed="true"] { color:#fff; background:var(--green); }
.date-controls input { min-width:130px; max-width:180px; padding:4px 8px; border:1px solid #d3d9ca; background:#fffefa; border-radius:6px; height:34px; font-variant-numeric:tabular-nums; font-size:15px; }
.step { min-width:34px; font-size:21px; line-height:1; }
.report-caption { margin:0 0 12px; }
.report-caption h2 { font-size:19px; font-weight:650; }
.report-cards { display:grid; grid-template-columns: .9fr 1.1fr 1.1fr .9fr; gap:12px; }
.summary-card { border:1px solid var(--line); background:var(--white); border-radius:10px; padding:16px 17px; min-width:0; display:grid; align-content:start; gap:9px; text-align:left; }
.summary-card > span { font-size:14px; color:var(--muted); }
.summary-card strong { line-height:1.32; font-weight:650; font-size:clamp(19px,2.1vw,31px); overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.summary-card strong em { font-style:normal; font-weight:500; font-size:14px; margin-left:6px; }
.summary-card small { color:var(--muted); font-size:12px; line-height:1.5; }
.summary-card.major { background:var(--dark); border-color:var(--dark); color:var(--white); }
.summary-card.major > span { color:#e4eddf; }
.report-explain { align-items:baseline; padding:13px 2px; gap:4px 14px; }
.report-explain > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:5px 15px; font-size:14px; color:var(--muted); }
.report-explain strong { color:var(--ink); font-size:14px; }
.report-explain b { color:#435b4c; font-weight:600; }
.report-legacy { padding:8px 12px; margin:6px 0; border:1px solid #e5d9bc; background:#fbf4e4; border-radius:7px; color:#735a2d; font-size:14px; }
.report-panel { margin-top:14px; }
.report-panel .panel-head { border-bottom:1px solid var(--line); }
.report-panel .panel-head small { font-size:13px; }
.rtable { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.rtable th,.rtable td { text-align:right; padding:10px 15px; font-size:14px; }
.rtable th { color:var(--muted); background:#f3f4eb; font-weight:550; font-size:13px; }
.rtable th:first-child,.rtable td:first-child { text-align:left; padding-left:20px; }
.rtable td { border-top:1px solid #e8eadf; }
.rtable td small { display:block; font-size:12px; color:var(--muted); margin-top:3px; }
.rtable td strong { font-size:14px; font-weight:620; }
.report-empty,.report-note { font-size:14px; line-height:1.65; color:var(--muted); }
.report-empty { padding:20px; }
.report-note { margin:13px 1px; }
@media(max-width:760px) {
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metrics .metric strong { margin-block:auto 0; padding-top:5px; }
  .amount-metric strong { font-size:23px; }
  .variant-picker { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .variant-picker > label:last-child { grid-column:1/-1; }
  .purpose-fields { grid-template-columns:minmax(0,1fr); gap:8px; }
  .two-cols { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-controls { align-items:center; gap:10px; margin-bottom:14px; padding-bottom:12px; }
  .report-tabs button { padding:5px 12px; }
  .date-controls { gap:4px; flex-wrap:wrap; }
  .date-controls input { min-width:113px; font-size:14px; max-width:143px; }
  .step { min-width:28px; padding:5px; }
  .report-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .summary-card { padding:11px 12px; min-height:76px; gap:5px; }
  .report-caption h2 { font-size:17px; }
  .report-caption .small-btn { font-size:12px; }
  .report-explain { align-items:flex-start; padding:12px 1px 0; }
  .report-panel .panel-head { display:flex; align-items:center; }
  .rtable,.rtable tbody { display:block; }
  .rtable thead { position:absolute; width:1px; height:1px; clip:rect(0,0,0,0); overflow:hidden; }
  .rtable tbody tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding:10px 12px; border-bottom:1px solid var(--line); }
  .rtable tbody tr:last-child { border-bottom:none; }
  .rtable td,.rtable td:first-child { display:block; text-align:left; border:0; padding:0; font-size:13px; overflow-wrap:anywhere; }
  .rtable td:first-child { grid-column:1/-1; }
  .rtable td:not(:first-child)::before { display:block; color:var(--muted); font-size:11px; margin-bottom:3px; }
  .rtable td:nth-child(2)::before { content:"销售单数"; }
  .rtable td:nth-child(3)::before { content:"销售出库"; }
  .rtable td:nth-child(4)::before { content:"库存减少"; }
  .rtable td:nth-child(5)::before { content:"销售退回"; }
  .rtable td:nth-child(6)::before { content:"商品销售额"; }
  .rtable td:nth-child(7)::before { content:"净销售额"; }
}

.stock-price,.mobile-price,.line-money,.money-total { font-variant-numeric:tabular-nums; }
.stock-price { white-space:nowrap; }
.mobile-price { color:var(--green); font-size:13px; line-height:1.4; }
.priced-line { grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) auto; }
.priced-line input { width:100%; min-width:0; }
.price-hint { color:var(--muted); font-size:13px; line-height:1.5; }
.money-total { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:13px 15px; background:#eef3e9; border-radius:8px; color:var(--green); }
.money-total strong { font-size:20px; }
.line-money { color:var(--muted); }
.line-money b { color:var(--green); }
@media (min-width:761px) and (max-width:1180px) {
  .metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #tableContent,.rtable-wrap { overflow-x:auto; }
}

.app-id {display:flex;align-items:center;gap:14px;margin:2px 0 8px}
.app-id img {flex:none;width:64px;height:64px;border:1px solid var(--line);border-radius:15px}
.app-id strong,.app-id span {display:block}
.app-id strong {font-size:21px;line-height:1.45;color:var(--green)}
.app-id span {font-size:14px;color:var(--muted);margin-top:3px}
.app-address {display:grid;gap:5px}
.phone-entry .btn {justify-self:start}
button.login-install {display:none}
@media(max-width:720px) {button.login-install {display:block;margin:7px auto 0;min-height:36px}}
@media(display-mode:standalone) {button.login-install {display:none}}
