@charset "UTF-8";
:root{--ink:#243b32;--muted:#7c8279;--green:#234c3e;--green-light:#edf3ee;--cream:#f7f7f2;--line:#e6e8df;--gold:#b79b65;--red:#ad5145;--serif:"Songti SC","Noto Serif SC","SimSun",serif;--sans:"Microsoft YaHei","PingFang SC",system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font:14px/1.6 var(--sans)}button,input,select,textarea{font:inherit}button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #b8a271;outline-offset:3px}button:disabled{cursor:not-allowed;opacity:.5}[hidden]{display:none!important}
.sidebar{width:228px;position:fixed;inset:0 auto 0 0;background:#fcfcf8;border-right:1px solid var(--line);padding:35px 20px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;gap:12px;align-items:center;padding:0 10px;font:600 26px var(--serif);letter-spacing:2px}.brand-mark{width:48px;height:48px;background:var(--green);color:#ece3cf;border-radius:14px;display:grid;place-items:center;font-weight:400;box-shadow:0 5px 15px #234c3e15}.brand small{font:10px var(--sans);letter-spacing:1px;display:block;margin-top:7px;color:var(--muted)}.nav-label{color:#999d92;font-size:11px;letter-spacing:1px;margin:45px 15px 13px}nav{display:flex;flex-direction:column;gap:7px}nav a{padding:13px 15px;display:flex;gap:12px;align-items:center;border-radius:9px;color:#727c72;font-size:13px}nav a.active{background:#eaf0e9;color:var(--green);font-weight:600}nav a:hover{background:#eff2eb}nav a>span:first-child{display:flex}.nav-count{margin-left:auto;background:#dde7dc;border-radius:5px;padding:0 6px;font-size:10px}.sidebar-bottom{margin-top:auto;padding:19px 14px;border-top:1px solid var(--line);font-size:12px;color:#5b6c5e}.sidebar-bottom small{display:block;margin-top:8px;margin-left:15px;font-size:10px;line-height:1.8;color:#969c91}.status-dot,.device-badge i{background:#6f9474;width:6px;height:6px;border-radius:50%;display:inline-block;margin-right:6px}
main{margin-left:228px;min-height:100vh}.topbar{height:78px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;background:#fcfcf980}.breadcrumb{font-size:12px;color:#8b9186}.breadcrumb span{padding:0 15px;color:#c4c8bd}.breadcrumb b{color:#5a685c;font-weight:500}.top-right{display:flex;align-items:center;gap:20px;color:#909589;font-size:11px}.device-badge{border:1px solid #e1e6da;border-radius:20px;padding:4px 10px;color:#6f826b}.content{max-width:1450px;margin:auto;padding:36px 42px 30px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.eyebrow{color:var(--gold);font-size:10px;letter-spacing:2px;margin-bottom:6px}.page-heading h1{font:500 30px/1.3 var(--serif);letter-spacing:1px;margin:0 0 9px}.page-heading p{color:var(--muted);font-size:12px;margin:0}.actions{display:flex;gap:10px;flex-wrap:wrap}.btn{border:1px solid #d9e0d3;border-radius:7px;padding:10px 17px;background:#fff;color:var(--green);font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;line-height:1.4;white-space:nowrap}.btn svg{width:16px;height:16px}.btn.primary{background:var(--green);border-color:var(--green);color:#fff}.btn:hover{filter:brightness(.97);box-shadow:0 3px 9px #234c3e0c}.btn.small{padding:7px 11px;font-size:11px}.btn.danger{color:var(--red);border-color:#e4c7c0}.link-btn{background:none;border:0;padding:3px;color:var(--green);font-size:12px}.link-btn:hover{text-decoration:underline}.link-btn.red{color:var(--red)}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:26px}.metric{background:#fff;border:1px solid var(--line);border-radius:11px;padding:21px 22px;position:relative;overflow:hidden}.metric.dark{background:var(--green);border-color:var(--green);color:#fff}.metric-label{font-size:11px;color:#7e897a;display:flex;align-items:center;justify-content:space-between}.metric-label svg{color:#9aa58e;width:17px;height:17px}.metric.dark .metric-label{color:#c1d3c6}.metric.dark svg{color:#c1d3c6}.metric-value{font-size:29px;line-height:1.5;font-weight:600;letter-spacing:-.7px;margin-top:8px;font-variant-numeric:tabular-nums}.metric-value small{font-size:12px;font-weight:400;margin-left:4px;letter-spacing:0}.metric-foot{font-size:10px;color:#929a8a;margin-top:7px}.metric.dark .metric-foot{color:#aec3b2}.currency{font-size:.6em;margin-right:4px;font-weight:400}.positive{color:var(--green)}.negative{color:var(--red)}.metric.dark .negative{color:#ffc4ad}.overview-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr);gap:23px;margin-bottom:24px}.panel{border:1px solid var(--line);background:#fff;border-radius:11px;overflow:hidden}.panel-head{padding:21px 23px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eff0e9;gap:12px}.panel h2{font:600 16px var(--serif);margin:0;letter-spacing:.5px}.panel-sub{font-size:10px;color:#949c8e;margin-top:5px}.tag{font-size:10px;border:1px solid #e4e9dd;padding:3px 8px;border-radius:5px;color:#7a8972;background:#f7f9f3}.chart{height:220px;display:flex;gap:12px;align-items:flex-end;padding:24px 25px 15px;position:relative}.chart:before{content:"";position:absolute;inset:28px 25px 39px;background:repeating-linear-gradient(to top,transparent 0,transparent calc(33.333% - 1px),#eff1e9 33.333%);pointer-events:none}.bar-col{height:100%;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;z-index:1;min-width:0}.bar-values{font-size:9px;color:#839078;min-height:16px}.bars{height:145px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:4px}.bar{width:20px;max-width:38%;background:#c4d3b8;border-radius:4px 4px 0 0;min-height:2px}.bar.profit{background:#315c46}.bar.loss{background:#d2a18a}.bar-label{font-size:10px;color:#999f93;margin-top:9px}.chart-legend{display:flex;justify-content:center;gap:22px;font-size:10px;color:#8a9481;padding:0 0 18px}.legend-dot{display:inline-block;width:7px;height:7px;border-radius:2px;margin-right:6px;background:#c4d3b8}.legend-dot.profit{background:#315c46}.summary-body{padding:22px}.summary-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:12px;color:#88917e}.summary-row b{color:#52654f;font-weight:500;font-variant-numeric:tabular-nums}.summary-row.total{border-top:1px dashed var(--line);margin-top:8px;padding-top:17px}.summary-row.total b{font-size:20px;font-weight:600}.note-box{background:#f5f6ef;border-radius:7px;color:#8a907c;font-size:10px;padding:11px 13px;margin-top:12px;line-height:1.8}.section-gap{margin-top:24px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:12px}th{text-align:left;color:#92998b;font-weight:400;background:#fbfcf8;font-size:10px;padding:12px 20px}td{padding:17px 20px;border-top:1px solid #f0f1ea;vertical-align:middle;font-variant-numeric:tabular-nums}tbody tr:hover{background:#fcfdf9}td.num,th.num{text-align:right}.item-name{font-weight:600;color:#40573f;font-size:12px;max-width:240px;white-space:normal;overflow-wrap:anywhere}.item-code{font-size:10px;color:#9ba18f;margin-top:3px}.pill{display:inline-block;font-size:10px;padding:3px 8px;border-radius:4px;background:#edf3e7;color:#6e8860}.pill.low{background:#faf0dd;color:#a68b52}.pill.out{background:#f0f1eb;color:#969b8d}.pill.void{background:#f7eae5;color:#a06a5b}.muted{color:#929b8a}.small-note{font-size:10px;color:#979e91}.row-actions{display:flex;gap:12px;align-items:center}.filters{display:flex;flex-wrap:wrap;gap:11px;padding:17px 21px;border-bottom:1px solid var(--line);align-items:center}.search{position:relative;flex:1;min-width:190px}.search svg{position:absolute;left:12px;top:11px;width:16px;height:16px;color:#95a18c}.search input{width:100%;padding-left:37px}.filters input,.filters select{border:1px solid #e2e6da;border-radius:6px;background:#fff;padding:8px 11px;color:#66755e;font-size:11px}.filters label{font-size:11px;color:#8b9580;display:flex;align-items:center;gap:7px}.filters .search input{padding-left:37px}.filter-count{font-size:11px;color:#969e8e}.table-foot{font-size:10px;padding:13px 22px;color:#969e8e;background:#fcfdf9;border-top:1px solid var(--line)}.empty{padding:50px 25px;text-align:center;color:#929a89}.empty-icon{display:inline-flex;background:#f0f4e9;border-radius:16px;padding:14px;margin-bottom:12px;color:#8c9c7c}.empty-icon svg{width:27px;height:27px}.empty h3{font:600 18px var(--serif);color:#556a4f;margin:0 0 8px}.empty p{font-size:12px;margin:0 auto 18px;max-width:370px}.welcome{display:grid;grid-template-columns:1fr 150px;gap:20px;background:#eef2e8;border:1px solid #e1e8d9;border-radius:11px;margin-bottom:24px;padding:27px 30px}.welcome h2{font:500 21px var(--serif);margin:0 0 10px}.welcome p{font-size:12px;color:#879179;max-width:520px;margin:0 0 20px;line-height:1.9}.incense-art{display:flex;align-items:flex-end;justify-content:center;gap:10px;position:relative;padding:10px 15px 20px;border-bottom:2px solid #bec9ac;width:100px;margin:auto}.incense-art i{display:block;height:88px;width:3px;background:linear-gradient(#bf8666 0 6px,#6c815a 6px 65px,#ba9e70 65px);transform:rotate(8deg)}.incense-art i:nth-child(2){height:115px;transform:rotate(0)}.incense-art i:nth-child(3){height:95px;transform:rotate(-8deg)}.incense-art:before{content:"";width:36px;height:54px;border:1px solid #b8c5aa;border-bottom:0;border-right:0;border-radius:50%;position:absolute;top:-30px;left:49px;transform:rotate(20deg)}.progress{height:5px;background:#edf0e7;border-radius:4px;min-width:90px;margin-top:7px;overflow:hidden}.progress span{height:100%;display:block;background:#8fa57b}.below-table{font-size:11px;color:#939a89;line-height:1.9;margin-top:14px}.inventory-total{font-size:12px;padding:16px 23px;background:#f8faf3;color:#7e8b70;border-bottom:1px solid var(--line)}
.backup-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.backup-card{padding:27px}.backup-card .icon-circle{width:42px;height:42px;border-radius:11px;background:#eef3e8;display:grid;place-items:center;color:#6c885b;margin-bottom:17px}.backup-card h2{font-size:18px;margin:0 0 12px}.backup-card p{font-size:12px;color:#929987;line-height:1.9;min-height:47px;margin:0 0 20px}.backup-card .actions{margin-top:14px}.rules{padding:24px 28px}.rules h2{margin-bottom:18px}.rules p{font-size:12px;line-height:1.95;color:#89947e;margin:9px 0}.rules strong{color:#607553;font-weight:500}.backup-state{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:16px 22px;font-size:11px;background:#edf3e7;color:#7f9073;border-radius:8px;margin-bottom:22px}footer{max-width:1450px;margin:0 auto;padding:20px 42px 28px;font-size:10px;color:#a6ad9b;display:flex;justify-content:space-between;gap:15px;border-top:1px solid #e9ecdf}.demo-banner{padding:10px 42px;background:#efe3c8;color:#8d7445;font-size:12px;display:flex;justify-content:space-between;gap:12px;align-items:center}.demo-banner button{background:none;border:1px solid #c6b389;border-radius:4px;color:#8d7445;padding:3px 10px}.fatal{margin:20px 42px;padding:20px;background:#f9e8e2;border-radius:8px;color:#a45e4d;font-size:12px}.fatal button{margin-top:10px}
dialog{border:1px solid #e2e5d7;border-radius:14px;padding:0;width:min(620px,calc(100% - 24px));max-height:90vh;color:var(--ink);box-shadow:0 22px 80px #14291e2f;background:#fff}dialog::backdrop{background:#1d30277a;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;padding:23px 27px;border-bottom:1px solid var(--line);gap:15px}.dialog-head h2{font:600 21px var(--serif);margin:0}.dialog-head p{font-size:11px;color:#929b87;margin:6px 0 0}.close-btn{border:0;background:#f1f4eb;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;color:#7c8d6f;padding:0}.close-btn svg{width:15px;height:15px}.form-body{padding:24px 27px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.field{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#63765a}.field.wide{grid-column:1/-1}.field input,.field select,.field textarea{width:100%;padding:10px 11px;border:1px solid #dfe5d6;border-radius:6px;color:#405b35;background:#fff;min-width:0}.field input:disabled{background:#f3f5ef;color:#8c9682}.field textarea{resize:vertical;min-height:75px}.field small{font-size:10px;color:#98a18d}.form-calc{padding:14px 16px;border:1px solid #e4eadb;border-radius:7px;background:#f5f8ef;margin-top:20px;display:flex;justify-content:space-between;gap:12px;font-size:12px;flex-wrap:wrap;color:#859578}.form-calc b{font-size:16px;color:#4a6a3c}.form-error{margin:15px 0 0;color:#b25b49;background:#fdf0e9;padding:11px;border-radius:6px;font-size:12px}.dialog-foot{padding:17px 27px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px}.confirm-body{padding:24px 27px;font-size:13px;color:#819175;line-height:1.9}.confirm-body strong{color:#4b6a3b}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:12px;padding:23px 27px}.detail-grid div{padding:11px;background:#f7f9f2;border-radius:6px;overflow-wrap:anywhere}.detail-grid small{display:block;color:#97a38b;margin-bottom:4px}.detail-history{padding:0 27px 24px}.detail-history h3{font:600 16px var(--serif)}.detail-history .history-item{padding:10px 0;border-bottom:1px solid var(--line);font-size:12px;display:flex;gap:10px;justify-content:space-between}.history-item small{display:block;color:#9ba58f}.wrap-text{white-space:pre-wrap;overflow-wrap:anywhere}.note-detail{padding:0 27px 20px;font-size:12px;color:#8e9a81}.sample-tag{background:#f0e8d4;color:#9a8350;font-size:10px;padding:3px 7px;border-radius:4px}#toast{position:fixed;bottom:28px;left:calc(50% + 100px);transform:translateX(-50%);background:#264c3f;color:#fff;padding:11px 22px;font-size:12px;border-radius:8px;box-shadow:0 6px 25px #234c3e30;z-index:100;max-width:90vw}.saved-at{font-size:10px;color:#a0a78f}
@media(min-width:1600px){.content{padding-top:45px}.metric{padding:25px}.metric-value{font-size:34px}}
@media(max-width:1100px){.sidebar{width:190px;padding:30px 13px}main{margin-left:190px}.content{padding:28px}.topbar{padding:0 28px}.metric{padding:17px}.metric-value{font-size:25px}.overview-grid{grid-template-columns:1.3fr 1fr;gap:17px}th,td{padding-left:16px;padding-right:16px}footer{padding:20px 28px}.page-heading h1{font-size:27px}.btn{padding:10px 13px}.top-right{gap:10px}}
@media(max-width:800px){.sidebar{width:76px;padding:24px 9px}.brand{padding:0;justify-content:center}.brand>span:last-child,.nav-label,.nav-count,.sidebar-bottom{display:none}.brand-mark{width:42px;height:42px;font-size:24px}nav{margin-top:35px;gap:12px}nav a{font-size:0;padding:14px;justify-content:center;gap:0}nav a svg{width:22px;height:22px}main{margin-left:76px}.metrics{grid-template-columns:1fr 1fr;gap:13px}.overview-grid{grid-template-columns:1fr}.backup-grid{grid-template-columns:1fr}.topbar{height:62px}.page-heading{align-items:flex-start}.page-heading .actions{justify-content:flex-end}.metric-value{font-size:29px}.content{padding:25px}.topbar{padding:0 25px}.top-right>span:first-child{display:none}.welcome{padding:25px;grid-template-columns:1fr 80px}.incense-art{transform:scale(.8)}footer{font-size:9px;flex-direction:column;gap:3px}.demo-banner{padding:10px 25px}.fatal{margin:20px 25px}#toast{left:calc(50% + 38px)}}
@media(max-width:520px){.sidebar{width:auto;height:64px;inset:auto 0 0;padding:0;background:#fbfcf8;border:0;border-top:1px solid var(--line)}.brand{display:none}nav{margin:0;flex-direction:row;gap:0;height:100%;align-items:stretch}nav a{flex:1;flex-direction:column;gap:4px;font-size:9px;padding:9px 0 6px;border-radius:0}nav a svg{width:19px;height:19px}main{margin-left:0;padding-bottom:64px}.content{padding:23px 16px}.topbar{height:54px;padding:0 18px}.page-heading{gap:12px;margin-bottom:22px;flex-direction:column}.page-heading h1{font-size:27px}.page-heading p{font-size:11px}.page-heading .actions{justify-content:flex-start;align-self:stretch}.page-heading .actions .btn{flex:1}.eyebrow{font-size:9px}.metric{padding:16px 15px}.metric-value{font-size:26px}.metric-label{font-size:10px}.metric-foot{font-size:9px}.metrics{gap:10px;margin-bottom:20px}.panel-head{padding:17px 18px}.overview-grid{gap:20px}.welcome{grid-template-columns:1fr;padding:22px}.incense-art{display:none}.welcome h2{font-size:20px}.welcome p{font-size:11px}.filters{padding:13px;gap:9px}.filters label{font-size:10px}.filters input,.filters select{font-size:11px}.search{flex-basis:100%}.chart{padding-left:15px;padding-right:15px}.chart .bar-values{font-size:8px}.summary-body{padding:18px}th,td{padding:14px}footer{padding:15px 18px}.demo-banner{padding:10px 18px;font-size:10px}.fatal{margin:15px 16px}.backup-card{padding:23px}.rules{padding:22px}.form-body{padding:20px}.dialog-head{padding:20px}.dialog-foot{padding:16px 20px}.form-grid{gap:15px}.field{font-size:11px}.field input,.field select,.field textarea{font-size:13px}.form-grid .mobile-wide{grid-column:1/-1}.detail-grid{padding:20px}.detail-history{padding:0 20px 20px}#toast{left:50%;bottom:82px}.breadcrumb{font-size:11px}.device-badge{font-size:10px}}
@media(prefers-reduced-motion:no-preference){.btn,nav a{transition:background .15s,box-shadow .15s}.content{animation:appear .2s ease-out}@keyframes appear{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}}

/* Purchases and gifts */
.report-cutoff{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 20px;background:#edf2e9;border:1px solid #e0e7d9;border-radius:9px;margin-bottom:24px;color:#75856b;font-size:12px}.report-cutoff label{display:flex;gap:10px;align-items:center;color:#415d36}.report-cutoff input{padding:8px 11px;border:1px solid #d9e2d1;border-radius:6px;background:white;color:var(--green);font:inherit}.report-cutoff>span{font-size:11px;flex:1}.report-cutoff .btn{padding:8px 12px}.outbound-summary{display:flex;flex-wrap:wrap;gap:10px 25px;padding:16px 23px;background:#f8faf3;color:#7e8b70;border-bottom:1px solid var(--line);font-size:12px}.outbound-summary span{white-space:nowrap}.outbound-summary b{color:var(--green);margin-left:4px}.pill.gift{color:#9a7348;background:#f7eddd}.pill.sale{background:#e8f0e9;color:#577c5e}.accounting-notes{padding:18px 23px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.accounting-notes div{font-size:11px;color:#8d9884;line-height:1.9}.accounting-notes strong{display:block;color:#617957;font-weight:500;font-size:12px;margin-bottom:4px}.accounting-notes span{display:block}.metric-value{overflow-wrap:anywhere}.summary-row{gap:12px}.summary-row b{text-align:right}.summary-row.total b{white-space:nowrap}
@media(max-width:800px){.accounting-notes{grid-template-columns:1fr;gap:13px}.accounting-notes div+div{padding-top:12px;border-top:1px solid var(--line)}.report-cutoff{gap:10px}.report-cutoff label{flex-wrap:wrap}.outbound-summary{gap:9px 18px}}
/* Purchase import preview */
dialog.purchase-import-dialog{width:min(1180px,96vw);max-width:1180px}
.purchase-import .import-file-name{font-weight:600;overflow-wrap:anywhere;margin-bottom:18px}
.import-options{display:flex;gap:24px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.import-options .field{max-width:330px;flex:1;min-width:220px}.check-field{display:flex;align-items:center;gap:8px;font-size:13px}
.import-summary{display:flex;align-items:center;gap:16px;justify-content:space-between;margin:20px 0;padding:16px;background:#edf2e9;border-radius:12px;flex-wrap:wrap}
.import-summary strong{font-size:17px}.import-summary>span{font-size:12px}.import-selection{margin-bottom:14px;flex-wrap:wrap}
.import-table{max-height:350px;overflow:auto;border:1px solid #e1e5db;border-radius:10px}.import-table table{min-width:940px}.import-table thead{position:sticky;top:0;background:#f8f9f5;z-index:1}
.import-table td:nth-child(3){min-width:180px;max-width:260px;overflow-wrap:anywhere}.import-table td:nth-child(8){min-width:175px;max-width:260px}.import-table input[type=checkbox]{width:18px;height:18px;accent-color:#234c3e}
.import-message{display:block;white-space:normal;font-size:11px;line-height:1.55;margin-top:6px;overflow-wrap:anywhere}.import-error-row{background:#fff5ef}.import-skipped{margin:14px 0}
.purchase-edit{padding:16px;margin:16px 0;border:1px solid #d2ddc7;background:#f8faf5;border-radius:12px}.purchase-edit>.form-grid{margin-top:14px}.purchase-edit input{background:#fff}
@media(max-width:640px){dialog.purchase-import-dialog{width:calc(100vw - 24px);max-width:none}.import-options{display:block}.import-options .field{max-width:none;min-width:0}.check-field{margin-top:18px}.import-table{max-height:300px}.import-summary{padding:12px}.purchase-import .note-box{font-size:12px}}
