:root{--ink:#20211f;--muted:#81817b;--paper:#f7f6f3;--line:#e7e6e1;--bronze:#956c4b;--soft:#eee8e1;--green:#61745d;--sidebar:216px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;font-size:14px;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{border:0;background:none}button:disabled{cursor:not-allowed;opacity:.5}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:2px solid var(--bronze);outline-offset:4px}input:focus,select:focus,textarea:focus{outline:2px solid #b4a08b;outline-offset:1px}input,select,textarea{min-width:0;background:white;border:1px solid var(--line);padding:11px 12px;border-radius:4px}textarea{resize:vertical;min-height:92px}img{max-width:100%;display:block}h1,h2,h3,p{margin:0}h1{font-size:30px;letter-spacing:-.9px;font-weight:550;line-height:1.4}h2{font-size:17px;font-weight:600;letter-spacing:-.3px}h3{font-size:15px;font-weight:550}svg.icon{width:19px;height:19px;flex:none;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:500;color:var(--bronze);margin-bottom:10px}.small{font-size:12px}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:42px;padding:10px 17px;border:1px solid var(--line);border-radius:3px;background:#fff;white-space:nowrap;transition:background .15s,transform .15s}.button:hover{background:#eeede8}.button.primary{color:white;border-color:var(--ink);background:var(--ink)}.button.primary:hover{background:#494840}.button.light{background:white;color:#20211f;border-color:white}.button.text{border-color:transparent;background:transparent;padding:8px 0;color:var(--bronze)}.button.compact{min-height:34px;padding:7px 11px;font-size:12px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;font-size:24px;color:#777;border-radius:3px}.icon-button:hover{background:#efeee9}.split{display:flex;align-items:center;justify-content:space-between;gap:16px}.stack{display:flex;flex-direction:column;gap:6px}.status{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:3px;font-size:11px;white-space:nowrap;background:#f0eeea;color:#766b5d}.status.green{background:#ecf0e9;color:#5f7659}.status.bronze{background:#f4ebe1;color:#98713d}.status.gray{background:#f0f0ef;color:#777}.dot{width:5px;height:5px;border-radius:50%;background:currentColor;display:inline-block}.skip-link{position:fixed;left:15px;top:-60px;background:white;z-index:999;padding:12px}.skip-link:focus{top:15px}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);border-right:1px solid var(--line);background:#faf9f6;z-index:20;padding:35px 18px 20px;display:flex;flex-direction:column}.brand{padding:0 17px 36px}.brand img{width:81px;height:25px;object-fit:contain;object-position:left}.brand-caption{display:block;margin-top:15px;letter-spacing:2px;font-size:10px;color:#898983}.nav-label{color:#a19f96;font-size:10px;letter-spacing:1.6px;padding:0 16px;margin-bottom:14px}.nav-list{display:grid;gap:6px}.nav-item{width:100%;display:flex;align-items:center;gap:12px;border-radius:4px;padding:13px 16px;text-align:left;font-size:13px;color:#77786f}.nav-item.active{background:var(--ink);color:white}.nav-item:not(.active):hover{background:#efeee9}.nav-item .nav-count{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:25px;height:23px;padding:0 7px;border-radius:12px;font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1;background:#f2e4d6;color:#8a562d;border:1px solid #e9d5bf}.nav-item .nav-count.is-empty{background:#eeede8;border-color:#e3e1da;color:#85867e}.nav-item.active .nav-count{background:#e5c6a7;border-color:#e5c6a7;color:#35291c}.nav-item.active .nav-count.is-empty{background:#ffffff1f;border-color:#ffffff20;color:#d9dcd3}.sidebar-bottom{margin-top:auto}.profile{display:flex;gap:10px;align-items:center;border-top:1px solid var(--line);padding:20px 10px 0}.avatar{width:33px;height:33px;display:inline-flex;align-items:center;justify-content:center;background:#e5e3dc;color:#6e7065;border-radius:50%;font-size:11px;flex:none}.profile strong{font-size:12px;font-weight:500}.profile p{font-size:10px;color:var(--muted);margin-top:4px}.shell{margin-left:var(--sidebar)}.topbar{height:75px;padding:0 36px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:#faf9f6;gap:15px}.breadcrumbs{color:#a09f98;font-size:11px;display:flex;gap:12px;align-items:center}.breadcrumbs strong{font-weight:400;color:#65665f}.header-right{display:flex;align-items:center;gap:18px}.prototype-chip{font-size:10px;letter-spacing:.5px;color:#8d8172;display:flex;align-items:center;gap:6px}.mode-control{font-size:11px;border:1px solid var(--line);padding:8px;background:transparent;max-width:155px}.main{max-width:1650px;margin:0 auto;padding:32px 36px 40px;min-height:calc(100vh - 75px)}.page-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:27px}.page-heading p{font-size:12px;line-height:1.7;color:var(--muted);margin-top:9px}.page-actions{display:flex;align-items:center;gap:10px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:25px}.stat{background:white;border:1px solid var(--line);border-radius:3px;padding:20px 22px;text-align:left;display:flex;flex-direction:column;align-items:stretch;gap:14px}.stat:hover{border-color:#bfb9af}.stat-label{font-size:11px;color:#767870;display:flex;justify-content:space-between;align-items:center}.stat-label svg{color:#a19e91;width:16px;height:16px}.stat-value{font-size:30px;font-weight:450;letter-spacing:-1px;font-variant-numeric:tabular-nums}.stat-value.currency{font-size:26px}.stat-bottom{font-size:10px;color:#95978e}.stat-bottom .positive{color:#71816b}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(260px,1fr);gap:20px;margin-bottom:26px}.panel{border:1px solid var(--line);background:#fff;border-radius:3px;min-width:0}.panel-head{padding:22px 22px 18px;border-bottom:1px solid #f1f0eb;display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head h2{font-size:14px;font-weight:500}.panel-head .text{font-size:10px}.table-wrap{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;white-space:nowrap}.data-table th{font-size:10px;font-weight:400;color:#96958c;background:#fcfcfa;padding:12px 20px;border-bottom:1px solid #eeede7}.data-table td{padding:17px 20px;border-bottom:1px solid #f0efe9}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#fcfbf8}.data-table .row-title{font-size:12px;display:block;line-height:1.5;color:#42443d}.data-table .row-meta{font-size:10px;color:#97988f;margin-top:4px;display:block}.data-table button{font-size:11px;color:#8c7257}.table-product{display:flex;align-items:center;gap:12px}.table-product img{width:48px;height:48px;object-fit:contain;background:#f5f4ef;border-radius:2px;mix-blend-mode:multiply}.task-list{padding:4px 22px 12px}.task{display:flex;align-items:flex-start;padding:16px 0;border-bottom:1px solid #f0efe9;gap:12px}.task:last-child{border-bottom:0}.task input{appearance:none;width:15px;height:15px;padding:0;margin:3px 0 0;border:1px solid #cbc9bf;border-radius:50%;cursor:pointer;flex:none}.task input:checked{background:#7b8a6f;border-color:#7b8a6f;box-shadow:inset 0 0 0 3px white}.task-copy{flex:1;min-width:0}.task-copy button{text-align:left;padding:0;font-size:12px;line-height:1.6}.task-copy p{color:#93978a;font-size:10px;margin-top:4px;line-height:1.6}.task.done .task-copy button{text-decoration:line-through;color:#999}.task time{font-size:10px;color:#a0a18f;white-space:nowrap;margin-top:4px}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-title h2{font-size:15px}.section-title .text{font-size:11px}.featured-products{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.featured-product{display:flex;align-items:center;background:#eeede7;border:1px solid #e8e7e0;padding:16px 20px;min-height:119px;border-radius:3px;gap:14px;text-align:left}.featured-product:hover{border-color:#b7afa0}.featured-product img{width:90px;height:90px;object-fit:contain;mix-blend-mode:multiply}.featured-product strong{font-size:14px;font-weight:500;line-height:1.6}.featured-product .category{font-size:9px;text-transform:uppercase;letter-spacing:1px;color:#9a9a8d;margin-bottom:6px}.featured-product p{font-size:10px;color:#878978;margin-top:5px}.footnote{font-size:10px;color:#a6a59c;line-height:1.8;margin-top:25px;display:flex;gap:20px;justify-content:space-between}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0 20px}.tabs{display:flex;gap:5px;background:#ebeae4;border-radius:4px;padding:4px}.tab{padding:8px 16px;font-size:12px;border-radius:3px;color:#8d8d82;white-space:nowrap}.tab.active{background:white;color:#292c26;box-shadow:0 1px 2px #0000000b}.search{position:relative;min-width:210px;max-width:330px;width:100%}.search svg{position:absolute;left:12px;top:12px;color:#a3a598;width:16px;height:16px}.search input{width:100%;padding-left:37px;font-size:12px;height:40px}.customer-name{display:flex;align-items:center;gap:11px}.customer-name .avatar{background:#eeece5;width:32px;height:32px}.empty{padding:50px 20px;text-align:center;color:#909084;font-size:13px;line-height:1.8}.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.project-card{background:white;border:1px solid var(--line);padding:24px;border-radius:4px}.project-card h2{font-size:17px;margin:18px 0 7px}.project-card p{font-size:11px;color:#8f9085;line-height:1.7}.project-thumbs{display:flex;margin-top:22px;gap:8px}.project-thumbs img{width:54px;height:54px;object-fit:contain;background:#f5f4ef}.progress-track{height:3px;background:#ebece6;margin:12px 0 17px;overflow:hidden}.progress-track i{display:block;height:100%;background:#939c86}.project-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #f1f0e9;padding-top:18px;margin-top:19px;gap:10px}.project-numbers{display:flex;gap:35px;padding-top:23px}.project-numbers span{display:block;font-size:10px;color:#96978a;margin-bottom:7px}.project-numbers strong{font-size:18px;font-weight:400}.inventory-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.inventory-note{padding:14px 18px;background:#eeece4;color:#817561;font-size:11px;line-height:1.9;border-radius:3px}.inventory-note strong{font-weight:500}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.form-grid label,.field{display:flex;flex-direction:column;gap:8px;color:#828276;font-size:12px}.form-grid label.full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px;padding-top:18px;border-top:1px solid var(--line)}.field-note{line-height:1.8;font-size:11px;color:#999b8f;margin-top:15px}.detail-line{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:14px 0;font-size:12px}.detail-line span{color:#99988e}.detail-line strong{font-weight:400}.detail-note{background:#f5f4ef;padding:18px;font-size:12px;line-height:1.8;margin:22px 0}.detail-list{font-size:12px;line-height:1.8;margin-top:20px}dialog{border:1px solid var(--line);border-radius:5px;box-shadow:0 25px 80px #181b1d25;padding:0;width:560px;max-width:calc(100% - 30px);max-height:90vh;color:var(--ink);background:white}dialog::backdrop{background:#20211f55;backdrop-filter:blur(3px)}dialog header{display:flex;align-items:center;justify-content:space-between;padding:20px 25px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:1}#modal-content{padding:25px}#toast{position:fixed;bottom:30px;left:calc(50% + 108px);transform:translateX(-50%) translateY(20px);background:#262922;color:#fff;padding:13px 22px;border-radius:4px;font-size:12px;box-shadow:0 5px 30px #0002;z-index:100;opacity:0;pointer-events:none;transition:.2s;max-width:calc(100vw - 32px);text-align:center;line-height:1.6}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.mobile-brand,.mobile-nav{display:none}.dealer-mode .sidebar{display:none}.dealer-mode .shell{margin-left:0}.dealer-mode .main{max-width:1350px}.dealer-mode .mobile-brand{display:block}.dealer-mode .mobile-brand img{width:65px}.dealer-mode #toast{left:50%}.dealer-mode .breadcrumbs{margin-right:auto}.dealer-mode .topbar{padding-left:max(32px,calc((100vw - 1280px)/2));padding-right:max(32px,calc((100vw - 1280px)/2))}
@media(min-width:1600px){.main{padding:40px 50px}.stats{gap:22px}.stat{padding:23px 25px}}
@media(max-width:1180px){:root{--sidebar:185px}.sidebar{padding:30px 12px 20px}.main{padding:26px 25px}.topbar{padding:0 25px}.stat{padding:17px 16px}.stat-value{font-size:26px}.stat-value.currency{font-size:23px}.dashboard-grid{grid-template-columns:minmax(0,1.4fr) minmax(240px,1fr)}.data-table td,.data-table th{padding-left:16px;padding-right:16px}.featured-product{padding:13px 10px;gap:8px}.featured-product img{width:64px;height:74px}.featured-product strong{font-size:12px}.featured-product .category{font-size:8px}.header-right{gap:10px}.prototype-chip{font-size:9px}.footnote{font-size:9px}}
@media(max-width:950px){.dashboard-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}.stat{padding:18px}.featured-products{grid-template-columns:repeat(2,1fr)}.featured-product:last-child{display:none}.project-grid{grid-template-columns:1fr}.prototype-chip{display:none}.toolbar{align-items:flex-start;flex-wrap:wrap}.search{max-width:none}.page-heading{align-items:flex-start}.page-actions{flex-wrap:wrap;justify-content:flex-end}.inventory-stats{grid-template-columns:1fr 1fr 1fr}.inventory-stats .stat-value{font-size:23px}}
@media(max-width:700px){:root{--sidebar:0px}.sidebar{display:none}.shell{margin-left:0}.topbar{height:65px;padding:0 20px;position:sticky;top:0;z-index:15;background:#faf9f6f2;backdrop-filter:blur(12px)}.mobile-brand{display:block}.mobile-brand img{width:63px;height:22px}.breadcrumbs{display:none}.header-right{gap:8px}.mode-control{font-size:10px;padding:8px;max-width:144px}.main{padding:24px 19px 100px}.page-heading{margin-bottom:21px;gap:10px}.page-heading h1{font-size:26px}.page-heading p{font-size:11px}.page-heading .eyebrow{font-size:8px}.page-actions .button{font-size:11px;padding:9px 11px;min-height:37px}.page-actions .button svg{width:15px}.stats{gap:10px;margin-bottom:19px}.stat{padding:16px;gap:12px}.stat-label{font-size:10px}.stat-value{font-size:27px}.stat-value.currency{font-size:24px}.stat-bottom{font-size:9px}.panel-head{padding:18px}.data-table th,.data-table td{padding-left:17px;padding-right:17px}.dashboard-grid{gap:18px}.featured-products{gap:10px}.featured-product{padding:15px 12px;flex-direction:column;align-items:flex-start}.featured-product img{width:100%;height:100px;object-fit:contain}.featured-product .category{font-size:8px}.featured-product strong{font-size:12px}.footnote{display:block}.footnote span{display:block;margin-bottom:8px}.mobile-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;left:0;right:0;border-top:1px solid var(--line);background:#faf9f6f5;backdrop-filter:blur(15px);z-index:30;padding:10px 5px max(12px,env(safe-area-inset-bottom))}.mobile-nav button{display:flex;align-items:center;flex-direction:column;gap:6px;font-size:9px;color:#9a9b91;padding:2px}.mobile-nav button.active{color:#292d25}.mobile-nav svg{width:21px;height:21px}.toolbar{margin:20px 0 17px;gap:12px}.tabs{max-width:100%;overflow:auto}.tab{padding:8px 12px;font-size:11px}.form-grid{grid-template-columns:1fr;gap:14px}.form-grid label.full{grid-column:auto}dialog{max-height:90dvh;width:calc(100% - 24px)}dialog header{padding:17px 20px}#modal-content{padding:20px}.inventory-stats{gap:8px}.inventory-stats .stat{padding:15px 11px}.inventory-stats .stat-label{font-size:9px}.inventory-stats .stat-value{font-size:22px}.inventory-stats .stat-bottom{font-size:8px}.inventory-note{font-size:10px}.project-card{padding:21px}.project-card h2{font-size:16px}#toast{left:50%;bottom:88px;font-size:11px;width:max-content}.dealer-mode .topbar{padding:0 19px}.dealer-mode .main{padding-bottom:35px}.dealer-mode .mobile-nav{display:none}.dealer-mode #toast{bottom:25px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:700px){.customers-table,.stock-table{display:block;white-space:normal}.customers-table thead,.stock-table thead{display:none}.customers-table tbody,.stock-table tbody{display:block}.customers-table tr,.stock-table tr{display:grid;grid-template-columns:1fr 1fr;padding:17px;gap:12px 16px;border-bottom:1px solid var(--line)}.customers-table tr:last-child,.stock-table tr:last-child{border-bottom:0}.customers-table td,.stock-table td{display:block;padding:0;border:0!important;min-width:0}.customers-table td:first-child,.customers-table td:nth-child(2),.stock-table td:first-child{grid-column:1/-1}.customers-table td:nth-child(4),.customers-table td:nth-child(6){text-align:right;align-self:center}.customers-table td:nth-child(5){color:#9a9c90;font-size:10px}.customers-table td:nth-child(5):before{content:'最近联系 ';font-size:9px}.stock-table td:not(:first-child):not(:last-child){font-size:12px;display:flex;justify-content:space-between;align-items:center;gap:5px}.stock-table td:before{font-size:10px;color:#999b8d}.stock-table td:nth-child(2):before{content:'参考单价'}.stock-table td:nth-child(3):before{content:'总在库'}.stock-table td:nth-child(4):before{content:'已预留'}.stock-table td:nth-child(5):before{content:'B类机'}.stock-table td:nth-child(6):before{content:'当前可售'}.stock-table td:nth-child(2) .row-meta{display:none}.stock-table td:last-child{text-align:right;align-self:center}.customers-table td.empty,.stock-table td.empty{grid-column:1/-1;padding:30px 10px}.stock-table .table-product img{width:60px;height:60px}}
@media print{.sidebar,.topbar,.mobile-nav,.footnote,#toast{display:none!important}.shell{margin:0}.main{padding:0;max-width:none}body{background:white}}

.mobile-function-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mobile-function-grid button{display:flex;align-items:center;gap:10px;padding:18px 12px;border:1px solid var(--line);border-radius:4px;font-size:12px;text-align:left}.mobile-function-grid button.active{background:#f0ede6;border-color:#ad947a}.mobile-function-grid svg{flex:none;width:20px;height:20px}
.session-name{font-size:11px;color:var(--muted);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-logout{white-space:nowrap}.auth-retry{max-width:520px;margin:15vh auto;padding:28px;line-height:2}.auth-retry img{width:80px;margin-bottom:30px}.auth-retry h1{font-size:24px}.auth-retry p{margin:16px 0}.form-grid input[readonly]{background:#f2f0e9;color:#7c7a70}
@media(max-width:700px){.session-name{max-width:100px;font-size:10px}.header-right{gap:5px}.header-right .icon-button{min-width:30px}.header-right .session-logout{padding:8px;min-width:36px}.topbar .mode-control{max-width:104px}.topbar .mobile-brand img{width:50px}.topbar{padding-left:14px;padding-right:14px}}

/* A compact brand strip keeps business metrics near the top of the dashboard. */
.hero{display:grid;grid-template-columns:minmax(0,1fr) 150px;min-height:88px;background:#242623;color:#f7f6f3;overflow:hidden;margin-bottom:22px;border-radius:3px}
.hero-copy{display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0;padding:18px 24px}
.hero-message{min-width:0}
.hero .eyebrow{color:#c0b09b;font-size:8px;letter-spacing:2px;margin-bottom:6px}
.hero h2{font-size:20px;font-weight:400;line-height:1.4;letter-spacing:.4px}
.hero .button{flex:none;min-height:34px;padding:8px 12px;font-size:11px;white-space:nowrap}
.hero-visual{position:relative;overflow:hidden;background:#d7d9d5;min-width:0}
.hero-visual img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:24% center}
@media(max-width:950px){.hero{grid-template-columns:1fr}.hero-visual{display:none}.hero-copy{gap:18px;padding:18px 22px}.hero h2{font-size:18px}}
@media(max-width:700px){.hero{min-height:78px;margin-bottom:17px}.hero-copy{padding:14px 16px;gap:12px}.hero .eyebrow{font-size:7px;letter-spacing:1.1px;margin-bottom:5px}.hero h2{font-size:15px;line-height:1.5;letter-spacing:0}.hero .button{min-height:36px;padding:8px 10px;font-size:10px;gap:6px}.hero .button svg{width:14px;height:14px}}

/* Keep the two business lines accessible on desktop and phone. */
.sidebar .nav-list{flex:1;min-height:0;overflow-y:auto;align-content:start;scrollbar-width:thin;padding-bottom:8px}
.sidebar .brand,.sidebar .nav-label,.sidebar-bottom{flex-shrink:0}
.nav-group{min-width:0}
.nav-group-toggle .nav-text{flex:1;text-align:left}
.nav-group-chevron{width:12px;height:12px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.nav-group-toggle[aria-expanded=true] .nav-group-chevron{transform:rotate(90deg)}
.nav-group-toggle[aria-expanded=true] .nav-count{display:none}
.nav-group-items{display:grid;gap:3px;margin:3px 0 5px 19px;padding-left:7px;border-left:1px solid #dedbd3}
.nav-group-items[hidden]{display:none}
.nav-group-items .nav-item{gap:8px;padding:11px 9px;font-size:12px;line-height:1.5}
.nav-group-items .icon{width:16px;height:16px}
.nav-group-items .nav-text{min-width:0;overflow-wrap:anywhere}
.nav-group-items .nav-count{min-width:23px;height:22px;padding:0 6px}
.nav-group.has-current .nav-group-toggle:not(.active){color:var(--ink)}
/* Reserve separate columns for first-level counts and disclosure arrows. */
.sidebar .nav-list>.nav-item,.sidebar .nav-list>.nav-group>.nav-group-toggle{display:grid;grid-template-columns:18px minmax(0,1fr) 32px 12px;column-gap:6px;padding-inline:12px}
.sidebar .nav-list>.nav-item>.icon,.sidebar .nav-list>.nav-group>.nav-group-toggle>.icon{width:18px;height:18px}
.sidebar .nav-list>.nav-item>.nav-text{grid-column:2/-1;min-width:0}
.sidebar .nav-list>.nav-item:has(>.nav-count)>.nav-text,.sidebar .nav-list>.nav-group>.nav-group-toggle>.nav-text{grid-column:2;min-width:0}
.sidebar .nav-list>.nav-item>.nav-count,.sidebar .nav-list>.nav-group>.nav-group-toggle>.nav-count{grid-column:3;margin-left:0;justify-self:end;width:32px;min-width:32px;height:23px;padding:0 4px}
.sidebar .nav-list>.nav-group>.nav-group-toggle>.nav-group-chevron{grid-column:4;justify-self:end}
@media(min-width:701px) and (max-height:900px){.sidebar{padding-top:24px}.sidebar .brand{padding-bottom:24px}.sidebar .nav-item{padding-top:10px;padding-bottom:10px}.sidebar .nav-list{gap:3px}.sidebar .profile{padding-top:14px}}

/* Shared list filters: the customer scope switch is the visual reference.
   Limit these rules to page filters, excluding dialog tabs and material pickers. */
:is(#main,#page-popup-content) :is(.tabs,.o-filters,.pj-toolbar>.pj-filters,.pj-scope,.p-filters,.q-followup-filter,.pr-filters,.biz-periods){
  display:flex;
  flex:0 1 auto;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:5px;
  width:fit-content;
  min-width:0;
  max-width:100%;
  padding:4px;
  border:0;
  border-radius:4px;
  background:#ebeae4;
  box-shadow:none;
  overflow:visible;
}
:is(#main,#page-popup-content) :is(.tabs,.o-filters,.pj-toolbar>.pj-filters,.pj-scope,.p-filters,.q-followup-filter,.pr-filters,.biz-periods)>button{
  display:inline-flex;
  flex:0 1 auto;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:0;
  max-width:100%;
  min-height:34px;
  margin:0;
  padding:8px 16px;
  border:0;
  border-radius:3px;
  background:transparent;
  color:#8d8d82;
  box-shadow:none;
  font:inherit;
  font-size:12px;
  font-weight:400;
  line-height:1.5;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
}
:is(#main,#page-popup-content) :is(.tabs,.o-filters,.pj-toolbar>.pj-filters,.pj-scope,.p-filters,.q-followup-filter,.pr-filters,.biz-periods)>button:hover{
  color:#55584e;
  background:#ffffff66;
}
:is(#main,#page-popup-content) :is(.tabs,.o-filters,.pj-toolbar>.pj-filters,.pj-scope,.p-filters,.q-followup-filter,.pr-filters,.biz-periods)>button:is(.active,.is-active,[aria-pressed="true"]){
  color:#292c26;
  background:#fff;
  box-shadow:0 1px 2px #0000000b;
}
:is(#main,#page-popup-content) .pj-toolbar>.pj-filters>.pj-filter>span{
  min-width:22px;
  padding:2px 6px;
  border-radius:12px;
  background:#deddd6;
  color:#73756a;
  font-size:10px;
  line-height:1.4;
}
:is(#main,#page-popup-content) .pj-toolbar>.pj-filters>.pj-filter[aria-pressed="true"]>span{background:#f0efea;color:#62675b}
@media(max-width:700px){
  :is(#main,#page-popup-content) :is(.tabs,.o-filters,.pj-toolbar>.pj-filters,.pj-scope,.p-filters,.q-followup-filter,.pr-filters,.biz-periods)>button{min-height:33px;padding:8px 12px;font-size:11px;gap:6px}
}

/* Open dashboard destinations without replacing or scrolling the home page. */
body.page-popup-open{overflow:hidden}
#page-popup{--page-popup-header-height:64px;width:min(1320px,calc(100vw - 48px));max-width:none;height:calc(100dvh - 48px);max-height:none;margin:auto;padding:0;overflow:hidden;background:#f7f6f3;border:1px solid #dedbd3;border-radius:10px;box-shadow:0 24px 90px #181b1d33}
#page-popup[open]{display:grid;grid-template-rows:var(--page-popup-header-height) minmax(0,1fr)}
#page-popup::backdrop{background:#24282455;backdrop-filter:blur(3px)}
#page-popup>.page-popup-header{height:var(--page-popup-header-height);margin:0;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-bottom:1px solid #e7e4dc}
.page-popup-header>div{display:flex;align-items:baseline;gap:14px;min-width:0}
.page-popup-header>div>span{font-size:10px;color:#959084;white-space:nowrap}
#page-popup-title{font-size:15px;font-weight:500;line-height:1.4;margin:0}
.page-popup-close{display:inline-flex;align-items:center;gap:12px;min-height:36px;white-space:nowrap;font-size:12px;background:#faf9f6}
.page-popup-close>span{font-size:21px;line-height:1;color:#8c877b}
#page-popup-content{min-width:0;min-height:0;width:100%;padding:26px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#page-popup-content>.page-heading,#page-popup-content .q-heading{margin-top:0}
@media(max-width:700px){
 #page-popup{width:100%;height:100dvh;border:0;border-radius:0;--page-popup-header-height:60px}
 #page-popup>.page-popup-header{padding:0 16px}
 .page-popup-header>div>span{display:none}
 #page-popup-content{padding:18px 14px 24px;scrollbar-gutter:auto}
 .page-popup-close{min-height:38px;padding:8px 10px}
}

/* Shared list pagination: match the existing flat filter controls. */
.list-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:16px 20px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);background:#faf9f6}
.list-pagination-summary{font-variant-numeric:tabular-nums;white-space:nowrap}
.list-pagination-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-left:auto}
.list-pagination button{font-size:12px;line-height:1.4;color:#73756d;border:1px solid transparent;border-radius:3px;white-space:nowrap}
.list-pagination .list-page-size{width:auto;min-width:110px;height:32px;padding:5px 8px;border:1px solid var(--line);border-radius:4px;background:white;color:var(--ink);font:inherit;cursor:pointer}
.list-page-numbers{display:flex;align-items:center;gap:4px}
.list-page-numbers button{min-width:30px;height:30px;padding:0 7px}
.list-page-numbers button[aria-current=page]{background:var(--ink);color:white}
.list-page-numbers button:not([aria-current]):not(:disabled):hover{background:#eeede8}
.list-pagination button:disabled{opacity:.35;cursor:default}
.list-pagination button:focus-visible,.list-pagination select:focus-visible{outline:2px solid #a18e78;outline-offset:2px}
.list-page-gap{min-width:20px;text-align:center}
@media(max-width:650px){.list-pagination{padding:14px 10px;gap:10px}.list-pagination-summary{flex-basis:100%}.list-pagination-actions{gap:8px}}

/* Account settings stay available to every signed-in role. */
.session-password{white-space:nowrap;gap:6px}.session-password .icon{width:15px;height:15px}
.account-password-dialog{width:460px}
.account-password-identity{margin:0 0 22px;font-size:14px;font-weight:500;line-height:1.6;overflow-wrap:anywhere}
.account-password-identity>span{display:block;margin-top:3px;font-size:11px;font-weight:400;color:var(--muted)}
.account-password-fields{gap:16px}.account-password-fields input{width:100%;min-width:0}
.account-password-error{margin:15px 0 0;padding:10px 12px;background:#fcf1ed;border-radius:3px;color:#b04b3e;font-size:12px;line-height:1.7}
.account-password-error[hidden]{display:none}
@media(max-width:700px){.header-right .session-password{min-width:30px;padding:7px}.session-password>span{display:none}.session-password .icon{width:16px;height:16px}.account-password-identity{margin-bottom:18px}.account-password-dialog .form-actions>.button{flex:1}}
