/* BEGIN UI TOKENS */
/* Shared controls; customer document typography and print dimensions stay independent. */
:root{
 --ui-space-1:4px;--ui-space-2:8px;--ui-space-3:12px;--ui-space-4:16px;--ui-space-5:24px;--ui-space-6:32px;
 --ui-text-xs:12px;--ui-text-sm:13px;--ui-text-base:14px;--ui-text-lg:18px;--ui-text-title:24px;
 --ui-weight-normal:400;--ui-weight-medium:500;--ui-weight-strong:600;
 --ui-radius:6px;--ui-radius-panel:8px;--ui-border:#e3e5e8;--ui-surface:#fff;--ui-soft:#f6f7f8;
 --ui-ink:#25262b;--ui-muted:#626772;--ui-action:#292c30;--ui-hover:#ededf0;--ui-focus:#355e8c;
 --ui-success:#276546;--ui-success-bg:#eef6f1;--ui-warning:#805a16;--ui-warning-bg:#fff8e8;--ui-danger:#a12e28;--ui-danger-bg:#fff3f1;
 --ui-control:38px;--ui-touch:44px;--ui-layout:1440px;--ui-nav:208px;
}
/* Shared compact breakpoint: 820px. CSS media queries cannot consume variables. */
/* END UI TOKENS */
:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#25262b;background:#fff;font-size:14px;--ink:#25262b;--muted:#626772;--line:#e6e7eb;--soft:#f7f7f9;--accent:#404040;--nav-width:208px;color-scheme:light}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent)}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 12px;border:1px solid #dadce3;border-radius:7px;background:#fff;color:var(--ink);cursor:pointer;text-decoration:none;font-weight:500;white-space:nowrap;transition:background .12s,border-color .12s}button:hover,.button:hover{background:#f3f3f6;border-color:#c7cad3}button:active,.button:active{background:#e9e9ee}button:disabled,[aria-disabled=true]{opacity:.5;cursor:not-allowed}.primary{background:#26272d;border-color:#26272d;color:#fff}.primary:hover{background:#41424a;border-color:#41424a}.danger{color:#a52925}.danger:hover{background:#fff1f0;border-color:#e8b9b5}.quiet{border-color:transparent;background:transparent}.muted,.note{color:var(--muted);line-height:1.65}a{color:#404040;text-decoration:none}a:hover{text-decoration:underline}h1{font-size:24px;font-weight:600;letter-spacing:-.3px;margin:0;line-height:1.4}h2{font-size:20px;font-weight:600;margin:0}p{line-height:1.6}label{display:grid;gap:8px;color:#454953;font-size:13px;font-weight:500}input,select,textarea{border:1px solid #d7d9e0;border-radius:7px;padding:9px 11px;min-height:38px;color:var(--ink);background:#fff;width:100%;min-width:0}input::placeholder,textarea::placeholder{color:#6c707b;opacity:1}textarea{min-height:88px;resize:vertical}input[type=checkbox],input[type=radio]{width:17px;min-height:17px;accent-color:var(--accent);flex-shrink:0}fieldset{min-width:0}.app-header{position:sticky;top:0;z-index:10;height:56px;display:flex;align-items:center;gap:14px;padding:0 32px;background:#fffffff2;border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}.app-header .header-name{font-size:13px;color:var(--muted)}.app-header .header-name a{color:inherit}.app-header .header-name a:hover{text-decoration:none;color:var(--ink)}main{max-width:1440px;padding:32px;margin:0 auto;min-width:0}.has-workspace main,.has-workspace .app-header{margin-left:var(--nav-width)}.app-nav{position:fixed;inset:0 auto 0 0;width:var(--nav-width);padding:25px 12px 12px;background:var(--soft);border-right:1px solid var(--line);z-index:20;display:flex;flex-direction:column;gap:24px}.workspace-brand{padding:0 10px}.workspace-brand strong{font-size:16px;letter-spacing:-.2px}.workspace-brand span{display:block;font-size:11px;letter-spacing:1.5px;color:var(--muted);margin-top:8px}.nav-links{display:grid;gap:4px}.nav-links a{display:flex;align-items:center;gap:10px;padding:10px 12px;min-height:40px;color:#555963;border-radius:7px;font-size:13px;text-decoration:none}.nav-links a:hover{background:#ededed}.nav-links a[aria-current=page]{color:#262626;background:#e8e8e8;font-weight:600}.nav-icon{width:18px;height:18px;flex-shrink:0}.nav-spacer{flex:1}.account-menu{position:relative;margin-top:auto}.account-menu>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;min-height:44px;padding:8px;border-radius:7px}.account-menu>summary:hover{background:#ededed}summary::-webkit-details-marker{display:none}.account-avatar{display:grid;place-items:center;width:28px;height:28px;flex-shrink:0;background:#dedede;border-radius:7px;font-size:12px}.account-identity{min-width:0;flex:1;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-identity small{display:block;color:var(--muted);font-size:11px;margin-top:3px;overflow:hidden;text-overflow:ellipsis}.account-menu .menu-panel{top:auto;bottom:calc(100% + 6px);left:0;right:auto;min-width:180px;max-width:calc(100vw - 32px)}.menu{position:relative}.menu>summary{list-style:none}.menu-panel{position:absolute;z-index:30;top:calc(100% + 5px);right:0;min-width:170px;padding:5px;background:#fff;border:1px solid #dddfe6;border-radius:9px;box-shadow:0 8px 28px #20212b1c}.menu-panel button,.menu-panel a{display:flex;justify-content:flex-start;align-items:center;width:100%;min-height:36px;border:0;background:#fff;border-radius:5px;padding:8px 10px;text-align:left;text-decoration:none;font-weight:400;font-size:13px}.menu-panel button:hover,.menu-panel a:hover{background:#f1f1f1}.menu-panel .danger{color:#a52925}.menu-panel kbd{margin-left:auto}kbd{font-family:inherit;font-size:11px;color:#656a76;border:1px solid #dfe1e7;border-radius:4px;padding:1px 4px;font-weight:400}.nav-shade{display:none}.primary kbd{color:#ececf5;border-color:#656572}.nav-toggle{display:none}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 24px}.page-heading p{margin:7px 0 0;color:var(--muted);font-size:13px}.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.search-box{position:relative;flex:1;min-width:160px;max-width:460px}.search-box input{padding-left:34px;padding-right:44px}.search-box .search-icon{position:absolute;left:11px;top:11px;pointer-events:none;color:#676c78;width:16px;height:16px}.search-box kbd{position:absolute;right:10px;top:10px;pointer-events:none}.segmented{display:flex;gap:3px;background:#f3f3f6;border-radius:8px;padding:3px}.segmented button{border:0;background:transparent;min-height:30px;font-size:13px;padding:5px 12px;color:#626772}.segmented button[aria-pressed=true]{background:#fff;color:#2b2c33;box-shadow:0 1px 3px #20212b14}.sort-select{width:auto;max-width:180px;min-height:36px;font-size:13px}.list-count{font-size:12px;color:var(--muted);margin:0 0 12px;font-variant-numeric:tabular-nums}.status{font-size:13px;line-height:1.65;color:#2b6546;overflow-wrap:anywhere;margin:12px 0}.status:empty{display:none}.status.error{color:#a32c28;background:#fff4f2;border:1px solid #efd4cf;border-radius:7px;padding:10px 12px}.status.loading{color:var(--muted)}.status.loading::before{content:'';display:inline-block;width:10px;height:10px;border:2px solid #d5d5d5;border-top-color:#595959;border-radius:50%;margin-right:8px;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}[aria-busy=true]{opacity:.65}.sheet-list{border:1px solid var(--line);border-radius:9px}.sheet-row{display:grid;grid-template-columns:minmax(160px,1fr) 85px minmax(90px,150px) 126px 65px 44px;gap:18px;align-items:center;padding:15px 18px;border-top:1px solid var(--line);position:relative}.sheet-row:first-child{border-top:0}.sheet-row:focus-within{z-index:2}.sheet-row:hover{background:#fafafd}.sheet-title{font-size:14px;font-weight:550;color:var(--ink);line-height:1.55;overflow-wrap:anywhere}.sheet-title:hover{text-decoration:none;color:#404040}.sheet-title small{display:block;margin-top:4px;color:var(--muted);font-size:12px;font-weight:400}.badge,.category{display:inline-flex;align-items:center;width:fit-content;max-width:100%;font-size:12px;padding:3px 7px;background:#f1f1f5;color:#575b67;border-radius:5px;line-height:1.5;overflow-wrap:anywhere}.badge.paused{color:#8f3530;background:#fff0ec}.sheet-number,.sheet-time,.sheet-lines{font-size:12px;color:#626772;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.sheet-head{background:#fafafb;border-bottom:1px solid var(--line);display:grid;grid-template-columns:minmax(160px,1fr) 85px minmax(90px,150px) 126px 65px 44px;gap:18px;padding:10px 18px;color:#626772;font-size:12px;border-radius:9px 9px 0 0}.sheet-list:has(.sheet-head) .sheet-row:nth-child(2){border-top:0}.row-more{font-size:20px;width:32px;min-height:32px;padding:0;border:0;background:transparent}.empty{padding:64px 24px;text-align:center;border:1px dashed #dcdde5;border-radius:10px;background:#fcfcfd;color:var(--muted)}.empty h3{color:#30323a;font-size:19px;font-weight:550;margin:16px 0 8px}.empty p{font-size:14px;margin:0 0 22px}.empty-icon{display:inline-grid;place-items:center;width:44px;height:44px;font-size:26px;border-radius:10px;color:#626262;background:#eeeeee}.login{max-width:400px;margin:8vh auto;border:1px solid var(--line);border-radius:12px;padding:28px;background:#fff}.login h2{font-size:24px}.login p{font-size:14px;margin:10px 0 24px}.login form>label+label{margin-top:18px}.login form>button{width:100%;margin-top:24px;min-height:42px}.login .note{font-size:12px;margin-top:22px;margin-bottom:0}.note{font-size:12px}.password-wrap{display:flex;gap:8px}.password-wrap button{white-space:nowrap}
/* Dialogs share a scrolling body and persistent actions, including short windows. */
dialog{padding:0;border:1px solid #dcdee5;border-radius:12px;width:560px;max-width:calc(100vw - 24px);max-height:min(90dvh,calc(var(--app-visual-height,100dvh) - 24px));overflow:hidden;box-shadow:0 24px 90px #18192326;color:var(--ink)}dialog[open],dialog>form{display:flex;flex-direction:column;min-height:0}dialog>form{width:100%;max-height:inherit;overflow:hidden}dialog::backdrop{background:#17182550;backdrop-filter:blur(2px)}.dialoghead{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);flex-shrink:0}.dialoghead h2{font-size:19px;min-width:0;overflow-wrap:anywhere}.dialogbody{padding:24px;overflow:auto;min-height:0;overscroll-behavior:contain}.dialogfoot{display:flex;justify-content:space-between;gap:10px;padding:16px 24px;border-top:1px solid var(--line);flex-shrink:0;background:#fafafb}.dialogfoot>.actions{margin-left:auto}.dialogbody .status{margin-bottom:0}.close{border:0;background:transparent;min-width:32px;padding:0;font-size:24px;color:#676c76}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.wide{grid-column:1/-1}.check{display:flex;align-items:flex-start;font-size:14px;line-height:1.6;gap:10px}.check input{margin-top:3px}.template-picker{border:0;margin:22px 0 0;padding:0;display:flex;gap:10px}.template-picker legend{font-size:13px;font-weight:500;color:#454953;margin-bottom:9px}.template-choice{flex:1;display:flex;align-items:center;gap:8px;border:1px solid #d7d9e0;padding:12px;border-radius:8px;cursor:pointer;color:#484c57}.template-choice:has(input:checked){border-color:#737373;background:#f5f5f5;color:#333333}.template-choice:has(input:disabled){opacity:.6;cursor:default}.template-choice input{margin:0}.template-choice span{font-size:14px}.template-choice small{display:block;font-size:10px;letter-spacing:.8px;color:#676879;margin-top:3px}#createDialog{width:460px}#usersDialog{width:680px}.account-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 0;border-bottom:1px solid var(--line)}.account-row>div{min-width:0;overflow-wrap:anywhere}.account-row p{font-size:13px;margin:6px 0 0}.account-name{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.account-name strong{font-size:14px}.account-tools{display:flex;align-items:center;justify-content:space-between;gap:8px}.audit-entry{padding:15px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere;font-size:13px}.audit-entry:first-child{padding-top:0}.audit-entry p{margin:4px 0}.audit-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#626772}.audit-meta time{font-size:12px}.audit-before{color:#9e3934;text-decoration:line-through}.audit-after{color:#2d6847}.audit-change{line-height:1.7}
/* Catalog: one filter mechanism, with an optional panel on small screens. */
.catalog-heading{margin-bottom:24px}.catalog-heading h1{display:flex;align-items:center;gap:12px}.catalog-picker{display:flex;align-items:center;gap:8px}.catalog-picker select{min-height:36px;width:128px;font-size:13px}.catalog-layout{display:grid;grid-template-columns:155px minmax(0,1fr);gap:24px}.catalog-views{border-right:1px solid var(--line);padding-right:14px}.view-heading{font-size:11px;color:var(--muted);padding:6px 10px 12px}.view-button{border:0;background:transparent;display:flex;width:100%;justify-content:space-between;gap:8px;font-size:13px;padding:9px 10px;min-height:38px;white-space:normal;text-align:left;color:#5a5f6a}.view-button:hover{border:0;background:#f3f3f3}.view-button[aria-pressed=true]{color:#333333;background:#ebebeb;font-weight:550}.view-count{font-size:11px;color:#626772;font-variant-numeric:tabular-nums;flex-shrink:0}.catalog-main{min-width:0}.catalog-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:14px}.catalog-toolbar .search-box{max-width:none}.catalog-toolbar .menu-panel{min-width:185px}.filters{display:flex;gap:8px;align-items:center;margin-bottom:12px}.filters select{width:auto;max-width:190px;font-size:13px;min-height:36px}.filters .mobile-category{display:none}.filters #clearFilters{font-size:12px;min-height:32px;border:0;background:#f6f6f9}.filters #clearFilters[disabled]{display:none}.filter-toggle{display:none}.filter-summary{font-size:12px;color:#626772;margin:0 0 12px}.filter-summary:empty{display:none}.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:8px;max-height:calc(100dvh - 292px);min-height:80px;overscroll-behavior:contain}.equipment-table{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;min-width:650px;text-align:left}.equipment-table .number-col{width:40px}.equipment-table .brand-col{width:100px}.equipment-table .category-col{width:95px}.equipment-table .price-col{width:128px}.equipment-table .stock-col{width:75px}.equipment-table .action-col{width:58px}.equipment-table th{position:sticky;top:0;z-index:1;background:#f8f8fa;font-size:11px;font-weight:500;color:#606572;border-bottom:1px solid var(--line);padding:11px 9px;white-space:nowrap}.equipment-table td{font-size:12px;border-top:1px solid #efeff3;padding:12px 9px;overflow-wrap:anywhere;background:#fff}.equipment-table tr:first-child td{border-top:0}.equipment-table tr:hover td{background:#fafafd}.equipment-table strong{display:block;line-height:1.5;font-size:13px;font-weight:550}.equipment-table small{display:block;font-size:11px;line-height:1.5;color:#636975;margin-top:3px}.equipment-table .equipment-brand,.equipment-stock{color:#626772;font-size:12px}.price{text-align:right;font-variant-numeric:tabular-nums;font-weight:550;white-space:nowrap}.equipment-table .row-number{color:#626772;font-size:11px;text-align:center}.equipment-table .equipment-action{position:sticky;right:0;border-left:1px solid var(--line)}.equipment-table th.equipment-action{z-index:2}.edit{border:0;background:transparent;color:#404040;min-height:32px;padding:5px 6px}.catalog-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#626772;font-size:12px;margin-top:12px;line-height:1.6}.catalog-main>.status{margin-top:0}.tablewrap .empty{border:0;border-radius:0;padding:40px 18px}.shortcut-help{color:#6a6e7a;font-size:11px;padding:4px 12px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}[hidden]{display:none!important}.skip-link{position:fixed;top:-80px;left:12px;z-index:100;background:#fff;padding:10px 16px;border:2px solid var(--accent)}.skip-link:focus{top:8px}
@media(max-width:1150px){:root{--nav-width:184px}.app-header{padding:0 24px}main{padding:28px 24px}.catalog-layout{grid-template-columns:1fr;gap:0}.catalog-views{display:none}.filters .mobile-category{display:block}.sheet-row,.sheet-head{grid-template-columns:minmax(160px,1fr) 72px 112px 100px 36px;gap:12px}.sheet-lines{display:none}.sheet-head .lines-label{display:none}.equipment-table .brand-col{width:85px}}
@media(min-width:821px) and (max-width:1150px){.equipment-table{min-width:0}.equipment-table .brand-col{visibility:collapse}.equipment-table .equipment-brand,.equipment-table th:nth-child(3){display:none}.equipment-table .brand-col{display:none}}
@media(max-width:820px){html{-webkit-text-size-adjust:100%;scroll-padding-top:68px}input,select,textarea{font-size:16px!important}.has-workspace main,.has-workspace .app-header{margin-left:0}.app-header{height:56px;padding:0 16px;gap:12px}.nav-toggle{display:inline-flex;min-width:40px;min-height:40px;padding:5px;font-size:20px}.app-nav{display:none;width:min(280px,85vw);padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(14px,env(safe-area-inset-bottom));height:100dvh}.nav-open .app-nav{display:flex}.nav-shade{display:none;position:fixed;inset:0;z-index:19;background:#1819235e;border:0;border-radius:0}.nav-open .nav-shade{display:block}.app-nav .nav-links a{min-height:46px;font-size:14px}.app-nav .account-menu summary{min-height:48px}.app-nav .menu-panel button,.app-nav .menu-panel a{min-height:44px}main{padding:24px 16px max(28px,env(safe-area-inset-bottom))}h1{font-size:22px}.page-heading{margin-bottom:20px;gap:10px}.page-heading p{font-size:13px}.page-heading>.primary{min-height:44px}.page-heading kbd{display:none}.toolbar{gap:10px}.search-box{max-width:none;flex-basis:100%;order:0}.search-box input{min-height:44px}.search-box .search-icon{top:14px}.search-box kbd{display:none}.segmented{flex:1}.segmented button{min-height:36px;flex:1;padding:7px 10px}.sort-select{min-height:44px;max-width:170px}.toolbar>.quiet{min-height:44px;min-width:44px}.sheet-head{display:none}.sheet-row{grid-template-columns:minmax(0,1fr) auto 40px;gap:8px 12px;padding:16px}.sheet-title{grid-column:1/3;font-size:15px}.sheet-row>.badge{grid-column:1;grid-row:2}.sheet-time{grid-column:2;grid-row:2;font-size:12px}.sheet-number{grid-column:1/3;grid-row:3;font-size:12px}.sheet-row>.row-actions{grid-column:3;grid-row:1/4;align-self:center}.row-more{min-height:44px;width:36px}.row-actions .menu-panel button{min-height:44px}.sheet-number[data-empty=true]{display:none}.sheet-row:has(.sheet-number[data-empty=true])>.row-actions{grid-row:1/3}.empty{padding:42px 20px}.empty button{min-height:44px}.catalog-heading{flex-wrap:wrap;margin-bottom:16px}.catalog-heading h1{gap:10px}.catalog-picker select{width:125px;min-height:44px}.catalog-heading p{display:none}.catalog-heading #add{min-height:44px}.catalog-toolbar{margin-bottom:12px;gap:8px}.catalog-toolbar .search-box{min-width:0;flex-basis:auto}.catalog-toolbar>button,.catalog-toolbar>details>summary{min-height:44px;min-width:44px}.filter-toggle{display:inline-flex}.catalog-main .filters{display:none;padding:12px;background:#f8f8fb;border:1px solid var(--line);border-radius:8px;flex-wrap:wrap;gap:8px}.catalog-main .filters.is-open{display:flex}.filters select{flex:1;min-width:120px;min-height:44px;max-width:none}.filters #clearFilters{min-height:38px}.filter-summary{margin-top:0}.tablewrap{max-height:none;overflow:visible;overscroll-behavior:auto}.equipment-table{min-width:0;table-layout:auto}.equipment-table colgroup,.equipment-table thead{display:none}.equipment-table tbody{display:block}.equipment-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:16px;gap:6px 12px;border-top:1px solid var(--line);align-items:center}.equipment-table tr:first-child{border-top:0}.equipment-table td{padding:0;border:0!important;background:transparent!important;min-width:0}.equipment-table .row-number,.equipment-table .equipment-brand{display:none}.equipment-table .equipment-name{grid-column:1/-1}.equipment-table strong{font-size:15px}.equipment-table small{font-size:12px}.equipment-table .price{grid-column:2;grid-row:2;font-size:15px}.equipment-table .price::before{content:'¥ ';font-size:12px}.equipment-table .equipment-action{position:static;grid-column:2;grid-row:3;text-align:right}.equipment-table .edit{min-height:44px;min-width:56px;background:#f3f3f3}.catalog-footer{font-size:12px}.catalog-footer span:last-child{width:100%}.menu-panel button,.menu-panel a{min-height:44px}.login{margin:24px auto;padding:24px}.login form>button{min-height:44px}.login .note a{display:inline-flex;min-height:44px;align-items:center}dialog{top:var(--app-visual-top,0px);bottom:auto;margin:12px auto;max-height:calc(var(--app-visual-height,100dvh) - 24px)}.dialoghead{padding:16px 18px}.dialogbody{padding:20px 18px}.dialogfoot{padding:14px 18px max(14px,env(safe-area-inset-bottom))}.dialogfoot button,.close{min-height:44px}.close{min-width:44px}.dialogbody .grid,.dialogbody.grid{grid-template-columns:1fr}.grid .wide{grid-column:1}.template-choice{padding:12px 10px;gap:6px}.account-row>.edit{min-height:44px;flex-shrink:0}.shortcut-help{display:none}button,a,summary{touch-action:manipulation}}
@media(max-width:380px){main{padding-left:12px;padding-right:12px}.page-heading{flex-wrap:wrap}.catalog-heading h1{font-size:20px}.catalog-picker select{width:110px}.catalog-heading #add{padding:7px 10px;font-size:13px}.toolbar .sort-select{flex:1;max-width:none}.segmented{flex-basis:100%}.sheet-row{padding:14px 12px;gap:8px}.template-choice small{font-size:9px}.dialogfoot{padding-left:14px;padding-right:14px}.dialogfoot button{padding:8px 10px}.dialoghead h2{font-size:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* The persistent header reports route loading without shifting the workspace. */
.route-status{margin-left:auto;min-width:0;font-size:12px;color:#626772;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.route-status:empty{display:none}.route-status.error{color:#a32c28}.route-placeholder{min-height:160px;margin:0;color:#626772;font-size:14px}.has-workspace main[aria-busy=true]{opacity:1}@media(max-width:820px){.route-status{position:fixed;top:60px;right:12px;max-width:calc(100vw - 24px);padding:8px 12px;background:#fff;border:1px solid #e6e7eb;border-radius:7px;box-shadow:0 3px 14px #20212b15}}

/* Personal initial templates reuse the workspace's existing controls and navigation. */
.template-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px}.template-card{border:1px solid var(--border,#dce1e6);border-radius:12px;padding:24px;background:var(--surface,#fff)}.template-card h2{margin-top:0}.template-card-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.template-card-actions a{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border:1px solid #d7dce1;border-radius:8px;font-size:14px}.template-card-actions .primary{background:#17232d;color:#fff;border-color:#17232d}@media(max-width:800px){.template-cards{grid-template-columns:1fr}.template-card{padding:18px}}

.account-static>.account-label{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px;border-radius:7px}.account-static>.menu-panel{display:none}

button.sheet-title{border:0;background:transparent;text-align:left;font:inherit;font-weight:600;padding:0;cursor:pointer;min-width:0;white-space:normal}
.project-open{display:block;margin-top:5px;color:#626772;font-size:12px;font-weight:400}
dialog.project-drawer{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:100dvh;width:min(520px,100vw);max-width:100vw;border:0;border-left:1px solid #e2e5ea;border-radius:0;padding:0;box-sizing:border-box;box-shadow:-10px 0 40px #0002;background:#fff}
dialog.project-drawer[open]{display:flex;flex-direction:column;animation:project-drawer-in .2s ease-out}
.project-drawer .dialoghead,.project-drawer .dialogfoot{flex-shrink:0}.project-drawer .dialogbody{overflow:auto;min-height:0;flex:1}.project-drawer h2{overflow-wrap:anywhere}.project-drawer h3{font-size:15px;margin:24px 0 12px}.project-drawer h3:first-of-type{margin-top:12px}
#projectCurrent,.project-version{padding:16px;border:1px solid #e2e5ea;border-radius:10px;background:#fafbfc}#projectVersions{padding:0;list-style:none;display:grid;gap:12px}.project-version-link{font-weight:600;display:block;color:#25262b;text-decoration:none;min-height:28px;overflow-wrap:anywhere}.project-version-link:hover{text-decoration:underline}.project-version-note{white-space:pre-wrap;overflow-wrap:anywhere}.project-drawer .muted{font-size:13px;line-height:1.6}.project-drawer .close{min-width:44px;min-height:44px}
@keyframes project-drawer-in{from{transform:translateX(32px);opacity:0}to{transform:translateX(0);opacity:1}}@media(prefers-reduced-motion:reduce){dialog.project-drawer[open]{animation:none}}
.statistics-filters{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr)) minmax(160px,1.4fr) auto;gap:14px;align-items:end;margin:24px 0}.statistics-filters label{display:grid;gap:7px;font-size:13px}.statistics-filters input,.statistics-filters select{min-width:0;width:100%;box-sizing:border-box;min-height:42px}.statistics-filters button{min-height:42px}.statistics-notice{padding:18px 20px;background:#fff8e7;border:1px solid #ebdcad;border-radius:10px;margin:20px 0}.statistics-notice p{margin-bottom:0;line-height:1.7}.statistics-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.statistics-metrics article{border:1px solid var(--line);border-radius:10px;padding:20px}.statistics-metrics h2{font-size:14px;font-weight:500;margin:0 0 18px}.statistics-metrics strong{font-size:30px}.statistics-metrics p{color:var(--muted);font-size:12px;line-height:1.6}.statistics-detail{margin-top:32px}.statistics-detail h2{font-size:18px}.statistics-empty{border:1px dashed #cfd3da;border-radius:10px;padding:32px;text-align:center}.statistics-empty p{color:var(--muted);line-height:1.8;max-width:650px;margin:12px auto 0}.statistics-definitions{margin:24px 0}.statistics-definitions summary{cursor:pointer;min-height:44px;line-height:44px}.statistics-definitions li{line-height:1.8;margin:8px 0}@media(max-width:1000px){.statistics-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.statistics-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.statistics-metrics{grid-template-columns:1fr}.statistics-empty{padding:24px 16px}}

/* Project state comes from the rental order, never inferred from quote saves. */
.rental-list-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:18px 0}.rental-list-filters>span{font-size:12px;color:var(--muted);margin-right:4px}.rental-list-filters button{min-height:34px;font-size:12px;padding:5px 10px;background:transparent;border-color:transparent}.rental-list-filters button[aria-pressed=true]{background:#292c30;color:#fff;border-color:#292c30}.sheet-rental{grid-column:1/-1;display:flex;gap:10px 18px;align-items:center;flex-wrap:wrap;padding-top:10px;border-top:1px solid #eceef1}.rental-badges{display:flex;gap:6px;flex-wrap:wrap}.rental-badge{display:inline-flex;align-items:center;min-height:24px;padding:2px 7px;border-radius:5px;font-size:11px;line-height:1.5;white-space:nowrap}.rental-badge.neutral{background:#f0f1f3;color:#626772}.rental-badge.confirmed{background:#edf2ff;color:#354f89}.rental-badge.paid{background:#eaf5ef;color:#276546}.rental-badge.partial{background:#fff5df;color:#8a6215}.rental-badge.overdue{background:#fff0eb;color:#a13c27}.rental-list-money{font-size:12px;color:#626772;font-variant-numeric:tabular-nums}.rental-manage-link{font-size:12px;margin-left:auto;color:#303d57;min-height:28px;display:inline-flex;align-items:center}.project-drawer .sheet-rental{margin-top:18px;border:1px solid #e2e5ea;padding:16px;border-radius:10px;align-items:flex-start}.project-drawer .rental-list-money{line-height:1.8;width:100%}.project-drawer .rental-manage-link{margin-left:0;font-weight:600;font-size:14px}@media(max-width:820px){.sheet-rental{grid-column:1/-1;grid-row:4;gap:10px}.sheet-rental .rental-list-money{width:100%;font-size:12px;line-height:1.8}.sheet-rental .rental-manage-link{margin-left:0;min-height:38px}.rental-list-filters{gap:4px}.rental-list-filters button{min-height:38px}.rental-list-filters>span{width:100%;margin-bottom:3px}}
.statistics-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:8px}.statistics-table{width:100%;border-collapse:collapse;min-width:780px;font-size:12px;text-align:left}.statistics-table th{background:#f7f8fa;padding:13px 12px;font-weight:500;color:#626772;white-space:nowrap}.statistics-table td{padding:16px 12px;border-top:1px solid var(--line);vertical-align:top;line-height:1.8}.statistics-table td:nth-child(2),.statistics-table td:nth-child(3),.statistics-table td:nth-child(5){font-variant-numeric:tabular-nums;white-space:nowrap}.statistics-table td:first-child{min-width:150px}.statistics-table small{display:block;color:#747b85;font-size:11px;overflow-wrap:anywhere}.statistics-table strong{font-weight:600}.statistics-table details{min-width:150px}.statistics-table summary{cursor:pointer;min-height:30px}.statistics-table ul{padding-left:18px;margin:6px 0}.statistics-table li{margin:10px 0}.statistics-table a{color:#384e78}#statisticsAsOf{font-size:12px;line-height:1.8}.statistics-metrics strong{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}@media(max-width:820px){.statistics-table{min-width:680px}.statistics-table th,.statistics-table td{padding:12px 9px}}
button.sheet-title{display:block;text-align:left}

/* Working surfaces: one action level, shared controls and concise status. */
:root{--ink:var(--ui-ink);--muted:var(--ui-muted);--line:var(--ui-border);--soft:var(--ui-soft);--accent:var(--ui-focus)}
button,.button,input,select,textarea{border-radius:var(--ui-radius);min-height:var(--ui-control)}
.primary{background:var(--ui-action);border-color:var(--ui-action);color:#fff}
.primary.danger{background:var(--ui-danger);border-color:var(--ui-danger);color:#fff}
.app-header{background:var(--ui-surface);backdrop-filter:none}
dialog::backdrop{backdrop-filter:none;background:#18192366}
dialog{border-radius:var(--ui-radius-panel)}
.dialogfoot{justify-content:flex-end}.dialogfoot>:first-child:not(:only-child){margin-right:auto}
.close{min-width:var(--ui-touch);min-height:var(--ui-touch)}
.page-heading{margin-bottom:var(--ui-space-5)}
.page-heading h1{font-size:var(--ui-text-title)}
.page-heading #newSheet{flex-shrink:0}
.sheet-list{border-radius:var(--ui-radius-panel)}
.rental-list-filters{gap:var(--ui-space-1);border-bottom:1px solid var(--line);padding-bottom:var(--ui-space-2);margin:var(--ui-space-4) 0 var(--ui-space-3)}
.rental-list-filters button{color:var(--ui-muted);min-height:var(--ui-control);padding:6px 9px}
.rental-list-filters button[aria-pressed=true]{background:var(--ui-hover);color:var(--ui-ink);border-color:transparent;font-weight:600}
.filter-count{font-size:11px;min-width:16px;font-variant-numeric:tabular-nums;color:inherit}
.list-options{display:flex;gap:var(--ui-space-2);align-items:center;justify-content:flex-end;margin-bottom:var(--ui-space-3)}
.list-options .sort-select{max-width:200px;font-size:12px}
.list-count{margin-top:calc(-1 * var(--ui-control));margin-bottom:var(--ui-space-4);max-width:50%;min-height:var(--ui-space-5);pointer-events:none;padding-top:6px}
.sheet-rental{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px var(--ui-space-4);padding-top:var(--ui-space-3)}
.sheet-rental>.rental-badges,.sheet-rental>.project-next-detail,.sheet-rental>.rental-list-money{grid-column:1;min-width:0}
.sheet-rental>.rental-manage-link{grid-column:2;grid-row:1/4;justify-content:center;min-height:var(--ui-control);padding:7px 12px;border:1px solid var(--ui-border);border-radius:var(--ui-radius);font-size:var(--ui-text-sm);font-weight:500;white-space:nowrap;color:var(--ui-ink)}
.sheet-rental>.rental-manage-link:hover{background:var(--ui-soft);text-decoration:none;border-color:#c8ccd1}
.project-next-detail{font-size:var(--ui-text-sm);line-height:1.6;overflow-wrap:anywhere}
.project-next-detail.danger{color:var(--ui-danger);font-weight:600}.project-next-detail.warning{color:var(--ui-warning)}.project-next-detail.success{color:var(--ui-success)}
.rental-badge.confirmed{color:var(--ui-muted);background:var(--ui-soft)}
.rental-badge.paid{color:var(--ui-success);background:var(--ui-success-bg)}
.rental-badge.partial{color:var(--ui-muted);background:var(--ui-soft)}
.rental-badge.overdue{color:var(--ui-danger);background:var(--ui-danger-bg)}
.project-drawer .sheet-rental{display:grid;padding:var(--ui-space-4);background:var(--ui-soft);border:0;border-radius:var(--ui-radius)}
.project-drawer .sheet-rental>.rental-manage-link{grid-row:auto;grid-column:1;justify-self:start;margin-top:var(--ui-space-2);background:var(--ui-surface)}
#projectCurrent,.project-version{border-radius:var(--ui-radius);padding:var(--ui-space-4);background:var(--ui-surface)}
.statistics-notice{padding:var(--ui-space-3) 0;background:transparent;border:0;border-bottom:1px solid var(--ui-border);border-radius:0;font-size:var(--ui-text-sm)}
.statistics-notice p{margin:4px 0;color:var(--ui-muted)}
.statistics-notice.is-warning{padding:var(--ui-space-4);background:var(--ui-warning-bg);border:1px solid #e5d5a5;border-radius:var(--ui-radius)}
.statistics-metrics{gap:0;border-bottom:1px solid var(--ui-border);padding:var(--ui-space-4) 0}
.statistics-metrics article{border:0;border-right:1px solid var(--ui-border);border-radius:0;padding:var(--ui-space-2) var(--ui-space-5)}
.statistics-metrics article:first-child{padding-left:0}.statistics-metrics article:last-child{border-right:0}
.statistics-metrics h2{margin-bottom:var(--ui-space-3)}
.statistics-metrics strong{font-size:26px;font-weight:600}
.statistics-metrics article:last-child strong{font-size:22px;color:var(--ui-muted)}
.statistics-table small,.rental-table small{color:var(--ui-muted)}
.statistics-table summary{min-height:var(--ui-touch);display:flex;align-items:center}
@media(max-width:820px){
 button,.button,select,input,.segmented button,.rental-list-filters button,.row-more,.sheet-rental>.rental-manage-link{min-height:var(--ui-touch)}
 input[type=checkbox],input[type=radio]{min-height:17px}
 .page-heading{align-items:flex-start}.page-heading h1{font-size:22px}
 .toolbar .search-box{flex-basis:calc(100% - 54px);order:0}.toolbar #refresh{order:0}.toolbar .segmented,.toolbar .sort-select{order:1}
 .toolbar .segmented{flex-basis:100%}.toolbar>.sort-select{max-width:none;flex:1}.toolbar #refresh{margin-left:auto}
 .rental-list-filters{gap:4px}.rental-list-filters button{font-size:12px;padding:6px 8px}
 .list-options{justify-content:flex-start;flex-wrap:wrap}.list-options .sort-select{max-width:210px}.list-count{margin-top:0;max-width:100%;padding:0;min-height:0}
 .sheet-rental{grid-template-columns:minmax(0,1fr);gap:6px}
 .sheet-rental>.rental-manage-link{grid-column:1;grid-row:auto;margin-top:var(--ui-space-2);justify-self:start;margin-left:0}
 .sheet-rental .rental-list-money{line-height:1.7}
 .statistics-metrics article{padding:var(--ui-space-3)!important}.statistics-metrics article:nth-child(2n){border-right:0}
 .statistics-metrics strong{font-size:22px}
 .statistics-table-wrap{overflow:visible;border:0}
 .statistics-table{min-width:0;table-layout:fixed}
 .statistics-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .statistics-table tbody{display:block}.statistics-table tr{display:block;padding:var(--ui-space-4) 0;border-bottom:1px solid var(--ui-border)}
 .statistics-table td{display:grid;grid-template-columns:125px minmax(0,1fr);gap:var(--ui-space-3);border:0;padding:6px 0;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere}
 .statistics-table td::before{content:attr(data-label);color:var(--ui-muted);font-size:12px}
 .statistics-table td:first-child{display:block;font-size:15px;padding-bottom:var(--ui-space-3)}.statistics-table td:first-child::before{display:none}
 .statistics-table details{min-width:0}.statistics-table ul{padding-left:var(--ui-space-4)}
}
@media(max-width:480px){.statistics-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.statistics-metrics h2{font-size:12px}.statistics-metrics p{font-size:11px}}

@media(min-width:1151px){.sheet-row,.sheet-head{grid-template-columns:minmax(170px,1fr) 100px 132px 80px 126px 36px}}

.sheet-rental[data-draft]>.rental-manage-link{grid-row:1}.sheet-rental[data-draft]>.project-next-detail{align-self:center}

/* Project filters: keep frequent actions visible; disclose secondary controls on small screens. */
#workspace .toolbar{margin-bottom:12px;flex-wrap:nowrap}
#workspace .toolbar .search-box{flex:1;min-width:0}
#workspace .filter-toggle{display:none}
.list-filter-panel{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.list-filter-panel .segmented{margin-right:auto}
.list-filter-panel .filter-field{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ui-muted);white-space:nowrap}
.list-filter-panel .sort-select{max-width:170px;color:var(--ui-ink)}
#workspace .list-options{justify-content:space-between;min-height:24px;margin:0 0 12px}
#workspace .list-count{margin:0;padding:0;max-width:none;min-height:0}
#workspace #filterReset{min-height:32px;padding:4px 8px;font-size:12px}
@media(max-width:820px){
 #workspace .page-heading{margin-bottom:16px}
 #workspace .toolbar{gap:6px}
 #workspace .toolbar .search-box{flex-basis:0}
 #workspace .toolbar #refresh{margin:0;order:0;min-width:36px;padding:6px}
 #workspace .filter-toggle{display:inline-flex;flex-shrink:0;min-height:44px;padding:7px 10px}
 #workspace .filter-toggle.has-filters{background:var(--ui-hover);font-weight:600}
 .list-filter-panel{padding:12px;background:var(--ui-soft);border:1px solid var(--ui-border);border-radius:var(--ui-radius);gap:12px}
 .list-filter-panel .segmented{flex:0 0 100%;width:100%;margin:0}
 .list-filter-panel .filter-field{flex:1 1 calc(50% - 6px);min-width:0;display:grid;gap:6px}
 .list-filter-panel .sort-select{width:100%;max-width:none}
 #workspace .rental-list-filters{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;margin:8px 0 12px;padding-bottom:6px;scrollbar-width:thin}
 #workspace .rental-list-filters button{flex-shrink:0}
 #workspace #filterReset{min-height:44px}
}

#catalogCategoryDialog{width:min(640px,calc(100vw - 24px))} .catalog-category-list{list-style:none;margin:16px 0;padding:0}.catalog-category-item{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--ui-border,#ddd)}.catalog-category-number{width:24px;color:#8a8f96;font-variant-numeric:tabular-nums}.catalog-category-label{flex:1;min-width:0}.catalog-category-label strong,.catalog-category-label small{display:block}.catalog-category-label small{color:#6b7280;font-size:12px;margin-top:3px}.catalog-category-item button{min-width:40px;min-height:40px}.catalog-category-item button:disabled{opacity:.35}@media(max-width:640px){.catalog-heading>.actions{flex-wrap:wrap}#catalogCategoryDialog .dialogfoot{flex-wrap:wrap;gap:8px}.catalog-category-item button{min-height:44px}}

/* Project drawer: one primary action, a compact latest version, details on demand. */
dialog.project-drawer{width:min(464px,100vw);box-shadow:-16px 0 64px #17202b18}
.project-drawer .dialoghead{padding:28px 28px 22px;align-items:flex-start;background:#fff}
.project-drawer .drawer-eyebrow{font-size:12px;color:var(--muted);margin:0 0 8px}
.project-drawer h2{font-size:25px;line-height:1.3;letter-spacing:-.5px;margin:0;text-wrap:balance}
#projectDrawerMeta{margin:10px 0 0;font-size:12px;color:var(--muted)}
.project-drawer .dialogbody{padding:28px}
#projectCurrent{padding:22px;border:0;background:#f5f6f7;border-radius:12px}
.drawer-current-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.project-drawer .drawer-current-heading h3{margin:0;font-size:15px;font-weight:600}
.drawer-draft-status{font-size:12px;color:var(--muted)}
.drawer-current-action{display:flex;align-items:center;justify-content:center;min-height:44px;text-decoration:none;border-radius:7px;font-size:14px;font-weight:550;padding:8px 14px}
.drawer-current-action:hover{text-decoration:none}
.drawer-saved{font-size:12px;color:var(--muted);margin:12px 0 0;text-align:center;font-variant-numeric:tabular-nums}
.drawer-archive-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:32px 0 12px}
.project-drawer .drawer-archive-heading h3{font-size:14px;margin:0}
.drawer-archive-heading>span{font-size:11px;color:var(--muted)}
#projectVersions{display:block;margin:0}
.project-drawer .project-version{padding:16px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
.project-version[hidden]{display:none!important}
.project-drawer .project-version-link{display:flex;align-items:center;gap:12px;min-height:40px;font-size:14px}
.version-number{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:32px;border-radius:6px;background:#f0f1f3;font-size:12px;font-weight:600}
.version-label{font-weight:500}.version-arrow{margin-left:auto;color:var(--muted);font-size:18px}
.version-date{display:block;font-size:12px;color:var(--muted);margin:2px 0 4px 52px;font-variant-numeric:tabular-nums}
.version-details{margin-left:52px;color:var(--muted);font-size:12px}
.version-details summary{cursor:pointer;display:list-item;min-height:36px;padding:9px 0;width:fit-content}
.version-details p{line-height:1.65;margin:8px 0;overflow-wrap:anywhere}
.project-drawer .version-details .muted{font-size:12px}
.drawer-older-toggle{display:block;width:100%;border:0;border-top:1px solid var(--line);background:transparent;min-height:44px;color:var(--muted);font-size:12px;text-align:left;padding:12px 0}
.drawer-older-toggle:hover{background:#fafafa;color:var(--ink)}
#projectVersionStatus:empty{display:none}
#projectVersionStatus{font-size:13px;line-height:1.7;color:var(--muted)}
.project-drawer #projectRental:not([hidden]){margin-bottom:24px}
.project-drawer #projectRental .sheet-rental{margin-top:0}
@media(max-width:520px){.project-drawer .dialoghead{padding:24px 20px 20px}.project-drawer .dialogbody{padding:24px 20px}#projectCurrent{padding:20px}}
/* dev.29 task hierarchy */
.has-workspace .app-header{min-height:48px;height:48px;background:transparent;border-bottom:0}
.has-workspace .header-name{font-size:12px;color:#7b8795}
#workspaceHelp{display:none}
.page-heading{margin-bottom:24px}
#equipmentMore{margin-top:20px;border-top:1px solid #e4e9ef;padding-top:16px}
#equipmentMore summary{cursor:pointer;color:#516784;min-height:32px}
#equipmentMore .grid{margin-top:12px}
.template-card-actions .menu{margin-left:auto}
#createForm .template-picker{margin-bottom:20px}
#createForm .grid>label{position:relative;display:flex;flex-direction:column;gap:8px;justify-content:flex-start}
#createForm .field-suffix{position:absolute;right:14px;bottom:13px;color:#718096;font-weight:400;pointer-events:none}
#createDiscount{padding-right:40px}
/* Shared projects: creator, last editor and live editing badge under the title. */
.sheet-title .project-people{display:block;margin-top:2px;color:var(--muted);font-size:12px;font-weight:400}
.sheet-title .project-editing{display:inline-flex;align-items:center;margin-top:4px;padding:1px 8px;border-radius:999px;background:#fff1c7;color:#6b5210;font-size:12px;font-weight:500}
