:root{--side:246px;--navy:#102d46;--ink:#182b3a;--muted:#84919b;--line:#e5eaee;--bg:#f3f6f8;--teal:#168f86;font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink)}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}.logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:#17354c}.logo-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:9px;background:linear-gradient(145deg,#2db1a4,#143a55);color:#fff;font-weight:800}.logo>span:last-child{display:flex;flex-direction:column}.logo b{font-size:17px;letter-spacing:2.6px;line-height:1}.logo small{font-size:11px;letter-spacing:1.5px;margin-top:5px;opacity:.6}.login-layout{min-height:100vh;display:grid;grid-template-columns:minmax(520px,1.12fr) minmax(440px,.88fr)}.login-visual{position:relative;overflow:hidden;padding:52px clamp(48px,6vw,94px);display:flex;flex-direction:column;background:linear-gradient(145deg,#0b2539,#153e55 58%,#0b3941);color:#fff}.login-visual:after{content:"";position:absolute;width:760px;height:760px;border-radius:50%;border:1px solid rgba(108,210,197,.12);right:-370px;bottom:-360px;box-shadow:0 0 0 120px rgba(53,183,169,.035),0 0 0 240px rgba(53,183,169,.025)}.logo.light{color:#fff;position:relative;z-index:1}.hero{margin:auto 0;position:relative;z-index:1}.kicker{color:#83d1c8!important;text-transform:uppercase;letter-spacing:2px;font-size:12px!important}.hero h1{font-size:clamp(48px,5vw,70px);line-height:1.13;margin:20px 0;font-weight:570;letter-spacing:-3px}.hero h1 em{font-style:normal;color:#75d1c6}.hero>p{max-width:600px;color:#b9cad3;font-size:16px;line-height:1.9}.flow{position:relative;z-index:1;display:flex;align-items:center;gap:12px}.flow span{padding:9px 13px;border:1px solid rgba(126,210,200,.22);border-radius:7px;background:rgba(255,255,255,.04);font-size:11px;color:#d4e2e7}.flow i{font-style:normal;color:#60afa8}.login-form-wrap{position:relative;display:grid;place-items:center;padding:55px;background:#f8fafb}.mobile-logo{display:none}.login-card{width:min(410px,100%)}.workspace-label{color:#148d84;font-size:11px;letter-spacing:1px;margin:0 0 13px}.login-card h2{font-size:32px;margin:0 0 7px;color:#17364d}.subtitle{color:#8b97a0;font-size:13px;margin:0 0 32px}.login-card label{display:block;font-weight:600;font-size:12px;color:#3a4d5c;margin:20px 0 8px}.label-row{display:flex;align-items:end;justify-content:space-between}.label-row label{margin-bottom:8px}.label-row a,.help a{color:#148d84;text-decoration:none;font-size:11px}.input{height:50px;display:flex;align-items:center;border:1px solid #d9e1e6;border-radius:7px;background:#fff;padding:0 14px;color:#8d99a2}.input:focus-within{border-color:#269a91;box-shadow:0 0 0 3px rgba(30,152,143,.09)}.input input{height:100%;flex:1;border:0;outline:0;padding:0 12px;color:#233542}.input button{border:0;background:transparent;color:#87949e;cursor:pointer}.remember{display:flex;align-items:center;justify-content:space-between;color:#84919b;font-size:11px;margin:16px 0}.remember label{font-weight:400;margin:0}.error{height:15px;font-size:11px;color:#c64d4d}.login-button{width:100%;height:52px;border:0;border-radius:7px;background:linear-gradient(105deg,#173e59,#136e6d);color:white;cursor:pointer;box-shadow:0 12px 24px rgba(19,82,87,.18)}.login-button b{margin-left:12px}.help{text-align:center;margin-top:28px;color:#8f9aa2;font-size:11px}.login-form-wrap footer{position:absolute;bottom:24px;color:#a3abb1;font-size:11px}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
.topbar{position:fixed;z-index:20;inset:0 0 auto;height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 25px}.topbar>.logo{width:220px}.company{height:42px;display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 12px;color:#60717e}.company>span{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;background:#e5f4f2;color:#168f86}.company label{display:flex;flex-direction:column;text-align:left;font-size:11px}.company small{color:#9aa4ac;font-size:11px}.top-actions{margin-left:auto;display:flex;align-items:center;gap:7px}.search{width:260px;height:38px;display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:7px;background:#f8fafb;color:#8f9ba4}.search span{flex:1;text-align:left;font-size:11px}.search kbd,.command kbd{font-size:11px;background:#fff;border:1px solid #dce2e6;border-radius:4px;padding:2px 5px}.round{width:38px;height:38px;border:0;background:transparent;color:#60717e}.profile{height:43px;display:flex;align-items:center;gap:9px;border:0;border-left:1px solid var(--line);background:#fff;margin-left:4px;padding-left:15px}.profile>span{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#17415d,#238f88);color:white}.profile label{display:flex;flex-direction:column;text-align:left}.profile b{font-size:11px}.profile small{font-size:11px;color:#9aa4ac}.shell{padding-top:70px}.shell aside{position:fixed;z-index:15;left:0;top:70px;bottom:0;width:var(--side);background:var(--navy);color:#b9c7d0;transition:width .15s;box-shadow:2px 0 10px rgba(10,35,53,.06)}aside nav{padding:18px 13px;height:100%;overflow:hidden}aside nav p{margin:17px 12px 7px;color:#638097;font-size:11px;letter-spacing:1.5px}aside nav a{height:42px;display:flex;align-items:center;gap:12px;padding:0 13px;margin:2px 0;border-radius:6px;color:#b8c8d2;text-decoration:none;font-size:12px;white-space:nowrap}aside nav a:hover{background:rgba(255,255,255,.06);color:#fff}aside nav a.active{background:linear-gradient(90deg,rgba(43,166,154,.26),rgba(43,166,154,.08));border-left:2px solid #4cc2b6;color:#fff}aside nav a>b{margin-left:auto;border-radius:9px;background:#d55c55;color:#fff;font-size:11px;padding:2px 6px}.resize-handle{position:absolute;z-index:2;right:-3px;top:0;bottom:0;width:6px;cursor:col-resize}.resize-handle:hover{background:#42b7ac}.collapse{position:absolute;right:8px;bottom:17px;border:0;background:rgba(255,255,255,.08);color:#8299aa;border-radius:5px;width:27px;height:27px;font-size:18px}.compact nav a{justify-content:center;font-size:17px}.compact nav a span,.compact nav a b,.compact nav p{display:none}.compact nav{padding-left:9px;padding-right:9px}.compact .collapse{right:21px;transform:rotate(180deg)}.dashboard{margin-left:var(--side);padding:30px clamp(22px,3vw,44px) 50px;transition:margin .15s;max-width:1800px}.mobile-menu{display:none}.welcome{display:flex;align-items:end;gap:9px;margin-bottom:24px}.welcome>div{margin-right:auto}.welcome p{margin:0 0 5px;color:#95a0a8;font-size:11px}.welcome h1{margin:0 0 5px;font-size:25px}.welcome span{color:#7f8c96;font-size:11px}.welcome span b{color:#168f86}.primary,.outline{height:38px;border-radius:6px;padding:0 14px;font-size:11px}.primary{border:0;background:#176f71;color:#fff}.outline{border:1px solid #dce3e7;background:#fff;color:#667783}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:15px}.metrics article,.panel{background:#fff;border:1px solid #e5eaed;border-radius:9px;box-shadow:0 4px 14px rgba(19,46,65,.035)}.metrics article{padding:18px}.metrics article>div{display:flex;align-items:center;gap:8px}.metrics article>div>span,.module-grid>a>span,.task>span,.activity>span{display:grid;place-items:center;border-radius:7px}.metrics article>div>span{width:30px;height:30px}.blue{background:#e6f0fb;color:#2873c8}.teal{background:#e4f4f1;color:#168e84}.amber{background:#fff0dd;color:#c27a20}.purple{background:#eeeafa;color:#7056b1}.green{background:#e6f3e9;color:#438c54}.rose{background:#f9e8eb;color:#b85362}.metrics small{font-size:11px;color:#788792}.metrics i{margin-left:auto;color:#29936b;background:#e8f5ef;border-radius:8px;padding:3px 5px;font-size:11px;font-style:normal}.metrics i.warn{color:#c77b21;background:#fff0df}.metrics i.neutral{color:#7f8c96;background:#eef2f4}.metrics strong{display:block;font-size:21px;margin:14px 0 6px}.metrics em{font-size:11px;font-style:normal}.metrics p{margin:0;color:#9aa4ac;font-size:11px}.main-grid,.bottom-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(350px,.85fr);gap:15px;margin-bottom:15px}.panel{padding:19px}.panel header{display:flex;align-items:start;justify-content:space-between;margin-bottom:16px}.panel h2{font-size:13px;margin:0 0 4px}.panel header p{font-size:11px;color:#9aa4ac;margin:0}.panel header button,.panel header a{border:0;background:transparent;color:#74838e;text-decoration:none;font-size:11px}.module-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.module-grid a{min-height:82px;display:flex;align-items:center;gap:11px;border:1px solid #e7ecef;border-radius:7px;padding:13px;text-decoration:none;color:#96a1a8;transition:.18s}.module-grid a:hover{transform:translateY(-2px);border-color:#b5d7d2;box-shadow:0 7px 15px rgba(20,65,75,.07)}.module-grid>a>span{width:38px;height:38px;flex:0 0 auto;font-size:16px}.module-grid a div{display:flex;flex-direction:column;gap:5px;flex:1}.module-grid a b{color:#203542;font-size:11px}.module-grid a small{font-size:11px;color:#97a1a9;white-space:nowrap}.tabs{display:flex;gap:17px;border-bottom:1px solid var(--line)}.tabs button{border:0;background:transparent;color:#8b98a1;padding:0 0 9px;font-size:11px}.tabs button.active{color:#168f86;border-bottom:2px solid #168f86}.tabs b{background:#e6f3f1;border-radius:8px;padding:1px 5px}.task{display:flex;align-items:center;gap:10px;min-height:57px;border-bottom:1px solid #edf0f2}.task:last-child{border:0}.task>span{width:31px;height:31px;flex:0 0 auto;font-size:11px}.task>div{min-width:0}.task b{font-size:11px}.task p{margin:3px 0;color:#778690;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task small{font-size:11px;color:#9da6ad}.task em{margin-left:auto;background:#fbe9e8;color:#d34f4b;border-radius:8px;padding:3px 6px;font-size:11px;font-style:normal}.activity{height:50px;display:flex;align-items:center;border-bottom:1px solid #edf0f2}.activity:last-child{border:0}.activity>span{width:28px;height:28px;margin-right:10px}.activity p{display:flex;flex-direction:column;gap:4px;margin:0}.activity b{font-size:11px}.activity small{color:#98a2aa;font-size:11px}.activity time{margin-left:auto;color:#a2abb2;font-size:11px}.health label{display:flex;justify-content:space-between;margin:16px 0 7px;color:#687985;font-size:11px}.health progress{display:block;width:100%;height:5px;border:0}.health progress::-webkit-progress-bar{background:#edf1f3;border-radius:6px}.health progress::-webkit-progress-value{background:linear-gradient(90deg,#1a8984,#3db2a7);border-radius:6px}.command{display:none;position:fixed;z-index:50;inset:0;background:rgba(8,26,39,.5);backdrop-filter:blur(3px);padding-top:13vh;justify-content:center}.command.show{display:flex}.command>div{width:min(620px,90vw);height:58px;background:#fff;border-radius:10px;display:flex;align-items:center;padding:0 18px;box-shadow:0 20px 60px rgba(10,30,44,.2)}.command input{flex:1;border:0;outline:0;padding:0 12px}.toast{position:fixed;z-index:20000;top:50%;bottom:auto;left:50%;transform:translate(-50%,calc(-50% - 16px));opacity:0;visibility:hidden;pointer-events:none;background:#15374f;color:white;border-radius:7px;padding:10px 16px;font-size:11px;box-shadow:0 8px 24px rgba(12,35,49,.2);transition:.2s}.toast.show{opacity:1;visibility:visible;transform:translate(-50%,-50%);pointer-events:none}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
@media(max-width:1100px){.module-grid{grid-template-columns:repeat(2,1fr)}.metrics{grid-template-columns:repeat(2,1fr)}.main-grid,.bottom-grid{grid-template-columns:1fr}.login-visual{padding:45px}.hero h1{font-size:48px}}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
@media(max-width:800px){.login-layout{display:block}.login-visual{display:none}.login-form-wrap{min-height:100vh;padding:100px 25px}.mobile-logo{display:flex;position:absolute;top:28px;left:28px}.topbar{padding:0 14px}.topbar>.logo{width:auto}.company,.search span,.search kbd,.profile label{display:none}.search{width:38px;border:0;background:transparent}.shell aside{width:246px;transform:translateX(-246px);transition:.2s}.shell aside.open{transform:translateX(0)}.dashboard{margin-left:0;padding:20px 15px}.mobile-menu{display:block;border:0;background:transparent;font-size:19px;padding:0 0 14px}.metrics{grid-template-columns:1fr 1fr}.welcome .outline{display:none}.module-grid{grid-template-columns:1fr 1fr}}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
@media(max-width:520px){.metrics,.module-grid{grid-template-columns:1fr}.main-grid,.bottom-grid{display:block}.panel{margin-bottom:14px}.welcome{align-items:start;flex-wrap:wrap}.welcome>div{width:100%}.topbar .logo small{display:none}}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
/* Shared primary category tabs across every business module. */.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
body [class$="-tabs"]>button:not(.primary){font-size:15px!important;line-height:1.35}body [class$="-tabs"]>button b{font-size:11px!important;padding:2px 7px}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
.page-sizer{display:inline-flex;align-items:center;gap:6px;margin:0;color:#73838e;font-size:11px}.page-sizer select{height:30px;border:1px solid #dce3e7;border-radius:5px;background:#fff;padding:0 24px 0 8px;color:#425765}.confirm{display:none;position:fixed;z-index:70;inset:0;background:rgba(8,26,39,.48);align-items:center;justify-content:center}.confirm.show{display:flex}.confirm>div{width:min(360px,90vw);background:#fff;border-radius:11px;padding:26px;text-align:center;box-shadow:0 22px 60px rgba(8,30,45,.22)}.confirm>div>span{width:43px;height:43px;display:grid;place-items:center;margin:auto;border-radius:50%;background:#fcebea;color:#cf5551;font-weight:700}.confirm h3{font-size:17px;margin:14px 0 7px}.confirm p{color:#76858f;font-size:11px;line-height:1.7}.confirm footer{display:flex;justify-content:center;gap:9px;margin-top:20px}.confirm button:not(.cancel){height:36px;border:1px solid #dce3e7;border-radius:6px;background:#fff;padding:0 17px;font-size:11px}.confirm button:last-child{border-color:#c75a57;background:#c75a57;color:#fff}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
.confirm .void-reason{display:block;text-align:left;color:#526875;font-size:12px}.confirm .void-reason textarea{display:block;width:100%;margin-top:7px;padding:9px 10px;border:1px solid #dce3e7;border-radius:6px;resize:vertical;font:inherit;line-height:1.5}.confirm .void-reason textarea:focus{outline:0;border-color:#2b9b92;box-shadow:0 0 0 3px rgba(30,151,142,.08)}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
/* Shared table alignment: numeric values follow their numeric headings. */.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
table :is(th,td)[data-line-col="quantity"],table :is(th,td)[data-line-col="taxPrice"],table :is(th,td)[data-line-col="netPrice"],table :is(th,td)[data-line-col="taxTotal"],table :is(th,td)[data-line-col="taxRate"],table :is(th,td)[data-line-col="netTotal"],table :is(th,td)[data-col="purchase"],table :is(th,td)[data-col="sale"],table :is(th,td)[data-col="inventory"],table :is(th,td).amount,table :is(th,td).money-col,table :is(th,td).quantity,table :is(th,td).tax,table :is(th,td).col-quantity{text-align:right!important;font-variant-numeric:tabular-nums}table :is(th,td)[data-line-col="productCode"],table :is(th,td)[data-line-col="productName"],table :is(th,td)[data-line-col="model"],table :is(th,td)[data-line-col="brand"],table :is(th,td)[data-line-col="description"],table :is(th,td)[data-line-col="unit"],table :is(th,td)[data-line-col="note"]{text-align:left!important}.audit-timeline p:has(>strong:first-child),.purchase-audit-events p:has(>strong:first-child),.contract-audit-trail p:has(>strong:first-child){color:#c47718;font-weight:600}.audit-timeline p:has(>strong:first-child) strong,.purchase-audit-events p:has(>strong:first-child) strong,.contract-audit-trail p:has(>strong:first-child) strong{color:inherit}
:root{
  --app-frame-gap:20px;
  --app-inner-gap:16px;
  /* 文件夹页签文字起点：外框间距 + 页签按钮左右内距；面板自身 1px 边框对齐活动页签边框 */
  --folder-tab-label-inset:calc(var(--app-frame-gap,20px) + 22px);
}

/* Keep page-level controls fixed when a tab adds or removes vertical overflow. */
html{scrollbar-gutter:stable}

/*
 * Shared frame spacing
 * Page-level secondary tabs and tool headers keep the same horizontal inset
 * from their first-level panel border.  Vertical spacing remains owned by
 * each module so this rule does not change control height or row density.
 */
:is(.main-tabs,.org-tabs,.todo-tabs,.inventory-tabs,.settings-tabs){
  padding-left:var(--app-frame-gap,20px)!important;
  padding-right:var(--app-frame-gap,20px)!important;
}
:is(.business-list,.product-list,.partner-list,.inventory-panel,.todo-list)>header{
  padding-left:var(--app-frame-gap,20px)!important;
  padding-right:var(--app-frame-gap,20px)!important;
  padding-top:var(--app-frame-gap,20px)!important;
  padding-bottom:var(--app-frame-gap,20px)!important;
}
.business-list-stage{
  margin:0;
  padding:var(--app-frame-gap,20px);
}
.business-list-stage>.business-list{
  width:100%;
  margin:0!important;
  box-shadow:none;
}
/* 原则 9d：列表表格内容区四周 20px；表头／合计色块不贴外框 */
.business-list .table-wrap{
  padding:var(--app-frame-gap,20px);
  box-sizing:border-box;
}
.inventory-page>.inventory-panel{
  position:relative;
  isolation:auto;
  margin:0!important;
  padding:0!important;
  box-shadow:none;
}
.inventory-page>.inventory-tabs>button:not(.primary){
  font-weight:700;
}
.todo-page>.todo-tabs>button{
  font-weight:700;
}
.todo-page #refreshTodos{
  border-color:#168078;
  background:#168078;
  color:#fff;
  font-weight:700;
}
.todo-page #refreshTodos:hover{
  border-color:#126f69;
  background:#126f69;
}
.todo-page #refreshTodos:disabled{
  opacity:.72;
  cursor:wait;
}
.inventory-page>.inventory-panel:before{
  display:none!important;
}

/* Shared folder tabs: the active tab joins the module content frame. */
:is(.project-page>.main-tabs,.purchase-page>.main-tabs,.inventory-page>.inventory-tabs,.todo-page>.todo-tabs,.settings-page>.main-tabs){
  position:relative;
  z-index:2;
  display:flex;
  align-items:flex-end;
  gap:4px;
  padding-top:0!important;
  padding-bottom:0!important;
  margin-bottom:-1px;
  border:0;
  border-radius:0;
  background:transparent;
}
:is(.project-page>.main-tabs,.purchase-page>.main-tabs,.inventory-page>.inventory-tabs,.todo-page>.todo-tabs,.settings-page>.main-tabs)>button{
  height:48px;
  padding:0 22px;
  border:1px solid transparent;
  border-bottom:0;
  border-radius:9px 9px 0 0;
  background:transparent;
}
:is(.project-page>.main-tabs,.purchase-page>.main-tabs,.inventory-page>.inventory-tabs,.todo-page>.todo-tabs,.settings-page>.main-tabs)>button.active{
  border-color:#e5eaed;
  background:#fff;
}
:is(.project-page>.main-tabs,.purchase-page>.main-tabs,.inventory-page>.inventory-tabs,.todo-page>.todo-tabs,.settings-page>.main-tabs)>button.active:after{
  display:none;
}
/* Folder-tab list tools sit on the same row as tabs (left tabs, right tools). */
:is(.project-page>.main-tabs,.purchase-page>.main-tabs,.settings-page>.main-tabs)>.list-tools,
.todo-page>.todo-tabs>.todo-list-tools,
.inventory-page>.inventory-tabs>.inventory-tab-search,
.inventory-page>.inventory-tabs>#newWarehouse,
.finance-page>.inventory-tabs>.finance-panel-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  margin-bottom:9px;
  flex:0 0 auto;
}
.project-page>.business-list-stage,.purchase-page>.business-list-stage,.todo-page>.todo-list,.settings-page>.settings-stage,
.product-page>.product-list,.partner-page>.partner-list{
  position:relative;
  z-index:1;
  border-radius:9px;
}

/* Inventory document views use the same inset second-level frame. */
:is(
  .inventory-page:has(>.inventory-tabs>button[data-tab="inbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="outbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="stock"].active)
)> .inventory-panel{
  padding:0!important;
}
:is(
  .inventory-page:has(>.inventory-tabs>button[data-tab="inbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="outbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="stock"].active)
)> .inventory-panel>header{
  margin:0!important;
  padding-top:var(--app-frame-gap,20px)!important;
  padding-bottom:var(--app-frame-gap,20px)!important;
  padding-left:var(--folder-tab-label-inset)!important;
  padding-right:var(--app-frame-gap,20px)!important;
  border:0;
  border-radius:0;
  background:transparent;
}
:is(
  .inventory-page:has(>.inventory-tabs>button[data-tab="inbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="outbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="stock"].active)
)> .inventory-panel>header h2{
  margin:0 0 4px!important;
}
:is(
  .inventory-page:has(>.inventory-tabs>button[data-tab="inbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="outbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="stock"].active)
)> .inventory-panel>header p{
  margin:0!important;
}
:is(
  .inventory-page:has(>.inventory-tabs>button[data-tab="inbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="outbound"].active),
  .inventory-page:has(>.inventory-tabs>button[data-tab="stock"].active)
)> .inventory-panel>#inventoryContent{
  overflow-x:auto;
  width:auto;
  margin:0 var(--app-frame-gap,20px) var(--app-frame-gap,20px);
  border:1px solid #e0e7ea;
  border-radius:9px;
  background:#fff;
}

/* Warehouse-location cards keep the standard inset. */
.inventory-page:has(>.inventory-tabs>button[data-tab="locations"].active) .location-tree{
  padding-right:var(--app-frame-gap,20px)!important;
  padding-left:var(--app-frame-gap,20px)!important;
}

/*
 * Every warehouse tab shares one hierarchy:
 * level 1 owns title and note; list tools sit on the folder-tab row;
 * level 2 owns the tab body only.
 */
.inventory-page>.inventory-panel>header{
  margin:0!important;
  /* 标题／说明与上方文件夹页签文字左缘对齐（非框边 20px） */
  padding:var(--app-frame-gap,20px) var(--app-frame-gap,20px) var(--app-frame-gap,20px) var(--folder-tab-label-inset)!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
.inventory-page>.inventory-panel>header h2{
  margin:0 0 4px!important;
}
.inventory-page>.inventory-panel>header p{
  margin:0!important;
}
.inventory-page>.inventory-panel>#inventoryContent,
.inventory-page>.inventory-panel>#financeContent{
  overflow-x:auto;
  width:auto;
  margin:0 var(--app-frame-gap,20px) var(--app-frame-gap,20px)!important;
  border:1px solid #e0e7ea!important;
  border-radius:9px!important;
  background:#fff!important;
}

/* Finance money columns: title + cell right-aligned, single line, expand width not shrink font (原则 9c). */
.finance-page #financeContent .inventory-table th.number,
.finance-page #financeContent .inventory-table td.number,
.finance-page #financeContent .inventory-table tfoot th.number{
  text-align:right!important;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  min-width:7.5em;
}
.finance-page #financeContent .inventory-table td.number small{
  display:block;
  margin-top:4px;
  text-align:right;
  white-space:nowrap;
}
/* Settlement tables: keep amount/status columns compact so right-aligned amounts sit under their headers. */
.finance-page #financeContent .finance-settlement-table{
  table-layout:fixed;
}
.finance-page #financeContent .finance-settlement-table th:nth-child(1),
.finance-page #financeContent .finance-settlement-table td:nth-child(1){width:52px;min-width:52px;text-align:center}
.finance-page #financeContent .finance-settlement-table th:nth-child(2),
.finance-page #financeContent .finance-settlement-table td.finance-code-cell{width:11.5em;min-width:11.5em;white-space:nowrap}
.finance-page #financeContent .finance-settlement-table th:nth-child(3),
.finance-page #financeContent .finance-settlement-table td.finance-name-cell{width:auto;min-width:12em}
.finance-page #financeContent .finance-settlement-table td.finance-name-cell strong,
.finance-page #financeContent .finance-settlement-table td.finance-name-cell small{display:block}
.finance-page #financeContent .finance-settlement-table td.finance-name-cell small{margin-top:4px;color:#7d8f98}
.finance-page #financeContent .finance-settlement-table th.number,
.finance-page #financeContent .finance-settlement-table td.number,
.finance-page #financeContent .finance-settlement-table tfoot th.number{
  width:8.5em;
  min-width:8.5em;
  max-width:9.5em;
  padding-left:10px;
  padding-right:14px;
}
.finance-page #financeContent .finance-settlement-table th.finance-status-cell,
.finance-page #financeContent .finance-settlement-table td.finance-status-cell,
.finance-page #financeContent .finance-settlement-table tfoot th.finance-status-cell,
.finance-page #financeContent .finance-settlement-table tfoot th:last-child{
  width:5.5em;
  min-width:5.5em;
  text-align:center;
  white-space:nowrap;
}
.finance-page #financeContent .finance-entry-actions{text-align:left}
/* Entry / FX amount columns stay compact; text columns absorb remaining width. */
.finance-page #financeContent .inventory-table:not(.finance-settlement-table) th.number,
.finance-page #financeContent .inventory-table:not(.finance-settlement-table) td.number,
.finance-page #financeContent .inventory-table:not(.finance-settlement-table) tfoot th.number{
  width:8.5em;
  max-width:10em;
}

