/*
 * 静界 global shell
 * The shell owns information architecture and workspace framing only. Business
 * pages keep their original DOM, route keys and event handlers inside #content.
 */
body:has(#app.quiet-global-shell:not(.hidden)){
 background:var(--page);color:var(--ink);
}
.quiet-global-shell{min-width:0;min-height:100vh;background:var(--page);color:var(--ink);font-family:"Avenir Next","PingFang SC","Microsoft YaHei",sans-serif}
.quiet-global-shell .topbar{z-index:40;left:88px;height:72px;display:grid;grid-template-columns:minmax(280px,620px) auto;justify-content:end;gap:20px;padding:0 18px;background:#101721;border-color:var(--stroke);box-shadow:none;backdrop-filter:none}
.quiet-global-shell .logo{position:fixed;z-index:44;left:0;top:0;width:88px;min-width:88px;height:72px;padding:0;display:grid;place-items:center;background:#0c1220;border-right:1px solid var(--stroke);border-bottom:1px solid var(--stroke)}
.quiet-global-shell .logo-symbol{width:42px;height:42px;border-radius:12px;background:var(--brand);box-shadow:none;color:#fff;font-size:15px;letter-spacing:.06em}
.quiet-global-shell .logo>span:last-child{display:none}

.quiet-global-shell #topNav{position:fixed;z-index:42;left:0;top:72px;bottom:0;width:88px;height:auto;padding:10px 8px 16px;display:flex;flex-direction:column;align-items:stretch;gap:5px;overflow-x:hidden;overflow-y:auto;background:#0c1220;border-right:1px solid var(--stroke);scrollbar-width:thin}
.quiet-global-shell #topNav button{width:100%;min-width:0;height:58px;min-height:58px;padding:7px 3px;display:grid;grid-template-columns:1fr;grid-template-rows:22px auto;place-items:center;gap:3px;border:1px solid transparent;border-radius:11px;background:transparent;color:#7f8b9b;font-size:11px;text-align:center;transition:.16s ease}
.quiet-global-shell #topNav button i{margin:0;color:#9aa6b6;font-size:17px;font-style:normal;line-height:1}
.quiet-global-shell #topNav button span{line-height:1.15}
.quiet-global-shell #topNav button:hover{background:rgba(255,255,255,.045);color:#e9edf2}
.quiet-global-shell #topNav button.active{background:var(--brand-soft);border-color:color-mix(in srgb,var(--brand) 32%,transparent);color:#fff;box-shadow:inset 3px 0 0 var(--brand)}
.quiet-global-shell #topNav button.active i{color:var(--brand-2)}

.quiet-global-command{position:relative;align-self:center;width:min(100%,620px);height:42px;display:flex;align-items:center;gap:9px;padding:0 11px;border:1px solid var(--stroke);border-radius:10px;background:#0b111a;color:#8490a0}
.quiet-global-command:focus-within{border-color:color-mix(in srgb,var(--brand) 58%,var(--stroke));box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent)}
.quiet-global-command input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:var(--ink);font-size:13px}
.quiet-global-command input::placeholder{color:#657181}
.quiet-global-command kbd{padding:3px 6px;border:1px solid var(--stroke);border-radius:5px;color:#727e8e;background:rgba(255,255,255,.025);font:10px inherit;white-space:nowrap}
.quiet-global-shell .top-actions{min-width:0;justify-content:flex-end;gap:8px;padding:0;color:var(--sub)}
.quiet-global-shell .top-actions>button,.quiet-global-shell .backend-status{min-height:36px;border:1px solid var(--stroke);border-radius:9px;background:rgba(255,255,255,.035);color:#b3bcc8}
.quiet-global-shell .top-actions>button{padding:0 10px;cursor:pointer}
.quiet-global-shell .backend-status{display:inline-flex;align-items:center;padding:0 10px;color:var(--brand-2)}
.quiet-global-shell .theme-toggle{width:38px}
.quiet-global-shell .nav-compact{width:38px;font-size:16px}
.quiet-global-shell .user-pill{min-height:42px!important;padding:4px 8px 4px 5px!important;background:rgba(255,255,255,.045)!important}
.quiet-global-shell .user-pill i{background:var(--brand-soft);color:var(--brand-2)}
.quiet-global-shell .user-pill-copy b{color:var(--ink)}
.quiet-global-shell .user-pill-copy small{color:#7e8997}

.quiet-global-shell .sidebar{z-index:32;left:88px;top:72px;bottom:0;width:256px;height:auto;padding:0 12px 18px;background:#111925;border-right:1px solid var(--stroke);overflow-x:hidden;overflow-y:auto;box-shadow:none;transition:transform .18s ease;scrollbar-width:thin}
.quiet-global-shell .sidebar-heading{position:sticky;z-index:2;top:0;margin:0 -12px;padding:19px 20px 13px;background:#111925}
.quiet-global-shell .sidebar-heading small{display:block;margin-bottom:6px;color:#667282;font-size:9px;font-weight:700;letter-spacing:.16em}
.quiet-global-shell .sidebar h2{width:auto;min-width:0;height:auto;margin:0;padding:0;border:0;color:#eef1f5;font-size:20px;font-weight:600;letter-spacing:.01em}
.quiet-global-shell .nav-search{position:sticky;z-index:2;top:66px;height:38px;margin:0 0 10px;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--stroke);border-radius:9px;background:#0d141e;color:#697687}
.quiet-global-shell .nav-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}
.quiet-global-shell .nav-search input::placeholder{color:#647080}
.quiet-global-shell #sideNav{display:grid;align-content:start;gap:6px;padding:0;overflow:visible}
.quiet-global-shell .side-group{height:auto;display:block;padding:0;border:0;white-space:normal}
.quiet-global-shell .side-group[hidden]{display:none}
.quiet-global-shell .group-toggle{width:100%;min-width:0;height:36px;display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:7px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:#7f8b9a;text-align:left;font-size:11px;font-weight:700;letter-spacing:.04em}
.quiet-global-shell .group-toggle:hover{background:rgba(255,255,255,.035);color:#bfc6d0}
.quiet-global-shell .group-toggle em{min-width:20px;padding:2px 6px;border-radius:999px;background:rgba(255,255,255,.045);color:#697586;font-size:9px;font-style:normal;text-align:center}
.quiet-global-shell .group-caret{display:grid;place-items:center;transition:transform .16s ease}
.quiet-global-shell .side-group.collapsed .group-caret{transform:rotate(-90deg)}
.quiet-global-shell .side-group.collapsed .group-items{display:none}
.quiet-global-shell #sideNav.filtering .group-items{display:grid}
.quiet-global-shell .group-items{display:grid;gap:2px;padding:2px 0 7px}
.quiet-global-shell .group-items button{position:relative;width:100%;min-width:0;height:auto;min-height:36px;padding:9px 10px 9px 24px;border:1px solid transparent;border-radius:8px;background:transparent;color:#9aa4b1;font-size:12px;text-align:left;white-space:normal}
.quiet-global-shell .group-items button:before{content:"";position:absolute;left:9px;top:50%;width:5px;height:5px;border:1px solid #566273;border-radius:50%;transform:translateY(-50%)}
.quiet-global-shell .group-items button:hover{background:rgba(255,255,255,.035);color:#e4e8ed}
.quiet-global-shell .group-items button.active{background:var(--brand-soft);border-color:color-mix(in srgb,var(--brand) 22%,transparent);color:#fff;font-weight:600}
.quiet-global-shell .group-items button.active:before{border-color:var(--brand);background:var(--brand)}
.quiet-global-shell .group-items button[hidden]{display:none}

.quiet-global-shell .main{min-width:0;min-height:100vh;padding:72px 0 0 344px;background:var(--page);transition:padding-left .18s ease}
.quiet-global-shell .crumb{position:sticky;z-index:18;top:72px;height:64px;padding:12px 22px;display:grid;align-content:center;gap:3px;background:rgba(14,20,30,.92);border-color:var(--stroke);backdrop-filter:blur(16px)}
.quiet-global-shell .crumb #pageContext{color:#717d8d;font-size:10px;letter-spacing:.04em}
.quiet-global-shell .crumb #pageTitle{color:#f0f3f6;font-size:17px;font-weight:600}
.quiet-global-shell #content{min-width:0;padding:18px 20px 28px;background:var(--page);color:var(--ink)}
.quiet-global-shell .main>footer{padding:12px 20px;color:#5f6b79}
.quiet-global-shell .panel,.quiet-global-shell .cash-left,.quiet-global-shell .goods,.quiet-global-shell .source-page,.quiet-global-shell .product-source-page{background:var(--surface);border-color:var(--stroke);border-radius:13px;box-shadow:none;color:var(--ink)}
.quiet-global-shell .panel{padding:18px}
.quiet-global-shell :is(.summary-row>div,.mall-stats>div,.report-grid>div,.campaign,.metric,.data-tool-grid article,.source-page article){box-shadow:none}
.quiet-global-shell :is(input,select,textarea,button){accent-color:var(--brand)}
.quiet-global-shell #content :is(input,select,textarea){border-color:var(--stroke);background:var(--surface-2);color:var(--ink)}
.quiet-global-shell #content button:not(.primary):not(.link-btn){border-color:var(--stroke);background:var(--surface-2);color:var(--ink)}
.quiet-global-shell #content button:not(.primary):not(.link-btn):hover{border-color:color-mix(in srgb,var(--brand) 44%,var(--stroke));background:color-mix(in srgb,var(--brand-soft) 55%,var(--surface-2))}
.quiet-global-shell .primary{border-color:var(--brand)!important;background:var(--brand)!important;color:#fff!important;box-shadow:none!important}
.quiet-global-shell :is(.filters,.product-source-filters,.source-project-filters){background:var(--surface-2)!important;border-color:var(--stroke)!important}
.quiet-global-shell :is(table,th,td){border-color:var(--stroke)}
.quiet-global-shell table{background:var(--surface)}
.quiet-global-shell th{background:var(--surface-2);color:var(--sub)}
.quiet-global-shell td{color:var(--ink)}
.quiet-global-shell .table-wrap{border-color:var(--stroke);background:var(--surface);box-shadow:none}
.quiet-global-shell .status-tabs button{background:transparent!important}
.quiet-global-shell .status-tabs .active{color:var(--brand)!important;border-color:var(--brand)!important}
.quiet-global-shell .tag.green{background:var(--brand-soft);color:var(--brand-2)}
.quiet-global-shell .finance-source .finance-summary article{
 background:var(--surface-2);
 border-color:var(--stroke);
 color:var(--ink);
}
.quiet-global-shell .finance-source .finance-summary article b{color:var(--ink)}
.quiet-global-shell .inventory-source .inv-form-table th{
 background:var(--surface-2);
 border-color:var(--stroke);
 color:var(--sub);
}
.quiet-global-shell .inventory-source .inv-form-table td{
 background:var(--surface);
 border-color:var(--stroke);
 color:var(--ink);
}
.quiet-global-shell :is(.product-source-form input,.product-source-form select,.product-source-form textarea,.source-project-grid input,.source-project-grid select,.source-card-table input,.source-card-table select){background:var(--surface-2)!important;border-color:var(--stroke)!important;color:var(--ink)!important}
.quiet-global-shell :is(.product-source-filters,.product-source-form .ps-unit-spec-group,.applicable-store-picker){background:var(--surface-2)!important;border-color:var(--stroke)!important}
.quiet-global-shell .product-source-table{border-color:var(--stroke)}
.quiet-global-shell .receipt-preview,.quiet-global-shell .receipt-preview *{color:#161616;--ink:#161616;--sub:#666;--stroke:#ddd;color-scheme:light}

.quiet-global-shell.compact-nav .sidebar{transform:translateX(-260px)}
.quiet-global-shell.compact-nav .main{padding-left:88px}
.quiet-global-shell.compact-nav .topbar{left:88px}
.quiet-global-shell.compact-nav .nav-compact{color:var(--brand-2);border-color:color-mix(in srgb,var(--brand) 40%,var(--stroke))}
.quiet-global-shell.cashier-mode .sidebar,.quiet-global-shell.cashier-mode .crumb{display:block}
.quiet-global-shell.cashier-mode .main{padding-left:344px;padding-top:72px}
.quiet-global-shell.cashier-mode.compact-nav .main{padding-left:88px}
.quiet-global-shell.cashier-mode #content{padding:12px 14px 18px;background:var(--page)}
.quiet-global-shell.cashier-mode .cashier.quiet-pos-shell{height:calc(100vh - 172px);min-height:620px}

.quiet-menu-results{position:fixed;z-index:160;width:min(620px,calc(100vw - 32px));max-height:min(520px,70vh);padding:7px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:#111925;color:#f1f4f7;box-shadow:0 22px 70px rgba(0,0,0,.42);overflow:auto;color-scheme:dark}
.quiet-menu-results[hidden]{display:none}
.quiet-menu-results button{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:10px 11px;border:0;border-radius:8px;background:transparent;color:#dfe4e9;text-align:left;cursor:pointer}
.quiet-menu-results button:hover,.quiet-menu-results button.active{background:rgba(136,120,232,.15)}
.quiet-menu-results button b{font-size:12px}
.quiet-menu-results button small{grid-row:2;color:#778394;font-size:10px}
.quiet-menu-results button em{grid-row:1/3;align-self:center;color:#788494;font-size:10px;font-style:normal}
.quiet-menu-empty{padding:18px;color:#7d8998;text-align:center;font-size:12px}

@media(max-width:1360px){
 .quiet-global-shell .topbar{grid-template-columns:minmax(240px,1fr) auto}.quiet-global-shell .help-toggle{font-size:0}.quiet-global-shell .help-toggle:after{content:"?";font-size:14px}.quiet-global-shell .backend-status{display:none}
}
@media(max-width:1100px){
 .quiet-global-shell{--quiet-rail:76px}.quiet-global-shell .logo{width:76px;min-width:76px}.quiet-global-shell #topNav{width:76px}.quiet-global-shell .topbar{left:76px}.quiet-global-shell .sidebar{left:76px;width:226px}.quiet-global-shell .main{padding-left:302px}.quiet-global-shell.compact-nav .main,.quiet-global-shell.cashier-mode.compact-nav .main{padding-left:76px}.quiet-global-shell.compact-nav .topbar{left:76px}.quiet-global-shell.cashier-mode .main{padding-left:302px}.quiet-global-shell .user-pill-copy,.quiet-global-shell #langToggle{display:none}
}
@media(max-width:820px){
 .quiet-global-shell .sidebar{box-shadow:18px 0 45px rgba(0,0,0,.35)}.quiet-global-shell:not(.nav-expanded-mobile) .sidebar{transform:translateX(-230px)}.quiet-global-shell:not(.nav-expanded-mobile) .main,.quiet-global-shell.cashier-mode:not(.nav-expanded-mobile) .main{padding-left:76px}.quiet-global-shell .topbar{grid-template-columns:minmax(180px,1fr) auto}.quiet-global-shell .theme-toggle,.quiet-global-shell .help-toggle{display:none}.quiet-global-command kbd{display:none}.quiet-global-shell #content{padding:12px}.quiet-global-shell .crumb{padding-inline:14px}
}
@media(max-width:620px){
 .quiet-global-shell{min-width:620px}.quiet-global-shell .topbar{right:auto;width:544px}.quiet-global-shell .quiet-global-command{width:280px}.quiet-global-shell .cashier.quiet-pos-shell{min-height:650px}
}

/* 2026-08-16: 一级与二级导航统一迁移到顶部。业务页面 DOM 与路由保持不变。 */
.quiet-global-shell{
 --quiet-primary-height:64px;
 --quiet-secondary-height:68px;
}
.quiet-global-shell .topbar{
 position:fixed;
 inset:0 0 auto 0;
 width:auto;
 height:var(--quiet-primary-height);
 padding:0 14px 0 76px;
 display:flex;
 grid-template-columns:none;
 align-items:center;
 justify-content:stretch;
 gap:10px;
 background:#101721;
}
.quiet-global-shell .logo{
 position:fixed;
 left:0;
 top:0;
 width:64px;
 min-width:64px;
 height:var(--quiet-primary-height);
 border-right:1px solid var(--stroke);
 border-bottom:1px solid var(--stroke);
}
.quiet-global-shell .logo-symbol{width:38px;height:38px;border-radius:11px}
.quiet-global-shell #topNav{
 position:static;
 inset:auto;
 min-width:240px;
 height:var(--quiet-primary-height);
 flex:1 1 620px;
 padding:8px 0;
 display:flex;
 flex-direction:row;
 align-items:center;
 gap:4px;
 overflow-x:auto;
 overflow-y:hidden;
 background:transparent;
 border:0;
 scrollbar-width:none;
}
.quiet-global-shell #topNav::-webkit-scrollbar{display:none}
.quiet-global-shell #topNav button{
 width:auto;
 min-width:max-content;
 height:44px;
 min-height:44px;
 padding:0 10px;
 display:flex;
 grid-template-columns:none;
 grid-template-rows:none;
 place-items:center;
 justify-content:center;
 gap:6px;
 border-radius:9px;
 font-size:12px;
 white-space:nowrap;
}
.quiet-global-shell #topNav button i{font-size:15px}
.quiet-global-shell #topNav button.active{box-shadow:inset 0 -2px 0 var(--brand)}
.quiet-global-shell .quiet-global-command{flex:0 1 280px;width:280px;min-width:170px;height:38px}
.quiet-global-shell .top-actions{flex:0 0 auto}

.quiet-global-shell .sidebar{
 position:fixed;
 z-index:34;
 left:0;
 right:0;
 top:var(--quiet-primary-height);
 bottom:auto;
 width:auto;
 height:var(--quiet-secondary-height);
 padding:6px 14px;
 display:grid;
 grid-template-columns:auto minmax(160px,220px) minmax(0,1fr);
 grid-template-rows:1fr;
 align-items:center;
 gap:10px;
 overflow:hidden;
 background:#111925;
 border-right:0;
 border-bottom:1px solid var(--stroke);
 transform:none;
 transition:transform .18s ease;
}
.quiet-global-shell .sidebar-heading{
 position:static;
 margin:0;
 padding:0 10px 0 2px;
 background:transparent;
 white-space:nowrap;
}
.quiet-global-shell .sidebar-heading small{display:none}
.quiet-global-shell .sidebar h2{font-size:17px}
.quiet-global-shell .nav-search{
 position:static;
 top:auto;
 width:100%;
 height:34px;
 margin:0;
 flex:0 0 auto;
}
.quiet-global-shell #sideNav{
 min-width:0;
 height:44px;
 padding:0;
 display:flex;
 grid-template-columns:none;
 align-items:center;
 gap:7px;
 overflow-x:auto;
 overflow-y:hidden;
 scrollbar-width:none;
}
.quiet-global-shell #sideNav::-webkit-scrollbar{display:none}
.quiet-global-shell .side-group{
 flex:0 0 auto;
 height:40px;
 display:flex;
 align-items:center;
 gap:4px;
 padding:3px;
 border:1px solid var(--stroke);
 border-radius:10px;
 background:rgba(255,255,255,.018);
 white-space:nowrap;
}
.quiet-global-shell .side-group[hidden]{display:none}
.quiet-global-shell .group-toggle{
 width:auto;
 min-width:max-content;
 height:34px;
 display:flex;
 grid-template-columns:none;
 align-items:center;
 gap:6px;
 padding:0 9px;
 border-radius:7px;
 white-space:nowrap;
}
.quiet-global-shell .group-toggle em{min-width:18px;padding:2px 5px}
.quiet-global-shell .group-caret{transform:rotate(-90deg)}
.quiet-global-shell .side-group:not(.collapsed) .group-caret{transform:rotate(0)}
.quiet-global-shell .group-items{
 height:34px;
 display:flex;
 align-items:center;
 gap:3px;
 padding:0;
}
.quiet-global-shell .side-group.collapsed .group-items{display:none}
.quiet-global-shell #sideNav.filtering .group-items{display:flex}
.quiet-global-shell .group-items button{
 width:auto;
 min-width:max-content;
 min-height:32px;
 height:32px;
 padding:0 10px;
 border-radius:7px;
 font-size:11px;
 white-space:nowrap;
}
.quiet-global-shell .group-items button:before{display:none}

.quiet-global-shell .main{
 min-height:100vh;
 padding:calc(var(--quiet-primary-height) + var(--quiet-secondary-height)) 0 0;
 transition:padding-top .18s ease;
}
.quiet-global-shell .page-meta{display:none!important}
.quiet-global-shell .crumb{
 top:calc(var(--quiet-primary-height) + var(--quiet-secondary-height));
 height:54px;
 padding:9px 20px;
}
.quiet-global-shell.compact-nav .sidebar{transform:translateY(calc(-1 * var(--quiet-secondary-height) - 2px))}
.quiet-global-shell.compact-nav .main{padding:var(--quiet-primary-height) 0 0}
.quiet-global-shell.compact-nav .topbar{left:0}
.quiet-global-shell.compact-nav .crumb{top:var(--quiet-primary-height)}
.quiet-global-shell.cashier-mode .main,
body.cashier-mode .quiet-global-shell .main{padding:calc(var(--quiet-primary-height) + var(--quiet-secondary-height)) 0 0}
.quiet-global-shell.cashier-mode.compact-nav .main,
body.cashier-mode .quiet-global-shell.compact-nav .main{padding:var(--quiet-primary-height) 0 0}
.quiet-global-shell.cashier-mode .cashier.quiet-pos-shell,
body.cashier-mode .quiet-global-shell .cashier.quiet-pos-shell{height:calc(100vh - 156px);min-height:600px}

@media(max-width:1360px){
 .quiet-global-shell .topbar{display:flex;grid-template-columns:none}
 .quiet-global-shell .quiet-global-command{flex-basis:220px;width:220px;min-width:150px}
 .quiet-global-shell .backend-status{display:none}
}
@media(max-width:1120px){
 .quiet-global-shell .topbar{left:0;padding-left:72px}
 .quiet-global-shell .logo{width:64px;min-width:64px}
 .quiet-global-shell #topNav{width:auto;min-width:190px}
 .quiet-global-shell .sidebar{left:0;width:auto;grid-template-columns:auto minmax(160px,210px) minmax(0,1fr)}
 .quiet-global-shell .main,.quiet-global-shell.cashier-mode .main{padding-left:0}
 .quiet-global-shell .user-pill-copy,.quiet-global-shell #langToggle{display:none}
}
@media(max-width:900px){
 .quiet-global-shell .quiet-global-command{display:none}
 .quiet-global-shell .theme-toggle,.quiet-global-shell .help-toggle{display:none}
 .quiet-global-shell .sidebar{grid-template-columns:auto minmax(150px,190px) minmax(0,1fr)}
}
@media(max-width:700px){
 .quiet-global-shell{min-width:620px}
 .quiet-global-shell .topbar{right:auto;width:620px}
 .quiet-global-shell .sidebar{right:auto;width:620px;grid-template-columns:auto 170px minmax(0,1fr);box-shadow:none}
 .quiet-global-shell:not(.nav-expanded-mobile) .sidebar{transform:none}
 .quiet-global-shell.compact-nav .sidebar{transform:translateY(calc(-1 * var(--quiet-secondary-height) - 2px))}
 .quiet-global-shell .main,.quiet-global-shell.cashier-mode .main,.quiet-global-shell:not(.nav-expanded-mobile) .main,.quiet-global-shell.cashier-mode:not(.nav-expanded-mobile) .main{padding-left:0}
 .quiet-global-shell.compact-nav .main,.quiet-global-shell.cashier-mode.compact-nav .main{padding-top:var(--quiet-primary-height)}
 .quiet-global-shell #content{padding:12px}
}

/* 2026-08-16: fixed primary → fixed secondary → visual workspace cards. */
.quiet-global-shell{--quiet-secondary-height:58px}
.quiet-global-shell .sidebar{
 grid-template-columns:auto minmax(0,1fr);
 padding:5px 16px;
 gap:14px;
}
.quiet-global-shell .nav-search{display:none}
.quiet-global-shell #sideNav{height:46px;gap:6px}
.quiet-global-shell .quiet-secondary-tab{
 flex:0 0 auto;
 min-width:max-content;
 height:36px;
 display:inline-flex;
 align-items:center;
 gap:7px;
 padding:0 12px;
 border:1px solid transparent;
 border-radius:9px;
 background:transparent;
 color:#8e99a8;
 font:600 12px/1 "Avenir Next","PingFang SC","Microsoft YaHei",sans-serif;
 cursor:pointer;
 transition:border-color .16s ease,background .16s ease,color .16s ease;
}
.quiet-global-shell .quiet-secondary-tab:hover{background:rgba(255,255,255,.035);color:#e6eaf0}
.quiet-global-shell .quiet-secondary-tab.active{
 border-color:color-mix(in srgb,var(--brand) 34%,var(--stroke));
 background:var(--brand-soft);
 color:#fff;
 box-shadow:inset 0 -2px 0 var(--brand);
}
.quiet-global-shell .quiet-secondary-tab em{
 min-width:19px;
 padding:3px 6px;
 border-radius:999px;
 background:rgba(255,255,255,.055);
 color:#778494;
 font-size:9px;
 font-style:normal;
 text-align:center;
}
.quiet-global-shell .quiet-secondary-tab.active em{background:color-mix(in srgb,var(--brand) 18%,transparent);color:var(--brand-2)}
.quiet-global-shell.cashier-mode .cashier.quiet-pos-shell,
body.cashier-mode .quiet-global-shell .cashier.quiet-pos-shell{height:calc(100vh - 146px)}

.quiet-route-deck{min-height:calc(100vh - 158px);padding:4px 2px 28px}
.quiet-route-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,360px));gap:14px}
.quiet-global-shell #content .quiet-route-card{
 min-width:0;
 min-height:282px;
 padding:0;
 display:flex;
 flex-direction:column;
 overflow:hidden;
 border:1px solid var(--stroke);
 border-radius:15px;
 background:var(--surface)!important;
 color:var(--ink);
 text-align:left;
 cursor:pointer;
 box-shadow:none;
 transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.quiet-global-shell #content .quiet-route-card:hover{
 transform:translateY(-2px);
 border-color:color-mix(in srgb,var(--brand) 46%,var(--stroke));
 background:color-mix(in srgb,var(--brand-soft) 22%,var(--surface))!important;
}
.quiet-global-shell #content .quiet-route-card:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.quiet-route-explainer{
 --route-accent:var(--brand);
 margin-top:14px;
 padding:13px 14px;
 border:1px solid color-mix(in srgb,var(--route-accent) 24%,var(--stroke));
 border-radius:11px;
 background:color-mix(in srgb,var(--route-accent) 7%,transparent);
}
.quiet-route-explainer.kind-calendar{--route-accent:#66b6df}.quiet-route-explainer.kind-chart{--route-accent:#9a8cf0}.quiet-route-explainer.kind-form{--route-accent:#6ccab0}.quiet-route-explainer.kind-catalog{--route-accent:#d7aa66}.quiet-route-explainer.kind-profile{--route-accent:#e68aa7}.quiet-route-explainer.kind-campaign{--route-accent:#ed8b68}.quiet-route-explainer.kind-checkout{--route-accent:#68c6bd}.quiet-route-explainer.kind-workspace{--route-accent:#8aa8dc}
.quiet-route-explainer small{color:var(--route-accent);font-size:9px;font-weight:800;letter-spacing:.08em}
.quiet-route-explainer p{margin:6px 0 9px;color:var(--ink);font-size:12px;line-height:1.55}
.quiet-route-explainer ul{display:grid;gap:5px;margin:0;padding:0;list-style:none;color:var(--sub);font-size:10px;line-height:1.45}
.quiet-route-explainer li{position:relative;padding-left:11px}
.quiet-route-explainer li::before{content:'';position:absolute;left:0;top:.58em;width:4px;height:4px;border-radius:50%;background:var(--route-accent)}
.quiet-route-card-copy{min-height:133px;display:grid;grid-template-rows:auto auto 1fr auto;padding:15px 16px 14px}
.quiet-route-card-copy>small{color:var(--brand-2);font-size:9px;font-weight:800;letter-spacing:.08em}
.quiet-route-card-copy>b{margin-top:5px;color:var(--ink);font-size:17px;font-weight:700}
.quiet-route-card-copy>em{margin-top:7px;color:var(--sub);font-size:11px;font-style:normal;line-height:1.55}
.quiet-route-card-copy>strong{display:flex;align-items:center;justify-content:space-between;margin-top:12px;color:#bfc7d1;font-size:11px;font-weight:600}
.quiet-route-card-copy>strong i{color:var(--brand-2);font-size:15px;font-style:normal;transition:transform .16s ease}
.quiet-route-card:hover .quiet-route-card-copy>strong i{transform:translateX(3px)}

@media(max-width:1120px){
 .quiet-global-shell .sidebar{grid-template-columns:auto minmax(0,1fr)}
 .quiet-route-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
}
@media(max-width:700px){
 .quiet-global-shell .sidebar{grid-template-columns:auto minmax(0,1fr);padding-inline:10px}
 .quiet-route-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}

/* 2026-08-18: 恢复“一级菜单展开二级菜单”。二级菜单固定在顶部并保留原路由。 */
.quiet-global-shell{--quiet-secondary-height:58px}
.quiet-global-shell .sidebar{display:grid!important}
.quiet-global-shell .main,
.quiet-global-shell.cashier-mode .main,
body.cashier-mode .quiet-global-shell .main{padding:calc(var(--quiet-primary-height) + var(--quiet-secondary-height)) 0 0}
.quiet-global-shell.compact-nav .main,
.quiet-global-shell.cashier-mode.compact-nav .main,
body.cashier-mode .quiet-global-shell.compact-nav .main{padding:var(--quiet-primary-height) 0 0}
.quiet-global-shell.cashier-mode .cashier.quiet-pos-shell,
body.cashier-mode .quiet-global-shell .cashier.quiet-pos-shell{height:calc(100vh - 146px)}

.quiet-global-shell #sideNav .side-group{height:42px}
.quiet-global-shell #sideNav .group-toggle.active{color:var(--ink);background:var(--brand-soft)}
.quiet-global-shell #sideNav .group-toggle em{
 min-width:18px;
 padding:2px 5px;
 border-radius:999px;
 background:rgba(255,255,255,.06);
 color:var(--sub);
 font-size:9px;
 font-style:normal;
 text-align:center;
}
.quiet-global-shell #sideNav .group-items button.active{
 background:var(--brand-soft);
 color:#fff;
 box-shadow:inset 0 -2px 0 var(--brand);
}

.quiet-route-deck{
 min-height:calc(100vh - 84px);
 max-width:1800px;
 margin:0 auto;
 padding:16px 4px 32px;
 display:grid;
 align-content:start;
 gap:24px;
}
.quiet-route-section{display:grid;gap:10px}
.quiet-route-section>header{
 min-height:30px;
 display:flex;
 align-items:center;
 gap:9px;
 padding:0 2px;
}
.quiet-route-section>header h2{margin:0;color:var(--ink);font-size:15px;font-weight:700;letter-spacing:.01em}
.quiet-route-section>header span{
 min-width:22px;
 padding:3px 7px;
 border-radius:999px;
 background:rgba(255,255,255,.055);
 color:var(--sub);
 font-size:10px;
 text-align:center;
}
.quiet-route-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(164px,1fr));gap:10px}
.quiet-global-shell #content .quiet-route-card{
 min-width:0;
 min-height:92px;
 padding:15px 16px;
 display:flex;
 flex-direction:row;
 align-items:center;
 gap:12px;
 overflow:hidden;
 border:1px solid var(--stroke);
 border-radius:12px;
 background:var(--surface)!important;
 color:var(--ink);
 text-align:left;
 box-shadow:none;
}
.quiet-global-shell #content .quiet-route-card:hover{
 transform:translateY(-1px);
 border-color:color-mix(in srgb,var(--brand) 48%,var(--stroke));
 background:color-mix(in srgb,var(--brand-soft) 20%,var(--surface))!important;
}
.quiet-route-icon{
 flex:0 0 38px;
 width:38px;
 height:38px;
 display:grid;
 place-items:center;
 border:1px solid color-mix(in srgb,var(--brand) 25%,var(--stroke));
 border-radius:10px;
 background:color-mix(in srgb,var(--brand) 9%,transparent);
 color:var(--brand-2);
 font-size:18px;
 font-style:normal;
}
.quiet-route-card>b{min-width:0;color:var(--ink);font-size:14px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}

@media(max-width:900px){
 .quiet-route-deck{padding:12px 0 24px;gap:20px}
 .quiet-route-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
 .quiet-route-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* 2026-08-16: route groups are compact workspace tabs; only the active group is rendered. */
.quiet-route-deck{
 width:min(1280px,100%);
 min-height:calc(100vh - 84px);
 margin:0 auto;
 padding:28px 20px 36px;
 display:grid;
 align-content:start;
 gap:22px;
}
.quiet-route-tabs{
 display:flex;
 align-items:flex-end;
 gap:4px;
 overflow-x:auto;
 padding:0 2px;
 border-bottom:1px solid var(--stroke);
 scrollbar-width:none;
}
.quiet-route-tabs::-webkit-scrollbar{display:none}
.quiet-global-shell #content .quiet-route-tabs>button{
 flex:0 0 auto;
 min-width:max-content;
 height:44px;
 padding:0 18px;
 border:0;
 border-bottom:2px solid transparent;
 border-radius:0;
 background:transparent!important;
 color:var(--sub);
 font-size:13px;
 font-weight:650;
 box-shadow:none;
 cursor:pointer;
}
.quiet-global-shell #content .quiet-route-tabs>button:hover{color:var(--ink);background:color-mix(in srgb,var(--brand) 5%,transparent)!important}
.quiet-global-shell #content .quiet-route-tabs>button.active{
 border-bottom-color:var(--brand);
 color:var(--ink);
 background:transparent!important;
}
.quiet-route-panel{min-height:92px}
.quiet-route-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.quiet-global-shell #content .quiet-route-card{
 min-width:0;
 min-height:68px;
 padding:12px 14px;
 gap:11px;
 border-radius:10px;
}
.quiet-route-icon{
 flex-basis:34px;
 width:34px;
 height:34px;
 border-radius:9px;
 font-size:16px;
}
.quiet-route-card>b{font-size:13px}

@media(max-width:1100px){
 .quiet-route-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:820px){
 .quiet-route-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
 .quiet-route-deck{padding:18px 12px 28px;gap:16px}
 .quiet-global-shell #content .quiet-route-tabs>button{height:42px;padding:0 13px}
 .quiet-route-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/*
 * Dialogs are appended to <body>, outside #app.  Keep them on the same dark
 * reading surface as the quiet shell so pale shell text is never rendered on
 * the legacy white modal background.
 */
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal{
 --line:var(--stroke);
 --text:var(--ink);
 --muted:var(--sub);
 background:var(--surface);
 color:var(--ink);
 border:1px solid var(--stroke);
 color-scheme:dark;
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal-head{
 background:var(--surface);
 border-color:var(--stroke);
 color:var(--ink);
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(h2,h3,h4,legend,label,label>span,.card-unit){
 color:var(--ink);
 opacity:1;
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(small,.muted,.hint){
 color:var(--sub);
 opacity:1;
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(input,select,textarea){
 border-color:var(--stroke)!important;
 background:var(--surface-2)!important;
 color:var(--ink)!important;
 -webkit-text-fill-color:var(--ink);
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(input,textarea)::placeholder{
 color:#6f7c8c;
 opacity:1;
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(input,select,textarea):disabled{
 color:#aab4c0!important;
 -webkit-text-fill-color:#aab4c0;
 opacity:.72;
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(.source-project-grid,.source-project-section,.stored-form-grid){
 border-color:var(--stroke);
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(.source-project-grid>label,.stored-form-grid>label){
 border-color:var(--stroke);
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal :is(.project-modal-actions,.stored-source-dialog .project-modal-actions){
 background:var(--surface);
 border-color:var(--stroke);
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal button:not(.primary):not(.link-btn){
 border-color:var(--stroke);
 background:var(--surface-2);
 color:var(--ink);
}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal #storedSelectedItems span{
 background:var(--brand-soft);
 color:var(--ink);
}

/*
 * Eight-theme bridge for the quiet shell.
 *
 * The global palette lives on html[data-theme].  The first quiet-shell
 * implementation fixed its own dark colors on body and on the navigation
 * surfaces, which made all eight theme buttons appear ineffective.  Keep the
 * quiet information architecture, but let every visible shell surface consume
 * the active theme tokens again.
 */
body:has(#app.quiet-global-shell:not(.hidden)){
 background:var(--page);
 color:var(--ink);
}
html[data-theme="snow"]{--nav:#f5f7f8;--nav-ink:#1b2228;--nav-strong:#11161c;--nav-sub:#56626d;--nav-stroke:#c8d0d7;--nav-hover:#e5eaee;--nav-field:#edf1f3;--nav-active:#ccd7df;--nav-accent:#17242d}
html[data-theme="mist"]{--nav:#edf3f6;--nav-ink:#1d2c36;--nav-strong:#14232c;--nav-sub:#566b78;--nav-stroke:#bfd0da;--nav-hover:#dce8ee;--nav-field:#e5edf2;--nav-active:#c5dce6;--nav-accent:#1e4d61}
html[data-theme="sand"]{--nav:#f5eddf;--nav-ink:#2d271f;--nav-strong:#1f1a15;--nav-sub:#66594c;--nav-stroke:#cebba3;--nav-hover:#eadcc7;--nav-field:#efe4d2;--nav-active:#dcc3a0;--nav-accent:#563613}
html[data-theme="jade"]{--nav:#edf5f1;--nav-ink:#1a2d26;--nav-strong:#102119;--nav-sub:#566d64;--nav-stroke:#bdd4c8;--nav-hover:#dbeae3;--nav-field:#e4efe9;--nav-active:#bedbcf;--nav-accent:#104b3b}
html[data-theme="ocean"]{--nav:#edf4f8;--nav-ink:#192e3c;--nav-strong:#102530;--nav-sub:#536d7e;--nav-stroke:#b9cedb;--nav-hover:#dae8f0;--nav-field:#e4eef4;--nav-active:#bcd6e3;--nav-accent:#174d68}
html[data-theme="dusk"]{--nav-active:#302b4d;--nav-accent:#aaa3df}
html[data-theme="ink"]{--nav-active:#28374a;--nav-accent:#a6bad1}
html[data-theme="void"]{--nav-active:#173e38;--nav-accent:#78e2c8}
html[data-theme="tattoo"]{--nav-active:#391f20;--nav-accent:#e4a68f}
html[data-theme="shanshui"]{--nav-active:#d7e2dc;--nav-accent:#234b3e}
html[data-theme="oilink"]{--nav-active:#243542;--nav-accent:#a8c3d2}
html[data-theme="landscape"]{--nav-active:#274c3b;--nav-accent:#a9d0b8}
html[data-theme="alien"]{--nav-active:#251d55;--nav-accent:#55efd0}
.quiet-global-shell .topbar,
.quiet-global-shell .logo,
.quiet-global-shell #topNav,
.quiet-global-shell .sidebar,
.quiet-global-shell .sidebar-heading{
 background:var(--nav);
 color:var(--nav-strong);
}
.quiet-global-shell #topNav button{color:var(--nav-ink)}
.quiet-global-shell #topNav button i{color:var(--nav-sub)}
.quiet-global-shell #topNav button:hover{
 background:var(--nav-hover);
 color:var(--nav-strong);
}
.quiet-global-shell #topNav button.active,
.quiet-global-shell #sideNav .group-toggle.active,
.quiet-global-shell #sideNav .group-items button.active,
.quiet-global-shell .quiet-secondary-tab.active{
 background:var(--nav-active);
 border-color:color-mix(in srgb,var(--nav-accent) 28%,var(--nav-stroke));
 color:var(--nav-accent);
}
.quiet-global-shell #topNav button.active i,
.quiet-global-shell #sideNav .group-toggle.active em,
.quiet-global-shell #sideNav .group-items button.active em,
.quiet-global-shell .quiet-secondary-tab.active em{
 color:var(--nav-accent);
}
.quiet-global-command,
.quiet-global-shell .nav-search{
 background:var(--nav-field);
 border-color:var(--nav-stroke);
 color:var(--nav-sub);
}
.quiet-global-command input,
.quiet-global-shell .nav-search input{color:var(--nav-strong)}
.quiet-global-command input::placeholder,
.quiet-global-shell .nav-search input::placeholder{color:var(--nav-sub)}
.quiet-global-command kbd,
.quiet-global-shell .top-actions>button,
.quiet-global-shell .backend-status,
.quiet-global-shell .user-pill{
 background:var(--nav-hover)!important;
 border-color:var(--nav-stroke);
 color:var(--nav-ink);
}
.quiet-global-shell .side-group,
.quiet-global-shell .group-toggle em,
.quiet-global-shell #sideNav .group-toggle em,
.quiet-global-shell .quiet-secondary-tab em,
.quiet-route-section>header span{
 background:var(--nav-hover)!important;
 color:var(--nav-sub);
}
.quiet-global-shell .sidebar-heading small,
.quiet-global-shell .group-toggle,
.quiet-global-shell .group-items button,
.quiet-global-shell .quiet-secondary-tab,
.quiet-global-shell .user-pill-copy small{color:var(--nav-sub)}
.quiet-global-shell .main>footer{color:var(--sub)}
.quiet-global-shell .group-toggle:hover,
.quiet-global-shell .group-items button:hover,
.quiet-global-shell .quiet-secondary-tab:hover{
 background:var(--nav-hover);
 color:var(--nav-strong);
}
.quiet-global-shell .group-toggle em,
.quiet-global-shell .quiet-secondary-tab em,
.quiet-route-section>header span{background:color-mix(in srgb,var(--nav-hover) 72%,var(--nav-stroke))!important}
.quiet-global-shell .sidebar h2,
.quiet-global-shell .user-pill-copy b{color:var(--nav-strong)}
.quiet-global-shell .crumb{
 background:color-mix(in srgb,var(--surface) 92%,transparent);
 color:var(--sub);
}
.quiet-global-shell .crumb #pageContext{color:var(--sub)}
.quiet-global-shell .crumb #pageTitle{color:var(--ink)}
.quiet-menu-results{
 border-color:var(--stroke);
 background:var(--surface);
 color:var(--ink);
 color-scheme:inherit;
}
.quiet-menu-results button{color:var(--ink)}
.quiet-menu-results button:hover,
.quiet-menu-results button.active{background:var(--brand-soft)}
.quiet-menu-results button small,
.quiet-menu-results button em,
.quiet-menu-empty{color:var(--sub)}
body:has(#app.quiet-global-shell:not(.hidden)) .project-modal{color-scheme:inherit}

/* Five expressive skins: texture stays subtle so long sessions remain calm. */
html[data-theme="tattoo"] .quiet-global-shell{
 background-color:var(--page);
 background-image:repeating-linear-gradient(135deg,transparent 0 27px,rgba(168,68,64,.035) 27px 28px),repeating-linear-gradient(45deg,transparent 0 41px,rgba(228,166,143,.02) 41px 42px);
}
html[data-theme="shanshui"] .quiet-global-shell{
 background-color:var(--page);
 background-image:radial-gradient(ellipse at 82% 18%,rgba(65,111,96,.10),transparent 32%),radial-gradient(ellipse at 18% 88%,rgba(34,42,39,.055),transparent 38%);
}
html[data-theme="oilink"] .quiet-global-shell{
 background-color:var(--page);
 background-image:repeating-linear-gradient(0deg,rgba(24,26,25,.018) 0 1px,transparent 1px 5px),radial-gradient(circle at 92% 12%,rgba(36,72,100,.09),transparent 26%);
}
html[data-theme="landscape"] .quiet-global-shell{
 background-color:var(--page);
 background-image:radial-gradient(ellipse at 78% 8%,rgba(118,167,196,.11),transparent 30%),radial-gradient(ellipse at 12% 90%,rgba(63,121,89,.11),transparent 38%);
}
html[data-theme="alien"] .quiet-global-shell{
 background-color:var(--page);
 background-image:radial-gradient(circle at 18% 24%,rgba(85,239,208,.42) 0 1px,transparent 1.7px),radial-gradient(circle at 72% 16%,rgba(118,92,242,.44) 0 1px,transparent 1.8px),radial-gradient(ellipse at 78% 82%,rgba(118,92,242,.12),transparent 34%);
 background-size:84px 84px,126px 126px,auto;
}

/* Primary navigation keeps priority over utility controls. */
.quiet-global-shell #topNav{overflow-x:hidden}.quiet-global-shell #topNav>[hidden]{display:none!important}
.quiet-global-shell.primary-nav-aux-collapsed :is(.quiet-global-command,.backend-status,#langToggle,.theme-toggle,.user-pill-copy){display:none!important}
.quiet-global-shell.primary-nav-command-open .quiet-global-command{display:flex!important;position:fixed;z-index:172;right:14px;top:72px;width:min(520px,calc(100vw - 28px))}
.primary-nav-more-menu{z-index:171;width:min(286px,calc(100vw - 20px))}.primary-nav-more-menu section{display:grid}.primary-nav-more-menu section+section{border-top:1px solid var(--stroke)}.primary-nav-more-menu section>small{padding:6px 10px;color:var(--sub);font-size:10px}.primary-nav-more-menu i{margin-right:8px;color:var(--brand-2);font-style:normal}
