:root{--ink:#182c29;--muted:#586e68;--green:#087c60;--green-dark:#056249;--line:#dfe7e2;--paper:#fff;--ground:#f5f7f5;--pale:#eaf4ee;--red:#ad4938;--radius:12px;color-scheme:light;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);font-size:14px;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--ground)}[hidden]{display:none!important}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-defs{display:none}h1,h2,h3,p{margin:0}h1,h2{letter-spacing:-.025em}h1{font-size:28px;font-weight:650}h2{font-size:22px;font-weight:650}.muted{color:var(--muted);line-height:1.7}.error{color:var(--red);line-height:1.6;min-height:1em}::selection{background:#c7e9d8;color:#073f30}:focus-visible{outline:3px solid #6ab59b;outline-offset:3px}input,select{accent-color:var(--green);caret-color:var(--green)}::-webkit-scrollbar{height:9px;width:9px}::-webkit-scrollbar-thumb{background:#bacbc2;border-radius:8px;border:2px solid var(--ground)}::-webkit-scrollbar-track{background:var(--ground)}
.button{display:inline-flex;gap:8px;align-items:center;justify-content:center;min-height:40px;padding:9px 16px;border-radius:8px;border:1px solid transparent;font-weight:550;white-space:nowrap;text-decoration:none;color:var(--ink);background:transparent;transition:background .16s,color .16s}.primary{background:var(--green);color:#fff;border-color:var(--green)}.primary:hover{background:var(--green-dark);border-color:var(--green-dark)}.secondary{border-color:#cdd9d2;background:#fff}.secondary:hover{background:#edf3ef}.text-button{padding:8px 10px;color:var(--muted)}.text-button:hover{background:var(--pale);color:var(--green-dark)}.icon-button{display:inline-grid;place-items:center;width:36px;height:36px;border:0;border-radius:7px;background:transparent;color:var(--muted);flex-shrink:0}.icon-button:hover{background:#e7efea;color:var(--ink)}.danger{background:var(--red);color:white}.brand-mark{display:grid;place-items:center;width:62px;height:62px;border-radius:16px;background:var(--green);color:#fff}.brand-mark svg{width:34px;height:34px}.brand-mark.small{width:34px;height:36px;border-radius:8px}.brand-mark.small svg{width:23px;height:23px}
.auth-screen{min-height:100svh;display:grid;grid-template-columns:1fr 1fr;background:#fff}.auth-intro{padding:clamp(48px,8vw,130px);display:flex;flex-direction:column;justify-content:center;background:#eaf1ec;position:relative}.auth-intro h1{font-size:clamp(34px,3.8vw,58px);line-height:1.45;margin:48px 0 22px;font-weight:650;letter-spacing:-.035em}.auth-intro>p{font-size:16px;color:#456557;line-height:1.8}.auth-note{display:flex;gap:24px;margin-top:64px;padding-top:24px;border-top:1px solid #c4d7ca;color:#456557;font-size:13px}.auth-panel{display:flex;align-items:center;justify-content:center;padding:48px}.auth-box{width:100%;max-width:360px}.wordmark{display:inline-flex;align-items:center;font-size:17px;font-weight:650;gap:7px;margin-bottom:52px}.brand-dot{width:7px;height:7px;border-radius:50%;background:var(--green)}.auth-box h2{font-size:26px;margin-bottom:8px}.auth-box form{margin-top:30px}.auth-box label{display:block;font-size:13px;font-weight:550;margin-top:20px}.auth-box input{display:block;width:100%;padding:13px 14px;margin-top:9px;border:1px solid #cdd9d2;border-radius:8px;background:#fff;color:var(--ink)}input::placeholder{color:#657b73;opacity:1}.auth-box .error{margin-top:14px}.auth-submit{width:100%;border:0;border-radius:8px;padding:13px;font-weight:600;margin-top:12px;min-height:46px}.auth-foot{font-size:12px;color:var(--muted);margin-top:30px;text-align:center}
.topbar{height:74px;display:flex;justify-content:space-between;align-items:center;padding:0 36px;background:#fff;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:17px;font-weight:650}.account{display:flex;align-items:center;gap:16px;font-size:13px}.connection{display:flex;gap:7px;align-items:center;color:var(--muted)}.connection:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--green)}main{max-width:1800px;margin:0 auto;padding:38px 36px 24px}.heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}.heading h1{display:flex;gap:12px;align-items:center}.heading p{margin-top:8px}.count{font-size:12px;font-weight:500;letter-spacing:0;display:inline-block;border-radius:5px;background:#e7ede8;color:#50665c;padding:5px 8px}.heading-actions{display:flex;gap:10px}.ledger{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.toolbar{display:flex;justify-content:space-between;gap:16px;align-items:center;min-height:65px;padding:0 22px;border-bottom:1px solid var(--line)}.tabs{display:flex;align-self:stretch;gap:26px}.tab{border:0;border-bottom:2px solid transparent;padding:0 1px;background:transparent;color:var(--muted);font-weight:500;white-space:nowrap}.tab:hover{color:var(--green)}.tab.active{border-bottom-color:var(--green);color:var(--green);font-weight:650}.tab span{margin-left:4px;font-size:11px;border-radius:4px;padding:2px 5px;background:#f0f3f0;color:var(--muted)}.tools{display:flex;gap:4px;align-items:center}.tools .button{font-size:13px}.tools svg{width:17px;height:17px}.filters{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:18px 22px}.search{display:flex;align-items:center;position:relative;max-width:320px;flex:1;min-width:220px}.search svg{position:absolute;left:12px;color:var(--muted);width:18px;height:18px}.search input{width:100%;padding:10px 12px 10px 38px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);height:39px;font-size:13px}.filters select{border:1px solid var(--line);border-radius:7px;padding:8px 30px 8px 12px;max-width:150px;height:39px;background:#fff;color:var(--ink);font-size:13px}.date-filter{display:flex;gap:10px;align-items:center;font-size:12px;color:var(--muted);margin-left:auto}.date-filter input{border:1px solid var(--line);background:#fff;border-radius:7px;padding:8px;color:var(--ink);height:39px;width:140px;font-size:12px}.demo-banner{padding:12px 22px;background:#fff5dd;color:#755513;font-size:13px;display:flex;justify-content:space-between;gap:16px;align-items:center}.demo-banner button{border:0;background:transparent;color:#664500;text-decoration:underline;text-underline-offset:4px;white-space:nowrap}
.table-scroll{overflow:auto;min-height:335px;max-height:calc(100svh - 400px);position:relative;overscroll-behavior-x:contain}table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px;white-space:nowrap}thead{position:sticky;top:0;z-index:2}th{height:44px;background:#edf2ef;border-bottom:1px solid var(--line);text-align:left;color:#50665c;font-size:12px;font-weight:550;padding:10px 16px}td{height:65px;padding:12px 16px;border-bottom:1px solid #eaf0eb;max-width:200px;overflow:hidden;text-overflow:ellipsis;background:#fff}tbody tr:hover td{background:#f7faf7}tbody tr:last-child td{border-bottom:0}.number{text-align:right;font-variant-numeric:tabular-nums}.row-number{width:48px;color:#73877e;text-align:center;font-size:12px}.item-col{min-width:170px}.item-name{font-weight:550}.sku{font-size:12px;color:var(--muted)}.profit-col{min-width:115px}.positive{color:var(--green);font-weight:600}.negative{color:var(--red);font-weight:600}.action-col{position:sticky;right:0;min-width:96px;text-align:center;border-left:1px solid var(--line);z-index:1}th.action-col{z-index:3}.app-badge{display:inline-flex;align-items:center;gap:6px}.app-badge:before{content:"";width:6px;height:6px;border-radius:2px;background:#8ba195}.app-badge[data-app="淘宝"]:before{background:#be651e}.app-badge[data-app="京东"]:before{background:#c64a42}.app-badge[data-app="得物"]:before{background:#008f91}.signed-button{border:0;background:#eaf4ed;color:#257048;min-height:29px;padding:4px 9px;border-radius:5px;font-size:12px;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.signed-button svg{width:13px;height:13px}.signed-button.pending{background:#fcf2df;color:#8a6323}.signed-button:hover{filter:brightness(.96)}.empty{padding:45px 20px 42px;min-height:330px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.empty-icon{display:grid;place-items:center;width:58px;height:58px;background:#eef5ef;color:var(--green);border-radius:15px;margin-bottom:18px}.empty-icon svg{width:28px;height:28px}.empty h2{font-size:19px;margin-bottom:10px}.empty p{font-size:13px;color:var(--muted);line-height:1.7;max-width:38ch;margin-bottom:22px}.empty>.text-button{font-size:12px;margin-top:5px}.table-footer{display:flex;justify-content:space-between;gap:20px;align-items:center;min-height:47px;border-top:1px solid var(--line);padding:10px 22px;color:var(--muted);font-size:12px}.table-footer>span:last-child{color:#5d756a}
.summary{display:flex;align-items:center;justify-content:space-between;gap:32px;padding:28px 8px 24px}.summary-detail{display:flex;gap:clamp(30px,5vw,85px)}.summary-detail div{display:flex;flex-direction:column;gap:10px}.summary span{color:var(--muted);font-size:12px}.summary strong{font-size:20px;font-variant-numeric:tabular-nums;font-weight:550;letter-spacing:-.02em}.summary-profit{display:flex;align-items:center;gap:24px;padding-left:28px;border-left:1px solid #d9e2db}.summary-profit>span{display:flex;flex-direction:column;gap:6px;color:var(--ink);font-size:13px;font-weight:550}.summary-profit small{font-size:11px;color:var(--muted);font-weight:400}.summary-profit strong{font-size:32px;color:var(--green);font-weight:650}.summary-profit strong.negative{color:var(--red)}.page-footer{border-top:1px solid var(--line);padding:18px 0 0;display:flex;gap:20px;justify-content:space-between;font-size:11px;color:var(--muted);line-height:1.8}
dialog{color:var(--ink);border:0;padding:0;background:#fff}dialog::backdrop{background:#152e2755}.editor{margin:0 0 0 auto;height:100svh;max-height:100svh;width:540px;max-width:100vw;border-radius:0;box-shadow:-16px 0 60px #17392b22}.editor[open]{animation:slide-in .22s cubic-bezier(.16,1,.3,1)}.editor form{display:flex;height:100%;flex-direction:column}.editor-head{padding:28px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--line)}.editor-head p{font-size:12px;margin-top:7px}.editor-body{overflow:auto;flex:1;padding:24px 28px}.editor h3{font-size:13px;display:flex;align-items:center;gap:8px;margin:0 0 18px}.editor h3:not(:first-child){margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}.editor h3 span{font-size:11px;color:var(--muted);font-weight:400}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px 16px}.form-grid label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#425b4f}.form-grid label.wide{grid-column:1/-1}.form-grid input{width:100%;border:1px solid #d0dcd3;border-radius:7px;padding:10px 12px;height:40px;color:var(--ink);background:#fff;min-width:0;font-size:13px}.form-grid input:focus{border-color:var(--green)}.check-label{margin-top:24px;display:flex;gap:9px;align-items:center;font-size:13px}.check-label input{width:16px;height:16px}.profit-preview{background:#edf5ef;border-radius:8px;padding:18px;margin-top:24px;display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--green-dark)}.profit-preview strong{font-size:24px;font-variant-numeric:tabular-nums}.editor .error{font-size:12px;margin-top:12px}.editor-footer{padding:18px 28px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px;background:#fff;padding-bottom:max(18px,env(safe-area-inset-bottom))}.confirm-dialog{border-radius:14px;width:390px;max-width:calc(100vw - 32px);padding:28px;box-shadow:0 18px 70px #17392b30}.confirm-dialog h2{font-size:20px}.confirm-dialog p{margin-top:14px;color:var(--muted);font-size:13px;line-height:1.8;overflow-wrap:anywhere}.confirm-dialog form>div{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:50;background:#193d30;color:#fff;box-shadow:0 6px 24px #17392b20;padding:13px 20px;border-radius:9px;font-size:13px;max-width:calc(100vw - 32px);text-align:center;line-height:1.6}
@keyframes slide-in{from{transform:translateX(35px);clip-path:inset(0 0 0 12px)}to{transform:translateX(0);clip-path:inset(0)}}
@media(min-width:1800px){.table-scroll{min-height:420px}}
@media(max-width:1000px){.topbar{padding:0 24px}main{padding:30px 24px 20px}.date-filter{margin-left:0}.summary-detail{gap:26px}.summary-profit{gap:14px}.summary-profit strong{font-size:26px}.summary strong{font-size:18px}.summary-profit strong{font-size:28px}}
@media(max-width:680px){.auth-screen{grid-template-columns:1fr}.auth-intro{padding:30px 28px}.auth-intro .brand-mark{width:40px;height:40px;border-radius:10px}.auth-intro .brand-mark svg{width:25px;height:25px}.auth-intro h1{font-size:28px;line-height:1.4;margin:22px 0 10px}.auth-intro h1 br{display:none}.auth-intro>p{font-size:13px}.auth-note{display:none}.auth-panel{padding:32px 28px 44px;align-items:start}.wordmark{display:none}.auth-box{max-width:400px}.auth-box h2{font-size:22px}.auth-box form{margin-top:22px}.topbar{height:62px;padding:0 16px}.brand{font-size:15px;gap:9px}.brand-mark.small{width:29px;height:31px}.account{gap:8px;font-size:12px}.connection{display:none}main{padding:26px 14px 18px}.heading{gap:14px;align-items:flex-start;margin-bottom:22px}.heading h1{font-size:23px;gap:7px}.heading p{font-size:12px;margin-top:8px;max-width:23ch}.heading-actions{gap:7px}.heading-actions .secondary{width:39px;padding:8px}.heading-actions .secondary span{display:none}.heading-actions .button{min-height:39px;padding:8px 10px;font-size:13px}.heading-actions .secondary svg{width:18px}.count{font-size:10px;padding:4px 5px}.toolbar{flex-wrap:wrap;padding:0 14px;gap:0;min-height:102px}.tabs{gap:22px;height:50px;width:100%}.tab{font-size:13px}.tools{width:100%;justify-content:flex-end;min-height:43px;border-top:1px solid #edf1ee}.tools .button{font-size:12px}.tools .icon-button{margin-right:auto}.filters{padding:14px;gap:9px}.search{min-width:140px;max-width:100%}.filters select{max-width:120px;padding-right:15px}.date-filter{width:100%;gap:8px}.date-filter input{flex:1;width:0;min-width:0}.date-filter>span:first-child{display:none}.table-scroll{min-height:330px;max-height:480px}.empty{padding:38px 18px;min-height:330px}.empty h2{font-size:18px}.table-footer{padding:10px 14px;font-size:10px;gap:8px}th,td{padding-left:12px;padding-right:12px}td{height:59px}.action-col{min-width:88px}.table-scroll th:first-child,.table-scroll td:first-child{display:none}.summary{display:block;padding:22px 4px}.summary-detail{justify-content:space-between;gap:10px}.summary-detail span{font-size:10px}.summary strong{font-size:17px}.summary-profit{border-left:0;border-top:1px solid var(--line);margin-top:20px;padding:18px 0 0;justify-content:space-between}.summary-profit>span{flex-direction:row;align-items:center;gap:8px}.summary-profit strong{font-size:28px}.page-footer{display:block;font-size:10px;padding-top:14px}.page-footer span{display:block}.editor-head{padding:22px}.editor-body{padding:22px}.editor-footer{padding:16px 22px;padding-bottom:max(16px,env(safe-area-inset-bottom))}.demo-banner{font-size:11px;padding:12px 14px}.demo-banner button{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Independent touch layout; desktop keeps the full-width table. */
.summary-panel{margin-bottom:28px;padding:22px 24px 18px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius)}.summary-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px}.summary-toolbar h2{font-size:17px;white-space:nowrap}.month-controls{display:flex;align-items:center;gap:8px}.month-controls label{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}.month-controls input{width:155px;min-height:40px;border:1px solid #cdd9d2;background:white;border-radius:7px;padding:8px 10px;color:var(--ink);font-size:13px}.month-controls .button{font-size:12px;padding:8px 12px}.month-controls .button[aria-pressed="true"]{background:var(--pale);color:var(--green-dark)}.summary-panel .summary{padding:24px 0 20px}.summary-note{font-size:11px;line-height:1.7;color:var(--muted);padding-top:14px;border-top:1px solid var(--line)}.summary-profit #profit-label{font-size:13px;color:var(--ink);font-weight:550}.settlement-button{min-width:72px}.summary-profit small{white-space:nowrap}
.mobile-records,.mobile-hint{display:none}.row-number{color:#586e68}
@media(max-width:680px){
main{display:flex;flex-direction:column}.heading{order:0;margin-bottom:0}.summary{order:1;display:flex;flex-direction:column-reverse;align-items:stretch;gap:20px;padding:24px 2px}.ledger{order:2}.page-footer{order:3;margin-top:20px}.summary-profit{border:0;margin:0;padding:0}.summary-profit strong{font-size:32px}.summary-detail span{font-size:11px}.summary-detail strong{font-size:16px}.summary-detail div{gap:7px}.count{font-size:11px}.table-footer,.page-footer{font-size:11px}.table-scroll{max-height:none;overflow:visible}.table-scroll.has-records{min-height:0}.table-scroll table{display:none}.desktop-hint{display:none}.mobile-hint{display:inline}.mobile-records{display:block}.mobile-record{padding:16px 18px 18px;border-bottom:1px solid var(--line)}.mobile-record:last-child{border-bottom:0}.mobile-record-meta{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted);min-height:30px}.mobile-record-meta time{font-variant-numeric:tabular-nums}.mobile-record-meta>.icon-button{margin-left:auto;width:36px;height:36px}.mobile-record .app-badge{font-weight:550;color:#405b4d}.mobile-record h2{font-size:19px;line-height:1.6;margin:5px 0 3px;overflow-wrap:anywhere}.mobile-variant{font-size:12px;color:var(--muted);line-height:1.7}.mobile-money{display:grid;grid-template-columns:1fr 1fr 1.1fr;gap:10px;margin-top:20px;padding-bottom:16px}.mobile-money>div{display:flex;flex-direction:column;gap:8px}.mobile-money span{font-size:11px;color:var(--muted)}.mobile-money strong{font-size:15px;font-weight:550;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.mobile-money>div:last-child{text-align:right}.mobile-money>div:last-child strong{font-size:18px;line-height:1.1}.mobile-details{font-size:12px;border-top:1px solid #e9eeea}.mobile-details summary{padding:14px 0;color:var(--muted);min-height:44px;cursor:pointer}.mobile-details dl{margin:0 0 14px;display:grid;grid-template-columns:1fr 1fr;gap:14px 18px}.mobile-details dl>div{min-width:0}.mobile-details dt{font-size:11px;color:var(--muted);margin-bottom:5px}.mobile-details dd{margin:0;overflow-wrap:anywhere;font-size:13px;line-height:1.6}.mobile-record-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}.mobile-record-actions .button{min-height:42px;padding:8px 18px;color:var(--green-dark);border-color:#c5d7cb;background:#f5faf6}.mobile-record-actions .button svg{width:16px;height:16px}.mobile-record-actions .signed-button{min-height:38px;padding:8px 10px;font-size:12px}.filters select,.search input,.date-filter input{min-height:42px;height:42px}.form-grid input{height:46px;font-size:16px}.editor-head h2{font-size:23px}.editor-footer .button{min-height:46px;flex:1}.editor-footer .primary{flex:2}.editor .check-label{min-height:44px}.tools .button{min-height:44px}.tab{min-height:48px}.auth-box input{font-size:16px}.auth-submit{min-height:48px}
.summary-panel{order:-1;margin-bottom:24px;padding:18px 16px 16px}.summary-toolbar{align-items:flex-start;flex-direction:column;gap:13px}.summary-toolbar h2{font-size:16px}.month-controls{width:100%;gap:4px;flex-wrap:wrap}.month-controls label{flex:1;min-width:0;font-size:11px;gap:8px}.month-controls input{width:0;min-width:120px;flex:1;min-height:44px;font-size:14px;padding:8px}.month-controls .button{padding:8px;min-height:44px;font-size:11px}.summary-panel .summary{padding:20px 0 18px;gap:18px}.summary-profit>span{align-items:flex-start;flex-direction:column;gap:5px}.summary-profit strong{font-size:29px}.summary-detail strong{font-size:15px}.summary-note{padding-top:12px;font-size:11px}.heading{margin-bottom:22px}.summary-detail{gap:8px}.summary-detail>div{min-width:0}.summary-detail strong{overflow-wrap:anywhere}
}