/* All selected business tabs use the same visual language as “查看合同”. */
body [class$="-tabs"]>button.active,
body [class*="-tabs "]>button.active{
  border-color:#b8d7d3!important;
  background:#edf7f5!important;
  color:#167d76!important;
  font-weight:700!important;
  outline:0!important;
  box-shadow:none!important;
}
body [class$="-tabs"]>button.active:after,
body [class*="-tabs "]>button.active:after{
  display:none!important;
}
body [class$="-tabs"]>button:focus-visible,
body [class*="-tabs "]>button:focus-visible{
  outline:0!important;
  box-shadow:0 0 0 2px rgba(22,128,120,.18)!important;
}

/* Inventory operations: secondary folder tabs; full-width rail + active tab covers its foot. */
.inventory-page:has(>.inventory-tabs>button[data-tab="operations"].active)>.inventory-panel>header{
  display:none!important;
}
.inventory-page:has(>.inventory-tabs>button[data-tab="operations"].active)>.inventory-panel>.inventory-ops-sub-tabs{
  margin-top:var(--app-frame-gap,20px);
  margin-right:var(--app-frame-gap,20px);
  margin-left:var(--app-frame-gap,20px);
  margin-bottom:-1px;
  padding-left:var(--ops-tab-rail-inset,16px);
  border-bottom:0;
  background:transparent;
}
.inventory-page:has(>.inventory-tabs>button[data-tab="operations"].active)>.inventory-panel>#inventoryContent{
  position:relative;
  z-index:1;
  border-radius:9px!important;
  border-top:1px solid #e0e7ea!important;
}
.inventory-page .inventory-ops-sub-tabs>button[data-ops-tab]:not(.active){
  background:transparent!important;
}
.inventory-page .inventory-ops-sub-tabs>button[data-ops-tab].active{
  border-color:#dce6e8!important;
  background:#fff!important;
  color:#167d76!important;
}

/* 全系统业务表格标准列宽：单位 2 字、品牌 4 字、查看/编辑 5–6 字。 */
table :is(th,td)[data-col="unit"],
table :is(th,td).unit,
table :is(th,td)[data-line-col="unit"]{
  width:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  padding-left:4px!important;
  padding-right:4px!important;
  text-align:center;
  white-space:nowrap!important;
}
table :is(th,td)[data-col="brand"],
table :is(th,td).brand,
table.document-lines th.brand,
table :is(th,td)[data-line-col="brand"]{
  width:68px!important;
  min-width:68px!important;
  max-width:68px!important;
  padding-left:6px!important;
  padding-right:6px!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.35;
}
table :is(th,td)[data-col="view"]{
  width:100px!important;
  min-width:100px!important;
  max-width:100px!important;
  padding-left:6px!important;
  padding-right:6px!important;
  white-space:nowrap!important;
}
/* 全系统金额列：单行 nowrap；标准业务字号；不足则撑开列宽，禁止缩字／ellipsis（原则 9c） */
table :is(th,td).amount,
table :is(th,td).money-col,
table :is(th,td)[data-list-column="amount"],
table :is(th,td)[data-list-column="received"],
table :is(th,td)[data-list-column="balance"],
table :is(th,td)[data-list-column="invoice"],
table :is(th,td)[data-list-column="invoiceBalance"],
table :is(th,td)[data-list-column="paid"],
table :is(th,td)[data-list-column="sales"],
table :is(th,td)[data-list-column="purchase"],
table :is(th,td)[data-list-column="profit"],
table :is(th,td)[data-col="amount"],
table :is(th,td)[data-col="received"],
table :is(th,td)[data-col="balance"],
table :is(th,td)[data-col="invoice"],
table :is(th,td)[data-col="paid"],
table :is(th,td)[data-line-col="taxPrice"],
table :is(th,td)[data-line-col="netPrice"],
table :is(th,td)[data-line-col="taxTotal"],
table :is(th,td)[data-line-col="netTotal"]{
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:inherit!important;
  font-variant-numeric:tabular-nums;
  text-align:right!important;
  min-width:7.5em;
}

/* 系统标准「取消」按键：浅灰底 + 右下实心投影（非白框细边），与主按键同高同圆角 */
:root{
  --btn-cancel-bg:#b8b8b8;
  --btn-cancel-bg-hover:#ababab;
  --btn-cancel-ink:#1c1c1c;
  --btn-cancel-shadow:#616161;
}
button.cancel,
button.btn-cancel,
button.member-cancel,
button[data-cancel],
button[data-cancel-edit],
button[data-cancel-return],
button[data-cancel-location],
button[data-cancel-outbound],
button[data-cancel-sn-outbound],
button[data-cancel-transfer],
button[data-cancel-approval],
button[data-role-dialog-cancel],
button[data-close-manager],
#cancelEmployee,
#cancelDepartment,
#cancelDrawer,
#cancelDelete,
#cancelSetting,
#cancelProduct,
#cancelProductDelete,
#cancelRule,
#cancelFinance,
#cancelConfirm,
#cancelPartnerTypes,
#bgrCancel,
#payreqCancel,
.confirm footer > button.cancel,
.system-centered-dialog footer > button.cancel,
.inventory-confirm-dialog footer > button.cancel,
.completion-dialog button.cancel,
.metakin-password-dialog footer > button.cancel{
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:38px;
  min-height:38px;
  padding:0 14px;
  border:0!important;
  border-radius:6px;
  background:var(--btn-cancel-bg)!important;
  color:var(--btn-cancel-ink)!important;
  box-shadow:2px 2px 0 var(--btn-cancel-shadow);
  font-size:12px;
  font-weight:400;
  line-height:normal;
  cursor:pointer;
}
button.cancel:hover,
button.btn-cancel:hover,
button.member-cancel:hover,
button[data-cancel]:hover,
button[data-cancel-edit]:hover,
button[data-cancel-return]:hover,
button[data-cancel-location]:hover,
button[data-cancel-outbound]:hover,
button[data-cancel-sn-outbound]:hover,
button[data-cancel-transfer]:hover,
button[data-cancel-approval]:hover,
button[data-role-dialog-cancel]:hover,
button[data-close-manager]:hover,
#cancelEmployee:hover,
#cancelDepartment:hover,
#cancelDrawer:hover,
#cancelDelete:hover,
#cancelSetting:hover,
#cancelProduct:hover,
#cancelProductDelete:hover,
#cancelRule:hover,
#cancelFinance:hover,
#cancelConfirm:hover,
#cancelPartnerTypes:hover,
#bgrCancel:hover,
#payreqCancel:hover{
  background:var(--btn-cancel-bg-hover)!important;
}
button.cancel:active,
button.btn-cancel:active,
button.member-cancel:active,
button[data-cancel]:active,
button[data-cancel-edit]:active,
button[data-cancel-return]:active,
button[data-cancel-location]:active,
button[data-cancel-outbound]:active,
button[data-cancel-sn-outbound]:active,
button[data-cancel-transfer]:active,
button[data-cancel-approval]:active,
button[data-role-dialog-cancel]:active,
button[data-close-manager]:active{
  box-shadow:1px 1px 0 var(--btn-cancel-shadow);
  transform:translate(1px,1px);
}

/* 取消＋确认／主按键并排：同框体（同高／同圆角／同内边距／同最小宽度），只颜色区分 */
:root{--btn-pair-min-width:112px}
footer:has(>button.cancel):has(>button.primary)>button.cancel,
footer:has(>button.cancel):has(>button.primary)>button.primary,
footer:has(>button.cancel):has(>[data-confirm])>button.cancel,
footer:has(>button.cancel):has(>[data-confirm])>button[data-confirm],
footer:has(>button.cancel):has(>.centered-confirm)>button.cancel,
footer:has(>button.cancel):has(>.centered-confirm)>.centered-confirm,
footer:has(>button.cancel):has(>.inventory-confirm-action)>button.cancel,
footer:has(>button.cancel):has(>.inventory-confirm-action)>.inventory-confirm-action,
footer:has(>[data-cancel]):has(>[data-confirm])>button[data-cancel],
footer:has(>[data-cancel]):has(>[data-confirm])>button[data-confirm],
footer:has(>[data-cancel].cancel):has(>button.primary)>button.cancel,
footer:has(>[data-cancel].cancel):has(>button.primary)>button.primary,
.approval-picker>footer:has(button.cancel):has(button.primary)>button.cancel,
.approval-picker>footer:has(button.cancel):has(button.primary)>button.primary,
.approval-picker>footer:has([data-cancel]):has([data-confirm])>button.cancel,
.approval-picker>footer:has([data-cancel]):has([data-confirm])>[data-confirm],
.system-centered-dialog footer:has(button.cancel):has(.centered-confirm)>button.cancel,
.system-centered-dialog footer:has(button.cancel):has(.centered-confirm)>.centered-confirm,
.inventory-confirm-dialog footer:has(button.cancel):has(button.primary)>button.cancel,
.inventory-confirm-dialog footer:has(button.cancel):has(button.primary)>button.primary,
.inventory-confirm-dialog footer:has(button.cancel):has(.inventory-confirm-action)>button.cancel,
.inventory-confirm-dialog footer:has(button.cancel):has(.inventory-confirm-action)>.inventory-confirm-action,
.metakin-password-dialog footer:has(button.cancel):has(button.primary)>button.cancel,
.metakin-password-dialog footer:has(button.cancel):has(button.primary)>button.primary,
.role-name-dialog footer:has(button.cancel):has(button.primary)>button.cancel,
.role-name-dialog footer:has(button.cancel):has(button.primary)>button.primary,
.action-row:has(>button.cancel):has(>button:not(.cancel))>button.cancel,
.action-row:has(>button.cancel):has(>button:not(.cancel))>button:not(.cancel),
.confirm footer:has(button.cancel):has(button.primary)>button.cancel,
.confirm footer:has(button.cancel):has(button.primary)>button.primary{
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:var(--btn-pair-min-width)!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 14px!important;
  border-radius:6px!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:normal!important;
  white-space:nowrap!important;
}

/* 全站业务状态色：已审批／已签署／已结束＝绿；审批中／签署中／进行中＝橙；驳回／中止／已废弃＝红 */
.status.approved,.status.signed,.status.completed,
.approval-tag.approved,.signing-tag.signed,.execution-tag.completed{background:#e8f5f0;color:#187757}
.status.pending,.status.signing,.status.active,.status.revision_pending,.status.revision_requested,
.approval-tag.pending,.signing-tag.signing,.execution-tag.active{background:#fff1d9;color:#a66512}
.status.rejected,.status.terminated,.status.voided,
.approval-tag.rejected,.approval-tag.voided,.execution-tag.terminated{background:#fbe8e7;color:#c43f3a}

/* 列表「已废弃」勾选：放在新建主按键左侧，默认勾选＝显示已废弃 */
.show-voided-toggle{display:inline-flex;align-items:center;gap:6px;height:38px;margin:0;color:#536976;font-size:12px;font-weight:400;white-space:nowrap;cursor:pointer;user-select:none;box-sizing:border-box}
.show-voided-toggle input{width:15px;height:15px;margin:0;accent-color:#176f71;cursor:pointer;flex:none}
/* 与次按键／outline 同框：白底浅灰边、同高同圆角同内边距 */
.show-voided-toggle.outline,
.page-head .show-voided-toggle{
  border:1px solid #dce3e7;
  border-radius:6px;
  background:#fff;
  color:#667783;
  padding:0 14px;
  font-size:12px;
}
.status-tag.voided{color:#bd403b!important}
.status-tag.voided:before{background:#bd403b!important}
.status-pill.voided{background:#fbe8e7!important;color:#bd403b!important}
.status.draft,.status.unsigned,.status.not_started,.status.withdrawn,
.approval-tag.draft,.approval-tag.withdrawn,.signing-tag.unsigned,.execution-tag.not_started{background:#eef3f4;color:#627987}

/* 列表编号下申请人：本人绿、他人橙（全站结算／业务申请表单共用） */
.list-applicant{display:block;margin-top:3px;font-size:12px;font-weight:600;line-height:1.35}
td>strong+.list-applicant,td .list-applicant{font-weight:600}
.list-applicant.is-self,.payreq-detail-field .list-applicant.is-self{color:#167d76}
.list-applicant.is-other,.payreq-detail-field .list-applicant.is-other{color:#c4781a}
.payreq-detail-field .list-applicant{display:inline;margin:0;font-size:inherit}

/* 全站：单号下方只显示编号规则名称（如「收款单」） */
.doc-code-with-rule{display:inline-flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0;vertical-align:top}
.doc-code-with-rule>.doc-code-value{display:inline}
.doc-number-rule,.todo-numbering-rule{display:block;margin-top:1px;font-size:11px;font-weight:400;color:#84939d;line-height:1.35}

/* 列表「修改申请已获准」两行显示 */
.status.status-two-line{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:2px 0;line-height:1.25;white-space:normal;height:auto;min-height:0;background:transparent;border:0;border-radius:0}
.status.status-two-line>span{display:block;font-size:inherit;font-weight:inherit;color:inherit}

/* 数量框：去掉浏览器上下调节箭头，统一为可直接键入的普通输入框 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{appearance:none;-webkit-appearance:none;margin:0}
input[type="number"]{appearance:textfield;-moz-appearance:textfield}
input.qty-input{box-sizing:border-box;width:100%;min-width:4.5em;text-align:right;font-variant-numeric:tabular-nums}
td.number input.qty-input,td[data-line-col="quantity"] input.qty-input{width:88px;max-width:100%;padding:6px 8px}
