:root{color-scheme:light;font-family:"Microsoft YaHei",Arial,sans-serif;color:#353b45;background:#f5f7fb}*{box-sizing:border-box}body{margin:0}main{max-width:1020px;margin:64px auto;padding:0 28px}.eyebrow{font-size:13px;letter-spacing:2px;color:#68768b}h1{font-size:34px;margin:14px 0 8px;line-height:1.4;color:#24476e}.lead{font-size:17px;color:#677486;margin:0 0 32px}.document{display:flex;align-items:center;justify-content:space-between;gap:24px;background:#eaf1fb;border:1px solid #d9e4f3;border-radius:14px;padding:22px 26px}.document h2{font-size:17px;margin:0 0 8px}.document p{margin:0;font-size:13px;color:#68768b}a{color:#27598b;text-decoration:none;white-space:nowrap;font-size:14px}a:hover{text-decoration:underline}.actions{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:24px 0}.card{background:white;border:1px solid #e0e5ec;border-radius:14px;padding:28px;display:flex;flex-direction:column;align-items:flex-start}.tag{font-size:12px;padding:5px 12px;border-radius:6px}.blue{background:#eaf1fb;color:#38618d}.cream{background:#fff5dd;color:#806327}.card h2{font-size:22px;margin:18px 0 12px}.card p{font-size:15px;line-height:1.9;margin:0 0 12px}.card .hint{font-size:13px;color:#748091;margin-top:auto}button{font:inherit;background:#356493;color:white;border:1px solid #356493;padding:11px 24px;border-radius:8px;margin-top:12px;cursor:pointer}.secondary{background:#f5f8fc;color:#356493;border-color:#cddbea}button:hover{filter:brightness(.96)}button:focus-visible,a:focus-visible{outline:3px solid #98b6d8;outline-offset:4px}button:disabled{opacity:.55;cursor:wait}.result{background:#eef5f0;border:1px solid #dce8df;border-radius:12px;padding:20px 24px;display:flex;gap:13px;align-items:flex-start}.result strong{font-size:15px}.result p{margin:7px 0 0;font-size:13px;color:#65756b;line-height:1.7}#indicator{height:9px;width:9px;border-radius:50%;background:#6b9477;margin-top:6px;flex:none}.result[data-state=error]{background:#fff4e8;border-color:#edddc8}.result[data-state=error] #indicator{background:#ad7b42}.result[data-state=running]{background:#edf3fc}.footnote{font-size:13px;color:#778293;line-height:1.9;margin:20px 4px}@media(max-width:680px){main{margin:30px auto;padding:0 18px}.actions{grid-template-columns:1fr}.document{align-items:flex-start;flex-direction:column;gap:18px}.card{padding:22px}h1{font-size:28px}}

.project-section{margin-top:36px;padding-top:28px;border-top:1px solid #dde5ef}.project-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.project-heading h2{font-size:22px;margin:0 0 8px}.project-heading p,.project-heading span{font-size:13px;color:#748091;margin:0}.search-label{display:block;font-size:14px;margin:22px 0 9px}#project-search{width:100%;font:inherit;padding:13px 16px;border:1px solid #ccd9e8;border-radius:8px;background:white;color:#353b45}#project-search:focus{outline:3px solid #d4e4f5;outline-offset:1px}.index-hint{font-size:13px;color:#758193;line-height:1.8}.project-list{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}.project-card{background:white;border:1px solid #e0e5ec;border-radius:12px;padding:22px;overflow-wrap:anywhere}.project-card h3{font-size:17px;line-height:1.7;margin:8px 0 14px;color:#24476e}.project-meta{font-size:12px;color:#758193;margin:0}.project-fee{font-size:15px;margin:0 0 12px}.project-states{font-size:13px;line-height:1.9;color:#657283}.project-action{font-size:14px;background:#fff8e8;padding:10px 12px;line-height:1.8;border-radius:6px}.project-card a{display:inline-block;margin-top:6px}.project-count{white-space:nowrap}@media(max-width:680px){.project-list{grid-template-columns:1fr}.project-heading{align-items:flex-start;flex-direction:column;gap:10px}}

.project-card .followup-link{background:#fff5dd;border:1px solid #eadcba;border-radius:6px;color:#745b2a;padding:8px 12px;margin-right:18px;margin-top:8px}
.project-filters{display:flex;flex-wrap:wrap;gap:14px;align-items:end;margin:18px 0}.project-filters label{display:flex;flex:1 1 150px;flex-direction:column;gap:8px;font-size:13px;color:#657283}.project-filters select{width:100%;font:inherit;color:#353b45;background:#fff;border:1px solid #ccd9e8;border-radius:8px;padding:11px 12px;min-height:43px}.project-filters select:focus-visible{outline:3px solid #d4e4f5;outline-offset:1px}.project-filters button{margin:0;min-height:43px;padding:10px 16px;font-size:13px}
.project-followup{margin:16px 0;border-top:1px solid #e5eaf0;padding-top:12px}.project-followup p{font-size:13px;line-height:1.9;margin:0 0 6px;color:#657283}.project-followup .followup-field{display:flex;align-items:baseline;gap:4px}.followup-field-label{flex:none;color:#657283}.followup-field-value{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#353b45}.project-followup .followup-note-label{margin-top:12px;font-weight:700;color:#745b2a}.project-followup .followup-note{white-space:pre-wrap;color:#353b45;overflow-wrap:anywhere}
.active-filters{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:16px 0;font-size:13px;color:#657283}.active-filters[hidden]{display:none}.active-filters .filter-chip{margin:0;padding:7px 10px;background:#edf2f8;border-color:#d5e0ec;color:#426080;font-size:13px;line-height:1.8;max-width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere}#empty-reset-filters{margin-top:4px}
.project-states{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}.state-badge{padding:5px 9px;border-radius:6px;line-height:1.7;max-width:100%;overflow-wrap:anywhere}.state-badge.sage{background:#edf4ef;color:#42654d}.state-badge.amber{background:#faf3e5;color:#785c2b}.state-badge.blue{background:#edf2f8;color:#426080}.state-badge.rose{background:#f7eded;color:#845454}.state-badge.neutral{background:#f0f2f5;color:#596575}
.arrangement-controls{display:flex;flex-wrap:wrap;align-items:end;gap:14px 24px;margin:18px 0}.arrangement-controls label{display:flex;flex:0 1 230px;flex-direction:column;gap:8px;font-size:13px;color:#657283}.arrangement-controls select{font:inherit;padding:11px 12px;min-height:43px;border:1px solid #ccd9e8;border-radius:8px;background:#fff;color:#353b45;width:100%}.arrangement-controls select:focus-visible{outline:3px solid #d4e4f5;outline-offset:1px}.arrangement-controls p{flex:1 1 280px;font-size:13px;line-height:1.8;color:#657283;margin:0 0 10px}
.arrangement-controls #arrangement-summary{display:flex;flex-wrap:wrap;gap:4px 12px}.arrangement-count{white-space:nowrap}
.project-readout{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px}.project-readout #reload-projects{font-size:13px;margin:0;padding:7px 12px}.project-heading #project-read-at{line-height:1.8;max-width:540px}#arrangement-summary[hidden]{display:none}
.project-section[data-read-state=error] #project-read-at{color:#785c2b}
.actions{grid-template-columns:1fr}.more-actions{margin:0 0 24px;color:#657283;font-size:14px}.more-actions summary{cursor:pointer;width:fit-content;padding:8px 0}.more-actions summary:focus-visible{outline:3px solid #98b6d8;outline-offset:4px}.extra-action{padding:12px 18px;background:#f0f3f7;border:1px solid #e0e5ec;border-radius:8px}.extra-action p{line-height:1.8;margin:0 0 8px}.extra-action button{margin:0;font-size:13px}button[hidden]{display:none}
.more-actions:not([open]) .extra-action{display:none}
.navigation-status{font-size:14px;line-height:1.8;color:#426080;margin:12px 4px}.navigation-status:empty{display:none}
.original-info{margin:16px 0;background:#f3f5f7;border:1px solid #e2e6eb;border-radius:8px;color:#586577;font-size:13px}.original-info summary{padding:11px 13px;cursor:pointer;line-height:1.8}.original-info summary:focus-visible{outline:3px solid #98b6d8;outline-offset:3px;border-radius:7px}.original-info-content{padding:0 13px 12px}.original-info-content p{margin:0 0 8px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.original-info-content .original-note-label{margin-top:12px;font-weight:700;color:#586577}.original-info-content .original-note{margin-bottom:0;color:#465363}.original-info:not([open]) .original-info-content{display:none}
.project-followup .plan-badge{display:inline-block;margin:2px 0 10px;padding:5px 9px;font-size:13px;line-height:1.7;border-radius:6px}.plan-today{background:#edf2f8;color:#426080}.plan-past{background:#faf3e5;color:#785c2b}.plan-invalid{background:#f7eded;color:#845454}.plan-summary{flex-basis:100%;line-height:1.8}
.group-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin:18px 0}.group-controls button{margin:0;padding:9px 14px;font-size:13px}.group-controls button:disabled{cursor:default}.group-controls .index-hint{flex:1 1 220px}

.project-meta{font-size:13px;line-height:1.85;color:#637389;margin-bottom:12px}
.project-group-status{display:block;margin-top:8px;font-size:13px;line-height:1.9;color:#785c2b;white-space:normal;overflow-wrap:anywhere}
.input-check{margin:18px 0;padding:18px 22px;border:1px solid #eadcc2;border-radius:10px;background:#fff8eb;color:#785c2b;font-size:14px;line-height:1.9;overflow-wrap:anywhere}.input-check[hidden]{display:none}.input-check p{margin:0 0 8px}.input-check ul{margin:8px 0;padding-left:22px}
button[data-verification-paused="true"]{cursor:not-allowed}

.project-list{display:flex;flex-direction:column;gap:22px}.project-group{border:1px solid #d9e4f0;border-radius:12px;background:#edf3f9;min-width:0}.project-group-heading{cursor:pointer;padding:18px 22px;color:#355779;line-height:1.8}.project-group-code{font-size:18px;font-weight:700;margin-right:18px;overflow-wrap:anywhere}.project-group-count{font-size:13px;color:#657b91}.project-group-heading:focus-visible{outline:3px solid #98b6d8;outline-offset:3px;border-radius:10px}.project-group-cards{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;padding:0 18px 18px}.project-group:not([open]) .project-group-cards{display:none}@media(max-width:680px){.project-group-cards{grid-template-columns:minmax(0,1fr);padding:0 12px 12px}.project-group-heading{padding:16px}.project-group-code{margin-right:12px}}

.entry-locations{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}.entry-locations>div{padding:18px 20px;border:1px solid #e0e5ec;border-radius:10px;background:white}.entry-locations strong{font-size:15px;color:#24476e}.entry-locations p{font-size:13px;line-height:1.9;margin:8px 0 0;color:#657283}.entry-locations>div:last-child{background:#fff8e8;border-color:#eadfca}.actions{grid-template-columns:1fr}@media(max-width:680px){.entry-locations{grid-template-columns:1fr;gap:12px}}
.project-card .record-navigation-status{margin:14px 0 0;padding:10px 12px;background:#edf3fc;border-radius:6px;font-size:13px;line-height:1.8;color:#356493;white-space:pre-wrap;overflow-wrap:anywhere}.project-card .record-navigation-status[data-state=error]{background:#fff4e8;color:#875d32}.project-card .record-navigation-status[data-state=success]{background:#eef5f0;color:#476b51}.project-card a[aria-busy=true]{opacity:.65;cursor:wait}
.project-fee .fee-label{font-size:13px;color:#657283}.project-fee .fee-value{white-space:pre-wrap;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;line-height:1.8}.project-fee[data-kind=text]{padding:10px 12px;border-radius:7px;background:#fff8e8}.project-fee .fee-kind{display:block;font-size:12px;color:#806327;margin-top:5px}
.procurement-draft{margin:20px 0;border:1px solid #d9e4f3;border-radius:12px;background:white;padding:20px 24px}.procurement-draft>summary{font-size:17px;font-weight:700;color:#24476e;cursor:pointer}.draft-scope,.draft-help,#draft-status{font-size:13px;line-height:1.9;color:#657283}.draft-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-top:22px}.draft-fields label{display:flex;flex-direction:column;gap:9px;font-size:13px;color:#426080;min-width:0}.draft-fields input,.draft-fields textarea{font:inherit;color:#353b45;background:#fff;border:1px solid #ccd9e8;border-radius:7px;padding:12px;min-width:0;width:100%}.draft-fields textarea{resize:vertical;line-height:1.8}.draft-wide{grid-column:1/-1}#draft-preview{margin-top:20px;padding:16px 20px;background:#fff8e8;border:1px solid #eadfca;border-radius:8px;overflow-wrap:anywhere}#draft-preview p{font-size:14px;line-height:1.9;margin:10px 0}.draft-preview-label{color:#657283}.draft-preview-value{white-space:pre-wrap}#draft-preview strong{color:#745b2a}@media(max-width:680px){.procurement-draft{padding:18px}.draft-fields{grid-template-columns:minmax(0,1fr)}}
.draft-fields select{font:inherit;color:#353b45;background:white;border:1px solid #ccd9e8;border-radius:7px;padding:12px;width:100%;min-width:0}.draft-fields label[hidden]{display:none}.server-draft-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0;padding:14px;border:1px solid #e0e5ec;border-radius:8px;font-size:14px;line-height:1.8;overflow-wrap:anywhere}.server-draft-row button{flex:none;margin:0}.server-draft-row span{min-width:0}@media(max-width:680px){.server-draft-row{align-items:flex-start;flex-direction:column}}
.order-value{font-size:14px;line-height:1.9;overflow-wrap:anywhere;white-space:pre-wrap;margin:14px 0}#order-list{display:flex;flex-direction:column;gap:22px;margin-top:20px}#orders-status,#submitted-orders>p{font-size:13px;line-height:1.9;color:#657283}#order-search{width:100%;padding:12px;border:1px solid #ccd9e8;border-radius:8px;font:inherit}#submit-procurement{margin-left:8px}.draft-fields input:disabled,.draft-fields textarea:disabled,.draft-fields select:disabled{background:#f3f5f7;color:#586577}@media(max-width:680px){#submit-procurement{margin-left:0}}
#order-state{font:inherit;padding:11px 12px;border:1px solid #ccd9e8;border-radius:8px;background:#fff;color:#353b45;width:100%;margin:8px 0 0}.order-review{border-top:1px solid #e0e5ec;padding-top:18px;margin-top:20px}.order-review label{display:flex;flex-direction:column;gap:10px;font-size:13px;color:#426080}.order-review textarea{font:inherit;line-height:1.8;resize:vertical;width:100%;padding:12px;border:1px solid #ccd9e8;border-radius:8px;color:#353b45}.order-review button{margin-right:10px}.review-result{margin-top:20px;padding:14px;background:#f3f5f7;border-radius:8px;font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.review-result p{margin:8px 0 0}.review-result strong{color:#355779}
.payment-arrangements{margin-top:22px;border-top:1px solid #dce4ec;padding-top:18px}.payment-arrangements>summary{font-size:16px;font-weight:700;color:#355779;cursor:pointer;line-height:1.8}.installment{background:#f3f7fa;border:1px solid #dce6ed;border-radius:8px;padding:16px;margin-top:16px}.installment>strong{color:#355779;font-size:15px}.payment-plan-form{margin-top:20px;padding-top:12px;border-top:1px solid #e0e5ec}.payment-plan-form .draft-fields{grid-template-columns:minmax(0,1fr)}.payment-plan-form button{margin-right:10px}.payment-plan-form .index-hint{line-height:1.9}
.confirm-payment,.payment-ledger{margin-top:18px;border-top:1px solid #dce6ed;padding-top:14px}.confirm-payment>summary,.payment-ledger>summary{font-size:14px;color:#355779;cursor:pointer;line-height:1.9}.payment-confirmation-form .draft-fields{grid-template-columns:minmax(0,1fr)}.confirmation-record{margin:14px 0;padding:12px;background:white;border-radius:8px;font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.confirmation-record p{margin:8px 0 0}.confirmation-record strong{color:#355779}
/* Payment corrections stay inside the expanded ledger. */
.payment-correction{margin-top:14px;border-top:1px solid #e3e9ee;padding-top:12px}
.payment-correction summary,.payment-void-history summary{cursor:pointer;color:#667f94;font-size:14px}
.payment-correction-form{margin-top:14px}
.payment-correction-form label{display:block}
.payment-correction-form textarea{display:block;width:100%;box-sizing:border-box;margin-top:8px;padding:10px;border:1px solid #d8e2ea;border-radius:8px;font:inherit}
.payment-correction-form button{margin-top:12px}
.payment-void-history{margin-top:18px}
.voided-record{background:#f5f6f7;border-left:3px solid #b4bec6;padding-left:14px}
.supplier-bank-info{margin:18px 0;padding:18px;border:1px solid #dce5ec;background:#f3f7fa;border-radius:10px}
.bank-info-row{display:flex;align-items:center;gap:12px;margin:12px 0;flex-wrap:wrap}
.bank-info-row>.draft-preview-label{min-width:130px}
.bank-info-value{flex:1;min-width:100px;overflow-wrap:anywhere;white-space:pre-wrap;user-select:text}
.bank-info-row button{padding:6px 12px;white-space:nowrap}
.supplier-bank-info>.index-hint{display:block;margin-top:14px}
.bank-copy-manual{display:block;width:100%;box-sizing:border-box;min-width:0;padding:10px;font:inherit;font-size:14px;line-height:1.6;resize:vertical}.bank-copy-status{overflow-wrap:anywhere}
.order-search-match{padding:10px 12px;border-left:3px solid #bd7c21;border-radius:6px;background:#fff4d9;overflow-wrap:anywhere;white-space:pre-wrap}@media(min-width:0px){.standalone .order-search-match{background:#3b301c;border-color:#e6be6f}}
.project-group:not([open]):not(details) .project-group-cards{display:grid}
.order-state-filters{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.order-state-filters button{margin:0;padding:8px 12px;min-height:40px;font-size:14px}.standalone .order-state-filters button[aria-pressed=true]{background:var(--brand-pale);border-color:var(--brand-red);font-weight:700}
#my-procurement-applications[aria-pressed=true]{border-color:var(--brand-red)}
#procurement-submission-receipt:not([hidden]){display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-bottom:16px}
#procurement-submission-receipt button{margin:0;min-height:44px}
@media(max-width:480px){.order-state-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.order-state-filters button{width:100%}}
@media(min-width:651px){.standalone #app-navigation{position:sticky;top:16px;z-index:3}}
@media(max-width:650px){.standalone #app-navigation{position:fixed;left:0;right:0;bottom:0;z-index:30;box-sizing:border-box;background:#fff6f6;border-top:1px solid var(--brand-line);padding:8px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}html body.standalone[data-authenticated=true] main{padding-bottom:calc(90px + env(safe-area-inset-bottom))}}
@media(max-width:650px) and (min-width:0px){.standalone #app-navigation{background:#000}}
.order-proposal{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0 8px}.order-proposal>div{padding:12px;border:1px solid currentColor;border-radius:12px}.order-proposal span{display:block;font-size:12px;margin-bottom:6px}.order-proposal strong{display:block;font-size:16px;overflow-wrap:anywhere}.standalone .order-proposal>div{background:var(--brand-pale);border-color:var(--brand-line)}@media(max-width:480px){.order-proposal{gap:8px}.order-proposal>div{padding:10px}}
#new-project-code{padding:5px 10px;margin-left:10px;font-size:13px}
#project-code-panel input{display:block;width:100%;box-sizing:border-box;margin:10px 0;padding:10px;border:1px solid #dce5ec;border-radius:8px;font:inherit}
#quick-supplier-dialog{width:520px;max-width:calc(100vw - 32px);max-height:calc(100vh - 48px);overflow:auto;box-sizing:border-box;border:1px solid #dce5ec;border-radius:14px;padding:26px;color:#284158;background:white}
#quick-supplier-dialog::backdrop{background:rgba(28,44,58,.32)}
#quick-supplier-dialog .draft-fields{grid-template-columns:1fr;margin-top:20px}
.quick-supplier-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
#draft-new-supplier{padding:5px 10px;margin-left:10px;font-size:13px}

#payment-dashboard{background:#fffaf3;border-color:#e6dace;border-radius:22px}.payment-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.payment-metric{background:#fffdf8;border:1px solid #e6dace;border-radius:17px;padding:16px;min-width:0}.payment-metric span{font-size:14px;color:#766858}.payment-metric strong{display:block;font-size:22px;color:#514a46;overflow-wrap:anywhere;margin-top:8px}.payment-priority-section{margin-top:22px}.payment-priority-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:12px}.payment-priority-card{min-width:0;border:1px solid #ddd;border-radius:20px;padding:20px;background:#f6f4ef;overflow-wrap:anywhere}.payment-priority-card.urgent{background:#fff0ee;border-color:#efc0bb}.payment-priority-card.soon{background:#fff7df;border-color:#eddca7}.payment-priority-card.later{background:#f0f7eb;border-color:#cdddbe}.payment-urgency{display:inline-block;max-width:100%;font-size:14px;font-weight:700;line-height:1.7;color:#514a46}.urgent .payment-urgency{color:#a33c37}.soon .payment-urgency{color:#92611e}.later .payment-urgency{color:#477451}.payment-priority-card h4{font-size:18px;margin:14px 0 8px}.payment-card-amount{display:block;font-size:26px;margin:14px 0;color:#514a46}.payment-priority-card button{width:100%;border-radius:12px;margin-top:12px}.payment-future{margin-top:20px}@media(max-width:850px){.payment-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.payment-priority-cards{grid-template-columns:1fr}}

@media(max-width:480px){.payment-metrics{grid-template-columns:1fr}.payment-metric strong{font-size:24px}}

#settlement-dialog{width:680px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;box-sizing:border-box;border:1px solid #e1d8ca;border-radius:24px;padding:26px;background:#fffaf3;color:#514a46}#settlement-dialog::backdrop{background:#514a4666}.settlement-top{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.settlement-top h2{margin:0}.settlement-top button{width:auto;white-space:nowrap}#settlement-content h3{overflow-wrap:anywhere}.settlement-amounts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;background:#eef3e9;border-radius:17px;padding:16px;margin:18px 0}.settlement-amounts span{font-size:13px}.settlement-amounts strong{display:block;font-size:19px;overflow-wrap:anywhere;margin-top:6px}#settlement-dialog .supplier-bank-info{background:#f5f0e5;border-radius:16px}#settlement-dialog input,#settlement-dialog textarea{background:#fffdf8;border-radius:12px}#settlement-dialog button{border-radius:12px}#settlement-status{overflow-wrap:anywhere}@media(max-width:480px){#settlement-dialog{padding:18px}.settlement-amounts{grid-template-columns:1fr}.settlement-top{align-items:flex-start}}

@media(max-width:480px){#settlement-dialog .bank-info-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}#settlement-dialog .bank-info-row>.draft-preview-label{grid-column:1/-1;min-width:0}#settlement-dialog .bank-info-value{min-width:0}#settlement-dialog .bank-info-row button{grid-column:2;grid-row:2}}

.overview-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}.overview-controls select{display:block;width:100%;margin-top:7px}@media(max-width:480px){.overview-controls{grid-template-columns:1fr}}

.dashboard-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-scope{background:#f1f4e9;padding:14px;border-radius:12px}.payment-code-group{margin-top:14px}.payment-code-group summary{font-weight:700;color:#608576}@media(max-width:650px){.dashboard-controls{grid-template-columns:1fr}}

.order-compact{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin:14px 0}.order-supplier,.order-fee{margin:0;overflow-wrap:anywhere}.order-fee{font-weight:600}.order-details{margin-top:16px;border-top:1px solid #e6dace;padding-top:13px}.order-details>summary{color:#608576;font-weight:600;cursor:pointer}.order-details .order-value{margin-top:13px}@media(max-width:480px){.order-compact{display:block}.order-fee{margin-top:8px}}

/* The deployed application shares the approved cream and sage workbench layout. */
html:has(body.standalone){background:#fffaf3;min-height:100%;color-scheme:light}
.standalone{min-height:100vh;min-height:100dvh;background:#fffaf3}
html body.standalone main{padding-bottom:max(30px,env(safe-area-inset-bottom))}
@media(max-width:650px){.standalone .app-sidebar{padding-top:max(16px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}html body.standalone main{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));padding-bottom:max(22px,env(safe-area-inset-bottom))}}
.standalone{background:#fffaf3;color:#514a46;display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100dvh}
.standalone main{width:100%;max-width:1540px;margin:0;padding:30px 40px;min-width:0}
.app-sidebar{background:#f6eddf;border-right:1px solid #e6dace;padding:36px 22px;display:flex;flex-direction:column;gap:34px;min-width:0}
.app-brand{font-size:28px;font-weight:800;letter-spacing:2px;color:#ae6354}.app-brand small{display:block;font-size:13px;font-weight:400;letter-spacing:0;color:#867e75;margin-top:10px}
#app-navigation{display:grid;gap:9px}#app-navigation[hidden]{display:none}#app-navigation button{background:transparent;color:#776e62;border:0;text-align:left;margin:0;padding:14px 16px;font-size:16px;box-shadow:none}
#app-navigation button[aria-current=page]{background:#eadfcf;color:#514a46;font-weight:700}
.app-principles{font-size:12px;color:#867e75;margin-top:auto;line-height:1.8}.app-topbar{display:flex;justify-content:space-between;align-items:center;gap:15px;padding-bottom:18px;border-bottom:1px solid #e6ddd2;color:#887e73;font-size:13px}
#app-account{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}#app-account p{margin:0;font-size:13px}#app-account button{margin:0;padding:7px 12px}
.app-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:24px 0}.standalone h1{color:#514a46;margin:0;font-size:32px}.app-page-heading .lead{font-size:15px;margin:8px 0 0;color:#867e75}.app-page-heading button{margin:0;flex:none}
.standalone button{background:#608576;border-color:#608576;border-radius:13px;box-shadow:0 3px 0 #496a5e}.standalone button.secondary{background:#fffdf8;color:#665f55;border-color:#dfd8cd;box-shadow:0 3px 0 #e7e0d650}
.standalone .procurement-draft{border-color:#e7dfd5;border-radius:21px;box-shadow:0 4px 0 #ede5d970;padding:26px;background:#fff}
.standalone .procurement-draft>summary,.standalone h2,.standalone h3{color:#514a46}.standalone input,.standalone select,.standalone textarea{background:#fffdf8;border-color:#e1d9cf;border-radius:12px;color:#514a46}
.standalone #payment-dashboard{padding:0;background:transparent;border:0;box-shadow:none}.workbench-hero{display:flex;justify-content:space-between;align-items:center;gap:18px;background:#f7efdf;padding:24px 28px;border-radius:23px;border:1px solid #e4d9c5;margin-bottom:22px}.workbench-hero h2{margin:0;font-size:22px}.workbench-hero p{color:#86755e;font-size:14px;line-height:1.8;margin:8px 0 0}.workbench-hero svg{flex:none}
.standalone .payment-metric{background:white;padding:24px;border-radius:21px;box-shadow:0 4px 0 #ede5d970}.standalone .payment-metric strong{font-size:28px}.standalone .payment-priority-section{background:white;border:1px solid #e7dfd5;border-radius:21px;padding:26px;box-shadow:0 4px 0 #ede5d970}.standalone .payment-priority-section h3{margin-top:0;font-size:21px}.standalone .payment-priority-card button{background:#608576;color:white;border-color:#608576}
.standalone[data-authenticated=true] .member-access{display:none}.standalone[data-authenticated=false] #procurement-draft{display:none}
.standalone .member-login-options{display:flex;align-items:center;flex-wrap:wrap;gap:4px 20px;margin:10px 0 4px}
.standalone .member-login-options label{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:13px;color:var(--ui-ink);cursor:pointer}
.standalone .member-login-options input[type=checkbox]{width:18px;height:18px;margin:0;flex:none;accent-color:var(--ui-red)}
.standalone #member-login-help{margin:0 0 16px;font-size:12px;line-height:1.6;color:var(--ui-muted)}
.standalone #member-wecom-login:not([hidden]){min-height:44px;margin-inline-start:8px}
.standalone:not([data-view=overview]) #payment-dashboard,.standalone:not([data-view=orders]) #submitted-orders,.standalone:not([data-view=admin]) #member-management,.standalone:not([data-view=new]) #procurement-draft,.standalone:not([data-view=archive]) #archive-workspace{display:none}
.standalone:not([data-view=orders]):not([data-view=suppliers]) #procurement-workspace{display:none}
.standalone[data-view=orders] #supplier-form,.standalone[data-view=suppliers] #server-draft-list,.standalone[data-view=suppliers] #new-server-draft,.standalone[data-view=suppliers] #procurement-workspace>h3{display:none}
.standalone .overview-controls select{font:inherit;min-height:44px;padding:10px 12px;width:100%;border:1px solid #e1d9cf}.standalone .overview-controls label{font-size:14px;color:#776e62;min-width:0}
.standalone:not([data-view=finance]) #finance-workspace{display:none}.finance-chart{display:block;width:100%;max-height:340px;margin:22px 0}.finance-table-wrap{overflow-x:auto}.finance-table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:14px}.finance-table th,.finance-table td{padding:15px 12px;text-align:left;border-bottom:1px solid #eee7de}.finance-table th{color:#867e75;background:#faf6ee}#finance-content .payment-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:650px){#finance-content .payment-metrics{grid-template-columns:1fr}}
.standalone[data-view=overview] .payment-priority-section:has(.payment-priority-cards:empty){padding:18px 24px}.standalone[data-view=overview] .payment-priority-section:has(.payment-priority-cards:empty) h3{font-size:16px;margin-bottom:8px}
@media(max-width:900px){.standalone{grid-template-columns:185px minmax(0,1fr)}.standalone main{padding:24px}.app-sidebar{padding:28px 12px}.app-brand{font-size:24px}.standalone .payment-priority-cards{grid-template-columns:1fr}}
@media(max-width:650px){.standalone{display:block}.app-sidebar{padding:16px;border-right:0;border-bottom:1px solid #e6dace;gap:12px}.app-brand{font-size:21px}.app-brand small,.app-principles{display:none}#app-navigation{display:flex;overflow-x:auto;gap:6px;padding-bottom:4px}#app-navigation button{white-space:nowrap;font-size:14px;padding:10px 12px;flex:none}.standalone main{padding:18px 14px}.app-topbar{align-items:flex-start}.app-page-heading{align-items:flex-start;flex-wrap:wrap}.standalone h1{font-size:26px}.standalone .procurement-draft,.standalone .payment-priority-section{padding:20px}.workbench-hero{padding:20px}.workbench-hero h2{font-size:18px}.workbench-hero svg{width:54px;height:54px}.standalone .payment-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.standalone .payment-metric{padding:16px}.standalone .payment-metric strong{font-size:21px}}
/* HANABI company theme: white canvas, brand red actions, semantic urgency colors. */
html:has(body.standalone),body.standalone{background:#fff;color:#393238}
.standalone{--brand-red:#d9272b;--brand-pale:#fff2f2;--brand-line:#f0dddd}
.standalone .app-sidebar{background:#fff6f6;border-color:var(--brand-line)}
.company-logo{display:block;width:150px;height:150px;aspect-ratio:1;border-radius:20px;background:#d9272b url('/hanabi-logo.jpg') center / contain no-repeat}
.app-brand{letter-spacing:0}.app-brand small{color:#8a6266;font-size:12px}
.standalone button,.standalone .payment-priority-card button{background:var(--brand-red);border-color:var(--brand-red);color:#fff;box-shadow:0 3px 0 #ac1e25}
.standalone button.secondary{background:#fff;color:#65535a;border-color:#e4d5d8;box-shadow:0 3px 0 #f5eeee}
.standalone button:focus-visible,.standalone a:focus-visible{outline-color:#ef9095}
.standalone #app-navigation button{background:transparent;color:#79656b;box-shadow:none}
.standalone #app-navigation button[aria-current=page]{background:#fce2e3;color:#a61924}
.standalone h1,.standalone h2,.standalone h3{color:#393238}
.standalone .app-topbar{color:#88767d;border-color:#eee2e5}
.standalone .lead,.standalone .app-principles{color:#88767d}
.standalone .workbench-hero{background:var(--brand-pale);border-color:var(--brand-line)}
.standalone .workbench-hero p{color:#8a6266}
.standalone .procurement-draft,.standalone .payment-priority-section,.standalone .payment-metric{background:#fff;border-color:#eee2e5;box-shadow:0 4px 0 #f8f0f1}
.standalone .payment-metric span{color:#88767d}.standalone .payment-metric strong,.standalone .payment-card-amount{color:#393238}
.standalone input,.standalone select,.standalone textarea,.standalone .overview-controls select{background:#fff;border-color:#e4d5d8;color:#393238}
.standalone .draft-fields label,.standalone .overview-controls label{color:#79656b}
.standalone .dashboard-scope,.standalone .supplier-bank-info,.standalone .review-result,.standalone .installment{background:#fff6f6;border-color:var(--brand-line)}
.standalone .order-details>summary,.standalone .payment-code-group summary,.standalone .payment-arrangements>summary{color:#a61924}
.standalone .finance-table th{background:#fff6f6;color:#79656b}.standalone .finance-table td{border-color:#eee2e5}
.standalone #settlement-dialog{background:#fff;color:#393238;border-color:var(--brand-line)}
.standalone #settlement-dialog .supplier-bank-info,.standalone .settlement-amounts{background:#fff2f2}
.standalone #settlement-dialog input,.standalone #settlement-dialog textarea{background:#fff}
@media(max-width:900px){.company-logo{width:130px;height:130px}}
@media(max-width:650px){.company-logo{width:80px;height:80px;border-radius:14px}.standalone .app-brand{display:flex;align-items:center;gap:14px}.standalone .app-brand small{display:block;font-size:13px}.standalone .app-sidebar{border-bottom-color:var(--brand-line)}}
@media(min-width:0px){
 html:has(body.standalone),body.standalone{background:#000;color:#eee8eb;color-scheme:dark}
 .standalone{--brand-red:#dc323b;--brand-pale:#2a191d;--brand-line:#493035}
 .standalone .app-sidebar{background:#000;border-color:#333036}
 .standalone h1,.standalone h2,.standalone h3,.standalone h4,.standalone .payment-metric strong,.standalone .payment-card-amount{color:#f4eef0}
 .standalone .app-topbar{color:#bbb0b5;border-color:#393239}
 .standalone .lead,.standalone .app-principles,.standalone .app-brand small,.standalone .workbench-hero p,.standalone .payment-metric span,.standalone .draft-fields label,.standalone .overview-controls label{color:#bfb0b7}
 .standalone .procurement-draft,.standalone .payment-priority-section,.standalone .payment-metric{background:#1c1c20;border-color:#393239;box-shadow:0 4px 0 #08080a}
 .standalone input,.standalone select,.standalone textarea,.standalone .overview-controls select{background:#161619;color:#f4eef0;border-color:#51444b}
 .standalone button.secondary{background:#242126;color:#f3e9ed;border-color:#57444d;box-shadow:0 3px 0 #101013}
 .standalone #app-navigation button{color:#c1b4ba}.standalone #app-navigation button[aria-current=page]{background:#402127;color:#ffb7bd}
 .standalone .dashboard-scope,.standalone .supplier-bank-info,.standalone .review-result,.standalone .installment,.standalone .server-draft-row,.standalone .confirmation-record,.standalone #draft-preview{background:#262126;color:#e8dce2;border-color:#493b43}
 .standalone .payment-priority-card.urgent{background:#351c22;border-color:#793841}.standalone .urgent .payment-urgency{color:#ffa6af}
 .standalone .payment-priority-card.soon{background:#30291b;border-color:#725b30}.standalone .soon .payment-urgency{color:#f6cc78}
 .standalone .payment-priority-card.later{background:#1b2b23;border-color:#365a43}.standalone .later .payment-urgency{color:#a6d7b5}
 .standalone .order-details>summary,.standalone .payment-code-group summary,.standalone .payment-arrangements>summary,.standalone .draft-preview-label,.standalone .draft-preview-value,.standalone #draft-preview strong,.standalone .bank-info-value{color:#e8c0c9}
 .standalone .finance-table th{background:#292027;color:#dbcbd3}.standalone .finance-table td{border-color:#493b43}
 .standalone #settlement-dialog,.standalone #quick-supplier-dialog{background:#1c1c20;color:#f4eef0;border-color:#493b43}
 .standalone #settlement-dialog .supplier-bank-info,.standalone .settlement-amounts{background:#2a2026}
 .standalone #settlement-dialog input,.standalone #settlement-dialog textarea{background:#161619;color:#f4eef0}
 .standalone .input-check{background:#30271b;color:#efcf9d;border-color:#725b30}
 .standalone .index-hint,.standalone .draft-scope,.standalone .draft-help,.standalone #orders-status,.standalone #submitted-orders>p,.standalone #draft-status{color:#bfb0b7}
 .standalone .order-details,.standalone .order-review,.standalone .payment-arrangements{border-color:#493b43}
}

/* Chart labels and distinct line styles stay readable across live theme changes. */
.standalone .finance-chart{--chart-axis:#79656b;--chart-grid:#eadfe3;--chart-amount:#27684f;--chart-total:#b45228}
.finance-axis{fill:var(--chart-axis)}.finance-grid{stroke:var(--chart-grid)}
.finance-chart polyline{fill:none;stroke-width:3;stroke-linejoin:round}
.finance-chart .finance-series-amount{stroke:var(--chart-amount)}.finance-chart circle.finance-series-amount{fill:var(--chart-amount)}
.finance-chart .finance-series-total{stroke:var(--chart-total);stroke-dasharray:8 5}.finance-chart circle.finance-series-total{fill:var(--chart-total)}
.finance-legend{display:flex;gap:12px 24px;flex-wrap:wrap;font-size:14px;line-height:1.7;margin:12px 0 20px}
.finance-legend>span{display:inline-flex;align-items:center;gap:10px}.finance-legend i{display:inline-block;width:28px;border-top:3px solid #27684f}
.finance-legend i.finance-series-total{border-color:#b45228;border-top-style:dashed}
@media(min-width:0px){.standalone .finance-chart{--chart-axis:#d0c2c9;--chart-grid:#463840;--chart-amount:#9dd4b3;--chart-total:#ffbb8f}.standalone .finance-legend i{border-color:#9dd4b3}.standalone .finance-legend i.finance-series-total{border-color:#ffbb8f}}
@media(max-width:650px){.finance-chart .finance-axis{font-size:16px}}

/* Common project selection stays visible; secondary arrangement controls expand on demand. */
.dashboard-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
.dashboard-view-options{min-width:0;border:1px solid #e4d5d8;border-radius:12px;background:#fff}
.dashboard-view-options>summary{cursor:pointer;padding:12px 14px;font-size:14px;line-height:1.7;color:#65535a}
.dashboard-view-options>summary span{display:block;font-size:12px;color:#88767d;margin-top:3px;overflow-wrap:anywhere}
.dashboard-view-options>summary:focus-visible{outline:3px solid #ef9095;outline-offset:3px;border-radius:12px}
.dashboard-extra-controls{display:grid;gap:16px;padding:0 14px 16px}
.dashboard-extra-controls select{width:100%;font:inherit;padding:10px 12px}
@media(max-width:650px){.dashboard-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.dashboard-view-options>summary{font-size:13px;padding:10px 12px}.dashboard-extra-controls{padding:0 10px 12px}.dashboard-extra-controls select{font-size:13px}}
@media(min-width:0px){.standalone .dashboard-view-options{background:#1c1c20;border-color:#51444b}.standalone .dashboard-view-options>summary{color:#f3e9ed}.standalone .dashboard-view-options>summary span{color:#bfb0b7}}
.dashboard-view-options:not([open]) .dashboard-extra-controls{display:none}
/* Keep the original logo and caption centered with balanced space around the artwork. */
.standalone .app-brand{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px;width:100%;margin:0}
.standalone .company-logo{flex:none;width:132px;height:132px;border-radius:20px}
.standalone .app-brand small{margin:0;font-size:12px;line-height:1.8;letter-spacing:.4px}
@media(min-width:651px) and (max-width:900px){.standalone .company-logo{width:116px;height:116px;border-radius:18px}}
@media(max-width:650px){.standalone .app-brand{flex-direction:row;gap:12px;min-height:60px}.standalone .company-logo{width:60px;height:60px;border-radius:13px}.standalone .app-brand small{font-size:12px;text-align:left}}

.standalone:not([data-view=suppliers]) #supplier-evaluation-workspace{display:none}
.standalone:not([data-view=suppliers]) #supplier-subnavigation{display:none}
.standalone[data-view=suppliers]:not([data-supplier-panel=evaluations]) #supplier-evaluation-workspace{display:none}
.standalone[data-view=suppliers][data-supplier-panel=evaluations] #procurement-workspace{display:none}
#supplier-subnavigation{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px}
.standalone #supplier-subnavigation{display:none}
.standalone:not([data-view=suppliers]) #supplier-library,.standalone[data-supplier-panel=evaluations] #supplier-library,.standalone[data-view=suppliers] #procurement-workspace{display:none}
.supplier-library-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.supplier-library-heading h2{margin:0}.supplier-library-heading button{margin:0}
#supplier-library-search{width:100%;font:inherit;min-height:44px;padding:10px 12px;border:1px solid #d7c8ce;border-radius:12px;margin-top:8px}
#supplier-library>label{display:block;margin-top:22px;font-size:14px}
#supplier-library-list{--supplier-grid-gap:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,max(280px,calc((100% - 3 * var(--supplier-grid-gap)) / 4))),1fr));align-items:start;gap:var(--supplier-grid-gap);margin-top:18px}
#supplier-library-list > .index-hint{grid-column:1/-1}
.supplier-library-card{min-width:0;padding:18px;border:1px solid #eee2e5;border-radius:16px;overflow-wrap:anywhere}.supplier-library-card h3{font-size:18px;margin:0;line-height:1.6}.supplier-library-card details{font-size:13px;line-height:1.9;margin-top:14px}.supplier-library-card summary{cursor:pointer}.supplier-library-card button{font-size:13px;padding:8px 12px}
#supplier-editor-dialog{width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #e4d5d8;border-radius:20px;padding:24px;background:#fff;color:#3b3135}#supplier-editor-dialog::backdrop{background:rgba(0,0,0,.6)}#supplier-editor-dialog h2{margin-top:0}#supplier-editor-dialog .draft-fields{margin-top:16px}
#supplier-link-dialog{width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #e4d5d8;border-radius:20px;padding:22px;background:#fff;color:#3b3135}#supplier-link-dialog::backdrop{background:rgba(0,0,0,.6)}#supplier-link-dialog select{width:100%;padding:12px;font:inherit;border:1px solid #d7c8ce;border-radius:10px;margin-top:10px}.supplier-linked-review+.supplier-linked-review{border-top:1px solid #d7c8ce;padding-top:14px;margin-top:14px}
@media(min-width:0px){.standalone #supplier-link-dialog{background:#1c1c20;color:#f4eef0;border-color:#493b43}}
.evaluation-tag.production_quality{background:#e4f4ed;color:#24684c}.evaluation-tag.delivery_speed{background:#e8f0ff;color:#365f9d}.evaluation-tag.response_speed{background:#f0e9fb;color:#754d99}.evaluation-tag.price_advantage{background:#fff2d9;color:#8a6418}
.supplier-filter-drawer{margin:16px 0;font-size:14px}.supplier-filter-drawer>summary{cursor:pointer;padding:10px 0}.supplier-filter-drawer:not([open])>div{display:none}
@media(max-width:650px){#supplier-library-list{grid-template-columns:1fr}.supplier-library-heading h2{font-size:21px}.supplier-library-heading button{font-size:14px;padding:10px 12px}#supplier-editor-dialog{padding:18px}}
@media(min-width:0px){.standalone #supplier-editor-dialog{background:#1c1c20;color:#f4eef0;border-color:#493b43}.standalone .supplier-library-card{border-color:#493b43}.standalone .evaluation-tag.production_quality{background:#19372b;color:#a4dfc1}.standalone .evaluation-tag.delivery_speed{background:#202f4c;color:#b1caff}.standalone .evaluation-tag.response_speed{background:#352640;color:#d5baf3}.standalone .evaluation-tag.price_advantage{background:#3b301b;color:#f0ce88}}
#history-list{display:flex;flex-direction:column;gap:18px;margin-top:20px}
#history-list .history-card h3{margin:0 0 8px;color:inherit;font-size:18px;line-height:1.6}
.history-card .history-fee{font-size:17px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.7;margin:12px 0}
.history-card .history-payment{display:inline-block;font-size:13px;padding:5px 9px;margin:0 0 8px;background:#f5f0f1;border-radius:8px;line-height:1.7}
.history-action{font-size:13px;line-height:1.8;padding:10px 12px;background:#fff7e7;color:#785c2b;border-radius:9px;white-space:pre-wrap}
.history-card>details{margin-top:12px;border-top:1px solid #e4d5d8;padding-top:12px;font-size:13px;line-height:1.8}
.history-card>details>summary{cursor:pointer}
.history-card>details p{line-height:1.9;white-space:pre-wrap}
@media(min-width:0px){.standalone .history-card .history-payment{background:#30292e;color:#eee1e7}.standalone .history-action{background:#30271b;color:#efcf9d}.standalone .history-card>details{border-color:#493b43}}
#supplier-subnavigation button[aria-current=page]{border-color:#dd2933;color:#dd2933;background:#fff0f1}
.evaluation-tags{display:flex;flex-direction:column;gap:12px;margin-top:14px}.supplier-category-tags,.supplier-rating-tags{display:flex;flex-wrap:wrap;gap:8px}.supplier-category-tags:empty{display:none}.supplier-rating-tags{gap:6px}
.supplier-active-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}.supplier-active-filters[hidden]{display:none}.supplier-active-filters button{margin:0;padding:6px 10px;min-height:34px;font-size:13px;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
.evaluation-tag{font-size:13px;line-height:1.5;padding:5px 9px;border-radius:9px;background:#f5f0f1;color:#56434b}
.evaluation-tags button.evaluation-tag{margin:0;min-height:32px;font-size:13px;line-height:1.5;padding:5px 9px;border:1px solid transparent;box-shadow:none;cursor:pointer}.evaluation-tags button.evaluation-tag.missing{border-style:dashed;border-color:#d7c8ce}.evaluation-tags button.evaluation-tag:focus-visible{outline:2px solid #e02b36;outline-offset:2px}
.evaluation-tag.category{background:#fff0f1;color:#a61924}.evaluation-tag.missing{color:#786a70;border:1px dashed #d7c8ce;background:transparent}
.evaluation-score{font-size:15px;font-weight:600;margin:14px 0 0}
@media(min-width:0px){.standalone .evaluation-tag{background:#30292e;color:#eee1e7}.standalone .evaluation-tag.category,.standalone #supplier-subnavigation button[aria-current=page]{background:#402127;color:#ffb7bd}.standalone .evaluation-tag.missing{color:#bfb0b7;border-color:#66535d}}
#supplier-evaluation-workspace[hidden]{display:none}
#supplier-evaluation-workspace input{width:100%;min-height:44px;padding:10px 12px;font:inherit;margin-top:7px}
#supplier-evaluation-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}
.evaluation-card{min-width:0;border:1px solid #eee2e5;border-radius:18px;padding:22px;overflow-wrap:anywhere}
.evaluation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.evaluation-heading h3{font-size:18px;margin:0;min-width:0}
.evaluation-badge{font-size:12px;background:#fff2f2;color:#a61924;padding:5px 9px;border-radius:8px;flex:none}
.evaluation-dimensions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;font-size:14px}.evaluation-dimensions dt{color:#88767d}.evaluation-dimensions dd{margin:6px 0 0}
.evaluation-card details{margin-top:18px;line-height:1.9}.evaluation-card details summary{cursor:pointer;color:#a61924}.evaluation-card details p{white-space:pre-wrap}
@media(max-width:650px){#supplier-evaluation-list{grid-template-columns:1fr}.evaluation-card{padding:18px}}
@media(min-width:0px){.standalone .evaluation-card{border-color:#493b43}.standalone .evaluation-dimensions dt{color:#bfb0b7}.standalone .evaluation-badge{background:#402127;color:#ffb7bd}.standalone .evaluation-card details summary{color:#e8c0c9}}

.standalone:not([data-view=quotations]) #quotation-workspace{display:none}#quotation-form{margin:24px 0;padding:20px 0;border-top:1px solid currentColor}#quotation-form details{margin:20px 0}#quotation-list .quotation-group{margin:24px 0}#quotation-list .evaluation-card{margin-bottom:12px}#quotation-list h4{margin:0 0 10px;overflow-wrap:anywhere}

#dashboard-review-shortcut:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px}#dashboard-review-shortcut button{flex:none;margin:0}@media(max-width:440px){#dashboard-review-shortcut:not([hidden]){align-items:flex-start;flex-direction:column}}

#history-search{display:block;width:100%;box-sizing:border-box;min-width:0;min-height:44px;padding:10px 12px;font:inherit;margin-top:7px;border-width:1px;border-style:solid;border-radius:12px}

.category-tone-0{--tag-bg:#e6f1ff;--tag-fg:#285a92}.category-tone-1{--tag-bg:#f0e8fc;--tag-fg:#704797}.category-tone-2{--tag-bg:#e1f4f1;--tag-fg:#216e63}.category-tone-3{--tag-bg:#fff0db;--tag-fg:#855713}.category-tone-4{--tag-bg:#fbe7f0;--tag-fg:#974464}.category-tone-5{--tag-bg:#eaf2dd;--tag-fg:#546d26}.category-tone-6{--tag-bg:#e6ecfa;--tag-fg:#4b5b92}.category-tone-7{--tag-bg:#fceade;--tag-fg:#925230}
.standalone .evaluation-tag.category[class*=category-tone-]{background:var(--tag-bg);color:var(--tag-fg)}
.category-tone-8{--tag-bg:#dcf3f7;--tag-fg:#216978}.category-tone-9{--tag-bg:#ffecd0;--tag-fg:#86501a}.category-tone-10{--tag-bg:#f8e5fb;--tag-fg:#87418c}
.standalone .evaluation-tags button.evaluation-tag.category{font-weight:600}.standalone .evaluation-tags button.evaluation-tag:not(.category){font-size:12px;font-weight:400}
@media(min-width:0px){.category-tone-8{--tag-bg:#1c343c;--tag-fg:#a6dce9}.category-tone-9{--tag-bg:#44301c;--tag-fg:#f1c894}.category-tone-10{--tag-bg:#3c2540;--tag-fg:#e6b5ec}}
.standalone .evaluation-tag.production_quality.missing{background:#e4f4ed;color:#24684c}.standalone .evaluation-tag.delivery_speed.missing{background:#e8f0ff;color:#365f9d}.standalone .evaluation-tag.response_speed.missing{background:#f0e9fb;color:#754d99}.standalone .evaluation-tag.price_advantage.missing{background:#fff2d9;color:#8a6418}
@media(min-width:0px){.category-tone-0{--tag-bg:#20334b;--tag-fg:#b1d1f7}.category-tone-1{--tag-bg:#362744;--tag-fg:#d7baf3}.category-tone-2{--tag-bg:#1e3832;--tag-fg:#a6ded0}.category-tone-3{--tag-bg:#40321f;--tag-fg:#edcf97}.category-tone-4{--tag-bg:#402837;--tag-fg:#efbad1}.category-tone-5{--tag-bg:#303b21;--tag-fg:#cfdfa7}.category-tone-6{--tag-bg:#29314b;--tag-fg:#c4cdf4}.category-tone-7{--tag-bg:#402d22;--tag-fg:#efc3a5}.standalone .evaluation-tag.production_quality.missing{background:#19372b;color:#a4dfc1}.standalone .evaluation-tag.delivery_speed.missing{background:#202f4c;color:#b1caff}.standalone .evaluation-tag.response_speed.missing{background:#352640;color:#d5baf3}.standalone .evaluation-tag.price_advantage.missing{background:#3b301b;color:#f0ce88}}
.standalone .evaluation-tags .supplier-rating-tags button.evaluation-tag{background:#f5f3f4;color:#655c62}
.standalone .evaluation-tags .supplier-rating-tags .evaluation-pending{background:#f5f3f4;color:#655c62;display:inline-block;box-sizing:border-box;min-height:32px}
.standalone .evaluation-tags button.evaluation-tag[aria-pressed=true]{border-color:currentColor;box-shadow:0 0 0 1px currentColor}
.supplier-source-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.supplier-source-actions button{margin:0}
.supplier-library-card:focus-within{outline:2px solid #df7279;outline-offset:3px}.supplier-library-card h3:focus{outline:none}
#supplier-link-search{display:block;width:100%;box-sizing:border-box;min-width:0;min-height:44px;margin-top:8px;padding:10px 12px;font:inherit;border:1px solid #d7c8ce;border-radius:10px}
@media(min-width:0px){.standalone .evaluation-tags .supplier-rating-tags button.evaluation-tag{background:#29262a;color:#c6bdc3}}
@media(min-width:0px){.standalone .evaluation-tags .supplier-rating-tags .evaluation-pending{background:#29262a;color:#c6bdc3}}
#procurement-draft-form textarea[name=note]{min-height:96px;overflow-y:hidden;resize:none}
.payment-confirmation-form textarea{box-sizing:border-box;line-height:1.6;overflow-y:hidden;resize:none;overflow-wrap:anywhere;min-width:0}
.payment-confirmation-form textarea[name=reference]{min-height:72px}
.payment-confirmation-form textarea[name=note]{min-height:96px}
.server-draft-summary{flex:1;min-width:0}.server-draft-summary>strong,.server-draft-summary>small{display:block}.server-draft-summary>strong{font-size:16px}.server-draft-summary>small{margin-top:4px}.server-draft-proposal{display:flex;flex-wrap:wrap;gap:6px 20px;margin-top:8px;font-size:13px}
.quote-procurement-reviews{margin:12px 0;padding:0 14px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface);overflow-wrap:anywhere}
.quote-procurement-reviews>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--ui-ink)}
.quote-procurement-reviews>summary::before{content:'›';margin-right:8px}.quote-procurement-reviews[open]>summary::before{content:'⌄'}
.quote-review-list{max-height:420px;overflow-y:auto}
.quote-review-item{padding:10px 0;border-top:1px solid var(--ui-line)}
.quote-review-item p{margin:0;line-height:1.5}.quote-review-item p+p{margin-top:4px}
.quote-review-title{color:var(--ui-ink);font-size:15px}.quote-review-candidate{color:var(--ui-muted);font-size:14px}
.quote-review-match{display:flex;align-items:center;gap:12px;margin-top:4px}.quote-review-match p{flex:1;min-width:0}.quote-review-match button{flex:none;min-height:44px}
@media(max-width:680px){.quote-review-match{align-items:flex-start;flex-direction:column;gap:4px}}
#procurement-overview-search{display:none}.standalone[data-view=orders] #procurement-overview-search{display:block}#procurement-overview-search>.search-label{margin-top:0}#procurement-overview-search #order-search{width:100%;min-width:0}.draft-search-note{margin-top:10px;font-size:13px}.draft-search-note p{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:650px){.standalone .app-topbar>span{display:none}.standalone .app-topbar #app-account{width:100%;justify-content:space-between;flex-wrap:nowrap}.standalone #app-account p{min-width:0;flex:1;overflow-wrap:anywhere}.standalone #app-account button{flex:none}}
.draft-sort-options{margin:14px 0}.draft-sort-options>summary{cursor:pointer;font-size:13px;line-height:1.8}.draft-sort-options label{display:flex;flex-direction:column;gap:8px;margin:12px 0;font-size:13px}.draft-sort-options select{max-width:100%;font:inherit;padding:10px 12px}.standalone[data-view=suppliers] #draft-sort-options{display:none}
.supplier-review-provenance{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px 14px;font-size:13px;line-height:1.8}.supplier-review-provenance dt{font-weight:600}.supplier-review-provenance dd{margin:0;overflow-wrap:anywhere}

#supplier-opinion-dialog{box-sizing:border-box;width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #e4d5d8;border-radius:20px;padding:22px;background:#fff;color:#3b3135}#supplier-opinion-dialog::backdrop{background:rgba(0,0,0,.6)}#supplier-opinion-dialog h2{margin-top:0}#supplier-opinion-dialog label{display:block;margin-top:16px}#supplier-opinion-dialog select,#supplier-opinion-dialog textarea{box-sizing:border-box;display:block;width:100%;min-width:0;margin-top:8px;padding:12px;font:inherit;line-height:1.6;border:1px solid #d7c8ce;border-radius:10px;background:#fff;color:inherit}#supplier-opinion-dialog textarea{resize:vertical}.supplier-cooperation-history article{padding:14px 0;border-top:1px solid #d7c8ce}.supplier-cooperation-history p{margin:8px 0}@media(min-width:0px){.standalone #supplier-opinion-dialog{background:#1c1c20;color:#f4eef0;border-color:#493b43}.standalone #supplier-opinion-dialog select,.standalone #supplier-opinion-dialog textarea{background:#17171a;border-color:#66535d}}

.supplier-cooperation-actions{margin-top:10px}.supplier-cooperation-actions button{margin:0}.supplier-cooperation-actions p:empty{display:none}#order-list article[data-order-id]:focus-visible{outline:2px solid #df7279;outline-offset:3px}

.supplier-opinion-ratings{margin-top:18px}.supplier-opinion-ratings summary{cursor:pointer;line-height:1.8}.supplier-opinion-rating-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.supplier-opinion-rating-grid label{min-width:0}.supplier-cooperation-history .supplier-rating-tags{margin-top:12px}.cooperation-rating{background:#f5f3f4;color:#655c62}@media(min-width:0px){.standalone .cooperation-rating{background:#29262a;color:#c6bdc3}}@media(max-width:360px){.supplier-opinion-rating-grid{grid-template-columns:1fr}}
#quotation-list .quotation-group>summary{cursor:pointer;font-size:18px;font-weight:700;line-height:1.8;padding:8px 0;overflow-wrap:anywhere}#quotation-list .quotation-group>summary:focus-visible{outline:2px solid #e02b36;outline-offset:4px;border-radius:6px}

#supplier-opinion-dialog label[hidden]{display:none}#supplier-opinion-order-search{box-sizing:border-box;display:block;width:100%;min-width:0;min-height:44px;margin-top:8px;padding:12px;font:inherit;border:1px solid #d7c8ce;border-radius:10px;background:#fff;color:inherit}#supplier-opinion-order-count:empty{display:none}@media(min-width:0px){.standalone #supplier-opinion-order-search{background:#17171a;border-color:#66535d}}

#supplier-opinion-dialog textarea{min-height:156px;overflow-y:hidden;resize:none}

.supplier-category-picker{margin:14px 0}.supplier-category-picker summary{cursor:pointer}.supplier-category-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.supplier-category-options label{display:flex;align-items:center;gap:6px;margin:0;padding:8px 10px;border:1px solid #a4979d;border-radius:12px;font-size:14px}.supplier-category-options input{width:18px;min-height:18px;margin:0;accent-color:#df2936}.supplier-category-options label:has(input:checked){border-color:#df2936;background:#df29361a}

.standalone .supplier-category-options label[class*=category-tone-]{background:var(--tag-bg);color:var(--tag-fg);border-color:transparent;min-height:28px}.standalone .supplier-category-options label:has(input:checked){border-color:currentColor;box-shadow:0 0 0 1px currentColor}.supplier-category-options input:focus-visible{outline:2px solid currentColor;outline-offset:3px}

.supplier-bank-categories{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}.supplier-bank-categories span{padding:6px 10px;border-radius:12px;font-size:13px;background:var(--tag-bg);color:var(--tag-fg);overflow-wrap:anywhere}
.standalone .evaluation-tags .evaluation-tag,.standalone .evaluation-tags button.evaluation-tag,.standalone .evaluation-tags .supplier-rating-tags .evaluation-pending,.standalone .supplier-cooperation-history .cooperation-rating,.standalone .supplier-bank-categories span{box-sizing:border-box;min-height:16px;padding:0 7px;font-size:12px;line-height:14px;border-radius:6px}
.standalone .supplier-category-tags,.standalone .supplier-rating-tags,.standalone .supplier-bank-categories{row-gap:4px}
.standalone .supplier-library-card{display:flex;flex-direction:column;padding:16px;border-radius:14px}
.standalone .supplier-library-card>h3{font-size:17px;line-height:1.45;text-wrap:pretty}
.supplier-cooperation-summary{margin:5px 0 0;font-size:12px;line-height:1.5;color:#758193}
@media(min-width:0px){.standalone .supplier-cooperation-summary{color:#bfb0b7}}
.standalone .supplier-library-card .evaluation-tags{margin-top:12px;gap:8px}
.standalone .supplier-library-card .evaluation-score{font-size:14px;line-height:1.5;margin:10px 0 0}
.standalone .supplier-library-card>.supplier-source-actions{margin-top:auto;padding-top:12px;gap:6px}
.standalone .supplier-source-card>.index-hint{margin:0;margin-top:auto;padding-top:14px;font-size:12px;line-height:1.5}
.standalone .supplier-source-card>.supplier-source-actions{margin-top:8px;padding-top:0}
.standalone .supplier-library-card>.supplier-source-actions>button{min-height:32px;padding:5px 10px;font-size:12px;line-height:20px;border-radius:9px;box-shadow:none}
.standalone .supplier-library-card>details{margin-top:12px;padding-top:10px;border-top:1px solid #eee2e5;font-size:12px;line-height:1.6}
.standalone .supplier-library-card>details>summary{padding:2px 0;line-height:1.6}
@media(min-width:0px){.standalone .supplier-library-card>details{border-color:#493b43}}

#supplier-form textarea[name=note]{min-height:96px;overflow-y:hidden;resize:none}

.supplier-cooperation-meta{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 0 12px;overflow-wrap:anywhere}.supplier-cooperation-meta time{font-variant-numeric:tabular-nums}

#quotation-form textarea{min-height:96px;overflow-y:hidden;resize:none}

/* Keep the mobile WeCom app at one page scale while allowing scrolling. */
html.wecom-mobile,html.wecom-mobile body{touch-action:pan-x pan-y}
@media(max-width:900px){html.wecom-mobile input,html.wecom-mobile select,html.wecom-mobile textarea{font-size:16px!important}}

/* Information hierarchy: identity and account values first, maintenance on demand. */
.standalone #supplier-library{padding:0;border:0;background:transparent;box-shadow:none}
.standalone .supplier-library-heading{justify-content:flex-end;margin-bottom:12px}
.standalone #supplier-library-add{min-height:40px;padding:8px 14px;font-size:14px;box-shadow:none}
.standalone .supplier-search-controls{grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:12px;margin-top:0}
.standalone .supplier-search-controls label{font-size:12px;line-height:1.5;color:#667080}
.standalone #supplier-library-search,.standalone #supplier-library-sorting{box-sizing:border-box;margin-top:5px;min-height:44px;width:100%;font-size:14px;padding:10px 12px}
.standalone #supplier-library-filters{margin:10px 0;font-size:12px}
.standalone #supplier-library-filters>summary{padding:6px 0}
.standalone #supplier-library-status{margin:12px 0;font-size:12px;line-height:1.6;color:#667080}
.standalone #supplier-library-status strong{color:#2c3038;font-size:13px}
.standalone #supplier-library-list{margin-top:12px}
.standalone .supplier-library-card{background:#fff;padding:18px;border-color:#e5e7eb;border-radius:16px;gap:0}
.standalone .supplier-library-card>h3{font-size:18px;line-height:1.45;color:#252933}
.standalone .supplier-cooperation-summary{font-size:12px;color:#667080;margin-top:6px}
.standalone .supplier-library-card .evaluation-tags{margin-top:10px;gap:8px}
.standalone .supplier-library-card .evaluation-score{font-weight:600;font-size:14px;line-height:1.5;margin-top:10px;color:#343943}
.standalone .supplier-library-card .supplier-review-details{margin-top:10px;font-size:12px;color:#667080}
.standalone .supplier-review-details>summary{min-height:28px;line-height:28px}
.standalone .supplier-review-details>button{margin-top:10px;font-size:12px;min-height:36px;box-shadow:none}
.standalone .supplier-library-card>.supplier-payment-details{margin-top:12px;padding-top:10px;border-color:#e5e7eb;font-size:13px}
.standalone .supplier-payment-details>summary{font-weight:600;min-height:32px;line-height:32px}
.standalone .supplier-meta-details{margin-top:8px;font-size:12px;line-height:1.6;color:#667080}
.standalone .supplier-meta-details>summary{min-height:28px;line-height:28px}
.standalone .supplier-meta-details .draft-preview-value{font-size:12px;color:inherit;white-space:pre-wrap;margin:8px 0}
.standalone .supplier-library-card>.supplier-source-actions{margin-top:14px;padding-top:0;align-items:flex-start;gap:10px}
.standalone .supplier-library-card>.supplier-source-actions>.supplier-main-action{min-height:40px;padding:9px 13px;font-weight:600;font-size:13px;line-height:20px;border-radius:10px;box-shadow:none}
.standalone .supplier-more-actions{margin:0!important;font-size:12px;color:#667080}
.standalone .supplier-more-actions>summary{cursor:pointer;min-height:40px;padding:0 6px;line-height:40px;list-style:none}
.standalone .supplier-more-actions>summary::after{content:' ▾'}
.standalone .supplier-more-actions>summary::-webkit-details-marker{display:none}
.standalone .supplier-more-actions[open]>div{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.standalone .supplier-more-actions button{min-height:36px;padding:7px 10px;box-shadow:none;font-size:12px}
.standalone .supplier-bank-info{margin:12px 0;padding:14px;border-radius:12px}
.standalone .supplier-bank-info>strong{font-size:13px}
.standalone .bank-info-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;margin:0;padding:12px 0;border-bottom:1px solid #e5e7eb}
.standalone .bank-info-row>.draft-preview-label{grid-column:1;grid-row:1;min-width:0;font-size:12px;line-height:1.4;color:#667080}
.standalone .bank-info-row>.bank-info-value{grid-column:1;grid-row:2;min-width:0;font-size:14px;line-height:1.6;color:#303640}
.standalone .bank-info-row[data-bank-field=account_number]>.bank-info-value{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:18px;font-weight:650;font-variant-numeric:tabular-nums;line-height:1.5;color:#202630}
.standalone .bank-info-row button{grid-column:2;grid-row:1 / span 2;align-self:center;min-height:36px;min-width:52px;margin:0;padding:7px 10px;font-size:12px;border-radius:9px;box-shadow:none}
.standalone #settlement-dialog .bank-info-row button{grid-row:1 / span 2}
.standalone .supplier-bank-info>button[data-copy-bank=all]{min-height:38px;margin-top:12px;padding:8px 12px;font-size:13px;box-shadow:none}
.standalone .supplier-bank-info>.index-hint{font-size:11px;line-height:1.5;margin-top:10px;color:#667080}
.standalone .supplier-bank-info[data-bank-source=library]{margin:4px 0 8px;padding:0;border:0;background:transparent;border-radius:0}
.standalone .supplier-bank-info[data-bank-source=library]>strong{display:none}
.standalone .supplier-library-card:focus-within{outline:none}
.standalone .supplier-library-card button:focus-visible,.standalone .supplier-library-card summary:focus-visible{outline:2px solid #df7279;outline-offset:3px}
@media(max-width:650px){
 .standalone .supplier-search-controls{grid-template-columns:1fr}
 .standalone .supplier-library-card{padding:16px}
 .standalone .supplier-library-card>h3{font-size:17px}
 .standalone #supplier-library-status span{display:block}
 .standalone .bank-info-row[data-bank-field=account_number]>.bank-info-value{font-size:17px}
 .standalone .bank-info-row button,.standalone .supplier-more-actions>summary,.standalone .supplier-library-card>.supplier-source-actions>.supplier-main-action,.standalone .supplier-library-card>.supplier-source-actions>button,.standalone .supplier-library-card .supplier-review-details>button{min-height:44px}
 .standalone .supplier-more-actions>summary{line-height:44px}
}
@media(min-width:0px){
 .standalone .supplier-library-card{background:#1b1c20;border-color:#383b43}
 .standalone .supplier-library-card>h3,.standalone .supplier-library-card .evaluation-score,.standalone #supplier-library-status strong{color:#f1f2f5}
 .standalone .supplier-search-controls label,.standalone #supplier-library-status,.standalone .supplier-cooperation-summary,.standalone .supplier-library-card .supplier-review-details,.standalone .supplier-meta-details,.standalone .supplier-more-actions,.standalone .bank-info-row>.draft-preview-label,.standalone .supplier-bank-info>.index-hint{color:#adb3bf}
 .standalone .supplier-library-card>.supplier-payment-details,.standalone .bank-info-row{border-color:#383b43}
 .standalone .bank-info-row>.bank-info-value{color:#e4e7ed}
 .standalone .bank-info-row[data-bank-field=account_number]>.bank-info-value{color:#fff}
}

/* Approved October layout: clear values, compact secondary information, native flow. */
html:has(body.standalone){background:#f3f5f8}
body.standalone{--ui-canvas:#f3f5f8;--ui-surface:#fff;--ui-soft:#f8f9fc;--ui-ink:#272d38;--ui-muted:#748094;--ui-line:#e7ebf1;--ui-red:#e7293b;--ui-red-soft:#fff0f2;--ui-green:#247763;--ui-green-soft:#eaf7f1;--ui-amber:#a66e20;--ui-amber-soft:#fff5e5;--brand-red:var(--ui-red);--brand-pale:var(--ui-red-soft);--brand-line:var(--ui-line);background:var(--ui-surface);color:var(--ui-ink);font:14px/1.6 "Segoe UI","Microsoft YaHei",Arial,sans-serif;grid-template-columns:204px minmax(0,1fr)}
.standalone [hidden]{display:none!important}.standalone .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
html body.standalone main{max-width:1360px;padding:22px 32px 36px;margin:0 auto;background:var(--ui-surface)}
.standalone .app-sidebar{background:var(--ui-soft);border-color:var(--ui-line);padding:28px 16px;gap:28px}
@media(min-width:651px){.standalone .app-sidebar{position:sticky;top:0;align-self:start;height:100vh;height:100dvh;box-sizing:border-box;overflow-y:auto;overscroll-behavior-y:contain}}
.standalone .app-brand{display:flex;align-items:center;gap:10px;font-size:16px;letter-spacing:0;color:var(--ui-ink);padding:0 7px}
.standalone .app-brand strong{font-weight:700}.standalone .app-brand small{font-size:10px;color:var(--ui-muted);margin-top:3px}
.standalone .company-logo{width:40px;height:40px;flex:none;border-radius:10px}
.standalone .app-topbar .app-mobile-logo{display:none}
.standalone .app-principles{color:var(--ui-muted);font-size:11px}
.standalone #app-navigation{gap:7px;top:16px}
.standalone #app-navigation button{display:flex;align-items:center;gap:11px;padding:12px;min-height:44px;border-radius:10px;background:transparent;color:var(--ui-muted);font-size:13px;line-height:1.5;border:0;box-shadow:none;text-align:left;width:100%;margin:0}
.standalone #app-navigation button[aria-current=page]{background:var(--ui-red-soft);color:var(--ui-red);font-weight:650}
.standalone #app-navigation svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.standalone .app-navigation-more{border:0;margin:20px 0 0;padding:0}.standalone .app-navigation-more>summary{display:none}.standalone .app-more-menu{display:grid;gap:6px}.standalone #app-navigation .app-more-menu button{font-size:12px;min-height:38px;padding:9px 12px}
.standalone .nav-mobile-label{display:none}
.standalone .app-topbar{font-size:11px;color:var(--ui-muted);padding-bottom:18px;border-color:var(--ui-line)}
.standalone #app-account p{font-size:11px}.standalone #app-account button{font-size:11px;padding:6px 10px;min-height:32px}
.standalone .app-page-heading{margin:28px 0 24px;align-items:flex-start;gap:16px}
.standalone .app-page-heading h1{font-size:27px;line-height:1.3;letter-spacing:-.5px;color:var(--ui-ink)}
.standalone .app-page-heading .eyebrow{font-size:10px;letter-spacing:1px;color:var(--ui-muted);display:block;margin-bottom:6px}
.standalone .app-page-heading .lead{font-size:12px;color:var(--ui-muted);margin-top:8px;line-height:1.6}
.standalone .app-page-heading>button{min-height:38px;font-size:12px;padding:8px 14px}
.standalone:not([data-view=suppliers]) #supplier-library-add{display:none}
.standalone button{min-height:38px;padding:8px 14px;font-size:13px;border:1px solid var(--ui-red);border-radius:9px;box-shadow:none;background:var(--ui-red);color:#fff;line-height:1.5}
.standalone button.secondary{border-color:var(--ui-line);background:var(--ui-surface);color:var(--ui-ink);box-shadow:none}
.standalone button:focus-visible,.standalone summary:focus-visible{outline:2px solid var(--ui-red);outline-offset:3px}
.standalone input,.standalone select,.standalone textarea,.standalone .overview-controls select{background:var(--ui-surface);border:1px solid var(--ui-line);color:var(--ui-ink);border-radius:9px;font-size:14px;padding:9px 12px;min-height:42px;line-height:1.6}
.standalone .draft-fields label,.standalone .overview-controls label{font-size:12px;color:var(--ui-muted)}
.standalone .index-hint,.standalone .draft-help,.standalone .draft-scope{font-size:12px;line-height:1.6;color:var(--ui-muted)}
.standalone h2,.standalone h3,.standalone h4{color:var(--ui-ink)}
.standalone .procurement-draft{background:var(--ui-surface);border-color:var(--ui-line);box-shadow:none;border-radius:12px;padding:22px}
.standalone .procurement-draft>summary{color:var(--ui-ink);font-size:16px}
.standalone .supplier-library-heading{display:none}
.standalone #supplier-library-add{min-height:38px;padding:8px 14px;font-size:12px}
.standalone .supplier-search-controls{grid-template-columns:minmax(0,1fr) 240px;gap:12px;margin:0 0 12px}
.standalone .supplier-search-controls label{color:var(--ui-muted);font-size:11px}
.standalone #supplier-library-search,.standalone #supplier-library-sorting{min-height:42px;font-size:14px;margin-top:5px}
.standalone #supplier-library-filters{font-size:12px;color:var(--ui-muted);margin:8px 0 12px}
.standalone #supplier-library-filters>summary{min-height:32px;padding:5px 0}
.standalone #supplier-library-filters .overview-controls{margin:12px 0;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}
.standalone #supplier-library-status{color:var(--ui-muted);font-size:11px;margin:12px 0 18px}
.standalone #supplier-library-status strong{font-size:12px;color:var(--ui-ink);font-weight:500}
.standalone #supplier-library-list{gap:16px;margin-top:0;align-items:start}
.standalone .supplier-library-card{padding:19px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface);color:var(--ui-ink)}
.standalone :is(#supplier-library-list > .supplier-library-card,#supplier-evaluation-list > .evaluation-card){background:color-mix(in srgb,var(--ui-soft) 80%,var(--ui-line));border-color:var(--ui-line)}
.standalone .supplier-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.standalone .supplier-card-head>div{min-width:0;flex:1}
.standalone .supplier-card-head h3,.standalone .supplier-library-card>h3{font-size:17px;line-height:1.5;margin:0;color:var(--ui-ink);overflow-wrap:anywhere}
.standalone .supplier-cooperation-summary{font-size:11px;margin:5px 0 0;color:var(--ui-muted)}
.standalone .supplier-library-card .evaluation-tags{margin:12px 0 0;gap:8px}
.standalone .supplier-category-tags,.standalone .supplier-rating-tags{gap:4px 6px}
.standalone .evaluation-tags .evaluation-tag,.standalone .evaluation-tags button.evaluation-tag,.standalone .evaluation-tags .supplier-rating-tags .evaluation-pending{min-height:18px;line-height:16px;padding:1px 6px;font-size:11px;border-radius:5px}
.standalone .evaluation-tags .supplier-rating-tags button.evaluation-tag,.standalone .evaluation-tags .supplier-rating-tags .evaluation-pending{background:var(--ui-soft);color:var(--ui-muted);font-size:11px}
.standalone .evaluation-tags .supplier-rating-tags button.evaluation-tag.missing{border-color:var(--ui-line)}
.standalone .supplier-library-card .evaluation-score{font-size:14px;line-height:1.5;font-weight:650;color:var(--ui-ink);margin:13px 0 0}
.standalone .supplier-rating-main{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:13px 0 0;line-height:1.5;font-size:12px}.standalone .supplier-rating-main>strong{font-size:15px;color:var(--ui-ink);font-weight:650;font-variant-numeric:tabular-nums}.standalone .supplier-rating-label{font-size:12px;font-weight:500;color:var(--ui-green)}
.standalone .supplier-library-card .supplier-payment-details{margin:16px 0 0;padding-top:10px;border-top:1px solid var(--ui-line)}
.standalone .supplier-payment-details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;font-weight:500;min-height:32px;line-height:1.5;list-style:none;color:var(--ui-ink);cursor:pointer}
.standalone .supplier-payment-details>summary::-webkit-details-marker{display:none}.standalone .supplier-payment-details>summary::after{content:'＋';font-size:16px;color:var(--ui-muted)}.standalone .supplier-payment-details[open]>summary::after{content:'−'}
.standalone .supplier-payment-details>summary small{font-size:10px;color:var(--ui-muted);margin-left:auto}
.standalone .supplier-more-actions{position:relative;color:var(--ui-muted);margin:0!important;padding:0!important;border:0!important;flex:none;z-index:2}
.standalone .supplier-card-head .supplier-more-actions>summary{font-size:18px;line-height:28px;min-height:28px;min-width:28px;text-align:center;padding:0;list-style:none;cursor:pointer}
.standalone .supplier-card-head .supplier-more-actions>summary::after{content:none}
.standalone .supplier-card-head .supplier-more-actions[open]>div{position:absolute;right:0;top:30px;min-width:154px;display:flex;flex-direction:column;gap:4px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:10px;padding:7px;box-shadow:0 8px 24px #10182714;margin:0}
.standalone .supplier-card-head .supplier-more-actions button{min-height:36px;font-size:12px;padding:7px 9px;text-align:left;width:100%;border-color:transparent}
.standalone .supplier-card-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;flex-wrap:wrap}
.standalone .supplier-card-footer>.supplier-main-action{min-height:34px;font-size:12px;padding:6px 12px;line-height:20px;margin:0;border-radius:8px;box-shadow:none}
.standalone .supplier-card-footer>.secondary{min-height:34px;font-size:12px;margin:0;padding:6px 0;border:0;color:var(--ui-muted);background:transparent}
.standalone .supplier-card-history,.standalone .supplier-review-details,.standalone .supplier-cooperation-history,.standalone .supplier-meta-details{font-size:12px;line-height:1.6;color:var(--ui-muted);border-color:var(--ui-line)}
.standalone .supplier-card-history{margin-top:14px;padding-top:10px;border-top:1px solid var(--ui-line)}
.standalone .supplier-card-history>summary{cursor:pointer;min-height:32px;font-size:12px;color:var(--ui-muted)}
.standalone .supplier-card-history .supplier-review-details{margin-top:10px;padding-top:8px;border-top:1px solid var(--ui-line)}
.standalone .supplier-bank-info{background:var(--ui-soft);border-color:var(--ui-line);border-radius:10px;color:var(--ui-ink);padding:14px}
.standalone .supplier-bank-info[data-bank-source=library]{background:transparent;border:0;padding:0;margin:4px 0 8px}
.standalone .bank-info-row{gap:3px 10px;padding:11px 0;border-color:var(--ui-line)}
.standalone .bank-info-row>.draft-preview-label{font-size:11px;color:var(--ui-muted);line-height:1.5}
.standalone .bank-info-row>.bank-info-value{font-size:14px;color:var(--ui-ink);line-height:1.6;overflow-wrap:anywhere}
.standalone .bank-info-row[data-bank-field=account_number]>.bank-info-value{font-size:18px;color:var(--ui-ink);font-weight:650;line-height:1.5}
.standalone .bank-info-row button{min-height:32px;min-width:44px;font-size:11px;padding:6px 9px;border-radius:7px;margin:0}
.standalone .supplier-bank-info>button[data-copy-bank=all]{min-height:34px;font-size:12px;padding:7px 11px;margin-top:12px}
.standalone .supplier-bank-info>.index-hint{font-size:11px;color:var(--ui-muted);line-height:1.5}
.standalone #supplier-editor-dialog,.standalone #supplier-opinion-dialog,.standalone #quick-supplier-dialog,.standalone #settlement-dialog{background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line);border-radius:16px;padding:24px}
.standalone #supplier-editor-dialog h2,.standalone #supplier-opinion-dialog h2,.standalone #quick-supplier-dialog h2,.standalone #settlement-dialog h2{font-size:21px;color:var(--ui-ink)}
.standalone #settlement-dialog .supplier-bank-info{background:var(--ui-soft);color:var(--ui-ink)}
.standalone .settlement-amounts{background:var(--ui-soft);padding:15px;border-radius:10px;gap:12px}
.standalone .settlement-amounts span{color:var(--ui-muted);font-size:11px}.standalone .settlement-amounts strong{color:var(--ui-ink);font-size:20px}
.standalone #supplier-opinion-dialog select,.standalone #supplier-opinion-dialog textarea,.standalone #supplier-opinion-order-search,.standalone #settlement-dialog input,.standalone #settlement-dialog textarea{background:var(--ui-surface);border-color:var(--ui-line);color:var(--ui-ink)}

/* The overview and complete payment list share records, with separate purposes. */
.standalone:not([data-view=overview]) #work-overview{display:none}.standalone[data-view=overview] #payment-dashboard{display:none}.standalone[data-view=payments] #payment-dashboard{display:block}
.standalone #work-overview{margin:0;border:0;background:transparent;padding:0}
.work-overview-stats{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:24px;padding-bottom:24px;margin-bottom:28px;border-bottom:1px solid var(--ui-line)}
.work-overview-stat{min-width:0}.work-overview-stat>span{font-size:11px;color:var(--ui-muted)}.work-overview-stat>strong{display:block;font-size:27px;line-height:1.3;font-weight:650;margin:6px 0;letter-spacing:-.5px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.work-overview-stat:first-child>strong{font-size:31px}.work-overview-stat>small{display:block;font-size:11px;color:var(--ui-muted)}
.work-overview-grid{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:28px}.work-overview-main,.work-overview-aside{min-width:0}
.work-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.work-section-heading h3{font-size:16px;margin:0}.work-section-heading button{background:transparent!important;color:var(--ui-muted)!important;border:0!important;margin:0;font-size:11px;padding:5px 0}
.work-task-list{display:grid;gap:12px}.work-task-card{border:1px solid var(--ui-line);padding:16px;border-radius:12px;min-width:0}.work-task-card.urgent{border-left:3px solid var(--ui-red)}
.work-task-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.work-task-summary{flex:1;min-width:0}.work-task-summary h3,.work-task-summary h4{font-size:14px;line-height:1.5;margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.work-task-summary p,.work-task-summary small{font-size:11px;line-height:1.6;color:var(--ui-muted);margin:4px 0 0;display:block}
.work-task-amount{flex:0 0 auto;font-size:20px;font-weight:650;letter-spacing:-.3px;line-height:1.5;min-width:0;max-width:45%;overflow-wrap:anywhere;text-align:right;font-variant-numeric:tabular-nums}.work-task-amount small{display:block;font-size:10px;font-weight:400;color:var(--ui-muted)}.work-task-registered strong{font-size:13px;letter-spacing:0}
.work-task-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px}.work-task-bottom>div{min-width:0}.work-task-bottom span{display:inline-block;font-size:11px;padding:2px 7px;border-radius:5px;background:var(--ui-soft);color:var(--ui-muted)}.work-task-bottom p,.work-task-bottom small{font-size:11px;line-height:1.6;color:var(--ui-muted);margin:4px 0 0}.work-task-card.urgent .work-task-bottom span{background:var(--ui-red-soft);color:var(--ui-red)}.work-task-card.soon .work-task-bottom span{background:var(--ui-amber-soft);color:var(--ui-amber)}.work-task-card.later .work-task-bottom span{background:var(--ui-green-soft);color:var(--ui-green)}.work-task-bottom button{min-height:38px;margin:0;font-size:12px;white-space:nowrap;flex:none}
.work-side-block{padding-bottom:22px;margin-bottom:22px;border-bottom:1px solid var(--ui-line)}.work-side-block h3{font-size:14px;margin:0 0 12px}.work-schedule-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:14px 0;font-size:12px}.work-schedule-row small{display:block;color:var(--ui-muted);font-size:10px;margin-top:3px}.work-schedule-row>strong{font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;max-width:55%;text-align:right}
.work-quiet-list{display:grid;gap:8px}.work-quiet-list .work-entry{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:4px 12px;text-align:left;border:0;background:transparent;color:var(--ui-ink);padding:6px 0;font-size:12px;min-height:36px;margin:0}.work-entry span{min-width:0;overflow-wrap:anywhere}.work-entry small{font-size:11px;color:var(--ui-muted);min-width:0;overflow-wrap:anywhere}.work-overview-note,.work-overview-empty,#work-overview-status{font-size:11px;line-height:1.6;color:var(--ui-muted)}#work-overview-status:empty{display:none}
.standalone #payment-dashboard{border:0;padding:0;background:transparent;box-shadow:none}
.standalone .payment-metrics{grid-template-columns:1.5fr 1fr 1fr 1fr;gap:20px;margin:0 0 18px;padding-bottom:24px;border-bottom:1px solid var(--ui-line)}
.standalone .payment-metric{border:0;padding:0;box-shadow:none;background:transparent;border-radius:0;min-width:0}.standalone .payment-metric span{color:var(--ui-muted);font-size:11px;line-height:1.5}.standalone .payment-metric strong{color:var(--ui-ink);font-size:23px;font-weight:650;margin-top:6px;line-height:1.4;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.standalone .payment-metric:first-child strong{font-size:31px}
.standalone #dashboard-status{font-size:11px;color:var(--ui-muted);margin:12px 0}.standalone #dashboard-refresh,.standalone #dashboard-overview{font-size:12px;min-height:34px;margin:0 8px 0 0;padding:6px 10px}
.standalone .dashboard-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:18px 0}.standalone .dashboard-controls label{font-size:11px}.standalone .dashboard-view-options{min-width:0;background:transparent;padding:0;border:0;border-radius:0}.standalone .dashboard-view-options>summary{font-size:12px;color:var(--ui-muted);min-height:42px;line-height:1.6;padding:10px 0}.standalone .dashboard-extra-controls{gap:12px}
.standalone .payment-priority-section{background:transparent;box-shadow:none;border:0;padding:0;margin:22px 0}.standalone .payment-priority-section h3{font-size:15px;margin:0 0 10px}.standalone .payment-priority-cards{grid-template-columns:1fr;gap:10px;margin:0}
.standalone .payment-priority-card{position:relative;padding:17px;border-radius:11px;border-color:var(--ui-line);background:var(--ui-surface);display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:18px;align-items:center;color:var(--ui-ink)}
.standalone .payment-priority-card.urgent{background:var(--ui-red-soft);border-color:var(--ui-red)}.standalone .payment-priority-card.soon{background:var(--ui-surface);border-color:var(--ui-line)}.standalone .payment-priority-card.later{background:var(--ui-surface);border-color:var(--ui-line)}
.standalone .payment-priority-card .payment-urgency{grid-column:1;display:inline-block;width:fit-content;font-size:11px;line-height:1.5;color:var(--ui-red);overflow-wrap:anywhere;margin:0}
.standalone .payment-priority-card.soon .payment-urgency{color:var(--ui-amber)}.standalone .payment-priority-card.later .payment-urgency{color:var(--ui-green)}
.standalone .payment-priority-card h4{grid-column:1;font-size:15px;line-height:1.5;margin:6px 0 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.standalone .payment-priority-card>p{grid-column:1;font-size:11px;line-height:1.6;color:var(--ui-muted);margin:4px 0 0}
.standalone .payment-priority-card .payment-card-amount{grid-column:2;grid-row:1 / span 3;align-self:center;font-size:23px;color:var(--ui-ink);font-weight:650;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;margin:0}
.standalone .payment-priority-card>button{grid-column:2;grid-row:4 / span 2;align-self:end;justify-self:end;width:auto;min-height:38px;margin:8px 0 0;font-size:12px;padding:8px 12px;box-shadow:none;color:var(--ui-ink);border-color:var(--ui-line);background:var(--ui-surface)}.standalone .payment-priority-card.urgent>button{background:var(--ui-red);color:#fff;border-color:var(--ui-red)}
.standalone .payment-future>summary{font-size:12px;color:var(--ui-muted);min-height:32px;cursor:pointer}
.standalone .dashboard-scope{background:var(--ui-soft);color:var(--ui-muted);border:0;border-radius:9px;padding:12px;font-size:12px}
.standalone #procurement-overview-search{border:0;padding:0;background:transparent;margin:0 0 20px}.standalone #submitted-orders{border:0;padding:0;background:transparent}.standalone #submitted-orders>h2,.standalone #submitted-orders>p:not([role=status]){display:none}
.standalone .order-card,.standalone .server-draft-card{border-color:var(--ui-line);border-radius:12px;background:var(--ui-surface);color:var(--ui-ink)}
@media(min-width:0px){html:has(body.standalone){background:#0e1118}body.standalone{--ui-canvas:#0e1118;--ui-surface:#181d27;--ui-soft:#202634;--ui-ink:#eef1f6;--ui-muted:#a3aec1;--ui-line:#2c3445;--ui-red:#ef4655;--ui-red-soft:#3a222c;--ui-green:#95d7bf;--ui-green-soft:#213b36;--ui-amber:#ebc285;--ui-amber-soft:#3b3326}}
@media(max-width:900px) and (min-width:651px){body.standalone{grid-template-columns:180px minmax(0,1fr)}html body.standalone main{padding:22px}.work-overview-grid{grid-template-columns:1fr}.work-overview-aside{display:none}.standalone .app-sidebar{padding:24px 10px}.standalone .app-brand{gap:7px;font-size:14px}.standalone .app-brand small{font-size:9px}.standalone .payment-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.standalone .supplier-search-controls{grid-template-columns:1fr}}
@media(max-width:650px){
 body.standalone{display:block}.standalone .app-sidebar{display:none}.standalone[data-authenticated=true] .app-sidebar{display:contents}.standalone .app-sidebar>.app-brand,.standalone .app-principles{display:none}
 html body.standalone main{padding:17px max(16px,env(safe-area-inset-right)) 25px max(16px,env(safe-area-inset-left))}.standalone[data-authenticated=true] main{padding-bottom:calc(86px + env(safe-area-inset-bottom))!important}
 .standalone .app-topbar{padding-bottom:14px}.standalone #app-account p{font-size:10px}.standalone #app-account button{min-height:36px;font-size:10px}
 .standalone .app-page-heading{margin:22px 0;flex-wrap:nowrap;gap:12px}.standalone .app-page-heading h1{font-size:24px}.standalone .app-page-heading .lead{font-size:11px}.standalone .app-page-heading .eyebrow{font-size:9px}.standalone .app-page-heading>button{font-size:11px;min-height:44px;padding:8px 11px}
 .standalone #app-navigation{display:flex;position:fixed;top:auto;left:0;right:0;bottom:0;padding:7px max(5px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));border-top:1px solid var(--ui-line);background:var(--ui-surface);overflow:visible;gap:3px;box-shadow:none;z-index:30}
 .standalone #app-navigation>button,.standalone .app-navigation-more>summary{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:auto;min-width:0;min-height:48px;font-size:10px;padding:5px 1px;white-space:nowrap;border:0;border-radius:7px;line-height:1.5;text-align:center;color:var(--ui-muted);background:transparent;cursor:pointer}
 .standalone #app-navigation>button[aria-current=page]{color:var(--ui-red);background:transparent}.standalone .nav-desktop-label{display:none}.standalone .nav-mobile-label{display:inline}
 .standalone .app-navigation-more:has(button[aria-current=page])>summary{color:var(--ui-red)}
 .standalone .app-navigation-more{flex:1;position:static;margin:0;min-width:0}.standalone .app-navigation-more>summary::-webkit-details-marker{display:none}.standalone .app-navigation-more>summary{list-style:none}
 .standalone .app-more-menu{position:absolute;bottom:calc(100% + 8px);right:max(12px,env(safe-area-inset-right));left:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;background:var(--ui-surface);border:1px solid var(--ui-line);padding:8px;border-radius:12px;box-shadow:0 8px 26px #0002}
 .standalone .app-navigation-more:not([open])>.app-more-menu{display:none}.standalone #app-navigation .app-more-menu button{font-size:12px;min-height:44px;padding:10px}
 .standalone[data-member-role=pm] .app-navigation-more>summary{display:none}.standalone[data-member-role=pm] .app-navigation-more{flex:1}.standalone[data-member-role=pm] .app-more-menu{position:static;border:0;box-shadow:none;padding:0;display:flex;background:transparent}.standalone[data-member-role=pm] #app-navigation .app-more-menu button{flex:1;flex-direction:column;align-items:center;gap:3px;font-size:10px;background:transparent;color:var(--ui-red)}
 .standalone button{min-height:44px}.standalone input,.standalone select,.standalone textarea,.standalone .overview-controls select{font-size:16px;min-height:44px}
 .standalone .procurement-draft{padding:16px}.standalone #supplier-library{padding:0}.standalone #supplier-library-add{min-height:44px}
 .standalone .supplier-search-controls{grid-template-columns:1fr;gap:10px;margin-bottom:12px}.standalone #supplier-library-search,.standalone #supplier-library-sorting{font-size:16px;min-height:44px}
 .standalone #supplier-library-filters>summary{min-height:44px;line-height:1.6;padding:10px 0}.standalone #supplier-library-filters .overview-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .standalone #supplier-library-status{font-size:11px;line-height:1.6}.standalone #supplier-library-status span{display:inline}.standalone .supplier-library-card{padding:16px}.standalone .supplier-card-head h3{font-size:17px}
 .standalone .supplier-card-head .supplier-more-actions>summary{min-width:44px;min-height:44px;line-height:44px;margin:-7px -6px 0 0}.standalone .supplier-card-head .supplier-more-actions[open]>div{top:40px}.standalone .supplier-card-head .supplier-more-actions button{min-height:44px}
 .standalone .supplier-card-footer>.supplier-main-action,.standalone .supplier-card-footer>.secondary,.standalone .supplier-payment-details>summary,.standalone .bank-info-row button,.standalone .supplier-bank-info>button[data-copy-bank=all]{min-height:44px}
 .standalone .supplier-card-footer>.supplier-main-action{font-size:12px}.standalone .bank-info-row button{min-width:48px;font-size:11px}.standalone .bank-info-row>.draft-preview-label{font-size:11px}.standalone .bank-info-row>.bank-info-value{font-size:14px}.standalone .bank-info-row[data-bank-field=account_number]>.bank-info-value{font-size:18px}
 .standalone #supplier-editor-dialog,.standalone #supplier-opinion-dialog,.standalone #quick-supplier-dialog,.standalone #settlement-dialog{padding:20px}.standalone #supplier-editor-dialog h2,.standalone #supplier-opinion-dialog h2,.standalone #quick-supplier-dialog h2,.standalone #settlement-dialog h2{font-size:19px}
 .work-overview-stats{grid-template-columns:1.4fr 1fr 1fr;gap:12px;padding-bottom:20px;margin-bottom:23px}.work-overview-stat>span,.work-overview-stat>small{font-size:10px}.work-overview-stat>strong,.work-overview-stat:first-child>strong{font-size:22px}
 .work-overview-grid{grid-template-columns:1fr}.work-overview-aside{display:none}.work-task-card{padding:14px}.work-task-top{gap:8px}.work-task-summary h3,.work-task-summary h4{font-size:13px}.work-task-amount{font-size:18px}.work-task-bottom{align-items:flex-start}.work-task-bottom>div{max-width:65%}.work-task-bottom p{font-size:10px}.work-task-bottom button{min-height:44px;font-size:11px;padding:8px 10px}.work-section-heading h3{font-size:16px}.work-section-heading button{min-height:44px}
 .standalone .payment-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding-bottom:20px}.standalone .payment-metric:first-child{grid-column:1/-1}.standalone .payment-metric strong{font-size:21px}.standalone .payment-metric:first-child strong{font-size:31px}.standalone .payment-metric span{font-size:11px}
 .standalone .dashboard-controls{grid-template-columns:1fr;margin:16px 0;gap:6px}.standalone .dashboard-view-options>summary{min-height:44px}.standalone #dashboard-refresh,.standalone #dashboard-overview{min-height:44px}
 .standalone .payment-priority-card{padding:14px;column-gap:12px}.standalone .payment-priority-card h4{font-size:14px}.standalone .payment-priority-card>p{font-size:11px}.standalone .payment-priority-card .payment-card-amount{grid-column:1;grid-row:auto;text-align:left;font-size:22px;margin:12px 0 0}.standalone .payment-priority-card>button{grid-column:2;grid-row:auto;min-height:44px;font-size:12px;padding:8px 11px}.standalone .payment-priority-card>p{grid-column:1/-1}
 .standalone .supplier-active-filters button{min-height:44px;font-size:12px}.standalone .overview-controls{gap:12px}.standalone .settlement-amounts{grid-template-columns:1fr}
}

/* Procurement entry: project identity first, then one payment proposal. */
.standalone[data-view=new] #procurement-draft{border:0;padding:0;margin:0;background:transparent}
.standalone[data-view=new] #procurement-draft>summary,.standalone[data-view=new] #procurement-draft>.draft-scope{display:none}
.standalone[data-view=orders] #new-server-draft{display:none}
.standalone[data-view=new] .app-page-heading{max-width:920px}
.standalone #procurement-draft-form{width:100%;max-width:920px}
.standalone .procurement-form-layout{display:flex;flex-direction:column;align-items:stretch;gap:20px}
.standalone .procurement-form-section{box-sizing:border-box;width:100%;min-width:0;border:1px solid var(--ui-line);border-radius:12px;padding:24px;background:var(--ui-surface)}
.standalone .procurement-section-heading{display:flex;align-items:center;gap:10px;margin:0 0 20px;color:var(--ui-ink);font-size:16px;font-weight:650;line-height:1.5}
.standalone .procurement-section-heading h2,.standalone .procurement-section-heading h3{font:inherit;margin:0}
.standalone .procurement-section-heading>span:first-child{display:inline-flex;align-items:center;justify-content:center;flex:none;width:26px;height:26px;background:var(--ui-red-soft);color:var(--ui-red);font-size:12px;border-radius:8px}
.standalone .procurement-section-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 14px;margin:0}
.standalone .procurement-project-fields{grid-template-columns:220px minmax(0,1fr);gap:20px 16px}
.standalone .procurement-project-content textarea{min-height:76px;line-height:1.6;resize:vertical;white-space:pre-wrap;overflow-wrap:anywhere}
.standalone .procurement-project-content-value{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:14px;font-weight:650;color:var(--ui-ink)}
.standalone .procurement-project-content-empty{color:var(--ui-muted);font-size:12px;line-height:1.6}
.standalone .work-task-summary>.procurement-project-content-value,.standalone .payment-priority-card>.procurement-project-content-value{font-size:14px;color:var(--ui-ink);margin:8px 0;max-width:none}
.standalone #procurement-draft-form label{min-width:0;font-size:12px;color:var(--ui-muted);gap:7px}
.standalone #procurement-draft-form input,.standalone #procurement-draft-form select,.standalone #procurement-draft-form textarea{box-sizing:border-box;min-width:0;width:100%;font-size:14px;min-height:46px;line-height:1.5;padding:11px 12px}
.standalone #procurement-draft-form input,.standalone #procurement-draft-form select{height:46px}
.standalone .procurement-field-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;margin:0 0 7px;color:var(--ui-muted)}
.standalone .procurement-field-heading button,.standalone .procurement-field-heading #new-project-code{width:auto;min-width:44px;min-height:32px;padding:5px 6px;margin:0;background:transparent;color:var(--ui-red);border:0;border-radius:5px;font-size:12px}
.standalone .procurement-supplier-controls{display:grid;grid-template-columns:220px minmax(0,1fr);gap:16px;min-width:0}
.standalone .procurement-supplier-controls>#draft-supplier-search{grid-column:1;grid-row:1}
.standalone .procurement-supplier-controls>#draft-server-supplier{grid-column:2;grid-row:1}
.standalone .procurement-supplier-controls>#draft-supplier-search-result{grid-column:1/-1;grid-row:2;margin:0;min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.6}
.standalone #draft-supplier-search[hidden]~select{grid-column:1/-1}
.standalone #draft-server-supplier-field{gap:0}
.standalone #draft-server-supplier-field{display:flex;flex-direction:column}
.standalone #draft-supplier-search{margin:0}
.standalone #draft-supplier-bank{margin:0}
.standalone #draft-supplier-bank>details{margin:0;padding:0;border:0;font-size:12px;color:var(--ui-muted)}
.standalone #draft-supplier-bank>details>summary{cursor:pointer;min-height:34px;line-height:1.6;padding:6px 0}
.standalone #draft-supplier-bank .supplier-bank-info{background:var(--ui-soft);margin:8px 0 0;padding:12px}
.standalone .procurement-payment-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:0;padding:0;margin:0 0 20px;min-width:0}
.standalone .procurement-payment-modes legend{font-size:12px;color:var(--ui-muted);margin-bottom:9px}
.standalone #procurement-draft-form .procurement-payment-mode{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:3px 9px;padding:16px;border:1px solid var(--ui-line);border-radius:10px;color:var(--ui-ink);cursor:pointer;background:var(--ui-surface)}
.standalone #procurement-draft-form .procurement-payment-mode:has(input:checked){border-color:var(--ui-red);background:var(--ui-red-soft)}
.standalone #procurement-draft-form .procurement-payment-mode input{width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:var(--ui-red)}
.standalone .procurement-payment-mode strong{font-size:14px;line-height:1.5;font-weight:650}
.standalone .procurement-payment-mode>span{display:flex;flex-direction:column;gap:3px;min-width:0}
.standalone .procurement-payment-mode small{font-size:11px;line-height:1.6;color:var(--ui-muted);grid-column:2}
.standalone #draft-payment-unselected{font-size:12px;color:var(--ui-muted);background:var(--ui-soft);padding:14px;border-radius:8px;margin:0}
.standalone #draft-payment-total-field{margin:0 0 20px}
.standalone #draft-payment-total-field input{font-size:18px;font-weight:650;font-variant-numeric:tabular-nums;line-height:1.5;height:46px;min-height:46px;padding:8px 12px}
.standalone #draft-single-payment-fields,.standalone #draft-installments-fields{min-width:0}
.standalone #draft-installment-list{display:flex;flex-direction:column;gap:10px;margin:0 0 12px}
.standalone .procurement-installment-row{display:grid;grid-template-columns:52px minmax(0,1fr) minmax(0,1fr) 44px;gap:14px;align-items:end;padding:16px 0;border-top:1px solid var(--ui-line);min-width:0}
.standalone .procurement-installment-number{display:flex;align-items:center;min-height:46px;white-space:nowrap;color:var(--ui-muted);font-size:12px;line-height:1.5}
.standalone .procurement-installment-row label{display:flex;flex-direction:column;margin:0}
.standalone #procurement-draft-form .procurement-installment-remove{min-width:44px;min-height:46px;padding:6px;margin:0;border-color:transparent;color:var(--ui-muted);background:transparent;font-size:12px;line-height:1.5}
.standalone #procurement-draft-form .procurement-installment-overbudget{border-color:var(--ui-red);background:var(--ui-red-soft)}
.standalone #procurement-draft-form .procurement-installment-overbudget:focus-visible{outline-color:var(--ui-red)}
.standalone #procurement-draft-form .procurement-installment-budget-pulse{animation:procurement-budget-breath .65s ease-in-out 2}
.standalone .procurement-budget-error{margin:7px 0 0;font-size:12px;line-height:1.6;color:var(--ui-red);overflow-wrap:anywhere}
.standalone .procurement-total-hint{font-size:11px;line-height:1.6;color:var(--ui-muted)}
@keyframes procurement-budget-breath{0%,100%{box-shadow:0 0 0 0 rgba(244,63,94,0)}50%{box-shadow:0 0 0 4px rgba(244,63,94,.28)}}
@media(prefers-reduced-motion:reduce){.standalone #procurement-draft-form .procurement-installment-budget-pulse{animation:none}}
.standalone #draft-add-installment{min-height:36px;margin:0;font-size:12px;padding:7px 10px}
.standalone .procurement-payment-summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 20px;background:var(--ui-soft);padding:14px;border-radius:9px;margin:16px 0 0;line-height:1.6;font-size:12px;color:var(--ui-muted);overflow-wrap:anywhere}
.standalone .procurement-payment-summary strong{color:var(--ui-ink);font-size:18px;font-variant-numeric:tabular-nums;font-weight:650}
.standalone .procurement-payment-summary[data-state=balanced]{background:var(--ui-green-soft);color:var(--ui-green)}
.standalone .procurement-payment-summary[data-state=mismatch],.standalone .procurement-payment-summary[data-state=incomplete]{background:var(--ui-amber-soft);color:var(--ui-amber)}
.standalone #draft-legacy-payment-fields{padding:14px;background:var(--ui-soft);border-radius:9px;margin-top:14px;min-width:0}
.standalone #draft-legacy-payment-fields>p{font-size:12px;line-height:1.6;color:var(--ui-muted);margin:0 0 12px}
.standalone .procurement-note-details{grid-column:1/-1;border:0;border-top:1px solid var(--ui-line);margin:20px 0 0;padding:14px 0 0;min-width:0;color:var(--ui-muted)}
.standalone .procurement-note-details>summary{font-size:13px;cursor:pointer;min-height:34px;line-height:1.6}
.standalone .procurement-note-details label{display:flex;flex-direction:column;margin:12px 0 0}
.standalone .procurement-form-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:20px 0 0;padding:0;border:0}
.standalone .procurement-form-actions,.standalone #procurement-draft-form>.draft-help,.standalone #draft-status,.standalone #draft-preview{grid-column:1/-1}
.standalone .procurement-form-actions button{margin:0;min-height:42px;padding:9px 17px;font-size:13px}
.standalone .procurement-form-actions button[type=submit]{background:transparent;border-color:transparent;color:var(--ui-muted);padding:9px 4px}
.standalone #procurement-draft .draft-help{margin:14px 0 0;font-size:11px}
.standalone #draft-status{margin:12px 0 0;color:var(--ui-muted);font-size:12px;line-height:1.6}
.standalone .procurement-proposal-readonly{padding:14px;background:var(--ui-soft);border-radius:10px;margin:14px 0;color:var(--ui-ink);min-width:0;overflow-wrap:anywhere}
.standalone .procurement-proposal-readonly>strong{display:block;font-size:14px;margin-bottom:10px}
.standalone .procurement-proposal-periods{display:grid;gap:6px;font-size:12px;margin-top:10px}
.standalone .procurement-proposal-periods>*{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:8px 0;border-top:1px solid var(--ui-line)}
@media(max-width:1000px){
 .standalone .procurement-project-fields,.standalone .procurement-supplier-controls{grid-template-columns:minmax(0,1fr)}
 .standalone .procurement-supplier-controls>#draft-supplier-search,.standalone .procurement-supplier-controls>#draft-server-supplier,.standalone .procurement-supplier-controls>#draft-supplier-search-result{grid-column:1/-1;grid-row:auto}
 .standalone .procurement-installment-row{grid-template-columns:minmax(0,1fr) 44px;gap:10px 8px;padding:12px 0}
 .standalone .procurement-installment-number{grid-column:1;grid-row:1;min-height:44px}.standalone .procurement-installment-row label{grid-column:1/-1;grid-row:auto}
 .standalone #procurement-draft-form .procurement-installment-remove{grid-column:2;grid-row:1;min-height:44px;min-width:44px;margin:0;padding:8px 3px}
}
@media(max-width:650px){
 .standalone .procurement-form-layout{gap:16px}.standalone .procurement-form-section{padding:16px}.standalone .procurement-section-heading{margin-bottom:16px;font-size:16px}
 .standalone .procurement-section-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 .standalone .procurement-supplier-controls{grid-template-columns:minmax(0,1fr);gap:12px}
 .standalone #procurement-draft-form input,.standalone #procurement-draft-form select,.standalone #procurement-draft-form textarea{font-size:16px;min-height:44px}
 .standalone #draft-payment-total-field input{font-size:20px;height:48px;min-height:48px}
 .standalone .procurement-field-heading{min-height:44px}
 .standalone .procurement-field-heading button,.standalone .procurement-field-heading #new-project-code{min-height:44px;padding:8px 3px}
 .standalone #procurement-draft-form .procurement-payment-mode{padding:12px;min-height:78px;gap:4px 8px}.standalone .procurement-payment-mode strong{font-size:13px}
 .standalone .procurement-installment-row input{padding:9px 10px;font-size:16px}
 .standalone #draft-add-installment{min-height:44px}.standalone .procurement-payment-summary{padding:12px;font-size:12px}.standalone .procurement-payment-summary strong{font-size:19px}
 .standalone .procurement-form-actions{gap:10px;margin-top:20px}.standalone .procurement-form-actions button{min-height:44px}.standalone .procurement-form-actions #submit-procurement{flex:1;min-width:140px}
 .standalone .procurement-form-actions button[type=submit]{width:100%;text-align:left;min-height:44px}
 .standalone #draft-supplier-bank>details>summary,.standalone .procurement-note-details>summary{min-height:44px;padding:8px 0}
}

/* Mobile workspace: keep useful content wide and actions within thumb reach. */
.standalone .app-mobile-back{display:none}
@media(max-width:650px){
 html:has(body.standalone[data-authenticated=true]),body.standalone[data-authenticated=true]{overscroll-behavior-x:none}
}
@media(max-width:900px){
 .standalone input:not([type=radio]):not([type=checkbox]),.standalone select,.standalone textarea{font-size:16px!important;max-width:100%;min-width:0}
 .standalone input[type=date]{-webkit-appearance:none;appearance:none;text-align:left}
 .standalone dialog{box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(var(--mobile-viewport-height,100dvh) - 24px);overflow-y:auto;overscroll-behavior-y:contain;scroll-padding-block:16px;min-width:0;background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
 .standalone :is(#supplier-editor-dialog,#supplier-opinion-dialog,#quick-supplier-dialog,#settlement-dialog,#supplier-link-dialog){max-width:calc(100vw - 24px);max-height:calc(var(--mobile-viewport-height,100dvh) - 24px)}
 .standalone dialog :is(input,textarea,select){width:100%;min-width:0;max-width:100%;scroll-margin-block:16px}
 .standalone dialog button{min-height:44px}
 .standalone dialog>form,.standalone dialog .draft-fields{min-width:0}
 .standalone dialog :is(h2,h3,p,label){overflow-wrap:anywhere}
 .standalone :is(.order-details,.payment-arrangements,.confirm-payment,.payment-ledger,.payment-correction,.payment-void-history,.payment-plan-proposal,.supplier-meta-details,.supplier-card-history,.supplier-review-details,.quotation-group,.draft-sort-options)>summary{min-height:44px;padding-block:10px;line-height:1.6}
}
@media(max-width:650px){
 html:has(body.standalone dialog[open]){overflow:hidden;overscroll-behavior:none}
 body.standalone:has(dialog[open]){overflow:hidden}
 html body.standalone main{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
 .standalone[data-mobile-keyboard=true] #app-navigation{display:none}
 html body.standalone[data-authenticated=true][data-mobile-keyboard=true] main{padding-bottom:calc(24px + env(safe-area-inset-bottom))!important}
 .standalone .app-topbar{gap:8px;min-height:44px;padding-bottom:10px;flex-wrap:wrap}
 .standalone .app-topbar>span{display:none}
 .standalone .app-topbar .app-mobile-logo{display:block;width:32px;height:32px;border-radius:8px}
 .standalone #app-account{flex:1;width:auto;justify-content:space-between;gap:8px;flex-wrap:nowrap;min-width:0}
 .standalone #app-account p{min-width:0;overflow-wrap:anywhere;font-size:11px;line-height:1.5}
 .standalone #app-account button{flex:none;min-height:44px;font-size:11px;padding:8px 10px}
 .standalone .app-page-heading{margin:18px 0 20px;gap:10px;align-items:flex-start;flex-wrap:wrap}
 .standalone .app-page-heading>div{min-width:0;flex:1}
 .standalone .app-page-heading h1{margin:0;font-size:25px;line-height:1.35}
 .standalone .app-page-heading .eyebrow{display:none}
 .standalone .app-page-heading .lead{font-size:12px;line-height:1.6;margin:7px 0 0}
 .standalone .app-page-heading>button{flex:none;font-size:12px;padding:9px 12px}
 .standalone .app-page-heading>.app-mobile-back{display:flex;align-items:center;justify-content:flex-start;order:-1;flex-basis:100%;min-height:44px;width:100%;padding:6px 0;margin:-8px 0 0;border:0;background:transparent;color:var(--ui-muted);font-size:12px}
 .standalone #app-navigation{padding-bottom:max(7px,env(safe-area-inset-bottom));gap:2px}
 .standalone #app-navigation>button,.standalone .app-navigation-more>summary{min-height:48px;font-size:11px}
 .standalone .app-more-menu{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));gap:4px;max-height:calc(var(--mobile-viewport-height,100dvh) - 100px);overflow-y:auto;overscroll-behavior-y:contain}

 .standalone .procurement-form-layout{gap:0}
 .standalone .procurement-form-section{padding:18px 0 22px;border:0;border-top:1px solid var(--ui-line);border-radius:0;background:transparent}
 .standalone .procurement-form-section:first-child{padding-top:4px;border-top:0}
 .standalone .procurement-section-heading{font-size:16px;margin-bottom:14px}
 .standalone .procurement-section-fields{gap:14px}
 .standalone .procurement-field-heading{margin-bottom:5px;min-height:28px}
 .standalone .procurement-field-heading:has(button:not([hidden])){min-height:44px}
 .standalone #procurement-draft-form label{font-size:12px;gap:6px}
 .standalone #procurement-draft-form :is(input,select){height:46px;min-height:46px;padding:10px 12px}
 .standalone #procurement-draft-form textarea{padding:10px 12px;min-height:88px}
 .standalone #procurement-draft-form .procurement-payment-mode{padding:12px 10px;gap:4px 8px;min-height:76px;grid-template-columns:16px minmax(0,1fr)}
 .standalone #procurement-draft-form .procurement-payment-mode input{height:16px;min-height:0;width:16px;padding:0}
 .standalone .procurement-payment-mode strong{font-size:14px}
 .standalone .procurement-payment-mode small{font-size:11px}
 .standalone #draft-payment-total-field{margin-bottom:14px}
 .standalone #draft-payment-total-field input{font-size:21px!important;min-height:48px;height:48px}
 .standalone .procurement-installment-row{gap:8px;padding:10px 0 16px}
 .standalone .procurement-installment-number{min-height:44px;font-weight:600;font-size:12px}
 .standalone #procurement-draft-form .procurement-installment-remove{font-size:12px}
 .standalone #draft-installment-list{gap:0;margin-bottom:8px}
 .standalone #draft-add-installment{width:100%;margin:0;font-size:13px}
 .standalone .procurement-payment-summary{align-items:flex-start;gap:5px 12px;padding:12px;margin-top:14px}
 .standalone .procurement-payment-summary strong{font-size:19px}
 .standalone .procurement-note-details{margin-top:18px;padding-top:8px}
 .standalone .procurement-form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
 .standalone .procurement-form-actions #submit-procurement{grid-column:1/-1;min-width:0;width:100%;font-weight:650}
 .standalone .procurement-form-actions button{font-size:13px;margin:0;padding:9px 8px;width:100%;min-width:0}
 .standalone .procurement-form-actions button[type=submit]{width:100%;text-align:center;border-color:var(--ui-line);padding:9px 8px;background:var(--ui-surface)}
 .standalone #draft-preview{padding:14px 0;background:transparent;border:0;border-top:1px solid var(--ui-line);border-radius:0}
 .standalone #draft-preview p{font-size:14px;line-height:1.6}

 .standalone .supplier-search-controls{gap:10px}
 .standalone #supplier-library-status{margin:10px 0 14px;line-height:1.7}
 .standalone #supplier-library-list{--supplier-grid-gap:12px;gap:var(--supplier-grid-gap)}
 .standalone .supplier-library-card{padding:14px;border-radius:12px}
 .standalone .supplier-card-head h3{font-size:17px;line-height:1.5}
 .standalone .supplier-card-head .supplier-more-actions>summary{margin:-6px -5px 0 0}
 .standalone .supplier-cooperation-summary{font-size:12px;line-height:1.6}
 .standalone .supplier-payment-details>summary{font-size:13px}
 .standalone .supplier-payment-details>summary small{font-size:11px}
 .standalone .bank-info-row{grid-template-columns:minmax(0,1fr) 48px;gap:3px 8px;padding:11px 0}
 .standalone .bank-info-row>.bank-info-value{font-size:15px;line-height:1.55;word-break:normal;overflow-wrap:anywhere}
 .standalone .bank-info-row[data-bank-field=account_number]>.bank-info-value{font-size:17px;letter-spacing:0;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
 .standalone .bank-info-row button{min-width:48px;min-height:44px;font-size:12px;padding:8px 5px}
 .standalone #settlement-dialog .bank-info-row>.draft-preview-label{grid-column:1;grid-row:1}
 .standalone #settlement-dialog .bank-info-row>.bank-info-value{grid-column:1;grid-row:2}
 .standalone #settlement-dialog .bank-info-row button{grid-column:2;grid-row:1/span 2}
 .standalone .supplier-bank-info{padding:12px;border-radius:9px}
 .standalone .supplier-card-footer{gap:8px;margin-top:14px}
 .standalone .supplier-card-footer>.supplier-main-action,.standalone .supplier-card-footer>.secondary{font-size:13px}

 .standalone #procurement-overview-search{margin-bottom:12px}
 .standalone #procurement-overview-search .search-label{margin:0 0 7px;font-size:12px;color:var(--ui-muted)}
 .standalone #procurement-overview-search .overview-controls{margin:12px 0;grid-template-columns:minmax(0,1fr)}
 .standalone #order-view-options>summary{min-height:44px;padding:10px 0;line-height:1.6;font-size:13px;color:var(--ui-muted);overflow-wrap:anywhere}
 .standalone #order-view-options .overview-controls{grid-template-columns:minmax(0,1fr);gap:12px;margin:12px 0}
 .standalone #order-view-options .overview-controls select{width:100%;min-width:0}
 .standalone #order-list{gap:18px;margin-top:12px}
 .standalone .order-state-filters{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;max-width:100%;padding:3px 0 6px;margin:10px 0;overscroll-behavior-x:contain}
 .standalone .order-state-filters button{flex:0 0 auto;width:auto;min-height:44px;margin:0;font-size:12px;padding:8px 11px;white-space:nowrap}
 .standalone #order-list .project-group{border:0;border-radius:0;background:transparent}
 .standalone #order-list .project-group-heading{padding:8px 0 12px;font-size:16px;color:var(--ui-ink)}
 .standalone #order-list .project-group-cards{padding:0;gap:12px;grid-template-columns:minmax(0,1fr)}
 .standalone #order-list .project-card{padding:15px;border-color:var(--ui-line);background:var(--ui-surface);border-radius:12px}
 .standalone #order-list .project-card>h3{font-size:17px;line-height:1.5;margin:0 0 10px;color:var(--ui-ink)}
 .standalone #order-list .project-card .procurement-project-content-value{font-size:14px;margin:12px 0 8px}
 .standalone .order-compact{display:block;margin:10px 0}
 .standalone .order-supplier{font-size:12px;line-height:1.6;color:var(--ui-muted)}
 .standalone .order-fee{font-size:17px;font-weight:650;margin:6px 0 0;color:var(--ui-ink)}
 .standalone .order-details{margin-top:12px;padding-top:4px;border-color:var(--ui-line)}
 .standalone .order-details>summary{font-size:13px;color:var(--ui-muted);font-weight:500}
 .standalone .order-review{margin-top:12px;padding-top:14px;border-color:var(--ui-line)}
 .standalone .order-review label{font-size:12px;color:var(--ui-muted);gap:7px}
 .standalone .order-review button{min-height:44px;margin:10px 8px 0 0;max-width:100%}
 .standalone .procurement-proposal-readonly{padding:12px;margin:12px 0;background:var(--ui-soft)}
 .standalone .procurement-proposal-periods>*{gap:5px 10px;padding:8px 0}
 .standalone .installment{padding:12px;margin-top:12px;border-color:var(--ui-line);background:var(--ui-soft);color:var(--ui-ink)}
 .standalone .installment>strong{color:var(--ui-ink);font-size:14px}
 .standalone .installment .order-value{font-size:14px;line-height:1.6;margin:10px 0}
 .standalone .payment-plan-form .draft-fields,.standalone .payment-confirmation-form .draft-fields{gap:14px;margin-top:14px}
 .standalone .server-draft-row{padding:14px;border-color:var(--ui-line);background:var(--ui-surface);font-size:13px;gap:10px}

 .standalone .work-overview-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px;padding-bottom:18px;margin-bottom:20px}
 .standalone .work-overview-stat:first-child{grid-column:1/-1}
 .standalone .work-overview-stat:first-child>strong{font-size:30px}
 .standalone .work-overview-stat>span,.standalone .work-overview-stat>small{font-size:11px;line-height:1.5}
 .standalone .work-task-top{flex-wrap:wrap;gap:10px}
 .standalone .work-task-summary{flex-basis:100%}
 .standalone .work-task-summary h3,.standalone .work-task-summary h4{font-size:15px;display:block;-webkit-line-clamp:unset;overflow:visible}
 .standalone .work-task-amount{max-width:100%;text-align:left;flex-basis:100%;font-size:22px}
 .standalone .work-task-amount small{font-size:11px}
 .standalone .work-task-registered strong{font-size:16px}
 .standalone .work-task-bottom{gap:8px;flex-wrap:wrap}
 .standalone .work-task-bottom>div{flex:1;max-width:none;min-width:140px}
 .standalone .work-task-bottom p{font-size:11px}
 .standalone .work-task-bottom button{font-size:12px}
 .standalone .work-quiet-list .work-entry{min-height:44px;padding:8px 0}
 .standalone .payment-priority-card{grid-template-columns:minmax(0,1fr);padding:14px;gap:0}
 .standalone .payment-priority-card :is(h4,.payment-urgency,p){grid-column:1;grid-row:auto}
 .standalone .payment-priority-card h4{font-size:15px;display:block;-webkit-line-clamp:unset;overflow:visible}
 .standalone .payment-priority-card .payment-card-amount{grid-column:1;grid-row:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left;font-size:24px;margin:12px 0 0}
 .standalone .payment-priority-card>button{grid-column:1;grid-row:auto;justify-self:start;min-height:44px;margin-top:12px;font-size:13px}

 .standalone dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(var(--mobile-viewport-height,100dvh) - 24px);margin:auto;border-radius:14px;padding:16px}
 .standalone :is(#supplier-editor-dialog,#supplier-opinion-dialog,#quick-supplier-dialog,#settlement-dialog,#supplier-link-dialog){width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(var(--mobile-viewport-height,100dvh) - 24px);padding:16px;border-color:var(--ui-line);background:var(--ui-surface);color:var(--ui-ink)}
 .standalone[data-mobile-keyboard=true] dialog[open]{position:fixed;top:calc(var(--mobile-viewport-top,0px) + 12px);bottom:auto;margin:0 auto}
 .standalone dialog :is(h2,h3){line-height:1.5;font-size:18px}
 .standalone dialog .draft-fields{grid-template-columns:minmax(0,1fr);gap:14px;margin-top:16px}
 .standalone dialog .draft-fields label{font-size:12px;color:var(--ui-muted);gap:7px}
 .standalone dialog .draft-fields :is(input,select){min-height:46px}
 .standalone dialog .quick-supplier-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
 .standalone dialog .quick-supplier-actions button{width:100%;margin:0;min-width:0;padding:9px 8px}
 .standalone .settlement-top{position:sticky;top:-16px;background:var(--ui-surface);z-index:2;align-items:center;gap:8px;margin-bottom:12px;padding-bottom:8px}
 .standalone .settlement-top h2{font-size:18px}
 .standalone .settlement-top button{min-height:44px;font-size:12px;padding:8px 10px;margin:0;flex:none}
 .standalone .settlement-amounts{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px;margin:14px 0}
 .standalone .settlement-amounts>div:first-child{grid-column:1/-1}
 .standalone .settlement-amounts>div:first-child strong{font-size:25px}
 .standalone .settlement-amounts strong{font-size:18px}
 .standalone .finance-table-wrap{max-width:100%;overscroll-behavior-x:contain}
 .standalone .finance-table :is(th,td){padding:12px 10px;font-size:13px}
 .standalone #finance-workspace .overview-controls,.standalone #archive-workspace .overview-controls,.standalone #quotation-workspace .overview-controls{grid-template-columns:minmax(0,1fr);gap:12px}
 .standalone #finance-workspace .input-check{margin:12px 0 16px;padding:14px;font-size:12px;line-height:1.7}
 .standalone #archive-workspace,.standalone #quotation-workspace,.standalone #member-management{padding:0;border:0;background:transparent}
 .standalone :is(#history-list,#quotation-list) .evaluation-card{padding:14px;border-color:var(--ui-line);background:var(--ui-surface)}
 .standalone #quotation-list .quotation-group>summary{font-size:16px;line-height:1.6;min-height:44px}
}
@media(max-width:360px){
 .standalone .procurement-payment-modes{grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:16px}
 .standalone #procurement-draft-form .procurement-payment-mode{min-height:66px}
 .standalone .procurement-payment-mode>span{gap:1px}
 .standalone .app-page-heading>div{flex-basis:100%}
 .standalone .app-page-heading>button:not(.app-mobile-back){width:100%}
 .standalone .supplier-bank-info{padding:10px}
 .standalone .bank-info-row[data-bank-field=account_number]>.bank-info-value{font-size:16px}
}
/* The complete workbook remains a secondary owner-only reference. */
.standalone .source-workbook-panel{min-width:0;margin:0 0 24px;padding:16px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface)}
.standalone .source-workbook-panel>summary{font-size:16px;font-weight:650;line-height:1.6;cursor:pointer}
.standalone .source-workbook-panel .overview-controls{margin-top:16px}
.standalone .source-workbook-panel .overview-controls label{display:flex;flex-direction:column;gap:8px;min-width:0}
.standalone .source-workbook-panel .overview-controls label>:is(input,select){margin:0;height:44px;min-height:44px;width:100%;box-sizing:border-box}
.standalone .source-workbook-scroll{overflow:auto;max-width:100%;max-height:65vh;overscroll-behavior:contain;border:1px solid var(--ui-line);border-radius:8px}
.standalone #source-workbook-table{width:max-content;min-width:100%;border-collapse:collapse;font-size:12px;line-height:1.6}
.standalone #source-workbook-table :is(th,td){min-width:140px;max-width:280px;padding:10px 12px;border:1px solid var(--ui-line);white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;text-align:left}
.standalone #source-workbook-table thead th{position:sticky;top:0;background:var(--ui-surface);z-index:1}
.standalone #source-workbook-table tr>th:first-child{min-width:44px;font-variant-numeric:tabular-nums;color:var(--ui-muted)}
.standalone .source-formula{margin-top:8px;color:var(--ui-muted)}
.standalone .source-formula pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px}
.standalone .source-workbook-pages{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.standalone .source-workbook-pages p{margin:0 auto 0 0}
@media(max-width:650px){
 .standalone .source-workbook-panel{padding:12px}
 .standalone .source-workbook-panel :is(button,select,input){min-height:44px}
 .standalone .source-workbook-panel :is(input,select){font-size:16px}
 .standalone .source-workbook-pages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .standalone .source-workbook-pages p{grid-column:1/-1}
 .standalone .source-workbook-pages button{width:100%;margin:0}
}
/* New and edited requests share the quotation modal's surface and hierarchy. */
body.standalone #procurement-edit-dialog{--ui-muted:color-mix(in srgb,var(--ui-ink) 72%,var(--ui-surface));width:min(1120px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(var(--mobile-viewport-height,100dvh) - 32px);overflow:hidden;overscroll-behavior:contain;padding:0;background:var(--ui-surface);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px)}
body.standalone #procurement-edit-dialog[open]{display:flex;flex-direction:column}
body.standalone #procurement-edit-dialog::backdrop{background:light-dark(#1c263566,#00000099)}
body.standalone #procurement-edit-dialog #procurement-draft{display:block;margin:0;padding:0;border:0;box-shadow:none;background:transparent}
body.standalone #procurement-edit-dialog #procurement-draft>summary,body.standalone #procurement-edit-dialog .draft-scope{display:none}
body.standalone .procurement-edit-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--ui-surface);padding:24px 28px 12px}
body.standalone .procurement-edit-header h2{margin:0;font-size:var(--ui-section-size,18px)}
body.standalone .procurement-edit-header button{flex-shrink:0;margin:0}
body.standalone #procurement-edit-dialog>.dialog-business-identity{flex:none;margin:0;padding:0 28px 20px;font-size:13px;line-height:1.7;color:var(--ui-muted);border-bottom:1px solid var(--ui-line)}
body.standalone .procurement-edit-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 28px;scroll-padding-block:16px}
body.standalone #procurement-edit-dialog .procurement-form-layout{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:0 40px}
body.standalone #procurement-edit-dialog .procurement-form-section{padding:24px 0;border:0;border-radius:0;background:transparent;margin:0;min-width:0}
body.standalone #procurement-edit-dialog .procurement-form-section:last-child{grid-column:1/-1;padding:0}
body.standalone #procurement-edit-dialog .procurement-form-section:last-child>:is(.procurement-section-heading,.draft-help){display:none}
body.standalone #procurement-edit-dialog .procurement-project-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
body.standalone #procurement-edit-dialog .procurement-project-content{margin:0}
body.standalone #procurement-edit-dialog .procurement-supplier-controls{grid-template-columns:minmax(0,1fr)}
body.standalone #procurement-edit-dialog .procurement-supplier-controls>:is(input,select,p){grid-column:1/-1;grid-row:auto}
body.standalone #procurement-edit-dialog .procurement-section-heading{margin:0 0 16px;line-height:1.6}
body.standalone #procurement-edit-dialog .procurement-section-heading>span{display:none}
body.standalone #procurement-edit-dialog .procurement-installment-row{grid-template-columns:minmax(0,1fr) 44px;gap:8px 12px;padding:12px 0}
body.standalone #procurement-edit-dialog .procurement-installment-number{grid-column:1;grid-row:1;min-height:44px}
body.standalone #procurement-edit-dialog .procurement-installment-row>label{grid-column:1/-1}
body.standalone #procurement-edit-dialog .procurement-installment-remove{grid-column:2;grid-row:1;min-height:44px}
body.standalone #procurement-edit-dialog .procurement-edit-footer{flex:none;padding:12px 28px 18px;border-top:1px solid var(--ui-line);background:var(--ui-surface)}
body.standalone #procurement-edit-dialog #draft-status{margin:0 0 10px;font-size:12px}
body.standalone #procurement-edit-dialog :is(input,textarea,select)[data-submission-required=true]:not([type=radio]):not([readonly]){background:color-mix(in srgb,var(--ui-red) 12%,var(--ui-surface));border-color:color-mix(in srgb,var(--ui-red) 60%,var(--ui-line))}
body.standalone #procurement-edit-dialog label[data-submission-required=true]>.procurement-label-text::after{content:' · 必填';display:inline;color:var(--ui-red);font-size:12px;font-weight:400}
body.standalone #procurement-edit-dialog :is(#draft-payment-total-field,.procurement-installment-row label):has([data-submission-required=true]){color:var(--ui-ink)}
body.standalone .procurement-edit-changes{margin-top:16px;padding-top:16px;border-top:1px solid var(--ui-line);overflow-wrap:anywhere}
body.standalone .procurement-edit-changes h3{font-size:14px;font-weight:500;margin:0 0 8px;color:var(--ui-muted)}
body.standalone .procurement-edit-changes p{margin:6px 0;font-size:14px;white-space:pre-wrap}
body.standalone #procurement-edit-dialog .procurement-form-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin:0}
body.standalone #procurement-edit-dialog .procurement-form-actions button{min-height:44px;margin:0;width:auto;min-width:80px}
body.standalone :is(#app-new-order,#supplier-library-add,#quotation-new).business-create-button{min-height:48px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;max-width:100%;font-size:16px;font-weight:600;padding:12px 20px;margin:0;background:color-mix(in srgb,var(--ui-red) 78%,var(--ui-surface));color:var(--ui-ink)}
body.standalone :is(#app-new-order,#supplier-library-add,#quotation-new).business-create-button:hover{background:color-mix(in srgb,var(--ui-red) 82%,var(--ui-surface))}
@media(max-width:900px){body.standalone #procurement-edit-dialog .procurement-form-layout{grid-template-columns:minmax(0,1fr)}body.standalone #procurement-edit-dialog .procurement-form-section+.procurement-form-section{border-top:1px solid var(--ui-line)}}
@media(max-width:650px){body.standalone #procurement-edit-dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(var(--mobile-viewport-height,100dvh) - 12px)}body.standalone #procurement-edit-dialog button{min-height:44px}body.standalone #procurement-edit-dialog :is(input,textarea,select){font-size:16px}body.standalone .procurement-edit-header{padding:16px 16px 8px;gap:8px}body.standalone .procurement-edit-header button{padding:8px 10px;font-size:12px}body.standalone #procurement-edit-dialog>.dialog-business-identity{padding:0 16px 14px;font-size:12px}body.standalone .procurement-edit-body{padding:0 16px}body.standalone #procurement-edit-dialog .procurement-form-section{padding:16px 0 20px}body.standalone #procurement-edit-dialog .procurement-project-fields{grid-template-columns:minmax(0,1fr)}body.standalone #procurement-edit-dialog .procurement-edit-footer{padding:10px 16px 14px}body.standalone #procurement-edit-dialog .procurement-form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.standalone #procurement-edit-dialog .procurement-form-actions button{width:100%;min-width:0;font-size:13px;padding:9px 8px;grid-column:auto;grid-row:auto}body.standalone #procurement-edit-dialog[data-mode=create] .procurement-form-actions #submit-procurement,body.standalone #procurement-edit-dialog[data-mode=edit] .procurement-form-actions #save-server-draft{grid-column:1/-1;grid-row:2}body.standalone .business-create-button{font-size:13px;line-height:1.6}body.standalone :is(.app-page-heading,.supplier-library-heading){flex-wrap:wrap}body.standalone .app-page-heading>.business-create-button{flex-basis:100%;width:100%;padding:10px 16px}}

/* Desktop sidebar collapse keeps the existing role-filtered icon navigation. */
.standalone .app-sidebar-toggle{display:none}
@media(min-width:651px){
 .standalone .app-sidebar{gap:20px}
 .standalone .app-brand .company-logo{width:72px;height:72px;border-radius:16px}
 .standalone .app-sidebar-toggle{position:absolute;top:12px;right:8px;display:flex;align-items:center;justify-content:center;gap:0;margin:0;width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:var(--ui-radius,8px);background:transparent;color:var(--ui-muted)}
 .standalone .app-sidebar-toggle span{display:none}
 .standalone .app-sidebar-toggle:hover{background:var(--ui-line);color:var(--ui-ink)}
 .standalone .app-sidebar-toggle svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 body.standalone[data-sidebar-collapsed=true]{grid-template-columns:72px minmax(0,1fr)}
 .standalone[data-sidebar-collapsed=true] .app-sidebar{padding:24px 12px;gap:20px}
 .standalone[data-sidebar-collapsed=true] .app-brand{padding:0 0 40px}
 .standalone[data-sidebar-collapsed=true] .app-brand .company-logo{width:40px;height:40px;border-radius:10px}
 .standalone[data-sidebar-collapsed=true] .app-sidebar-toggle{top:76px;right:20px}
 .standalone[data-sidebar-collapsed=true] .app-brand>div,.standalone[data-sidebar-collapsed=true] .app-principles,.standalone[data-sidebar-collapsed=true] .app-sidebar-toggle span,.standalone[data-sidebar-collapsed=true] #app-navigation .nav-desktop-label,.standalone[data-sidebar-collapsed=true] #app-navigation .nav-mobile-label{display:none}
 .standalone[data-sidebar-collapsed=true] .app-sidebar-toggle svg{transform:scaleX(-1)}
 .standalone[data-sidebar-collapsed=true] #app-navigation button{justify-content:center;gap:0;padding:12px;min-height:44px}
 .standalone[data-sidebar-collapsed=true] #app-navigation .app-more-menu button{padding:12px;min-height:44px}
}
/* Three desktop navigation groups share the same typography and controls. */
@media(min-width:651px){.standalone #app-navigation.desktop-grouped{display:flex;flex-direction:column;gap:0}.standalone #app-navigation.desktop-grouped>.app-navigation-more{display:none}.standalone .app-navigation-group{display:grid;gap:6px}.standalone .app-navigation-group[hidden]{display:none}.standalone .app-navigation-group:not([hidden])~.app-navigation-group:not([hidden]){margin-top:20px;padding-top:20px;border-top:1px solid var(--ui-line)}}

/* Work overview source cues reuse the existing task and warning tokens. */
.standalone #app-navigation button[data-view=overview]{position:relative}
.standalone #app-navigation .work-reminder-badges{position:absolute;right:8px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;pointer-events:none}
.standalone #app-navigation .work-reminder-badge{--badge-fill:var(--hpr-tone,var(--ui-muted));display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:18px;padding:0 5px;border:1px solid var(--badge-fill);border-radius:999px;background:var(--badge-fill);color:light-dark(#fff,#1a1014);font:750 11px/1 var(--ui-font,"Segoe UI","Microsoft YaHei",sans-serif);font-variant-numeric:tabular-nums;box-shadow:0 0 0 1px color-mix(in srgb,var(--badge-fill) 30%,transparent),0 0 6px color-mix(in srgb,var(--badge-fill) 35%,transparent)}
@media(min-width:651px){.standalone[data-sidebar-collapsed=true] #app-navigation .work-reminder-badges{top:-5px;right:-3px;transform:none}.standalone[data-sidebar-collapsed=true] #app-navigation .work-reminder-badge{min-width:18px;height:16px;padding:0 3px;font-size:11px}.standalone[data-sidebar-collapsed=true] #app-navigation button[data-view=overview]:has(.work-reminder-badges)>svg{transform:translateX(-12px)}}
@media(max-width:650px){.standalone #app-navigation .work-reminder-badges{top:-12px;right:2px;transform:none;flex-direction:row;gap:2px}.standalone #app-navigation .work-reminder-badge{min-width:16px;height:16px;padding:0 2px;font-size:10px}}
.standalone .work-source-followups{margin:0 0 24px;padding:0 0 20px;border-bottom:1px solid var(--ui-line)}
.standalone .work-source-tasks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:12px}
.standalone .work-source-group{border-top:1px solid var(--ui-line)}
.standalone .work-source-group>summary{min-height:44px;align-content:center;cursor:pointer;color:var(--ui-muted);font-size:13px}
.standalone .work-source-group>summary:is(:hover,:focus-visible){color:var(--ui-ink)}
.standalone .work-source-followups>.work-overview-note{font-size:12px;line-height:1.6}
@media(max-width:1100px){.standalone .work-source-tasks{grid-template-columns:1fr}}

@media(max-width:900px){.standalone #work-overview .work-overview-aside:has(#work-source-schedule){display:block}}
.standalone #work-source-schedule .work-source-total{max-width:55%;min-width:0;text-align:right;font-size:12px;font-variant-numeric:tabular-nums}.standalone #work-source-schedule .work-source-total strong{max-width:none;overflow-wrap:anywhere}.standalone #work-source-schedule .work-source-total small{display:block;white-space:nowrap;margin-top:3px;color:var(--ui-muted)}
.standalone .work-source-tasks>.hpr-dialog:last-child:nth-child(odd){grid-column:1/-1}

.quote-review-match .quote-review-candidate:empty,.quote-review-item > .quote-review-candidate:empty{display:none}

.quote-review-money{white-space:nowrap}

/* Role-projected quotation list and separate editor, scoped to this workspace. */
/* Modal layout uses the shared product theme; source snapshots remain separate. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) dialog{color:var(--ui-ink);background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:12px;width:calc(100% - 32px);max-width:760px;max-height:calc(100dvh - 32px);padding:0;overscroll-behavior:contain}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) dialog::backdrop{background:#00000066}
:is(#quotation-workspace) .quotation-project-detail-button{display:none}
@media (max-width:1059px) {
 :is(#quotation-workspace) .quotation-quote-total-desktop{display:none!important}
}
@media (min-width:1060px) {
 :is(#quotation-workspace) .quotation-quote-total-legacy{display:none!important}
 :is(#quotation-workspace) .quotation-project-detail-button{display:inline-flex;align-items:center;gap:6px;margin:0;white-space:nowrap}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] :is(.quotation-project-strip .quotation-together-identity-edit,.quotation-title-edit,.quotation-row-edit,.quotation-readonly-badge){display:none}
 :is(#quotation-workspace) .quotation-modern-record[data-multi="true"] .quotation-row-toggle,
 :is(#quotation-workspace) .quotation-modern-record[data-multi="true"] .quotation-row-details{display:none}
}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog{max-width:1160px;inset-block-start:clamp(12px,3dvh,32px);inset-block-end:auto;max-height:calc(100dvh - clamp(12px,3dvh,32px) - 12px)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog .quotation-modal-head{flex:none;align-items:center;padding:12px 24px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog>.quotation-modal-head>div{display:grid;gap:3px;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog .quotation-modal-head h2{font-size:clamp(20px,2.4vw,26px);line-height:1.25;margin:0;overflow-wrap:anywhere}
#quotation-project-detail-dialog .quotation-modal-head button{flex:none;margin:0}
#quotation-project-detail-dialog .quotation-section-hint{margin:0}
.quotation-project-detail-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:12px 24px;display:grid;gap:10px}
#quotation-project-detail-dialog :is(.quotation-project-detail-body,.quotation-modal-head button)[hidden]{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog.quotation-embedded-editor[open]{position:static;inset:auto;width:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0;flex:1;min-height:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog.quotation-embedded-editor .quotation-modal-head{padding:8px 24px 12px}
.quotation-project-detail-total{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px 20px;background:var(--ui-soft,var(--ui-surface));padding:12px 16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px)}
#quotation-project-detail-dialog>.quotation-project-detail-total{flex:none;margin:0 24px 16px}
#quotation-project-detail-dialog:has(.quotation-embedded-editor[open])>.quotation-project-detail-total{display:none}
.quotation-project-total-summary{display:grid;gap:4px;min-width:0}
.quotation-project-total-summary h3,.quotation-phase-list h3,.quotation-active-phase-head h3{margin:0;font-size:15px}
.quotation-project-total-summary>strong{font-size:clamp(22px,2.5vw,30px);font-variant-numeric:tabular-nums;line-height:1.2;overflow-wrap:anywhere}
.quotation-fixed-price-form{display:grid;grid-template-columns:minmax(0,220px) auto;align-items:end;gap:5px 8px;max-width:100%}
.quotation-fixed-price-form label{display:grid;gap:4px;min-width:0;font-size:13px}
.quotation-fixed-price-form input{width:100%;min-width:0;font-variant-numeric:tabular-nums}
.quotation-fixed-price-form button{margin:0;white-space:nowrap}
.quotation-fixed-price-form [role=status]{grid-column:1/-1}
.quotation-fixed-price-form [role=status]:empty{display:none}
.quotation-whole-overview{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px}
.quotation-whole-section{min-width:0}
.quotation-whole-section+.quotation-whole-section{border-inline-start:1px solid var(--ui-line);padding-inline-start:24px}
.quotation-whole-section h3,.quotation-whole-table-head h3{margin:0;font-size:16px;font-weight:700}
.quotation-whole-section h3{border-bottom:1px solid var(--ui-line);padding-bottom:8px}
.quotation-whole-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:10px 0 0}
.quotation-whole-facts dt{color:var(--ui-muted);font-size:12px}
.quotation-whole-facts dd{margin:3px 0 0;overflow-wrap:anywhere}
.quotation-whole-phases{min-width:0;border-top:1px solid var(--ui-line);padding-top:12px}
.quotation-whole-table-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.quotation-whole-table-head button{margin:0}
.quotation-whole-phases>[role=status]:empty{display:none}
.quotation-whole-phases>[role=status]:not(:empty){margin-bottom:8px}
.quotation-whole-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);overflow:clip;font-size:13px}
.quotation-whole-table :is(th,td){padding:9px 8px;text-align:start;vertical-align:middle;border-block-end:1px solid var(--ui-line);overflow-wrap:anywhere}
.quotation-whole-table thead th{background:var(--ui-soft,var(--ui-surface));color:var(--ui-muted);font-weight:650}
.quotation-whole-table thead th:first-child{width:14%}
.quotation-whole-table thead th:nth-child(2){width:19%}
.quotation-whole-table:has(output) thead th:nth-child(3){width:12%}
.quotation-whole-table:has(output) thead th:nth-child(4){width:29%}
.quotation-whole-table:has(output) thead th:nth-child(5){width:12%}
.quotation-whole-table tbody tr:last-child>*{border-block-end:0}
.quotation-whole-table tbody tr:focus-within>*,.quotation-whole-table tbody tr:hover>*{background:color-mix(in srgb,var(--ui-soft,var(--ui-surface)) 45%,transparent)}
.quotation-whole-table :is(input,select){width:100%;min-width:0;min-height:36px;padding:5px 8px;margin:0;font:inherit}
.quotation-whole-table input,.quotation-whole-table output{font-variant-numeric:tabular-nums}
.quotation-whole-table output{font-weight:750;font-size:14px}
.quotation-whole-additions{display:grid;gap:5px}
.quotation-whole-addition{display:grid;grid-template-columns:minmax(46px,.7fr) minmax(58px,1fr) auto;align-items:center;gap:4px}
.quotation-whole-addition button,.quotation-whole-add,.quotation-whole-more{min-height:32px;margin:0;padding:4px 7px;font-size:12px;white-space:nowrap}
.quotation-whole-add{margin-top:5px}
.quotation-whole-more{display:block;margin-top:3px}
.quotation-whole-price{display:grid;gap:3px;font-variant-numeric:tabular-nums}
.quotation-whole-table small,.quotation-whole-row-status{color:var(--ui-muted);font-size:11px}
.quotation-whole-row-status{display:block;margin-top:3px}
.quotation-whole-row-status:empty{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-whole-table :is(input,select){min-height:32px;height:32px;padding:4px 7px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-whole-table :is(.quotation-whole-add,.quotation-whole-more,.quotation-whole-addition button){min-height:26px;padding:3px 6px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-whole-table .quotation-whole-more{border-color:transparent;background:transparent;color:var(--ui-muted)}
@media (max-height:850px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog>.quotation-modal-head{padding-block:6px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog>.quotation-modal-head h2{font-size:22px;line-height:1.15}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog>.quotation-modal-head p{font-size:11px;line-height:1.2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog>.quotation-modal-head button{min-height:32px;padding:4px 10px}
 #quotation-project-detail-dialog>.quotation-project-detail-total{padding:7px 12px;margin-bottom:10px}
 #quotation-project-detail-dialog>.quotation-project-detail-total .quotation-project-total-summary{grid-template-columns:auto auto;align-items:baseline;gap:0 8px}
 #quotation-project-detail-dialog>.quotation-project-detail-total .quotation-project-total-summary h3{font-size:13px;line-height:1.3}
 #quotation-project-detail-dialog>.quotation-project-detail-total .quotation-project-total-summary>strong{font-size:22px}
 #quotation-project-detail-dialog>.quotation-project-detail-total .quotation-project-total-summary .quotation-section-hint{grid-column:1/-1;font-size:11px;line-height:1.2}
 #quotation-project-detail-dialog .quotation-fixed-price-form label{grid-template-columns:auto minmax(0,1fr);align-items:center}
 #quotation-project-detail-dialog .quotation-fixed-price-form{grid-template-columns:minmax(0,270px) auto}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-project-detail-dialog .quotation-fixed-price-form :is(input,button){min-height:34px;height:34px;padding-block:4px}
 .quotation-project-detail-body{gap:7px;padding-block:8px}
 .quotation-whole-section h3{padding-bottom:5px}
 .quotation-whole-facts{gap:4px 12px;margin-top:6px}
 .quotation-whole-facts :is(dt,dd){line-height:1.4;margin-top:0}
 .quotation-whole-table-head button{min-height:32px;padding-block:4px}
 .quotation-whole-table :is(th,td){padding-block:4px}
 .quotation-whole-additions{gap:3px}
 .quotation-whole-table-head{margin-bottom:5px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-whole-table .quotation-whole-more{min-height:19px;padding-block:0;line-height:1.2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-whole-table .quotation-whole-addition :is(input,button){height:28px;min-height:28px}
}
.quotation-project-phases{display:grid;grid-template-columns:minmax(160px,22%) minmax(0,1fr);gap:16px;align-items:start}
.quotation-phase-list{position:sticky;top:0;min-width:0}
.quotation-phase-list h3{padding:0 8px 8px;color:var(--ui-muted)}
.quotation-phase-options{display:grid;grid-auto-rows:max-content;gap:4px;max-height:50dvh;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:2px}
.quotation-phase-options .quotation-phase-option{display:grid;justify-content:stretch;gap:2px;margin:0;padding:7px 10px;min-width:0;text-align:left;border-inline-start-width:2px}
.quotation-phase-option strong,.quotation-phase-option small{display:block;min-width:0;overflow-wrap:anywhere}
.quotation-phase-option small{color:var(--ui-muted);font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.quotation-phase-options .quotation-phase-option[aria-pressed=true]{background:color-mix(in srgb,var(--ui-red) 10%,var(--ui-surface));border-color:var(--ui-line);border-inline-start-color:var(--ui-red)}
.quotation-project-detail-phase{min-width:0;padding:12px 16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);overflow-wrap:anywhere}
.quotation-active-phase-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.quotation-active-phase-head h3{font-size:18px}
.quotation-active-phase-head button{flex:none;margin:0}
.quotation-active-phase-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.quotation-phase-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));gap:8px;margin:10px 0 0}
.quotation-phase-metrics>div{padding:8px 10px;background:var(--ui-soft,var(--ui-surface));border-radius:var(--ui-radius,8px)}
.quotation-phase-metrics dt{font-size:12px;color:var(--ui-muted)}
.quotation-phase-metrics dd{margin:1px 0 0;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-active-phase-content>.quotation-row-expanded{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));align-items:start;gap:10px 16px;margin:10px 0 0;padding:8px 0 0}
.quotation-phase-facts{min-width:0;display:grid;gap:10px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-detail-phase .quotation-read-section{margin:2px 0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-detail-phase .quotation-read-section h3{font-weight:650;margin-bottom:4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-detail-phase .quotation-read-values{gap:3px 10px}
.quotation-phase-references{border-top:1px solid var(--ui-line);margin-top:8px;padding-top:6px;font-size:13px}
.quotation-phase-references>summary{cursor:pointer;color:var(--ui-muted);width:fit-content;padding:4px 0}
@media (max-width:650px) {
 .quotation-project-phases{grid-template-columns:minmax(0,1fr)}
 .quotation-phase-list{position:static}
 .quotation-phase-options{max-height:30dvh}
}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-modal-head,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-footer{flex:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog #quotation-modal-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding-block:16px}
/* The scroll viewport can receive browser-restored focus; mark its thumb, not the whole form. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-body:focus{outline:none}
#quotation-edit-dialog:has(#quotation-modal-body:focus-visible) .ui-scroll-rail[data-scroll-target=quotation-modal-body] .ui-scroll-thumb{opacity:.95}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-footer{padding:16px 24px;border-top:1px solid var(--ui-line);background:var(--ui-surface)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog :is(#quotation-modal-body,select[multiple],textarea){scrollbar-width:thin;scrollbar-color:var(--ui-line) transparent}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog :is(#quotation-modal-body,select[multiple],textarea)::-webkit-scrollbar{width:8px;height:8px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog :is(#quotation-modal-body,select[multiple],textarea)::-webkit-scrollbar-thumb{background:var(--ui-line);border:2px solid transparent;background-clip:padding-box;border-radius:8px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog :is(#quotation-modal-body,select[multiple],textarea)::-webkit-scrollbar-thumb:hover{background-color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog :is(#quotation-modal-body,select[multiple],textarea)::-webkit-scrollbar-track{background:transparent}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog :is(#quotation-modal-body,select[multiple],textarea)::-webkit-scrollbar-button{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 24px;border-bottom:1px solid var(--ui-line);position:sticky;top:0;z-index:3;background:var(--ui-surface)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modal-head h2{font-size:20px;margin:0 0 4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-context{font-size:12px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-status{margin:0;padding:0 24px;color:var(--ui-muted);font-size:13px;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-status:not(:empty){padding:12px 24px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-reload{margin:0 24px 12px;max-width:calc(100% - 48px);white-space:normal;min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-body{padding:0 24px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog #quotation-editor{max-width:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-section{border:0;border-radius:0;margin:0;padding:16px 0;background:transparent}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-section h2{font-size:16px;margin-bottom:14px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-notes{padding:0;margin:0;border-top:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-notes>.quotation-fields{padding:12px 0 20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-footer{position:static;background:transparent;padding:0;margin:0;border:0;flex-wrap:wrap;gap:12px;justify-content:flex-end}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-footer .secondary{min-width:auto;margin-left:auto}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-footer button{min-width:auto}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-confirm-dialog{max-width:520px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-confirm-body{padding:12px 24px 20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-confirm-diff{margin:0;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-confirm-diff dt{color:var(--ui-muted);font-size:12px;padding-top:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-confirm-diff dd{margin:4px 0 0;padding-bottom:12px;border-bottom:1px solid var(--ui-line);white-space:pre-wrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-confirm-impact{color:var(--ui-muted);font-size:13px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--ui-line)}
@media(max-width:650px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) dialog{width:calc(100% - 12px);max-height:calc(100dvh - 12px)}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modal-head{padding:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-body{padding:0 16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-modal-footer{padding:12px 16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-fields{grid-template-columns:minmax(0,1fr)}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-save-hint{max-width:none;width:100%}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-form-footer button{flex:1;min-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modal-head button,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modal-actions button{min-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-confirm-body,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modal-actions{padding:16px}
}
#quotation-workspace{min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) [hidden]{display:none!important}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-search{display:flex;flex:1;flex-direction:column;gap:7px;min-width:0;font-size:12px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-search input{width:100%;min-width:0;padding:11px 12px;font-size:14px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters input,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters select{width:100%;min-width:0;padding:11px 12px;font-size:14px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-count{font-size:12px;color:var(--ui-muted);margin:18px 0 10px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-status{font-size:13px;color:var(--ui-muted);line-height:1.6;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-status:empty{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-panel{margin:16px 0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);padding:16px;background:var(--ui-surface);min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-top{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-heading{display:flex;align-items:baseline;gap:8px 16px;flex-wrap:wrap;min-width:0;font-size:13px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-heading>strong{font-size:var(--ui-label-size,14px);font-weight:650;color:var(--ui-ink)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-controls{display:flex;flex-wrap:wrap;gap:8px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-controls button{margin:0;min-height:44px;font-size:12px;padding:8px 12px;white-space:normal}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-context,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-status{font-size:var(--ui-help-size,12px);color:var(--ui-muted);line-height:1.8;margin:8px 0 0;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(#quotation-selection-count,#quotation-selection-status):empty{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:16px 24px;margin-top:16px;padding-top:16px;border-top:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-metric{min-width:0;font-size:var(--ui-help-size,12px);color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-metric>strong{display:block;font-size:var(--ui-value-size,23px);line-height:1.45;font-weight:700;color:var(--ui-ink);font-variant-numeric:tabular-nums;margin-top:4px;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-metric>small{display:block;margin-top:4px;font-size:12px;line-height:1.7}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock{position:fixed;top:max(8px,env(safe-area-inset-top));z-index:24;box-sizing:border-box;padding:12px 16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);box-shadow:0 8px 24px #0003;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-count{font-size:12px;line-height:1.5;font-weight:600;color:var(--ui-ink);min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-head>button{flex:none;margin:0;min-height:44px;padding:8px 12px;font-size:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-metrics{grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));margin:4px 0 0;padding:0;border:0;gap:8px 20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock .quotation-selection-metric-label{display:block;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock .quotation-selection-metric>strong{font-size:23px;line-height:1.2;margin-top:2px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;overflow-wrap:normal;scrollbar-width:thin;max-width:100%}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock .quotation-selection-metric>small{font-size:11px;line-height:1.3;margin-top:2px;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock .quotation-selection-metric>strong:focus-visible{outline:2px solid var(--ui-red);outline-offset:2px}
html:has(body.standalone[data-view=quotations] #quotation-selection-dock:not([hidden])){scroll-padding-top:var(--quotation-selection-scroll-offset,0px)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.quotation-project-select,.quotation-project-tools button,.quotation-row-actions button){scroll-margin-top:var(--quotation-selection-scroll-offset,0px)}
@media(max-width:650px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock{padding:6px 10px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-head{gap:6px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-count{font-size:11px;line-height:1.4}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-head>button{padding:8px 10px;font-size:11px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;margin-top:2px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-metrics:is([data-metric-count="1"],[data-metric-count="2"]){grid-template-columns:minmax(0,1fr)}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-metrics[data-metric-count="3"]>.quotation-selection-metric[data-quotation-metric=final_man_days]{order:0}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-metrics[data-metric-count="3"]>.quotation-selection-metric[data-quotation-metric=outsourced_cost]{order:1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock-metrics[data-metric-count="3"]>.quotation-selection-metric[data-quotation-metric=pre_tax_income]{order:2;grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock .quotation-selection-metric-label{font-size:11.5px;line-height:1.2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock .quotation-selection-metric>strong{line-height:1.15}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-dock .quotation-selection-metric>small{font-size:11px;line-height:1.2;margin-top:1px}
}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-manual{width:100%;margin-top:12px;min-height:120px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-select{display:flex;align-items:center;gap:8px;flex:none;min-height:44px;cursor:pointer;font-size:12px;color:var(--ui-muted);padding:8px 0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-select input{width:20px;height:20px;min-height:20px;flex:none;margin:0;accent-color:var(--ui-red)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-select:has(input:focus-visible){outline:2px solid var(--ui-red);outline-offset:4px;border-radius:var(--ui-radius,8px)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-selected=true]{border-color:color-mix(in srgb,var(--ui-red) 55%,var(--ui-line))}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-select:has(input:disabled){cursor:default;opacity:.6}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=outsourced_cost]{font-variant-numeric:tabular-nums}
body.standalone :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=outsourced_cost]>.quotation-cell-value{font-size:var(--ui-value-size,23px);font-weight:700;line-height:1.4}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cost-review{display:block;font-size:12px;font-weight:400;line-height:1.7;color:var(--ui-muted);margin-top:8px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year{margin:24px 0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-soft);overflow:hidden}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-summary{display:flex;align-items:center;gap:12px;padding:17px 16px;min-height:56px;list-style:none;cursor:default;border-bottom:1px solid transparent}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-summary::-webkit-details-marker{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-summary::before{content:'›';font-size:22px;line-height:1;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year[open]>.quotation-year-summary::before{transform:rotate(90deg)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year[open]>.quotation-year-summary{border-bottom-color:var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-label{font-size:var(--ui-section-size,18px);font-weight:650;line-height:1.5;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-count{margin-left:auto;font-size:11px;font-weight:400;line-height:1.8;color:var(--ui-muted);text-align:right}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-list .quotation-group{margin:0;border:0;border-top:1px solid var(--ui-line);border-radius:0;background:var(--ui-surface);overflow:hidden}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-body>.quotation-group:first-child{border-top:0!important}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-list .quotation-year-body>.quotation-group:nth-child(even){background:var(--ui-soft)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-list .quotation-group>summary{display:flex;align-items:center;gap:12px;padding:13px 16px;min-height:48px;list-style:none;font-size:14px;font-weight:600;line-height:1.6;cursor:pointer}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group>summary::-webkit-details-marker{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group>summary::before{content:'›';font-size:22px;color:var(--ui-muted);line-height:1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group[open]>summary::before{transform:rotate(90deg)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-name{min-width:0;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-code-label{font-size:15px;font-weight:650}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-source{display:block;font-size:11px;font-weight:400;line-height:1.8;color:var(--ui-muted);margin-top:2px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-count{margin-left:auto;font-size:11px;font-weight:400;white-space:nowrap;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group[open]>summary{border-bottom:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-record:first-child{border-top:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-details{min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary::-webkit-details-marker{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary:focus-visible,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group>summary:focus-visible,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year>summary:focus-visible{outline:2px solid var(--ui-red);outline-offset:-3px;border-radius:8px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-name{display:block;font-size:14px;font-weight:600;line-height:1.6;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-source-content{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:pre-line}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-requirement{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:4px;font-size:13px;line-height:1.6;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-meta{display:flex;align-items:flex-start;gap:5px 8px;flex-wrap:wrap;font-size:11px;line-height:1.7;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-category{border-radius:5px;background:var(--ui-soft);padding:1px 6px;color:var(--ui-ink)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-amount strong{font-size:14px;font-weight:600;line-height:1.5}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-expanded{border-top:1px dashed var(--ui-line);padding:8px 0 18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-read-section{margin:14px 0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-read-section h3{font-size:12px;margin:0 0 10px;color:var(--ui-muted);font-weight:500}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-read-values{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px 14px;margin:0;font-size:13px;line-height:1.7}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-read-values dt{color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-read-values dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-source-origin{font-size:11px;color:var(--ui-muted);line-height:1.6}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-source-notes{margin:12px 0;font-size:12px;line-height:1.7}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-source-notes>summary{cursor:pointer;min-height:32px;line-height:32px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-formula-value{overflow-wrap:anywhere;white-space:pre-wrap;font-family:ui-monospace,monospace;font-size:11px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-empty{margin:22px 0;padding:28px 18px;border:1px dashed var(--ui-line);border-radius:12px;color:var(--ui-muted);text-align:center;font-size:13px;line-height:1.8}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-resume{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid var(--ui-line);border-radius:10px;font-size:13px;margin:14px 0;background:var(--ui-soft)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-resume button{font-size:12px;white-space:nowrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-editor{max-width:1040px;margin:0 auto}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-back{margin-bottom:16px;font-size:13px;padding:9px 13px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-form{border:0;margin:0;padding:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-section,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-editor-context{border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface);padding:24px;margin:0 0 18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-section h2,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-editor-context h2{font-size:17px;line-height:1.6;margin:0 0 20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-section-hint{font-size:12px;color:var(--ui-muted);margin:-12px 0 20px;line-height:1.7}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 24px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field{min-width:0;display:flex;flex-direction:column;gap:8px;font-size:13px;line-height:1.6;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field-label{color:var(--ui-muted);order:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field input,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field select,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field textarea{order:1;font:inherit;font-size:14px;color:var(--ui-ink);min-width:0;width:100%;padding:12px 14px;border:1px solid var(--ui-line);border-radius:9px;background:var(--ui-surface)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field input,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field select:not([multiple]){height:46px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field select[multiple]{min-height:128px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field textarea{min-height:96px;max-height:260px;overflow-y:auto;resize:vertical;line-height:1.8}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field.quotation-project-name textarea{min-height:64px;line-height:1.6}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog .quotation-fields{gap:14px 20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog textarea{min-height:64px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cooperation-toggle{display:flex;align-items:center;gap:10px;min-height:44px;margin-bottom:12px;color:var(--ui-ink);font-size:14px;cursor:pointer}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cooperation-toggle input{width:18px;height:18px;accent-color:var(--ui-brand)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-internal-tag{display:inline-flex;padding:6px 10px;background:color-mix(in srgb,#ef4054 22%,var(--ui-surface));color:#ffb0b9;border:1px solid color-mix(in srgb,#ef4054 40%,var(--ui-line));border-radius:var(--ui-radius,8px);font-size:12px;line-height:1.5}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-new{max-width:100%}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field-wide{grid-column:1/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field-hint{order:2;font-size:11px;color:var(--ui-muted);line-height:1.6}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-code{font-size:11px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-editor-context h2{margin:8px 0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-editor-context p{font-size:13px;white-space:pre-wrap;line-height:1.8;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-form .quotation-form-advanced,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-form .quotation-form-notes{margin:20px 0 0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-advanced>summary,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-notes>summary{font-size:13px;color:var(--ui-muted);cursor:pointer;min-height:40px;line-height:40px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-advanced[open] .quotation-fields,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-notes[open] .quotation-fields{margin-top:14px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-notes{padding:0 24px 18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-pricing-note{padding:13px 16px;border:1px solid var(--ui-line);background:var(--ui-soft);border-radius:9px;font-size:13px;line-height:1.7}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0;border-top:1px solid var(--ui-line);margin-top:24px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-save-hint{font-size:12px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-footer button{min-width:130px;font-size:14px;padding:12px 20px}
@media(min-width:1100px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-fields:has([name=base_man_days]){grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-toolbar{align-items:flex-start;flex-wrap:wrap;margin:0 0 16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-toolbar-actions{width:100%;justify-content:space-between}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-search{flex-basis:100%;margin-bottom:4px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-search input{min-height:44px;font-size:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-toolbar button{min-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 10px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters input,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters select{min-height:44px;font-size:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group>summary{padding:12px!important;gap:8px!important;align-items:flex-start!important}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year{margin:18px 0}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-summary{padding:14px 12px;gap:8px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-year-count{max-width:95px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-count{white-space:normal;text-align:right;flex-shrink:0;max-width:160px;line-height:1.8}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-name{font-size:14px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-requirement{font-size:12px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-meta{font-size:11px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-amount strong{font-size:13px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-read-values{grid-template-columns:76px minmax(0,1fr);gap:8px 10px;font-size:12px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-source-notes>summary,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-advanced>summary,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-notes>summary{min-height:44px;line-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-resume{padding:10px 12px;font-size:12px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-resume button{min-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-back{min-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-section,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-editor-context{padding:18px 14px;margin-bottom:14px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-section h2{font-size:16px;margin-bottom:18px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-section-hint{font-size:11px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-fields{grid-template-columns:minmax(0,1fr);gap:18px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field-wide{grid-column:auto}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field input,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field select,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field textarea{font-size:16px;min-height:46px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field textarea{min-height:112px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-field-hint{font-size:11px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-notes{padding:0 14px 14px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-footer{position:sticky;bottom:calc(74px + env(safe-area-inset-bottom));padding:12px 0;background:var(--ui-surface);margin-top:18px;z-index:2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-save-hint{font-size:11px;max-width:45%;line-height:1.6}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-footer button{min-height:46px;min-width:170px;padding:12px 16px}
 body[data-mobile-keyboard=true] :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-form-footer{position:static}
}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body{padding:20px 24px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:var(--ui-muted);margin-bottom:18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body input,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body select{max-width:100%;width:100%;min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body .quotation-section-hint{margin:0 0 18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-list{margin-bottom:20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--ui-line);font-size:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item>span{flex:1;overflow-wrap:anywhere;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item a,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item button{min-height:44px;white-space:nowrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-status{font-size:13px;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-feedback{min-width:0;flex:1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-feedback .quotation-attachment-status{font-size:14px;font-weight:600;line-height:1.5;color:var(--ui-ink);margin:0 0 6px;padding-left:10px;border-left:3px solid var(--ui-red)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-feedback .quotation-attachment-status:empty{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-upload-success{position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 32px));box-sizing:border-box;padding:18px;gap:14px;border:1px solid var(--ui-green);border-radius:var(--ui-radius,10px);background:color-mix(in srgb,var(--ui-green) 25%,#075b37);color:#fff;box-shadow:0 16px 48px #0005}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-upload-success:popover-open{display:flex;align-items:center}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-upload-success strong{flex:1;min-width:0;font-size:17px;line-height:1.6;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-upload-success-mark{font-size:26px;line-height:1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-upload-success button{flex:none;min-width:44px;min-height:44px;margin:0;padding:8px;border:1px solid #ffffff66;background:transparent;color:inherit;font-size:22px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-media-dialog{max-width:1100px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-full-media{display:block;width:100%;height: min(65dvh,700px);object-fit:contain;background:#000}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-media-dialog h2{overflow-wrap:anywhere;min-width:0}
/* One responsive layout for the project band and production details. */
html body.standalone[data-view=quotations] main{max-width:1920px}
#quotation-list{max-width:none;margin-inline:auto;overflow:visible}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-rows{background:var(--ui-canvas);padding:20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block{background:var(--ui-surface);container-type:inline-size;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);overflow:hidden}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block+.quotation-project-block{margin-top:24px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-strip{font-size:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary{display:flex;flex-wrap:wrap;align-items:center;gap:24px;width:100%;padding:20px 24px;background:var(--ui-soft)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px 24px;padding:16px 24px;background:color-mix(in srgb,var(--ui-soft) 55%,var(--ui-surface));border-top:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata:empty{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-title-edit{font-size:12px;margin:4px 0 8px;min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-identity{flex:1 1 320px;min-width:0}
/* Stable action columns keep adjacent projects aligned when labels/counts differ. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools{--quotation-status-width:max(200px,13em);--quotation-invoice-width:max(112px,7.5em);display:grid;grid-template-columns:var(--quotation-status-width) minmax(0,1fr);align-items:start;gap:12px;flex:none;width:calc(var(--quotation-status-width) + var(--quotation-invoice-width)*2 + 24px);max-width:100%;margin-left:auto}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools>[data-group-field=status]{grid-column:1;grid-row:1;width:100%;min-width:0;box-sizing:border-box;min-height:44px;text-align:left;white-space:normal;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools>.quotation-invoice-links{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;margin:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools>.quotation-invoice-links.has-customer-export{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools .quotation-invoice-button{width:100%;min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools .has-customer-export .quotation-invoice-button{padding-left:4px;padding-right:4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-export-status{grid-column:1/-1;color:var(--hb-danger,#ff9aa6);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools [data-invoice-kind=invoice]{grid-column:1/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools button{margin:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-identity>.quotation-code{display:block;margin-bottom:8px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-title{font-size:var(--ui-section-size,18px);margin:0;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-title[data-missing=true]{color:var(--ui-muted);font-weight:500}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-fact{display:inline-flex;align-items:baseline;gap:8px;flex-wrap:wrap;max-width:100%;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-value{font-weight:400;color:var(--ui-ink)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-status{white-space:nowrap;font-size:12px;padding:6px 10px;border:0;border-radius:var(--ui-radius,8px);background:var(--tag-bg);color:var(--tag-fg);line-height:1.5}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-status small{display:block;font-size:12px;color:var(--ui-muted);margin-top:2px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-toggle{width:44px;height:44px;min-height:44px;padding:10px;flex:none;color:var(--ui-muted);border-color:transparent;background:transparent}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-toggle svg{width:20px;height:20px;transition:transform 120ms ease}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-toggle[aria-expanded=false] svg{transform:rotate(-90deg)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary{cursor:pointer}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary[data-complete=true]{position:relative;padding-top:24px;padding-inline-start:32px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary[data-complete=true]::before{content:"";position:absolute;top:0;left:0;width:48px;height:48px;background:var(--ui-completion-green,#32e8aa);clip-path:polygon(0 0,100% 0,0 100%);pointer-events:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-contents[hidden]{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-support-label{color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-outsourcing-facts{display:flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:100%}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-outsourcing-tag{white-space:normal;overflow-wrap:anywhere;font-size:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-links{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-button,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-download{font-size:12px;white-space:nowrap;padding:8px 12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-metadata{display:flex;flex-wrap:wrap;gap:6px 20px;font-size:11px;font-weight:400;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-column-head{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-record{position:relative;display:block;padding:20px 24px;border-top:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary{display:grid;grid-template-columns:var(--quotation-data-columns);gap:20px;align-items:start;padding:0;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell{min-width:0;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-cell::before{content:attr(data-label);display:block;font-size:12px;font-weight:400;color:var(--ui-muted);margin:0 0 8px;min-height:20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-identity{display:block}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-identity>.quotation-row-name{flex:0 1 auto;min-width:0;max-width:100%;font-weight:500}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-source-content{display:block;overflow:visible;white-space:pre-line;-webkit-line-clamp:unset}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell-value{display:block}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell-support{font-size:12px;color:var(--ui-muted);margin-top:8px;line-height:1.8}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell-support[data-column=duration] .quotation-support-value{display:inline-block;max-width:100%}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell-support[data-column=outsource_profit]{display:flex;flex-direction:column;gap:4px;margin-top:12px;padding-top:12px;border-top:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=amount],:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=unit_price]{text-align:right;font-variant-numeric:tabular-nums}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=amount]>strong{display:block;font-size:14px;white-space:nowrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=days]>.quotation-cell-value{font-size:14px;font-weight:600;white-space:nowrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=unit_price]>.quotation-cell-value{white-space:nowrap}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=subcategory] .evaluation-tag{display:inline-block;white-space:normal;font-size:11px;padding:4px 8px;line-height:1.6}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-note-label{display:block;font-size:12px;margin-bottom:4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=note] :is(.quotation-cell-value,.quotation-support-value){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;white-space:pre-line}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-note-hint{display:block;margin-top:6px;font-size:11px;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-status[data-complete=true]{color:#80cbbb}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-actions{display:grid;grid-template-columns:repeat(2,32px);align-content:start;gap:0 4px;margin:0;padding:0;background:transparent}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-actions::before{grid-column:1/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-readonly-badge{grid-column:1/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-icon-button{display:grid;place-items:center;width:32px;height:32px;min-height:32px;margin:0;padding:0;border:0;border-radius:var(--ui-radius,8px);background:transparent;color:var(--ui-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-icon-button:hover{background:var(--ui-soft);color:var(--ui-ink)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-icon-button svg{width:16px;height:16px;flex-shrink:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-toggle[aria-expanded=true] svg{transform:rotate(90deg)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-preview{min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-preview{text-align:center}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview-add{display:grid;place-items:center;width:80px;height:80px;min-height:80px;margin-inline:auto;padding:0;border:1px solid var(--ui-line);background:var(--ui-soft);color:var(--ui-muted);font-size:20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview-add:hover,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-preview[data-dragging=true]{background:var(--ui-soft)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview{display:block;position:relative;width:80px;height:80px;margin-inline:auto;padding:0;overflow:hidden;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-soft)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview img,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview video{width:100%;height:100%;object-fit:cover}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview-count{position:absolute;right:2px;bottom:2px;font-size:10px;background:#000a;color:#fff;border-radius:3px;padding:0 4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-expanded{width:100%;margin-top:20px;padding-top:16px;border-top:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-expanded[hidden]{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-manage{font-size:12px;min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-quantity-controls{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-quantity-controls>input{flex:1 1 8ch;width:0;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-quantity-controls>select{flex:0 0 auto;width:auto;min-inline-size:min(9em,100%);max-inline-size:100%;box-sizing:border-box}
@media(max-width:900px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-cell{grid-column:span 3}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-row-preview{grid-column:span 2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-identity{grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-media=true] .quotation-row-identity{grid-column:3/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=note]{grid-column:span 6}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-cell::before{margin-bottom:6px}
}
@container(min-width:761px) and (max-width:1100px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-content=true] .quotation-row-summary{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-content=true] .quotation-row-summary>.quotation-cell{grid-column:span 3}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-content=true] .quotation-row-summary>.quotation-row-preview{grid-column:span 2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-content=true] .quotation-row-identity{grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-media=true][data-has-content=true] .quotation-row-identity{grid-column:3/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-content=true] .quotation-cell[data-column=note]{grid-column:span 6}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-content=true] .quotation-row-summary>.quotation-cell::before{margin-bottom:6px}
}
@container(max-width:900px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-cell{grid-column:span 3}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-row-preview{grid-column:span 2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-identity{grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-media=true] .quotation-row-identity{grid-column:3/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=note]{grid-column:span 6}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-cell::before{margin-bottom:6px}
}
@media(min-width:761px){
@container(max-width:1250px){
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block .quotation-row-summary{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block .quotation-row-summary>.quotation-cell{grid-column:span 3}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block .quotation-row-summary>.quotation-row-preview{grid-column:span 2}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block .quotation-row-summary>.quotation-row-identity{grid-column:3/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block .quotation-row-summary>.quotation-cell[data-column=note]{grid-column:span 6}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-summary{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-summary>.quotation-cell{grid-column:span 3}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-summary>.quotation-row-preview{grid-column:span 2}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-identity{grid-column:1/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true][data-has-media=true] .quotation-row-identity{grid-column:3/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-cell[data-column=note]{grid-column:span 6}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block .quotation-row-summary>.quotation-cell:is([data-column=days],[data-column=outsourced_cost],[data-column=amount]){grid-column:span 6}
}
}
@media(min-width:761px){
 @container(min-width:650px) and (max-width:1250px){
  #quotation-workspace[data-quotation-role=superadmin] .quotation-project-block[data-wide-numbers=false] .quotation-row-summary>.quotation-cell[data-column=days]{order:1;grid-column:1/span 4}
  #quotation-workspace[data-quotation-role=superadmin] .quotation-project-block[data-wide-numbers=false] .quotation-row-summary>.quotation-cell[data-column=outsourced_cost]{order:2;grid-column:5/span 4}
  #quotation-workspace[data-quotation-role=superadmin] .quotation-project-block[data-wide-numbers=false] .quotation-row-summary>.quotation-cell[data-column=amount]{order:3;grid-column:9/span 4;text-align:left}
  #quotation-workspace[data-quotation-role=superadmin] .quotation-project-block[data-wide-numbers=false] .quotation-row-summary>.quotation-cell[data-column=action]{order:4;grid-column:1/-1;justify-content:end}
 }
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary>.quotation-cell{grid-column:span 3}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary>.quotation-row-preview{grid-column:span 2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary>.quotation-row-identity{grid-column:3/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary>.quotation-cell[data-column=note]{grid-column:span 6}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary>.quotation-cell[data-column=days]{grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary>.quotation-cell:is([data-column=outsourced_cost],[data-column=amount]){grid-column:span 6}
}
@media(max-width:760px){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata{padding:16px;gap:8px 16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary{flex-wrap:wrap;gap:12px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-identity{flex-basis:100%}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-select{order:0;margin-bottom:-8px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-identity{order:1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools{order:2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools{display:grid;width:100%;grid-template-columns:minmax(0,1fr);gap:8px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools>[data-group-field=status]{grid-column:1;grid-row:1;justify-self:stretch}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools>.quotation-project-toggle{grid-column:1;grid-row:3}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools>.quotation-invoice-links{display:grid;grid-column:1/-1;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;justify-content:start}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-links>[data-invoice-kind=invoice]{grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-rows{padding:12px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block+.quotation-project-block{margin-top:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-record{padding:20px 16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-summary{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-cell,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-summary>.quotation-cell{grid-column:span 3}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-row-preview,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-summary>.quotation-row-preview{grid-column:span 2}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-has-media=true] .quotation-row-identity{grid-column:3/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block .quotation-row-summary>.quotation-cell:is([data-column=note],[data-column=project_name],[data-column=amount],[data-column=date],[data-column=outsourced_cost],[data-column=days]){grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-wide-numbers=true] .quotation-row-summary>.quotation-cell[data-column=days]{grid-column:1/-1}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=amount],:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell[data-column=unit_price]{text-align:left}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-icon-button{width:44px;height:44px;min-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-row-summary>.quotation-row-actions,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-dense=true] .quotation-row-summary>.quotation-row-actions{grid-column:1/-1;grid-template-columns:repeat(2,44px);justify-content:end}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview-add,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-preview{width:64px;height:64px;min-height:64px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-button,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-download{min-height:44px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-cell-support[data-column=outsource_profit]{flex-direction:row;flex-wrap:wrap;gap:8px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-list .quotation-group>summary{flex-wrap:wrap}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-group-metadata{flex-basis:100%;gap:4px 14px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-heading{gap:4px 12px}
}
@media(pointer:coarse){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-icon-button{width:44px;height:44px;min-height:44px}}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-manpower-total{font-size:14px;font-weight:600;color:var(--ui-ink);margin:0 0 16px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-editor{display:flex;flex-direction:column;gap:12px;margin-top:16px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-row{display:grid;grid-template-columns:140px minmax(0,1fr) auto;gap:12px;align-items:end}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-row .quotation-field{margin:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-row button{min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-add{margin:14px 0 8px;min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-read{color:var(--ui-ink);overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-read small{display:block;color:var(--ui-muted);font-size:11px;margin-top:4px}
@media(max-width:600px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-row .quotation-field:first-child{grid-column:1}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-row .quotation-field:nth-child(2){grid-column:1/-1;grid-row:2}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-row button{grid-column:2;grid-row:1}}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-edit-dialog{scroll-padding-block:120px 140px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-addition-add+.quotation-field-hint{display:block}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-picker{border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);padding:12px;background:var(--ui-surface)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-picker summary{cursor:pointer;min-height:44px;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-options{max-height:220px;overflow:auto;margin-top:8px;scrollbar-width:thin}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-options label{display:flex;align-items:center;gap:12px;min-height:44px;padding:6px 4px;font-size:13px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-options label[hidden]{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-options input{width:18px;height:18px;min-height:18px;flex-shrink:0;accent-color:var(--ui-red)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-editor{grid-column:1/-1;border-top:1px solid var(--ui-line);padding-top:16px;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-editor h3{margin:0 0 12px;font-size:14px;font-weight:600;color:var(--ui-ink)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-rows{display:flex;flex-direction:column;gap:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-row{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:12px 20px;align-items:center;padding-bottom:12px;border-bottom:1px solid var(--ui-line)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-name{font-size:14px;font-weight:600;color:var(--ui-ink);overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-row .quotation-field{margin:0;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-row input{width:100%;min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-total{display:flex;justify-content:space-between;gap:16px;margin:16px 0 8px;color:var(--ui-muted);font-size:14px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-total strong{color:var(--ui-ink);font-size:18px;text-align:right;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-outsourcing-supplier-cost{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px 8px;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-outsourcing-supplier-cost strong{font-size:13px;color:var(--ui-ink);font-weight:600}
@media(max-width:600px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-row{grid-template-columns:minmax(0,1fr);gap:8px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-total{flex-wrap:wrap}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-supplier-cost-total strong{text-align:left}}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-links{justify-content:flex-end}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item select{max-width:220px;min-height:44px}

/* Direct, version-checked status changes retain the existing status colors. */
body.standalone :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-status-select{min-width:0;appearance:auto;cursor:pointer;min-height:44px;max-width:100%;width:auto;padding:8px 28px 8px 10px;font-size:13px;background:var(--tag-bg,var(--ui-soft));color:var(--tag-fg,var(--ui-ink));border:1px solid var(--ui-line);margin:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-status-select option{background:var(--ui-surface);color:var(--ui-ink)}
.quotation-status-popover{position:fixed;inset:auto;margin:0;max-width:calc(100vw - 24px);max-height:60dvh;overflow:auto;padding:18px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink);box-shadow:0 12px 36px #0004}
.quotation-status-phase{display:grid;gap:8px;padding:12px 0;border-top:1px solid var(--ui-line);overflow-wrap:anywhere}.quotation-status-phase select{width:100%;min-height:44px;font-size:16px}.quotation-inline-status{display:block;font-size:12px;line-height:1.6;color:var(--ui-muted);max-width:280px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-tools>.quotation-status-popover{grid-column:auto}

/* Shared compact attachment dialog: type/date first, saved files secondary. */
body.standalone #quotation-attachment-dialog{width:min(800px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:hidden}
#quotation-attachment-dialog[open]{display:flex;flex-direction:column}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-attachment-dialog .quotation-modal-head{padding:20px 24px;flex:none}#quotation-attachment-dialog .quotation-modal-head h2{font-size:24px;line-height:1.4;margin:0}#quotation-attachment-dialog .quotation-modal-head button{margin:0;min-height:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body{overflow:auto;min-height:0;padding:20px 24px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body label{font-size:14px;color:var(--ui-ink);min-width:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body [hidden]{display:none}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body :is(input,select){font-size:16px;min-width:0;margin:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-fields small{margin:0;font-size:12px;line-height:1.5}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-saved-files{border-top:1px solid var(--ui-line);padding-top:18px;margin-top:24px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-saved-files h3{font-size:16px;margin:0 0 12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item{flex-wrap:wrap;gap:12px;padding:14px 0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-identity{flex:1;min-width:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-identity strong{display:block;font-size:14px;overflow-wrap:anywhere}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-identity small{display:block;color:var(--ui-muted);font-size:12px;margin-top:6px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-list{margin-bottom:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-delivery{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-delivery>span{flex-basis:100%;font-size:12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-delivery strong{font-size:14px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-delivery button{margin:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-delivery-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-delivery-controls input{flex:1;width:auto;min-width:150px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 24px;flex:none;border-top:1px solid var(--ui-line);background:var(--ui-surface)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-footer .quotation-section-hint{margin:0;font-size:12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-footer button{margin:0;min-height:44px;flex:none}
@media(max-width:650px){body.standalone #quotation-attachment-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-attachment-dialog .quotation-modal-head,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-body{padding:16px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-fields{grid-template-columns:minmax(0,1fr);gap:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-footer{padding:12px 16px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-attachment-footer button{min-width:110px}}

body.standalone :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item>a.secondary{display:inline-flex;align-items:center;justify-content:center;min-width:56px;min-height:44px;padding:8px 12px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);color:var(--ui-ink);font:inherit;font-size:13px;text-decoration:none;box-sizing:border-box}body.standalone :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-file-item>a.secondary:hover{background:var(--ui-soft)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-tencent-evidence{flex:0 1 auto;min-width:0;color:var(--ui-muted);font-size:var(--ui-font-small,14px)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-tencent-evidence summary{min-height:44px;display:flex;align-items:center}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-tencent-evidence p{overflow-wrap:anywhere;margin:8px 0}
.quotation-tencent-import{width:min(900px,calc(100vw - 32px));max-height:85vh;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:var(--ui-radius,16px);padding:24px}
.quotation-tencent-import-list{max-height:45vh;overflow:auto;margin:16px 0}.quotation-tencent-import button{min-height:44px;margin-right:12px}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-tencent-identifiers{display:grid;gap:6px;flex:1 1 280px;min-width:0;margin-top:0;font-size:var(--ui-font-small,14px);color:var(--ui-muted)}

/* Dates share the existing metadata band; wrap whole facts before splitting date text. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact.quotation-tencent-date{min-width:108px}
@media(max-width:720px){body.standalone :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata>:is(.quotation-outsourcing-facts,.quotation-internal-tag,.quotation-modern-row-tools,.quotation-tencent-evidence){grid-column:1/-1}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata>.quotation-internal-tag{justify-self:start}}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary:has(>.quotation-tencent-identifiers)>.quotation-project-identity{flex:0 1 auto;max-width:clamp(220px,30cqw,480px)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-tencent-identifiers>.quotation-project-fact{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;align-items:baseline}
@media(max-width:720px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary:has(>.quotation-tencent-identifiers)>.quotation-project-identity{flex:1 1 100%;max-width:none}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary>.quotation-tencent-identifiers{order:1;flex-basis:100%}}

/* Keep off-screen projects in the document while deferring their internal layout.
   The auto size remembers measured heights when leaving and returning to a module. */
@supports(content-visibility:auto){
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block{content-visibility:auto;contain-intrinsic-block-size:auto 700px}
 :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-collapsed=true]{content-visibility:visible;contain-intrinsic-block-size:none}
}
@media print{:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block{content-visibility:visible;contain-intrinsic-block-size:none}}

/* Together project identity belongs to the existing project strip and form. */
.quotation-together-sync{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:8px 0;color:var(--ui-muted);font-size:13px;overflow-wrap:anywhere}
.quotation-together-sync>small{flex-basis:100%}.quotation-together-actions{display:flex;flex-wrap:wrap;gap:8px}.quotation-together-actions button,.quotation-together-actions a{min-height:44px}
.quotation-together-sync[data-state="failed"]>span{color:var(--ui-red)}
.quotation-together-identity{display:grid;gap:12px;padding:20px}.quotation-together-identity label{display:grid;gap:6px}.quotation-together-identity input{width:100%;min-height:44px}
.native-together-optin{min-height:44px;margin-top:8px}.native-together-optin input{min-width:20px;min-height:20px}
@media(max-width:700px){.quotation-together-actions{width:100%}.quotation-together-actions>*{flex:1 1 140px}.quotation-together-identity{padding:16px}}


.quotation-project-strip>.quotation-together-sync{padding:10px 20px;border-top:1px solid var(--ui-line)}
.quotation-together-actions>button,.quotation-together-actions>a{margin:0}
.quotation-together-actions>a{display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-soft);color:var(--ui-ink);font:inherit;text-decoration:none;white-space:normal;text-align:center}

/* Recoverable native project phases, using the shared dialog theme. */
body.standalone .quotation-trash-dialog{width:min(680px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;overflow:hidden;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink)}
.quotation-trash-dialog[open]{display:flex;flex-direction:column}.quotation-trash-dialog::backdrop{background:#0009}
.quotation-trash-dialog .finance-submissions-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;padding:20px 24px;border-bottom:1px solid var(--ui-line)}
body.standalone .quotation-trash-dialog h2{margin:0;font-size:var(--ui-section-size,24px);line-height:1.35}.quotation-trash-dialog .finance-submissions-heading button,.quotation-trash-item button{min-width:44px;min-height:44px;margin:0}
.quotation-trash-dialog .member-dialog-body{padding:20px 24px 24px;overflow:auto;min-height:0}.quotation-trash-dialog .member-dialog-body>p{font-size:14px;line-height:1.7;color:var(--ui-muted);margin:0 0 14px}.quotation-trash-dialog [role=status]:empty{display:none}
.quotation-trash-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 16px;align-items:start;padding:16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-soft);margin-top:10px}.quotation-trash-item strong{font-size:16px;line-height:1.5;overflow-wrap:anywhere}.quotation-trash-item p{grid-column:1;margin:0;font-size:13px;line-height:1.6;color:var(--ui-muted);overflow-wrap:anywhere}.quotation-trash-item button{grid-column:2;grid-row:1 / span 3;align-self:center}
@media(max-width:650px){body.standalone .quotation-trash-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.quotation-trash-dialog .finance-submissions-heading{padding:16px}.quotation-trash-dialog .member-dialog-body{padding:16px}.quotation-trash-item{grid-template-columns:minmax(0,1fr);padding:14px}.quotation-trash-item button{grid-column:1;grid-row:auto;justify-self:start;margin-top:6px}}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-preview{max-height:65dvh;overflow:auto;text-align:center;background:var(--hb-subtle)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-preview>p{padding:16px;margin:0;color:var(--hb-text)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-preview>[hidden]{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-invoice-canvas{display:block;max-width:100%;height:auto;margin:auto;background:white}

/* Business overview uses the existing product theme and information hierarchy. */
body.standalone[data-view=cash] #finance-workspace{display:block}
body.standalone[data-view=cash] #finance-workspace .business-controls>label{display:none}
#finance-workspace{min-width:0;--business-muted:color-mix(in srgb,var(--ui-muted) 80%,var(--ui-ink))}
#finance-workspace .business-controls{display:flex;align-items:end;gap:12px;margin-bottom:12px}
#finance-workspace .business-controls label{display:grid;gap:6px;min-width:0;font-size:12px;color:var(--business-muted)}
#finance-workspace .business-controls label:first-child{width:156px}
#finance-workspace .business-controls label:nth-child(2){width:280px;max-width:50%}
#finance-workspace .business-controls label:nth-child(3){width:150px;max-width:25%}
#finance-workspace .business-controls select{width:100%;min-width:0;height:42px;font-size:14px;margin:0}
#finance-workspace .business-controls button{margin:0 0 0 auto;min-height:42px}
#finance-workspace #finance-status{font-size:12px;color:var(--business-muted);margin:8px 0 18px;overflow-wrap:anywhere}
#finance-workspace #finance-content{display:grid;gap:18px}
#finance-workspace :is(h2,h3,p){color:inherit}
#finance-workspace h2{font-size:16px;font-weight:650;line-height:1.5;margin:0}
#finance-workspace h3{font-size:14px;font-weight:600;line-height:1.5;margin:0}
#finance-workspace p{margin:0}
#finance-workspace .business-company-profit{background:var(--ui-surface);padding:24px}
#finance-workspace .business-profit-period{display:grid;gap:4px;min-width:150px}
#finance-workspace .business-profit-period select{margin:0;min-height:44px;font-size:14px}
#finance-workspace .business-profit-summary{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:32px;align-items:center;margin:20px 0 16px}
#finance-workspace .business-profit-result{font-size:clamp(24px,3vw,38px);line-height:1.35;font-weight:650;display:block;margin-top:6px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .business-profit-result[data-tone=good]{color:var(--ui-green)}
#finance-workspace .business-profit-result[data-tone=loss]{color:var(--ui-red)}
#finance-workspace .business-profit-inputs{display:grid;gap:8px}
#finance-workspace .business-profit-trend{--hb-font:var(--ui-font,"Segoe UI","Microsoft YaHei",Arial,sans-serif);--hb-body:14px;--hb-caption:12px;--hb-radius:10px;--hb-text:var(--ui-ink);--hb-muted:var(--business-muted);--hb-border:var(--ui-line);--hb-brand:var(--ui-red);--hb-good:var(--ui-green);--hb-danger:var(--ui-red);--hb-subtle:var(--ui-soft);--hb-surface:var(--ui-surface);--hb-canvas:var(--ui-surface)}
@media(max-width:650px){#finance-workspace .business-company-profit{padding:16px}#finance-workspace .business-company-profit .business-panel-heading{align-items:stretch;flex-direction:column}#finance-workspace .business-profit-period{min-width:0;width:100%}#finance-workspace .business-profit-period select{font-size:16px}#finance-workspace .business-profit-summary{grid-template-columns:1fr;gap:16px}#finance-workspace .business-profit-trend{--hb-body:16px}}
#finance-workspace .business-note{font-size:12px;color:var(--business-muted);line-height:1.65;overflow-wrap:anywhere}
#finance-workspace .business-scope{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--business-muted)}
#finance-workspace .business-scope strong{font-weight:600;color:var(--ui-ink)}
#finance-workspace .finance-cash-period{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin-bottom:12px}
#finance-workspace .finance-cash-period label{display:grid;gap:6px;min-width:0;font-size:12px;color:var(--business-muted)}
#finance-workspace .finance-cash-period input{min-height:44px;box-sizing:border-box;max-width:100%;margin:0}
#finance-workspace .finance-cash-period button{min-height:44px;margin:0}
#finance-workspace .finance-cash .business-metrics{margin-top:18px}
#finance-workspace .finance-cash-actual{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px;padding-top:16px;border-top:1px solid var(--ui-line)}
#finance-workspace .finance-cash-actual>div{display:grid;gap:8px;min-width:0}
#finance-workspace .finance-cash-actual strong{font-size:16px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .finance-cash-row{display:grid;gap:6px;border-bottom:1px solid var(--ui-line);padding:14px 0;overflow-wrap:anywhere}
#finance-workspace .finance-cash-paging{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding-top:12px}
#finance-workspace .finance-cash-paging button{min-height:44px}
@media(max-width:700px){#finance-workspace .finance-cash-period{display:grid;grid-template-columns:minmax(0,1fr)}#finance-workspace .finance-cash-period input{width:100%;min-width:0}#finance-workspace .finance-cash-actual{grid-template-columns:repeat(2,minmax(0,1fr))}#finance-workspace .finance-cash .business-metrics{grid-template-columns:1fr}}
#finance-workspace .business-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
#finance-workspace .business-metric{min-width:0;border:1px solid var(--ui-line);border-radius:8px;padding:18px 18px 16px;background:var(--ui-soft)}
#finance-workspace .business-metric-label{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--business-muted)}
#finance-workspace .business-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex:none;background:var(--ui-red)}
#finance-workspace [data-tone=good] .business-dot{background:var(--ui-green)}
#finance-workspace [data-tone=amber] .business-dot{background:var(--ui-amber)}
#finance-workspace [data-tone=neutral] .business-dot{background:var(--business-muted)}
#finance-workspace .business-metric-value{display:block;font-size:clamp(22px,2.2vw,30px);letter-spacing:-.6px;line-height:1.3;font-weight:650;font-variant-numeric:tabular-nums;margin:14px 0 8px;overflow-wrap:anywhere}
#finance-workspace .business-profit-support{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--ui-line);padding:0 0 16px}
#finance-workspace .business-profit-support>strong{font-size:20px;font-weight:650;font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:anywhere}
#finance-workspace .business-primary-grid{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(260px,1fr);gap:18px;align-items:start}
#finance-workspace .business-secondary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}
#finance-workspace .business-panel{min-width:0;padding:20px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface)}
#finance-workspace .business-panel-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:18px}
#finance-workspace .business-panel-heading>div{min-width:0}
#finance-workspace .business-panel-heading .business-note{margin-top:5px}
#finance-workspace .business-panel-heading button{padding:0;min-height:30px;margin:0;border:0;background:transparent;color:var(--business-muted);font-size:12px;white-space:nowrap;box-shadow:none}
#finance-workspace .business-segments{display:flex;gap:4px;background:var(--ui-soft);padding:4px;border-radius:8px;margin-bottom:18px;width:fit-content;max-width:100%}
#finance-workspace .business-segments button{font-size:12px;margin:0;border:0;background:transparent;color:var(--business-muted);padding:7px 12px;min-height:34px;box-shadow:none}
#finance-workspace .business-segments button[aria-pressed=true]{background:var(--ui-surface);color:var(--ui-ink)}
#finance-workspace .business-chart{display:block;width:100%;height:auto;max-height:280px;overflow:visible}
#finance-workspace .business-chart-wrap{position:relative;min-width:0}
#finance-workspace .business-chart-tooltip{position:absolute;top:12px;z-index:3;max-width:100%;width:max-content;min-width:150px;padding:12px;background:var(--ui-surface);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:8px;box-shadow:0 6px 20px color-mix(in srgb,var(--ui-ink) 14%,transparent);pointer-events:none;font-size:12px;box-sizing:border-box}
#finance-workspace .business-chart-tooltip[hidden]{display:none}
#finance-workspace .business-chart-tooltip .business-data-row{gap:10px;padding:6px 0}
#finance-workspace .business-hover-guide{stroke:var(--business-muted);stroke-width:1;pointer-events:none}
#finance-workspace [data-chart-hit]{cursor:crosshair;outline-offset:2px}
#finance-workspace [data-chart-hit]:focus-visible{outline:2px solid var(--ui-red)}
#finance-workspace .business-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#finance-workspace .business-trend-control{display:grid;gap:6px;max-width:330px;margin-bottom:16px}
#finance-workspace .business-trend-control select{margin:0;min-height:44px;width:100%;font-size:14px}
#finance-workspace .business-analysis-finding{margin-top:16px;padding:14px 0;font-size:14px;line-height:1.7;border-bottom:1px solid var(--ui-line)}
#finance-workspace .business-matrix-scroll{max-width:100%;overflow-x:auto;margin-top:16px;overscroll-behavior-x:contain}
#finance-workspace .business-matrix{width:100%;border-collapse:collapse;font-size:12px;color:var(--ui-ink)}
#finance-workspace .business-matrix caption{text-align:left;color:var(--business-muted);padding-bottom:12px}
#finance-workspace .business-matrix :is(td,th){padding:12px;text-align:right;border-bottom:1px solid var(--ui-line);white-space:nowrap;font-variant-numeric:tabular-nums}
#finance-workspace .business-matrix th:first-child{text-align:left;min-width:110px;max-width:220px;white-space:normal;overflow-wrap:anywhere}
#finance-workspace .business-matrix th{font-weight:600}
#finance-workspace .business-matrix td{background:linear-gradient(to right,color-mix(in srgb,var(--ui-red) 10%,var(--ui-surface)) var(--business-share,0%),var(--ui-surface) var(--business-share,0%));min-width:74px}
#finance-workspace .business-matrix td span{display:block;color:var(--business-muted);margin-top:4px}
#finance-workspace .business-readiness{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}
#finance-workspace .business-readiness strong{display:block;font-size:14px;margin-bottom:6px}
#finance-workspace .business-analysis-charts{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,1fr);align-items:start;gap:28px;margin-top:20px}
#finance-workspace .business-analysis-chart{min-width:0}
#finance-workspace .business-analysis-chart>select{font-size:14px;min-height:44px;width:100%;max-width:280px;margin:12px 0 18px}
#finance-workspace .business-pie-wrap{display:grid;grid-template-columns:minmax(130px,.65fr) minmax(0,1fr);align-items:center;gap:16px}
#finance-workspace .business-pie-graphic{position:relative;container-type:inline-size;max-width:240px;width:100%;margin:0 auto}
#finance-workspace .business-pie{display:block;width:100%;height:auto}
#finance-workspace .business-pie-center{position:absolute;inset:30%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;pointer-events:none;overflow-wrap:anywhere}
#finance-workspace .business-pie-center strong{font-size:clamp(15px,11cqi,22px);line-height:1.4;font-weight:650;font-variant-numeric:tabular-nums}
#finance-workspace .business-pie-legend{min-width:0}
#finance-workspace .business-pie-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;width:100%;min-height:44px;padding:10px 0;margin:0;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;background:transparent;color:var(--ui-ink);box-shadow:none;text-align:left;font-size:12px}
#finance-workspace .business-pie-entry>span{display:flex;gap:8px;align-items:center;min-width:0;overflow-wrap:anywhere;grid-row:1/3}
#finance-workspace .business-pie-entry i{width:8px;height:8px;border-radius:50%;flex:none}
#finance-workspace .business-pie-entry strong{font-weight:600;font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:anywhere}
#finance-workspace .business-pie-entry small{text-align:right;color:var(--business-muted);font-size:11px}
#finance-workspace .business-pie-entry:hover{background:var(--ui-soft)}
#finance-workspace .business-category-line{max-height:none}
#finance-workspace [data-category-line-hit]{cursor:crosshair;outline-offset:2px}
#finance-workspace [data-category-line-hit]:focus-visible{outline:2px solid var(--ui-red)}
@media(max-width:1020px){#finance-workspace .business-analysis-charts{grid-template-columns:minmax(0,1fr)}#finance-workspace .business-pie-wrap{grid-template-columns:minmax(160px,.7fr) minmax(0,1fr);align-items:center}}
@media(max-width:650px){
 #finance-workspace .business-pie-wrap{grid-template-columns:minmax(0,1fr)}
 #finance-workspace .business-analysis-chart>select{font-size:16px;max-width:none}
 #finance-workspace .business-readiness{grid-template-columns:minmax(0,1fr)}
 #finance-workspace .business-trend-control{max-width:none}#finance-workspace .business-trend-control select{font-size:16px}
 #finance-workspace .business-matrix-scroll{overflow-x:visible}
 #finance-workspace .business-matrix,#finance-workspace .business-matrix tbody{display:block}
 #finance-workspace .business-matrix caption{display:block;width:100%;white-space:normal}
 #finance-workspace .business-matrix thead{display:none}
 #finance-workspace .business-matrix tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--ui-line);padding:12px 0;gap:8px}
 #finance-workspace .business-matrix th:first-child{grid-column:1/-1;min-width:0;max-width:none;padding:0;border:0}
 #finance-workspace .business-matrix td{min-width:0;padding:8px 6px;border:0;white-space:normal;overflow-wrap:anywhere;text-align:left}
 #finance-workspace .business-matrix td::before{content:attr(data-year);display:block;font-size:11px;color:var(--business-muted);margin-bottom:5px}
}
#finance-workspace .business-chart text{font:12px "Segoe UI","Microsoft YaHei",sans-serif;fill:var(--business-muted)}
#finance-workspace .business-chart .business-grid{stroke:var(--ui-line);stroke-dasharray:3 5}
#finance-workspace .business-series-primary{fill:var(--ui-red)}
#finance-workspace .business-series-secondary{fill:var(--ui-green)}
#finance-workspace .business-series-pending{fill:var(--ui-amber)}
#finance-workspace .business-chart-legend{display:flex;gap:18px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--business-muted);margin:12px 0}
#finance-workspace .business-chart-legend span{display:flex;align-items:center;gap:6px}
#finance-workspace .business-chart-legend i{width:8px;height:8px;border-radius:2px;background:var(--ui-red)}
#finance-workspace .business-chart-legend i.secondary{background:var(--ui-green)}
#finance-workspace .business-chart-legend i.pending{background:var(--ui-amber)}
#finance-workspace .business-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;min-height:160px;text-align:center;background:var(--ui-soft);border-radius:8px;padding:20px;color:var(--business-muted);font-size:12px}
#finance-workspace .business-empty strong{font-size:14px;font-weight:600;color:var(--ui-ink)}
#finance-workspace .business-details{font-size:12px;border-top:1px solid var(--ui-line);margin-top:16px;padding-top:12px}
#finance-workspace .business-details>summary{cursor:pointer;color:var(--business-muted);min-height:32px;padding:5px 0}
#finance-workspace .business-data-list{display:grid;gap:0;margin-top:8px}
#finance-workspace .business-data-row{display:flex;justify-content:space-between;align-items:start;gap:16px;padding:10px 0;border-bottom:1px solid var(--ui-line);font-size:12px}
#finance-workspace .business-data-row:last-child{border:0}
#finance-workspace .business-data-row>span:first-child{min-width:0;overflow-wrap:anywhere}
#finance-workspace .business-data-row>strong{font-variant-numeric:tabular-nums;text-align:right}
#finance-workspace .business-data-row>strong{min-width:0;overflow-wrap:anywhere}
#finance-workspace .business-task{display:block;width:100%;text-align:left;margin:0;padding:13px 0;border:0;border-top:1px solid var(--ui-line);border-radius:0;background:transparent;color:var(--ui-ink);box-shadow:none}
#finance-workspace .business-task:first-child{border:0;padding-top:0}
#finance-workspace .business-task-top{display:flex;justify-content:space-between;gap:12px;font-size:12px;align-items:start}
#finance-workspace .business-task-top>strong{font-weight:600;min-width:0;overflow-wrap:anywhere}
#finance-workspace .business-task-state{font-size:11px;color:var(--ui-amber);flex:none}
#finance-workspace .business-task[data-urgent=true] .business-task-state{color:var(--ui-red)}
#finance-workspace .business-task-amount{display:block;font-size:19px;font-weight:600;font-variant-numeric:tabular-nums;margin:4px 0}
#finance-workspace .business-task .business-note{display:block}
#finance-workspace .business-task:hover{background:var(--ui-soft)}
#finance-workspace .business-bars{display:grid;gap:14px}
#finance-workspace .business-bar-top{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:6px;font-size:12px}
#finance-workspace .business-bar-top>span{min-width:0;overflow-wrap:anywhere}
#finance-workspace .business-bar-top>strong{flex:none;font-weight:600;font-variant-numeric:tabular-nums}
#finance-workspace .business-bar-graphic{display:block;width:100%;height:7px}
#finance-workspace .business-bar-track{fill:var(--ui-soft)}
#finance-workspace .business-bar-fill{fill:var(--ui-red)}
#finance-workspace .business-bar[data-tone=good] .business-bar-fill{fill:var(--ui-green)}
#finance-workspace .business-bar[data-tone=amber] .business-bar-fill{fill:var(--ui-amber)}
#finance-workspace .business-bar[data-tone=neutral] .business-bar-fill{fill:var(--business-muted)}
#finance-workspace .business-bar .business-note{margin-top:4px}
#finance-workspace .business-summary-line{display:flex;justify-content:space-between;gap:12px;margin-bottom:20px;align-items:baseline}
#finance-workspace .business-summary-line strong{font-size:26px;font-weight:650;font-variant-numeric:tabular-nums}
#finance-workspace .business-profit{display:flex;justify-content:space-between;gap:18px;align-items:baseline;padding:14px 0;border-bottom:1px solid var(--ui-line)}
#finance-workspace .business-profit>strong{font-size:22px;font-variant-numeric:tabular-nums;font-weight:650;flex:none}
#finance-workspace .business-profit:last-child{border:0}
#finance-workspace .business-footer{font-size:12px;color:var(--business-muted);line-height:1.7}
#finance-workspace :is(button,summary):focus-visible{outline:2px solid var(--ui-red);outline-offset:3px}
@media(max-width:1180px){#finance-workspace .business-secondary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#finance-workspace .business-secondary-grid>:last-child{grid-column:1/-1}}
@media(max-width:1200px){#finance-workspace .business-primary-grid{grid-template-columns:minmax(0,1fr)}#finance-workspace .business-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){
 #finance-workspace .business-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:10px}
 #finance-workspace .business-controls label:first-child,#finance-workspace .business-controls label:nth-child(2){width:auto;max-width:none}
 #finance-workspace .business-controls label:nth-child(3){width:auto;max-width:none}
 #finance-workspace .business-controls select{height:44px;font-size:16px}
 #finance-workspace .business-controls button{grid-column:2;justify-self:end;min-height:44px;font-size:12px;padding:8px 12px;margin:0}
 #finance-workspace #finance-content{gap:14px}
 #finance-workspace .business-metrics{gap:10px}
 #finance-workspace .business-metric{padding:14px 12px}
 #finance-workspace .business-metric-value{font-size:22px;margin:10px 0 7px;letter-spacing:-.6px}
 #finance-workspace .business-metric-label,#finance-workspace .business-metric .business-note{font-size:11px}
 #finance-workspace .business-secondary-grid{grid-template-columns:minmax(0,1fr);gap:14px}
 #finance-workspace .business-primary-grid{gap:14px}
 #finance-workspace .business-panel{padding:16px}
 #finance-workspace .business-panel-heading{margin-bottom:16px}
 #finance-workspace .business-panel-heading button,#finance-workspace .business-segments button{min-height:44px}
 #finance-workspace .business-segments{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 #finance-workspace .business-segments button{padding:8px 7px}
 #finance-workspace .business-details>summary{min-height:44px;padding:10px 0}
 #finance-workspace .business-task{min-height:44px}
 #finance-workspace .business-profit-support{flex-wrap:wrap;gap:8px}
 #finance-workspace .business-profit-support>strong{margin-left:auto}
 #finance-workspace .business-data-row{flex-wrap:wrap}
 #finance-workspace .business-data-row>strong{margin-left:auto}
 #finance-workspace .business-profit{flex-wrap:wrap;gap:7px}
 #finance-workspace .business-profit>strong{margin-left:auto}
}

/* Shared business-list paging: neutral controls, public palette and sizing. */
.standalone .list-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;margin:16px 0;padding:12px 0;color:var(--ui-muted);font-size:13px;line-height:1.6;border-block:1px solid var(--ui-line);min-width:0;scroll-margin-top:20px}
.standalone .list-pagination-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;min-width:0}
.standalone .list-pagination-count{font-variant-numeric:tabular-nums;white-space:normal}
.standalone .list-pagination :is(.list-pagination-size,.list-pagination-jump){display:flex;align-items:center;gap:8px;margin:0;color:var(--ui-muted);font-size:13px;min-width:0}
.standalone .list-pagination-controls{display:flex;align-items:center;gap:6px;min-width:0}
.standalone .list-pagination button{margin:0;min-height:40px;padding:8px 12px;font-size:13px;line-height:1.6;white-space:nowrap;border-radius:var(--ui-radius,8px);background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
.standalone .list-pagination select{width:auto;max-width:100%;min-height:40px;margin:0;padding:8px 28px 8px 10px;font:inherit;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);color:var(--ui-ink);background-color:var(--ui-surface)}
.standalone .list-pagination button:disabled{opacity:.4;cursor:default}
.standalone .list-pagination :is(button,select):focus-visible{outline:2px solid var(--ui-red);outline-offset:2px}
.standalone .list-pagination-note{flex-basis:100%;font-size:12px;color:var(--ui-muted)}
.standalone .app-back-to-top{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:calc(max(20px,env(safe-area-inset-bottom)) + var(--back-top-lift,0px));z-index:45;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;border:1px solid var(--ui-red);border-radius:var(--ui-radius,8px);background:var(--ui-red);color:#fff;box-shadow:0 4px 14px #0003}
.standalone .app-back-to-top[hidden]{display:none}
.standalone .app-back-to-top[data-placement]{right:auto}
.standalone .app-back-to-top>svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.standalone .app-back-to-top:focus-visible{outline:2px solid var(--ui-red);outline-offset:3px}
@media(max-width:650px){
 .standalone .app-back-to-top{right:max(14px,env(safe-area-inset-right));bottom:calc(76px + env(safe-area-inset-bottom) + var(--back-top-lift,0px))}
 .standalone .list-pagination{gap:12px;margin:12px 0;padding:12px 0}
 .standalone .list-pagination-summary{width:100%;justify-content:space-between;gap:8px}
 .standalone .list-pagination-count{flex:1 1 100px;font-size:12px}
 .standalone .list-pagination-controls{width:100%;justify-content:space-between;gap:4px}
 .standalone .list-pagination :is(button,select){min-height:44px;font-size:14px}
 .standalone .list-pagination button{padding:8px;min-width:44px}
 .standalone .list-pagination button:is([data-page-action=first],[data-page-action=last]){display:none}
 .standalone .list-pagination-jump select{min-width:82px}
 .standalone .list-pagination-size select{max-width:142px}
}

/* Shared reading hierarchy: identity, business value, supporting context.
   All modules retain their role projection and semantic status/category colors. */
body.standalone{
 --ui-page-size:34px;--ui-section-size:24px;--ui-identity-size:21px;
 --ui-value-size:23px;--ui-label-size:14px;--ui-help-size:12px;
 --ui-muted:#a8b2c3;--ui-completion-green:#32e8aa;
}
body.standalone .app-page-heading h1{font-size:var(--ui-page-size);font-weight:750;line-height:1.25;letter-spacing:-.5px}
body.standalone .app-page-heading .lead{font-size:14px;line-height:1.7;margin-top:10px;max-width:65ch}
body.standalone .app-page-heading .eyebrow{font-size:11px}
body.standalone :is(.procurement-draft>h2,.settlement-top h2,.work-overview-heading h2){font-size:var(--ui-section-size);font-weight:700}
body.standalone :is(.supplier-card-head h3,.supplier-library-card>h3,.work-task-summary h3,.work-task-summary h4,.payment-priority-card h4){font-size:var(--ui-identity-size);font-weight:700;line-height:1.5}
body.standalone :is(.work-task-amount,.payment-card-amount,.settlement-amounts>div:first-child strong){font-size:28px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.4}
body.standalone :is(.work-task-amount small,.payment-card-amount small){font-size:var(--ui-help-size);font-weight:400;color:var(--ui-muted)}
body.standalone .work-overview-stat>strong{font-size:32px;font-weight:700;line-height:1.3}
body.standalone :is(.draft-fields label,.overview-controls label,.supplier-search-controls label){font-size:var(--ui-label-size)}
body.standalone :is(.supplier-cooperation-summary,.work-task-bottom p,.supplier-library-card .supplier-review-details,.index-hint){font-size:var(--ui-help-size);line-height:1.7}
body.standalone :is(.supplier-rating-main>strong,.bank-info-value){font-size:17px}
body.standalone #finance-workspace :is(h2,.business-panel-heading h2){font-size:var(--ui-section-size);font-weight:700}
body.standalone #finance-workspace h3{font-size:18px;font-weight:650}
body.standalone #finance-workspace .business-metric-value{font-size:32px;font-weight:700}
body.standalone #finance-workspace .business-task-amount{font-size:var(--ui-value-size);font-weight:700}
body.standalone #finance-workspace :is(.business-metric-label,.business-controls label){font-size:var(--ui-label-size)}
body.standalone #quotation-workspace .quotation-year-label{font-size:var(--ui-section-size);font-weight:700}
body.standalone #quotation-workspace .quotation-code-label{font-size:18px;font-weight:650}
body.standalone #quotation-workspace .quotation-project-title{font-size:var(--ui-identity-size);font-weight:700;line-height:1.5}
body.standalone #quotation-workspace .quotation-row-name{font-size:18px;font-weight:650}
body.standalone #quotation-workspace .quotation-cell{font-size:15px}
body.standalone #quotation-workspace .quotation-cell[data-column=days]>.quotation-cell-value,
body.standalone #quotation-workspace .quotation-cell[data-column=amount]>strong{font-size:var(--ui-value-size);font-weight:700;line-height:1.4;white-space:normal}
body.standalone #quotation-workspace .quotation-cell[data-column=unit_price]{font-size:16px}
body.standalone #quotation-workspace :is(.quotation-row-summary>.quotation-cell::before,.quotation-group-metadata,.quotation-group-source,.quotation-year-count,.quotation-group-count,.quotation-cell-support){font-size:var(--ui-help-size);font-weight:400;line-height:1.7;color:var(--ui-muted)}
body.standalone #quotation-workspace .quotation-project-status{font-size:14px;font-weight:600}
body.standalone #quotation-workspace :is(.quotation-search,.quotation-filters label){font-size:var(--ui-label-size)}
body.standalone #quotation-workspace :is(.quotation-search input,.quotation-filters select){font-size:16px}
/* Approved parallel editor. DOM order also follows the mobile reading order. */
body.standalone #quotation-workspace #quotation-edit-dialog{max-width:1120px}
body.standalone #quotation-workspace .quotation-modal-head{padding:24px 28px}
body.standalone #quotation-workspace .quotation-modal-head h2{font-size:32px;font-weight:750;line-height:1.3}
body.standalone #quotation-workspace #quotation-edit-context{font-size:13px;line-height:1.7}
body.standalone #quotation-workspace #quotation-modal-body{padding:0 28px}
body.standalone #quotation-workspace .quotation-form-core{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'identity work' 'time manpower';column-gap:40px;align-items:start}
body.standalone #quotation-workspace [data-form-area=identity]{grid-area:identity}
body.standalone #quotation-workspace [data-form-area=work]{grid-area:work}
body.standalone #quotation-workspace [data-form-area=time]{grid-area:time}
body.standalone #quotation-workspace [data-form-area=manpower]{grid-area:manpower}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-form-section{padding:24px 0;border-bottom:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-form-section h2{font-size:22px;font-weight:700;margin-bottom:20px}
body.standalone #quotation-workspace .quotation-field{font-size:14px}
body.standalone #quotation-workspace .quotation-field-label{font-size:14px;color:var(--ui-ink)}
body.standalone #quotation-workspace .quotation-field :is(input,select,textarea){font-size:16px;line-height:1.6}
body.standalone #quotation-workspace :is(.quotation-field-hint,.quotation-section-hint){font-size:12px;line-height:1.7;font-weight:400}
body.standalone #quotation-workspace .quotation-section-hint{margin:-10px 0 20px}
body.standalone #quotation-workspace .quotation-field :is(input,select,textarea)[required]{background:color-mix(in srgb,var(--ui-red) 12%,var(--ui-surface));border-color:color-mix(in srgb,var(--ui-red) 60%,var(--ui-line))}
body.standalone #quotation-workspace .quotation-field:has([required]) .quotation-field-label::after{content:' · 必填';font-size:12px;color:#ffb6bf;font-weight:400}
body.standalone #quotation-workspace .quotation-manpower-total{font-size:24px;font-weight:700;line-height:1.5;margin:20px 0 0;padding:16px;background:var(--ui-soft);border-radius:var(--ui-radius,8px)}
body.standalone #quotation-workspace .quotation-addition-row{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) auto;gap:10px}
body.standalone #quotation-workspace .quotation-addition-row button{font-size:12px;padding:8px;min-height:44px}
@media(min-width:1600px){
 html body.standalone main,html body.standalone[data-view=quotations] main{max-width:1720px;width:100%;box-sizing:border-box;padding-inline:40px}
 body.standalone{--ui-page-size:38px;--ui-identity-size:24px;--ui-value-size:26px}
 body.standalone .app-page-heading{margin:36px 0 28px}
}
@media(max-width:650px){
 body.standalone{--ui-page-size:28px;--ui-section-size:20px;--ui-identity-size:18px;--ui-value-size:22px}
 body.standalone .app-page-heading .lead{font-size:13px}
 body.standalone #quotation-workspace .quotation-modal-head{padding:18px 16px}
 body.standalone #quotation-workspace .quotation-modal-head h2{font-size:28px}
 body.standalone #quotation-workspace #quotation-modal-body{padding:0 16px}
 body.standalone #quotation-workspace .quotation-form-core{display:flex;flex-direction:column;gap:0}
 body.standalone #quotation-workspace .quotation-form-core>section{width:100%;box-sizing:border-box}
 body.standalone #quotation-workspace #quotation-edit-dialog .quotation-form-section h2{font-size:20px}
 body.standalone #quotation-workspace .quotation-addition-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 body.standalone #quotation-workspace .quotation-addition-row button{grid-column:1/-1;justify-self:end}
 body.standalone #finance-workspace .business-metric-value{font-size:28px}
}
/* Secondary workspaces and modal surfaces use the same hierarchy. */
body.standalone :is(.work-section-heading h3,.work-side-block h3,.payment-priority-section h3,.procurement-section-heading,.supplier-evaluation-workspace h2){font-size:22px;font-weight:700}
body.standalone :is(.procurement-project-content-value,.work-task-summary>.procurement-project-content-value,.payment-priority-card>.procurement-project-content-value){font-size:17px;font-weight:600;line-height:1.6}
body.standalone :is(.payment-metric strong,.settlement-amounts strong){font-size:26px;font-weight:700}
body.standalone .payment-metric:first-child strong{font-size:34px}
body.standalone :is(.payment-metric span,.dashboard-controls label,.settlement-amounts span){font-size:13px;font-weight:400;color:var(--ui-muted)}
body.standalone :is(#supplier-editor-dialog,#supplier-opinion-dialog,#quick-supplier-dialog,#settlement-dialog,#supplier-link-dialog,#procurement-edit-dialog) h2,
body.standalone dialog>h2{font-size:28px;font-weight:750;line-height:1.35;margin-bottom:18px}
body.standalone dialog h3{font-size:18px;font-weight:650}
body.standalone :is(dialog .draft-fields label,#procurement-draft-form label){font-size:14px;line-height:1.6}
body.standalone dialog :is(input,textarea,select){font-size:16px}
body.standalone dialog :is(.draft-help,.draft-scope,.index-hint,.procurement-edit-changes h3){font-size:12px;font-weight:400;color:var(--ui-muted)}
body.standalone :is(dialog,#supplier-opinion-dialog,#quick-supplier-dialog,#supplier-editor-dialog,#settlement-dialog,#supplier-link-dialog,#procurement-edit-dialog) :is(input,textarea,select)[required]{background:color-mix(in srgb,var(--ui-red) 12%,var(--ui-surface));border-color:color-mix(in srgb,var(--ui-red) 60%,var(--ui-line))}
body.standalone :is(#supplier-subnavigation button,#app-navigation button,#app-navigation .app-more-menu button){font-size:14px;min-height:44px}
body.standalone #supplier-subnavigation button[aria-current=page]{font-weight:700;background:var(--ui-soft);color:var(--ui-ink)}
body.standalone .supplier-card-head .supplier-more-actions button{font-size:14px;min-height:44px;padding:10px 12px}
body.standalone .supplier-card-head .supplier-more-actions[open]>div{min-width:180px;max-width:calc(100vw - 48px)}
body.standalone :is(.supplier-payment-details>summary,.dashboard-view-options>summary,.supplier-card-history>summary,.quotation-form-notes>summary,.quotation-form-advanced>summary){font-size:14px;font-weight:500;min-height:44px}
body.standalone :is(.draft-preview-label,.bank-info-row>.draft-preview-label){font-size:12px;font-weight:400;color:var(--ui-muted)}
body.standalone :is(.work-task-summary h3,.work-task-summary h4,.payment-priority-card h4){display:block;overflow:visible;-webkit-line-clamp:unset}
body.standalone :is(.finance-table,.overview-table) :is(th,td){font-size:14px;line-height:1.7}
@media(max-width:650px){
 body.standalone :is(.work-section-heading h3,.work-side-block h3,.payment-priority-section h3,.procurement-section-heading){font-size:20px}
 body.standalone :is(#supplier-editor-dialog,#supplier-opinion-dialog,#quick-supplier-dialog,#settlement-dialog,#supplier-link-dialog,#procurement-edit-dialog) h2,
 body.standalone dialog>h2{font-size:24px}
 body.standalone :is(.work-task-amount,.payment-card-amount){font-size:24px;max-width:100%}
 body.standalone :is(.procurement-project-content-value,.work-task-summary>.procurement-project-content-value){font-size:16px}
}
/* Legacy procurement/history cards must inherit the business palette at every width. */
body.standalone :is(#order-list,#history-list) .project-group{background:var(--ui-soft);border-color:var(--ui-line)}
body.standalone :is(#order-list,#history-list) .project-group-heading{color:var(--ui-ink);font-size:18px;font-weight:650}
body.standalone :is(#order-list,#history-list) .project-group-count{font-size:12px;color:var(--ui-muted);font-weight:400}
body.standalone :is(#order-list,#history-list) .project-card{background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
body.standalone :is(#order-list,#history-list) .project-card h3{font-size:var(--ui-identity-size);font-weight:700;line-height:1.5;color:var(--ui-ink)}
body.standalone :is(#order-list,#history-list) :is(.project-meta,.order-supplier,.project-states){font-size:13px;line-height:1.7;color:var(--ui-muted)}
body.standalone :is(#order-list,#history-list) :is(.order-fee,.project-fee){font-size:20px;font-weight:650;color:var(--ui-ink);line-height:1.5}
body.standalone :is(.order-details>summary,.payment-arrangements>summary,.payment-code-group summary){font-size:16px;line-height:1.6;color:var(--ui-ink);min-height:44px}
body.standalone :is(.order-details,.payment-arrangements,.order-review){border-color:var(--ui-line)}
body.standalone :is(.order-value,.payment-plan-row,.draft-preview-value){color:var(--ui-ink);font-size:15px;line-height:1.7}
body.standalone :is(.review-result,.confirmation-record,.server-draft-row,#draft-preview,.settlement-amounts){background:var(--ui-soft);color:var(--ui-ink);border-color:var(--ui-line)}
body.standalone .review-result strong{color:var(--ui-ink);font-size:16px}
body.standalone :is(#member-management>summary,.source-workbook-panel>summary){font-size:22px;font-weight:700;line-height:1.5}
body.standalone :is(#member-management>.draft-help,#archive-workspace>p){color:var(--ui-muted);font-size:13px;line-height:1.7;max-width:90ch}
body.standalone #settlement-dialog #settlement-content h3{font-size:var(--ui-identity-size);font-weight:700}
@media(max-width:650px){
 body.standalone :is(#order-list,#history-list) .project-group{background:transparent}
 body.standalone :is(#member-management>summary,.source-workbook-panel>summary){font-size:20px}
}
body.standalone #quotation-workspace .quotation-manpower-total{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 16px}
body.standalone #quotation-workspace .quotation-manpower-total>span{font-size:14px;font-weight:500}
body.standalone #quotation-workspace .quotation-manpower-total>strong{font-size:24px;font-weight:700;margin-left:auto}
body.standalone #quotation-workspace .quotation-manpower-total>small{width:100%;font-size:12px;font-weight:400;color:var(--ui-muted)}

body.standalone dialog .dialog-business-identity{font-size:var(--ui-identity-size);font-weight:650;line-height:1.5;color:var(--ui-ink);margin:0 0 22px;overflow-wrap:anywhere}

/* User preference: a stable system arrow everywhere except text entry. */
body.standalone,body.standalone *,body.standalone *::before,body.standalone *::after{cursor:default!important}
body.standalone :is(textarea,input:not([type]),input[type=text],input[type=search],input[type=email],input[type=tel],input[type=url],input[type=password],input[type=number],input[type=date],input[type=datetime-local],input[type=time],input[type=month],input[type=week]):not(:disabled):not([readonly]),body.standalone [contenteditable=true]{cursor:text!important}
body.standalone input::-webkit-calendar-picker-indicator,body.standalone input::-webkit-inner-spin-button,body.standalone input::-webkit-search-cancel-button{cursor:default!important}

/* Numbered form sections follow the approved project editor hierarchy. */
body.standalone .ledger-section-heading{display:flex;align-items:center;gap:10px;min-width:0;margin:0;font-size:var(--hb-group-title,18px);font-weight:650;line-height:1.5;color:var(--hb-text,var(--ui-ink))}
body.standalone .ledger-section-number{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border-radius:7px;background:var(--hb-subtle,var(--ui-soft));color:var(--hb-muted,var(--ui-muted));font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}

/* Source purchases use the product's shared palette, controls and reading scale. */
.standalone .imported-purchase-workspace{--ui-muted:color-mix(in srgb,var(--ui-ink) 72%,var(--ui-surface));min-width:0;margin:24px 0 32px}
.standalone:not([data-view=orders]) #imported-purchases,.standalone:not([data-view=payments]) #imported-payment-records{display:none}
.standalone[data-no-live-orders=true][data-view=orders] :is(#procurement-overview-search,#submitted-orders,#procurement-workspace){display:none}
.standalone[data-view=orders]:has(#imported-payment-records[data-purchase-search]) :is(#submitted-orders,#procurement-workspace){display:none}
.standalone[data-no-live-payments=true][data-view=payments] #payment-dashboard{display:none}
.standalone .imported-purchase-heading{display:flex;justify-content:space-between;align-items:start;gap:16px;margin-bottom:20px}
.standalone .imported-purchase-heading h2{font-size:var(--ui-section-size,24px);margin:0 0 6px;font-weight:700}
.standalone .imported-purchase-heading p{margin:0}
.standalone .imported-purchase-heading button{margin:0;flex-shrink:0;white-space:nowrap}
.standalone .imported-purchase-controls{grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr))}
.standalone .imported-payment-workspace .imported-purchase-controls{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr)}
.standalone .imported-purchase-controls>label{display:flex;flex-direction:column;gap:8px;min-width:0}
.standalone .imported-purchase-controls :is(input,select){box-sizing:border-box;width:100%;min-height:44px;margin:0}
.standalone .imported-purchase-year{border:1px solid var(--ui-line);background:var(--ui-surface);border-radius:var(--ui-radius,8px);margin:12px 0;overflow:hidden}
.standalone .imported-purchase-year:nth-of-type(even){background:var(--ui-soft)}
.standalone .imported-purchase-year-heading{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;box-sizing:border-box;background:var(--ui-soft);cursor:pointer}
.standalone .imported-purchase-year-heading strong{font-size:18px}
.standalone .imported-purchase-year-heading strong::before{content:'▸';display:inline-block;width:22px;color:var(--ui-muted)}
.standalone .imported-purchase-year[open]>.imported-purchase-year-heading strong::before{content:'▾'}
.standalone .imported-purchase-card{margin:0;border:0;border-top:1px solid var(--ui-line);background:transparent;border-radius:0;padding:0;scroll-margin-top:20px;min-width:0}
.standalone .imported-purchase-summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,auto) 24px;gap:20px;align-items:center;padding:18px 20px;cursor:pointer;min-height:88px;box-sizing:border-box}
.standalone .imported-purchase-summary::-webkit-details-marker{display:none}
.standalone .imported-purchase-summary:hover{background:color-mix(in srgb,var(--ui-soft) 70%,transparent)}
.standalone .imported-purchase-summary:focus-visible,.standalone .imported-purchase-year-heading:focus-visible{outline:2px solid var(--ui-red);outline-offset:-3px}
.standalone .imported-purchase-identity{display:grid;gap:5px;min-width:0}
.standalone .imported-purchase-name{font-size:var(--ui-identity-size,21px);line-height:1.5;font-weight:650;overflow-wrap:anywhere}
.standalone .imported-purchase-supplier{font-size:14px;line-height:1.6;color:var(--ui-muted);overflow-wrap:anywhere}
.standalone .imported-purchase-supplier-link{background:transparent;border:0;border-radius:0;margin:0;padding:2px 0;min-height:0;max-width:100%;text-align:left;justify-self:start;color:var(--ui-ink);font:inherit;line-height:1.5;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.standalone .imported-purchase-supplier-link.imported-purchase-supplier{font-size:14px;color:var(--ui-muted)}
.standalone .imported-purchase-supplier-link small{font-size:12px;color:var(--ui-muted);white-space:nowrap}
.standalone .imported-purchase-supplier-link:hover{text-decoration:underline;text-underline-offset:4px}
.standalone .imported-purchase-supplier-link:focus-visible{outline:2px solid var(--ui-red);outline-offset:3px;border-radius:var(--ui-radius,8px)}
.standalone .imported-purchase-supplier-pending{font-size:13px;color:var(--ui-amber);line-height:1.6}
.standalone .imported-purchase-work-summary{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:13px;color:var(--ui-muted);line-height:1.6}
.standalone .imported-purchase-work-summary span{overflow-wrap:anywhere}
.standalone .imported-purchase-source-note{color:var(--ui-muted);font-size:12px;line-height:1.6}
.standalone .imported-purchase-payment{display:grid;gap:6px;justify-items:end}
.standalone .imported-purchase-workspace .state-badge{font-size:12px;white-space:normal;margin:0}
.standalone .imported-purchase-workspace .state-badge.sage{color:var(--ui-green);background:var(--ui-green-soft)}
.standalone .imported-purchase-workspace .state-badge.amber{color:var(--ui-amber);background:var(--ui-amber-soft)}
.standalone .imported-purchase-workspace .state-badge.neutral{color:var(--ui-muted);background:var(--ui-soft)}
.standalone .imported-purchase-amount{display:grid;gap:3px;text-align:right;max-width:240px;overflow-wrap:anywhere}
.standalone .imported-purchase-amount small{font-size:12px;color:var(--ui-muted)}
.standalone .imported-purchase-amount strong{font-size:var(--ui-value-size,23px);font-weight:650;line-height:1.4;font-variant-numeric:tabular-nums}
.standalone .imported-purchase-chevron{color:var(--ui-muted);justify-self:end;font-size:20px}
.standalone .imported-purchase-card[open]>.imported-purchase-summary .imported-purchase-chevron{transform:rotate(180deg)}
.standalone .imported-purchase-body{padding:0 20px 20px;background:var(--ui-soft)}
.standalone .imported-purchase-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;padding-top:20px;border-top:1px solid var(--ui-line)}
.standalone .imported-purchase-columns h3{font-size:16px;margin:0 0 16px;font-weight:650}
.standalone .imported-purchase-facts{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px 16px;margin:0;line-height:1.7;font-size:14px}
.standalone .imported-purchase-facts dt{color:var(--ui-muted);font-size:12px;margin:0}
.standalone .imported-purchase-facts dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}
.standalone .imported-purchase-sources{border:0;border-top:1px solid var(--ui-line);border-radius:0;padding:0;margin:20px 0 0;background:transparent}
.standalone .imported-purchase-sources>summary{min-height:44px;display:flex;align-items:center;font-size:13px;color:var(--ui-muted);cursor:pointer}
.standalone .imported-purchase-source-row{padding:16px 0;border-top:1px solid var(--ui-line)}
.standalone .imported-purchase-source-row h4{font-size:13px;color:var(--ui-muted);margin:0 0 14px;font-weight:500;overflow-wrap:anywhere}
.standalone .imported-purchase-provenance{margin:12px 0 0;padding:0;border:0;border-radius:0;background:transparent}
.standalone .imported-purchase-provenance>summary{min-height:44px;display:flex;align-items:center;font-size:12px;color:var(--ui-muted);cursor:pointer}
.standalone .imported-purchase-provenance button{min-height:44px;white-space:normal;overflow-wrap:anywhere;font-size:12px;margin:6px 8px 6px 0}
.standalone .imported-purchase-actions{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;margin-top:12px}
.standalone .imported-purchase-actions button{margin:0;font-size:13px;min-height:44px}
.standalone .imported-purchase-actions small{margin:0}
.standalone .imported-payment-state-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 14px}
.standalone .imported-payment-state-tabs button{min-width:0;min-height:44px;margin:0;padding:8px 12px;display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;background:var(--ui-surface);border:1px solid var(--ui-line);color:var(--ui-muted);border-radius:var(--ui-radius,8px)}
.standalone .imported-payment-state-tabs button>span{overflow-wrap:anywhere}
.standalone .imported-payment-state-tabs button strong{font-size:16px;font-variant-numeric:tabular-nums;color:var(--ui-ink);font-weight:650}
.standalone .imported-payment-state-tabs button[aria-pressed=true]{border-color:var(--ui-red);background:var(--ui-red-soft);color:var(--ui-ink)}
.standalone .imported-payment-state-tabs button:focus-visible{outline:2px solid var(--ui-red);outline-offset:3px}
.standalone .imported-payment-table{border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);overflow:hidden;background:var(--ui-surface);margin:12px 0}
.standalone :is(.imported-payment-table-heading,.imported-payment-summary){display:grid;grid-template-columns:minmax(0,1.65fr) minmax(130px,.65fr) minmax(0,.8fr) minmax(150px,.7fr) 24px;gap:16px;padding:16px 20px;align-items:center}
.standalone .imported-payment-table-heading{background:var(--ui-soft);font-size:12px;color:var(--ui-muted);min-height:48px;box-sizing:border-box}
.standalone .imported-payment-table-heading>span:nth-child(2){text-align:right}
.standalone .imported-payment-summary{min-height:100px}
.standalone .imported-payment-recipient{font-size:16px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
.standalone .imported-payment-project{font-size:var(--ui-label-size,14px);line-height:1.6;color:var(--ui-muted);overflow-wrap:anywhere}
.standalone .imported-payment-row .imported-purchase-amount{max-width:none;min-width:0}
.standalone .imported-payment-row .imported-purchase-amount strong{font-size:var(--ui-value-size,23px)}
.standalone .imported-payment-row .imported-purchase-numeric-fee{white-space:nowrap}
.standalone .imported-payment-timing{display:grid;gap:6px;min-width:0;line-height:1.6;overflow-wrap:anywhere}
.standalone .imported-payment-timing strong{font-size:15px;font-weight:500;white-space:pre-wrap}
.standalone .imported-payment-timing>span:not(.imported-payment-mobile-label){font-size:13px;color:var(--ui-muted);white-space:pre-wrap}
.standalone .imported-payment-state{display:grid;justify-items:start;gap:8px;min-width:0}
.standalone .imported-payment-state small{font-size:12px;line-height:1.6;color:var(--ui-muted);overflow-wrap:anywhere}
.standalone .imported-payment-mobile-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.standalone .imported-payment-source-phases{padding:20px 0;border-bottom:1px solid var(--ui-line)}
.standalone .imported-payment-source-phases h3{font-size:16px;font-weight:650;margin:0 0 16px}
.standalone .imported-payment-source-phase{padding:12px 0}
.standalone .imported-payment-source-phase+.imported-payment-source-phase{border-top:1px solid var(--ui-line)}
.standalone .imported-payment-source-phase h4{font-size:12px;font-weight:500;color:var(--ui-muted);margin:0 0 12px}
.standalone .imported-purchase-workspace .imported-single-page .list-pagination-controls{display:none}
/* Same identity-strip and reading grid as quotation projects; status meanings stay independent. */
.standalone .procurement-year-body{padding:16px;background:var(--ui-canvas)}
.standalone .procurement-code-group{border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);margin:0 0 24px;padding:0;background:var(--ui-surface)}
.standalone .procurement-code-heading{display:flex;align-items:center;gap:16px;min-height:48px;padding:13px 16px;font-size:15px;line-height:1.6;cursor:pointer;background:var(--ui-soft)}
.standalone .procurement-code-heading small{margin-left:auto;color:var(--ui-muted);font-size:11px;font-weight:400}
.standalone .procurement-code-heading strong::before{content:'▸';display:inline-block;width:22px;color:var(--ui-muted)}
.standalone .procurement-code-group[open]>.procurement-code-heading strong::before{content:'▾'}
.standalone .procurement-code-heading:focus-visible{outline:2px solid var(--ui-red);outline-offset:-3px}
.standalone .procurement-code-hint{margin:0;padding:12px 16px;border-bottom:1px solid var(--ui-line)}
.standalone .procurement-code-body{padding:16px;background:var(--ui-canvas)}
.standalone :is(.imported-purchase-list,#order-list,#history-list) .procurement-project-block{padding:0;margin:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);overflow:hidden;container-type:inline-size}
.standalone :is(#imported-purchases,#order-list,#history-list) .procurement-project-block+.procurement-project-block{margin-top:16px}
.standalone .procurement-project-primary{display:flex;align-items:center;gap:24px;padding:20px 24px;background:var(--ui-soft)}
.standalone .procurement-project-identity{flex:1;min-width:0}
.standalone :is(.imported-purchase-list,#order-list,#history-list) .procurement-project-title{margin:0;font-size:var(--ui-section-size,18px);line-height:1.6;font-weight:650;color:var(--ui-ink);overflow-wrap:anywhere}
.standalone .procurement-project-identity>small{display:block;margin-top:4px;color:var(--ui-muted);font-size:11px;line-height:1.7}
.standalone .procurement-project-tools{display:flex;align-items:center;gap:8px;flex-shrink:0}
.standalone .procurement-project-toggle{width:44px;height:44px;min-height:44px;padding:10px;margin:0;border:0;background:transparent;color:var(--ui-muted);flex:none}
.standalone .procurement-project-toggle svg{display:block;width:20px;height:20px;transition:transform 120ms ease}
.standalone .procurement-project-toggle[aria-expanded=false] svg{transform:rotate(-90deg)}
.standalone .procurement-project-toggle:focus-visible{outline:2px solid var(--ui-red);outline-offset:-2px}
.standalone .procurement-project-contents[hidden]{display:none}
.standalone .procurement-detail-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.9fr) minmax(140px,1fr) minmax(90px,.7fr) minmax(100px,.8fr);gap:20px;padding:20px 24px;align-items:start;border-top:1px solid var(--ui-line)}
.standalone .procurement-detail-cell{min-width:0;font-size:13px;line-height:1.7;overflow-wrap:anywhere;white-space:pre-wrap}
.standalone .procurement-detail-cell::before{content:attr(data-label);display:block;font-size:12px;font-weight:400;line-height:1.7;color:var(--ui-muted);margin:0 0 8px}
.standalone .procurement-detail-cell[data-column=amount]{text-align:right;font-variant-numeric:tabular-nums}
.standalone .procurement-detail-amount{display:block;font-size:14px;font-weight:600}
.standalone .procurement-detail-support{display:block;color:var(--ui-muted);font-size:11px;margin-top:8px}
.standalone .procurement-detail-states{display:flex;flex-wrap:wrap;gap:6px}
.standalone .procurement-detail-cell .imported-purchase-supplier-link.imported-purchase-supplier{font-size:13px;color:var(--ui-ink);line-height:1.7;padding:0}
.standalone .imported-order-context{margin:0;padding:0 24px;border:0;border-top:1px solid var(--ui-line);background:transparent;border-radius:0}
.standalone .imported-order-context>summary{cursor:pointer;display:flex;align-items:center;min-height:44px;font-size:12px;color:var(--ui-muted)}
.standalone .imported-order-context>.imported-purchase-facts{padding:12px 0}
.standalone .imported-order-context .imported-purchase-body{padding:0 0 16px;background:transparent}
.standalone #order-list .project-group{margin:0;border:0;border-radius:0;background:var(--ui-surface)}
.standalone #order-list .project-group+.project-group{margin-top:24px}
.standalone #order-list .project-group-heading{margin:0;padding:13px 16px;min-height:48px;box-sizing:border-box;font-size:15px;font-weight:650;line-height:1.6;color:var(--ui-ink);background:var(--ui-soft)}
.standalone #order-list .project-group-cards{display:block;padding:20px;background:var(--ui-canvas)}
.standalone #order-list .procurement-project-contents>:not(.procurement-detail-row){margin-inline:24px}
.standalone #order-list .procurement-project-contents>.order-review{margin-bottom:20px}
.standalone #order-list .order-review-panel{margin:0 24px;padding:0;border:0;border-top:1px solid var(--ui-line);background:transparent;border-radius:0}
.standalone #order-list .order-review-panel>summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-size:13px;color:var(--ui-red)}
.standalone #order-list .order-review-panel .order-review{margin:0;padding:0 0 20px;border:0}
.standalone #order-list .order-proposal>div{background:var(--ui-soft);border:1px solid var(--ui-line)}
@container(max-width:800px){
 .standalone .procurement-detail-row{grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
 .standalone .procurement-detail-cell{grid-column:span 4}
 .standalone .procurement-detail-cell[data-column=supplier]{grid-column:span 8}
 .standalone .procurement-detail-cell[data-column=amount]{text-align:left}
}
@media(max-width:650px){
 .standalone .procurement-year-body{padding:12px}
 .standalone .procurement-project-primary{padding:16px;gap:12px;flex-wrap:wrap}
 .standalone .procurement-project-identity{flex-basis:100%}
 .standalone :is(#imported-purchases,#order-list,#history-list) .procurement-project-block+.procurement-project-block{margin-top:16px}
 .standalone .procurement-project-tools{flex-wrap:wrap;justify-content:end;margin-left:auto}
 .standalone .procurement-project-primary>.procurement-project-toggle{margin-left:auto}
 .standalone .procurement-detail-row{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;padding:16px}
 .standalone .procurement-detail-cell{grid-column:span 3}
 .standalone .procurement-detail-cell:is([data-column=supplier],[data-column=amount]){grid-column:1/-1;text-align:left}
 .standalone .procurement-detail-cell::before{margin-bottom:6px}
 .standalone .imported-order-context{padding:0 16px}
 .standalone #order-list .project-group-cards{padding:12px}
 .standalone #order-list .procurement-project-contents>:not(.procurement-detail-row){margin-inline:16px}
 .standalone .imported-purchase-supplier-link{min-height:44px;display:flex;align-items:center;gap:4px}
 .standalone .imported-purchase-workspace{margin:16px 0 24px}
 .standalone .imported-purchase-heading{gap:10px;margin-bottom:16px}
 .standalone .imported-purchase-heading button{min-height:44px;font-size:13px;padding:8px 12px}
 .standalone .imported-purchase-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
 .standalone .imported-purchase-controls>label:first-child{grid-column:1/-1}
 .standalone .imported-purchase-controls :is(input,select){min-height:44px;font-size:16px}
 .standalone .imported-purchase-year-heading{padding:12px 14px}
 .standalone .imported-purchase-summary{grid-template-columns:minmax(0,1fr) 24px;gap:12px;padding:16px 14px;min-height:44px}
 .standalone .imported-purchase-identity{grid-column:1;grid-row:1}
 .standalone .imported-purchase-chevron{grid-column:2;grid-row:1}
 .standalone .imported-purchase-payment{grid-column:1/-1;grid-row:2;justify-items:start;gap:6px}
 .standalone .imported-purchase-name{font-size:18px}
 .standalone .imported-purchase-supplier{font-size:13px}
 .standalone .imported-purchase-amount{max-width:65%}
 .standalone .imported-purchase-payment .imported-purchase-amount{text-align:left;max-width:100%}
 .standalone .imported-purchase-body{padding:0 14px 16px}
 .standalone .imported-purchase-columns{grid-template-columns:minmax(0,1fr);gap:24px}
 .standalone .imported-purchase-facts{grid-template-columns:80px minmax(0,1fr);gap:8px 12px}
 .standalone .imported-payment-state-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;margin:16px 0 10px;padding:3px 2px 8px;scroll-padding-inline:2px}
 .standalone .imported-payment-state-tabs button{flex:0 0 auto;min-width:110px;min-height:48px;padding:8px 12px;box-sizing:border-box;font-size:13px}
 .standalone .imported-payment-state-tabs button strong{font-size:var(--ui-value-size,22px)}
 .standalone .imported-payment-table-heading{display:none}
 .standalone .imported-payment-summary{grid-template-columns:minmax(0,1fr) 24px;gap:14px;padding:16px 14px}
 .standalone .imported-payment-summary .imported-purchase-amount{grid-column:1;grid-row:2;text-align:left}
 .standalone .imported-payment-row .imported-purchase-numeric-fee{white-space:normal}
 .standalone .imported-payment-summary .imported-payment-timing{grid-column:1/-1;grid-row:3}
 .standalone .imported-payment-summary .imported-payment-state{grid-column:1/-1;grid-row:4;display:flex;align-items:center;flex-wrap:wrap}
 .standalone .imported-payment-mobile-label{position:static;clip-path:none;width:auto;height:auto;overflow:visible;white-space:normal;font-size:12px;color:var(--ui-muted)}
}

/* Procurement uses the shared quotation design tokens, with its own scope and facts. */
:is(#imported-purchases,#imported-payment-records){container-type:inline-size;container-name:purchase}
:is(#imported-purchases,#imported-payment-records) [hidden]{display:none!important}
:is(#imported-purchases,#imported-payment-records) .purchase-overview{margin-bottom:18px;color:var(--hb-text)}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-period{display:flex;align-items:center;gap:16px;color:var(--hb-muted);font-size:var(--hb-small,12px)}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-period>strong{display:flex;align-items:center;justify-content:center;min-width:108px;min-height:44px;box-sizing:border-box;padding:8px 20px;border:1px solid var(--hb-border);border-bottom:0;border-radius:8px 8px 0 0;background:var(--hb-surface);color:var(--hb-text);font-size:var(--hb-body)}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-panel{padding:20px;border:1px solid var(--hb-border);border-radius:0 8px 8px 8px;background:var(--hb-surface)}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-panel>.purchase-summary-metric{padding-bottom:16px;margin-bottom:14px;border-bottom:1px solid var(--hb-border)}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-metric{display:grid;gap:8px;min-width:0}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-metric>span,:is(#imported-purchases,#imported-payment-records) .purchase-summary-metric>small{font-size:13px;color:var(--hb-muted);line-height:1.6}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-metric>strong{font-size:30px;line-height:1.3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--hb-text)}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-panel>.purchase-summary-metric>strong{font-size:36px}
:is(#imported-purchases,#imported-payment-records) .purchase-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
:is(#imported-purchases,#imported-payment-records) .purchase-status-card{min-width:0;background:var(--hb-subtle);border:1px solid var(--hb-border);border-radius:8px;padding:14px}
:is(#imported-purchases,#imported-payment-records) .purchase-status-card>.purchase-summary-metric{margin-top:14px}
:is(#imported-purchases,#imported-payment-records) .purchase-status-card .purchase-summary-metric>span{font-size:12px}
:is(#imported-purchases,#imported-payment-records) .purchase-status-card .purchase-summary-metric>strong{font-size:clamp(22px,2vw,30px)}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-basis{margin:14px 0 0;padding:0;border:0;background:transparent;color:var(--hb-muted);font-size:12px}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-basis summary{min-height:32px;cursor:pointer;display:list-item}
:is(#imported-purchases,#imported-payment-records) .purchase-summary-basis p{font-size:12px;line-height:1.7;margin:8px 0 0}
:is(#imported-purchases,#imported-payment-records) .purchase-review-workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:16px;margin-bottom:16px;align-items:start}
:is(#imported-purchases,#imported-payment-records) :is(.purchase-selection-panel,.purchase-search-region){padding:20px;border:1px solid var(--hb-border);border-radius:8px;background:var(--hb-surface);min-width:0}
:is(#imported-purchases,#imported-payment-records) .purchase-panel-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
:is(#imported-purchases,#imported-payment-records) .purchase-panel-heading h2{font-size:16px;line-height:1.5;margin:0;color:var(--hb-text)}
:is(#imported-purchases,#imported-payment-records) .purchase-panel-heading>button{margin:0;min-height:44px;padding:6px 12px}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-panel{display:flex;flex-direction:column;gap:12px}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-panel p{margin:0;font-size:12px;line-height:1.6}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-actions{display:flex;flex-wrap:wrap;gap:8px}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-actions button{margin:0;min-height:44px;font-size:13px;padding:8px 12px;white-space:normal}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-metrics{border-top:1px solid var(--hb-border);padding:16px 0 4px;display:grid;align-content:start}
:is(#imported-purchases,#imported-payment-records) .purchase-search-region .imported-purchase-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
:is(#imported-purchases,#imported-payment-records) .purchase-search-region .imported-purchase-controls>label:first-child{grid-column:1/-1}
:is(#imported-purchases,#imported-payment-records) .purchase-search-region label{margin:0;font-size:12px;color:var(--hb-muted)}
:is(#imported-purchases,#imported-payment-records) .purchase-select-label{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;color:var(--hb-muted);min-height:44px;flex-shrink:0;cursor:pointer}
:is(#imported-purchases,#imported-payment-records) .purchase-select-label input{width:20px;height:20px;min-height:0;margin:0;accent-color:var(--hb-brand)}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-dock{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:35;width:max-content;max-width:calc(100vw - 32px);box-sizing:border-box;display:flex;gap:16px;align-items:center;padding:12px 16px;border:1px solid var(--hb-border);border-radius:var(--hb-radius,8px);background:var(--hb-surface);box-shadow:0 8px 24px #0004}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-dock strong{min-width:0;overflow-wrap:anywhere;font-size:14px;line-height:1.6;font-variant-numeric:tabular-nums}
:is(#imported-purchases,#imported-payment-records) .purchase-selection-dock button{margin:0;flex-shrink:0;min-height:44px}
@container purchase (max-width:1100px){:is(#imported-purchases,#imported-payment-records) .purchase-review-workspace{grid-template-columns:minmax(0,1fr)}:is(#imported-purchases,#imported-payment-records) .purchase-selection-metrics{padding:18px 0}:is(#imported-purchases,#imported-payment-records) .purchase-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container purchase (max-width:540px){:is(#imported-purchases,#imported-payment-records) :is(.purchase-summary-panel,.purchase-selection-panel,.purchase-search-region){padding:14px}:is(#imported-purchases,#imported-payment-records) .purchase-summary-panel>.purchase-summary-metric>strong{font-size:28px}:is(#imported-purchases,#imported-payment-records) .purchase-status-grid{grid-template-columns:minmax(0,1fr)}:is(#imported-purchases,#imported-payment-records) .purchase-search-region .imported-purchase-controls{grid-template-columns:minmax(0,1fr)}:is(#imported-purchases,#imported-payment-records) .purchase-select-label{align-self:flex-start}:is(#imported-purchases,#imported-payment-records) .procurement-project-primary{flex-wrap:wrap}}
@media print{:is(#imported-purchases,#imported-payment-records) .purchase-selection-dock{display:none!important}}

/* Shared entrance and order-owned payment information; existing payment forms retain their controls. */
.standalone .procurement-task-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 24px;padding:0 0 16px;border-bottom:1px solid var(--ui-line)}
.standalone .procurement-task-navigation[hidden],.standalone .procurement-task-navigation [hidden]{display:none!important}
.standalone .procurement-task-navigation>button{margin:0;min-height:52px;min-width:156px;padding:12px 24px;font-size:16px;font-weight:600;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-soft)}
.standalone .procurement-task-navigation>button[aria-pressed=true]{border-color:var(--hb-brand);background:var(--ui-red-soft);color:var(--hb-text);font-weight:700;box-shadow:inset 0 -3px var(--hb-brand)}
@media(max-width:650px){.standalone .procurement-task-navigation>button{flex:1;min-width:0;padding:12px 8px;font-size:15px}}
.standalone .procurement-task-navigation>p{flex-basis:100%;margin:4px 0 0;font-size:12px;line-height:1.7}
.standalone[data-procurement-task=review][data-view=orders] #imported-purchases{display:none}
.standalone[data-procurement-task]:not([data-procurement-task=all])[data-view=orders] #procurement-workspace{display:none}
.standalone .procurement-order-payment{border-top:1px solid var(--ui-line);padding:14px 20px;margin:0;background:var(--ui-surface)}
.standalone .procurement-payment-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-bottom:10px}
.standalone .procurement-payment-heading h4{font-size:16px;margin:0;color:var(--ui-ink)}
.standalone .procurement-payment-heading>button{margin:0 0 0 auto;min-height:44px;font-size:13px}
.standalone .procurement-order-payment .imported-purchase-facts{grid-template-columns:100px minmax(0,1fr);max-width:850px}
.standalone .procurement-order-payment>p{margin:0;font-size:13px}
.standalone .procurement-source-installments{border:0;padding:0;margin:0;background:transparent}
.standalone .procurement-source-installments>summary{min-height:44px;cursor:pointer;color:var(--ui-muted);font-size:13px}
.standalone .procurement-source-installment{padding:12px 0;border-top:1px solid var(--ui-line)}
.standalone .procurement-source-installment>strong{display:block;font-size:13px;margin:0 0 12px}
.standalone .procurement-project-contents>.payment-arrangements{margin:0;padding:16px 20px;border:0;border-top:1px solid var(--ui-line);border-radius:0;background:var(--ui-soft)}
.standalone .procurement-project-contents>.payment-arrangements>summary{font-size:16px;font-weight:650;min-height:44px;color:var(--ui-ink)}
@media(max-width:650px){
 .standalone .procurement-task-navigation{gap:8px;margin-bottom:20px}
 .standalone .procurement-task-navigation>button{flex:1 0 auto;padding:8px 12px;font-size:13px}
 .standalone .procurement-order-payment,.standalone .procurement-project-contents>.payment-arrangements{padding:14px}
 .standalone .procurement-payment-heading{gap:8px}
 .standalone .procurement-payment-heading>span{flex-basis:100%}
 .standalone .procurement-payment-heading>button{margin-left:0}
 .standalone .procurement-order-payment .imported-purchase-facts{grid-template-columns:minmax(0,1fr);gap:4px}
 .standalone .procurement-order-payment .imported-purchase-facts dd{margin-bottom:10px}
}

.standalone[data-procurement-task]:not([data-procurement-task=all])[data-view=orders] :is(#order-state-filters,#order-state-filters-label){display:none}

.standalone .procurement-project-contents>.payment-arrangements .installment{background:var(--ui-surface);border-color:var(--ui-line);border-radius:var(--ui-radius,8px)}
.standalone .procurement-project-contents>.payment-arrangements .installment>strong{color:var(--ui-ink);font-size:16px}

.standalone .procurement-payment-facts{display:grid;grid-template-columns:minmax(100px,.7fr) minmax(0,1.3fr) minmax(100px,.6fr);gap:20px}
.standalone .procurement-payment-facts>div{display:grid;align-content:start;gap:4px;min-width:0}
.standalone .procurement-payment-facts span{font-size:12px;color:var(--ui-muted)}.standalone .procurement-payment-facts strong{font-size:14px;font-weight:500;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:650px){.standalone .procurement-payment-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.standalone .procurement-payment-facts>div:nth-child(2){grid-column:1/-1;grid-row:2}}

/* Payment overview follows the shared quotation hierarchy, adapted to three due periods. */
.standalone .purchase-payment-periods{container-type:inline-size;container-name:payment-summary;margin:0 0 20px;padding:20px;background:var(--hb-surface);border:1px solid var(--hb-border);border-radius:var(--hb-radius,8px);color:var(--hb-text);min-width:0}
.standalone .purchase-payment-periods[hidden]{display:none!important}
.standalone .purchase-period-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.standalone .purchase-period-heading h2{font-size:18px;margin:0 0 4px}.standalone .purchase-period-heading p{margin:0;font-size:12px}
.standalone .purchase-period-heading label{display:grid;gap:6px;font-size:12px;color:var(--hb-muted);min-width:160px;margin:0}.standalone .purchase-period-heading select{margin:0;min-height:44px;width:100%}
.standalone .purchase-period-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.standalone .purchase-period-card{min-width:0;padding:16px;border:1px solid var(--hb-border);border-radius:var(--hb-radius,8px);background:var(--hb-subtle)}
.standalone .purchase-period-card>h3{font-size:18px;display:inline;margin:0 10px 0 0}.standalone .purchase-period-card>.index-hint{font-size:12px;white-space:nowrap}
.standalone .purchase-period-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.standalone .purchase-period-metric{min-width:0}
.standalone .purchase-period-metric+.purchase-period-metric{border-left:1px solid var(--hb-border);padding-left:12px}
.standalone .purchase-payment-periods [hidden]{display:none!important}
.standalone button.purchase-review-alert{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;min-height:44px;margin:10px 0 0;padding:8px 12px;font-family:inherit;font-size:13px;font-weight:500;text-align:left;line-height:1.5;color:#ffd0d0;background:color-mix(in srgb,var(--ui-red) 12%,var(--hb-surface));border:1px solid color-mix(in srgb,var(--ui-red) 56%,var(--hb-border));border-radius:var(--hb-radius,8px);box-shadow:none;transition:background .15s,border-color .15s}
.standalone .purchase-review-label{display:flex;align-items:baseline;gap:5px;min-width:0;white-space:nowrap}
.standalone .purchase-review-label strong{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;color:inherit}
.standalone .purchase-review-arrow{font-size:22px;line-height:1;flex-shrink:0;color:inherit}
.standalone button.purchase-review-alert:hover{background:color-mix(in srgb,var(--ui-red) 22%,var(--hb-surface));border-color:var(--ui-red)}
.standalone button.purchase-review-alert:focus-visible{outline:2px solid var(--hb-brand);outline-offset:3px}
.standalone button.purchase-review-alert:active{background:color-mix(in srgb,var(--ui-red) 28%,var(--hb-surface))}
.standalone .purchase-payment-review-dialog{max-width:900px}
.standalone .purchase-payment-review-item{padding:16px 0;border-top:1px solid var(--ui-line)}
.standalone .purchase-payment-review-item h3{font-size:16px;line-height:1.6;margin:0;overflow-wrap:anywhere}
.standalone .purchase-payment-review-item ul{padding-left:20px;margin:12px 0}
.standalone .purchase-payment-review-item li{margin:12px 0;font-size:14px;line-height:1.6}
.standalone .purchase-payment-review-item li strong{color:#ffb5b5}
.standalone .purchase-payment-review-item p{margin:4px 0;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.standalone .purchase-payment-review-item>button{margin:0 8px 0 0;min-height:44px}
.standalone button.purchase-period-value{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;margin:0;padding:4px 0;border:0;border-radius:0;background:transparent;box-shadow:none;text-align:left;min-height:96px}
.standalone button.purchase-period-value+button{border-left:1px solid var(--hb-border);padding-left:12px}
.standalone button.purchase-period-value>span{font-size:12px;color:var(--hb-muted)}.standalone button.purchase-period-value>strong{display:flex;align-items:baseline;gap:5px;font-size:clamp(20px,2.2cqw,28px);line-height:1.4;font-variant-numeric:tabular-nums;max-width:100%;color:var(--hb-text)}
.standalone button.purchase-period-value>strong>small{font-size:12px;font-weight:500;color:var(--hb-muted)}.standalone button.purchase-period-value>strong>span{min-width:0;overflow-wrap:anywhere}
.standalone button.purchase-period-value>small{font-size:12px;color:var(--hb-muted);line-height:1.5}.standalone button.purchase-period-value:hover>strong{color:var(--hb-text)}.standalone button.purchase-period-value:focus-visible{outline:2px solid var(--hb-brand);outline-offset:4px;border-radius:4px}
.standalone .purchase-payment-periods>p{font-size:12px;margin:12px 0 0;line-height:1.6}
.standalone .purchase-period-basis{border:0;padding:0;margin:6px 0 0;background:transparent;color:var(--hb-muted);font-size:12px}.standalone .purchase-period-basis summary{min-height:32px;cursor:pointer}.standalone .purchase-period-basis p{font-size:12px;line-height:1.7}
.standalone[data-view=payments][data-purchase-stat-source=source] #payment-dashboard,.standalone[data-view=payments][data-purchase-stat-source=software] #imported-payment-records{display:none!important}
.standalone[data-view=payments] #dashboard-metrics{display:none}
.standalone .imported-payment-workspace .imported-purchase-controls{grid-template-columns:minmax(0,2fr) repeat(4,minmax(0,1fr))}
@container payment-summary (max-width:1200px){.standalone .purchase-period-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.standalone .purchase-period-card:last-child:nth-child(odd){grid-column:1/-1}}
@container payment-summary (max-width:1000px){.standalone .purchase-period-card{padding:12px}.standalone button.purchase-period-value>strong{font-size:20px;gap:3px}.standalone .purchase-period-pair{gap:10px}.standalone button.purchase-period-value+button{padding-left:10px}}
@container payment-summary (max-width:760px){.standalone .purchase-period-grid{grid-template-columns:minmax(0,1fr)}.standalone .purchase-period-card:last-child:nth-child(odd){grid-column:auto}.standalone button.purchase-period-value>strong{font-size:24px}.standalone button.purchase-period-value{min-height:80px}.standalone .purchase-period-heading{align-items:flex-start;flex-wrap:wrap}.standalone .purchase-period-heading label{min-width:150px}.standalone .purchase-period-pair{margin-top:10px}}
@media(max-width:1100px){.standalone .imported-payment-workspace .imported-purchase-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.standalone .purchase-payment-periods{padding:14px}.standalone .purchase-period-heading label{width:100%}.standalone button.purchase-period-value>strong{font-size:clamp(17px,5vw,22px)}.standalone button.purchase-period-value{min-height:82px}.standalone .imported-payment-workspace .imported-purchase-controls{grid-template-columns:minmax(0,1fr)}}

@media(max-width:380px){.standalone .purchase-period-pair{grid-template-columns:minmax(0,1fr)}.standalone .purchase-period-metric+.purchase-period-metric{border-left:0;padding-left:0;border-top:1px solid var(--hb-border);padding-top:10px}.standalone button.purchase-period-value+button{border-left:0;padding-left:0;border-top:1px solid var(--hb-border);padding-top:10px}}

/* Supplier identities share the existing business tokens and control styles. */
.standalone .supplier-group-tools{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:10px 0}
.standalone .supplier-group-tools>.index-hint{margin:0;margin-right:auto}
.standalone .supplier-group-tools button{margin:0}
.standalone .supplier-group-card>.supplier-card-head h3{font-size:20px;font-weight:700}
.standalone .supplier-group-card .supplier-group-edit{margin:0;flex:none;font-size:12px;min-height:36px;padding:6px 9px}
.standalone .supplier-group-categories{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}
.standalone .supplier-group-card>.supplier-group-entities{margin:16px 0 0;padding-top:10px;border-top:1px solid var(--ui-line)}
.standalone .supplier-group-entities>summary{display:flex;align-items:center;gap:10px;min-height:40px;font-size:13px;font-weight:600;color:var(--ui-ink);list-style:none}
.standalone .supplier-group-entities>summary::-webkit-details-marker{display:none}
.standalone .supplier-group-entities>summary::after{content:'＋';margin-left:auto;font-size:18px;color:var(--ui-muted)}
.standalone .supplier-group-entities[open]>summary::after{content:'−'}
.standalone .supplier-group-entities>summary>small{font-size:11px;font-weight:400;color:var(--ui-muted)}
.standalone .supplier-group-entities>.supplier-group-entity{padding:18px 0 0;margin:14px 0 0;border:0;border-top:1px solid var(--ui-line);border-radius:0;background:transparent;box-shadow:none}
.standalone .supplier-group-entity .supplier-card-head h3,.standalone .supplier-group-pending h4{font-size:15px;font-weight:600;line-height:1.6;margin:0;color:var(--ui-ink);overflow-wrap:anywhere}
.standalone .supplier-group-entity .supplier-card-summary:empty{display:none}
.standalone .supplier-group-entity .supplier-cooperation-summary{font-size:11px}
.standalone .supplier-group-pending>p{margin:6px 0 0}
.standalone #supplier-group-editor{width:min(680px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-surface);color:var(--ui-ink);box-sizing:border-box}
.standalone #supplier-group-editor::backdrop{background:#090c12a8}
.standalone #supplier-group-editor form{display:flex;flex-direction:column;gap:14px;min-width:0;margin:0}
.standalone #supplier-group-editor h2{font-size:22px;margin:0;line-height:1.4}
.standalone #supplier-group-editor form>label{display:grid;gap:6px;font-size:12px;color:var(--ui-muted)}
.standalone #supplier-group-editor form>label>input{margin:0;width:100%;box-sizing:border-box}
.standalone #supplier-group-editor .index-hint{margin:0}
.standalone #supplier-group-editor input[required]{border-color:var(--ui-red);background:var(--ui-red-soft)}
.standalone .supplier-group-choices{max-height:270px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--ui-line);border-radius:10px;padding:4px 12px}
.standalone .supplier-group-choice{display:flex;align-items:flex-start;gap:10px;padding:12px 0;border-bottom:1px solid var(--ui-line);min-height:44px;box-sizing:border-box;cursor:pointer}
.standalone .supplier-group-choice:last-child{border-bottom:0}
.standalone .supplier-group-choice>input{width:18px;height:18px;min-height:18px;flex:none;margin:3px 0 0;accent-color:var(--ui-red);padding:0}
.standalone .supplier-group-choice>span{min-width:0;display:grid;gap:3px}
.standalone .supplier-group-choice strong{font-size:13px;color:var(--ui-ink);font-weight:600;overflow-wrap:anywhere}
.standalone .supplier-group-choice small{font-size:11px;color:var(--ui-muted)}
.standalone .supplier-group-selected{display:flex;flex-wrap:wrap;gap:7px}
.standalone .supplier-group-selected:empty{display:none}
.standalone .supplier-group-selected>button{min-height:32px;font-size:11px;text-align:left;max-width:100%;overflow-wrap:anywhere;margin:0}
.standalone .supplier-group-editor-actions{position:sticky;bottom:-24px;padding:14px 0 0;background:var(--ui-surface);border-top:1px solid var(--ui-line);display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0}
.standalone .supplier-group-editor-actions>button{margin:0}
.standalone .supplier-group-editor-actions>[data-group-remove]{margin-right:auto;color:var(--ui-muted);border-color:transparent}
.standalone .supplier-editor-ratings{min-width:0;padding:16px 0 0;margin:14px 0;border:0;border-top:1px solid var(--ui-line)}
.standalone .supplier-editor-ratings legend{font-size:14px;font-weight:600;color:var(--ui-ink);padding:0}
.standalone .supplier-editor-rating-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.standalone .supplier-editor-rating-grid>label{display:grid;gap:6px;min-width:0;font-size:12px;color:var(--ui-muted)}
.standalone .supplier-editor-rating-grid select{min-width:0;width:100%;margin:0}
.standalone .supplier-rating-origin{font-size:11px;color:var(--ui-muted);margin:12px 0 -6px}
.standalone .supplier-editor-actions{display:flex;gap:10px;justify-content:flex-end;position:sticky;bottom:-24px;background:var(--ui-surface);padding:14px 0 0;margin:0;border-top:1px solid var(--ui-line);z-index:1}
.standalone .supplier-editor-actions button{margin:0;min-height:44px}
@media(max-width:650px){
 .standalone .supplier-group-card>.supplier-card-head h3{font-size:20px}
 .standalone .supplier-group-card .supplier-group-edit,.standalone .supplier-group-tools button,.standalone .supplier-group-entities>summary,.standalone #supplier-group-editor button{min-height:44px}
 .standalone .supplier-group-entities>summary{flex-wrap:wrap;gap:4px 10px}
 .standalone #supplier-group-editor{padding:18px;width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:12px}
 .standalone #supplier-group-editor input{font-size:16px}
 .standalone .supplier-group-editor-actions{bottom:-18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .standalone .supplier-group-editor-actions>[type=submit]{grid-column:1/-1;grid-row:2}
 .standalone .supplier-group-editor-actions>[data-group-remove]{margin:0;font-size:12px}
 .standalone .supplier-group-editor-actions>[data-group-remove][hidden]+button{grid-column:1/-1}
 .standalone .supplier-group-selected>button{font-size:12px}
 .standalone .supplier-library-card button.evaluation-tag{min-height:44px;padding:8px 10px;line-height:1.4}
 .standalone .supplier-editor-rating-grid select{min-height:44px;font-size:16px}
 .standalone .supplier-editor-actions{bottom:-16px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
}

.standalone .procurement-record-edit-button{min-height:44px;margin:0;font-size:12px;white-space:nowrap;padding:8px 12px}
.standalone .procurement-record-updated{display:block;margin-top:4px;font-size:11px;color:var(--ui-muted);line-height:1.7}
.standalone .procurement-record-edit-dialog{color:var(--ui-ink);background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:12px;width:calc(100% - 32px);max-width:760px;max-height:calc(100dvh - 32px);padding:0;overscroll-behavior:contain}
.standalone .procurement-record-edit-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
.standalone .procurement-record-edit-dialog::backdrop{background:#00000066}
.standalone .procurement-record-edit-head{flex:none;display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 24px;border-bottom:1px solid var(--ui-line);background:var(--ui-surface)}
.standalone .procurement-record-edit-head h2{font-size:20px;margin:0 0 4px}
.standalone .procurement-record-edit-head p{margin:0;font-size:12px;overflow-wrap:anywhere}
.standalone .procurement-record-edit-head button{margin:0;min-height:44px;flex-shrink:0}
.standalone .procurement-record-edit-body{min-height:0;overflow:auto;padding:0 24px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--ui-line) transparent;scroll-padding-block:16px}
.standalone .procurement-record-edit-body>p{margin:14px 0}
.standalone #procurement-record-edit-status:empty{display:none}
.standalone #procurement-record-edit-reload{min-height:44px;max-width:100%;white-space:normal}
.standalone .procurement-record-edit-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 20px;padding:4px 0 20px}
.standalone .procurement-record-edit-fields label{display:flex;flex-direction:column;gap:8px;min-width:0;font-size:13px;color:var(--ui-muted);line-height:1.6}
.standalone .procurement-record-field-wide{grid-column:1/-1}
.standalone .procurement-record-edit-fields :is(input,select,textarea){width:100%;box-sizing:border-box;min-width:0;min-height:46px;font:inherit;font-size:14px;color:var(--ui-ink);padding:12px 14px;border:1px solid var(--ui-line);border-radius:9px;background:var(--ui-surface)}
.standalone .procurement-record-edit-fields textarea{min-height:64px;resize:vertical;line-height:1.8}
.standalone .procurement-record-edit-fields [data-submission-required=true]{border-color:var(--ui-red);background:var(--ui-red-soft)}
.standalone .procurement-record-edit-fields small{font-size:11px}
.standalone .procurement-record-edit-footer{flex:none;display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid var(--ui-line);background:var(--ui-surface)}
.standalone .procurement-record-edit-footer button{margin:0;min-height:44px}
/* Same wide two-column composition as the approved create-purchase dialog. */
.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase]{width:min(1120px,calc(100vw - 32px));max-width:calc(100vw - 32px);border-radius:var(--ui-radius,8px)}
.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-head{padding:24px 28px 20px}
.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-head h2{font-size:var(--ui-section-size,18px)}
.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] #procurement-record-edit-hint{margin:16px 0 0;font-size:12px;line-height:1.7;color:var(--ui-muted)}
.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-body{padding:0 28px;scrollbar-gutter:stable}
.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-body>p.index-hint{font-size:12px;margin:16px 0 0}
.standalone .procurement-record-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;align-items:start}
.standalone .procurement-record-section{padding:24px 0;min-width:0}
.standalone .procurement-record-section>.procurement-section-heading{font-size:var(--ui-section-size,18px);line-height:1.6;margin:0 0 20px;color:var(--ui-ink)}
.standalone .procurement-record-section .procurement-record-edit-fields{padding:0;gap:18px 16px}
.standalone .procurement-record-section .procurement-record-edit-fields label{font-size:13px}
.standalone .procurement-record-section :is(input,select,textarea){border-radius:var(--ui-radius,8px);min-height:46px}
.standalone .procurement-record-section [data-record-field=workload] textarea{min-height:46px}
.standalone .procurement-record-section [data-record-field=project_name] textarea{min-height:46px;line-height:1.5}
.standalone .procurement-record-supplier-section .procurement-payment-mode{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:3px 9px;padding:16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);color:var(--ui-ink)}
.standalone .procurement-record-supplier-section .procurement-payment-mode:has(input:checked){border-color:var(--ui-red);background:var(--ui-red-soft)}
.standalone .procurement-record-supplier-section .procurement-payment-mode input{width:16px;height:16px;min-height:0;padding:0;margin:0;accent-color:var(--ui-red)}
.standalone .procurement-record-supplier-section [hidden],.standalone #draft-server-supplier-field [hidden]{display:none!important}
.standalone .procurement-supplier-types{margin-top:12px}
.standalone .procurement-record-optional{border:0;border-top:1px solid var(--ui-line);border-radius:0;margin:24px 0 0;padding:0;background:transparent}
.standalone .procurement-record-optional>summary{padding:16px 0;min-height:44px;box-sizing:border-box;font-size:13px;color:var(--ui-muted)}
.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-footer{padding:18px 28px}
@media(max-width:900px){
 .standalone .procurement-record-columns{grid-template-columns:minmax(0,1fr);gap:0}
 .standalone .procurement-record-section+.procurement-record-section{border-top:1px solid var(--ui-line)}
}
@media(max-width:650px){
 .standalone .procurement-record-edit-dialog{width:calc(100% - 12px);max-height:calc(100dvh - 12px)}
 .standalone .procurement-record-edit-head{padding:16px}
 .standalone .procurement-record-edit-body{padding:0 16px}
 .standalone .procurement-record-edit-fields{grid-template-columns:minmax(0,1fr);gap:14px}
 .standalone .procurement-record-edit-fields :is(input,textarea,select){font-size:16px}
 .standalone .procurement-record-edit-footer{padding:12px 16px}
 .standalone .procurement-record-edit-footer button{flex:1}
 .standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase]{width:calc(100vw - 12px);max-width:calc(100vw - 12px)}
 .standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-head{padding:16px}
 .standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-body{padding:0 16px}
 .standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-edit-footer{padding:12px 16px}
 .standalone .procurement-record-section{padding:20px 0}
}

.standalone .procurement-inline-payment{display:grid;justify-items:start;gap:6px;min-width:0;max-width:100%}
.standalone .imported-purchase-workspace .procurement-inline-payment select.state-badge{min-height:44px;width:auto;max-width:100%;min-width:100px;padding:8px 32px 8px 12px;border:1px solid var(--ui-line);font-size:13px;margin:0}
.standalone .procurement-inline-payment small{max-width:230px;line-height:1.6}
.standalone .procurement-inline-payment button{min-height:44px;margin:0}

@media(max-width:650px){.standalone .imported-purchase-workspace .procurement-inline-payment select.state-badge{width:100%;min-width:0;padding:8px 24px 8px 8px;white-space:nowrap;font-size:16px}}
.standalone .procurement-supplier-results{display:grid;gap:4px;max-height:240px;overflow:auto;border:1px solid var(--ui-line);border-radius:var(--hb-radius,8px);padding:6px}
.standalone .procurement-supplier-results[hidden]{display:none}.standalone .procurement-supplier-results button{min-height:44px;margin:0;text-align:left;white-space:normal}
.standalone .imported-purchase-supplier-link,.standalone .imported-purchase-supplier-link:hover{text-decoration:none}
.standalone .procurement-record-edit-fields label[hidden],.standalone .procurement-record-installments[hidden]{display:none!important}
.standalone .procurement-record-edit-fields textarea{overflow:hidden;field-sizing:content}
.standalone .procurement-record-installments{margin-top:20px;padding-top:16px;border-top:1px solid var(--ui-line);min-width:0}
.standalone .procurement-record-period-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.standalone .procurement-record-period-heading h4{margin:0;font-size:16px}
.standalone .procurement-record-period-heading button,.standalone .procurement-record-period-row button,.standalone .procurement-record-period-suggestion button{min-height:44px;margin:0}
.standalone .procurement-record-period-rows{display:grid;gap:12px}
.standalone .procurement-record-period-row{min-width:0;margin:0;padding:12px;border:1px solid var(--ui-line);border-radius:var(--hb-radius,8px)}
.standalone .procurement-record-period-row legend{padding:0 6px;color:var(--ui-ink);font-size:14px;font-weight:650}
.standalone .procurement-record-period-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.standalone .procurement-record-period-grid label{display:grid;gap:6px;min-width:0;color:var(--ui-muted);font-size:12px}
.standalone .procurement-record-period-grid :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:var(--hb-radius,8px);background:var(--ui-surface);color:var(--ui-ink);font:inherit;font-size:14px}
.standalone .procurement-record-period-row>button{margin-top:8px;font-size:12px}
.standalone .procurement-record-period-suggestion{padding:12px;border-radius:var(--hb-radius,8px);background:var(--hb-subtle);overflow-wrap:anywhere}
.standalone .procurement-record-period-suggestion strong{font-size:14px}.standalone .procurement-record-period-suggestion p{font-size:13px}
@media(max-width:650px){.standalone .procurement-record-period-grid{grid-template-columns:minmax(0,1fr)}.standalone .procurement-record-period-grid :is(input,select){font-size:16px}}
/* Match the create-purchase form: one identity column and one payment column. */
body.standalone .procurement-record-method-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 18px}
body.standalone .procurement-record-method-modes .procurement-payment-mode{display:flex;align-items:center;gap:10px;min-width:0;padding:14px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);color:var(--ui-ink);cursor:pointer}
body.standalone .procurement-record-method-modes .procurement-payment-mode:has(input:checked){border-color:var(--ui-red);background:var(--ui-red-soft)}
body.standalone .procurement-record-method-modes input{width:16px;height:16px;min-height:0;padding:0;margin:0;accent-color:var(--ui-red);flex:none}
body.standalone .procurement-record-method-modes strong{display:block;font-size:14px;line-height:1.6}
body.standalone .procurement-record-method-modes small{display:block;font-size:11px;line-height:1.6;color:var(--ui-muted)}
body.standalone .procurement-record-installments{margin-top:18px;padding-top:12px}
body.standalone .procurement-record-period-rows{gap:8px}
body.standalone .procurement-record-period-row{padding:0 0 12px;border:0;border-bottom:1px solid var(--ui-line);border-radius:0}
body.standalone .procurement-record-period-row legend{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;padding:0;min-height:44px}
body.standalone .procurement-record-period-row legend>button{margin:0;padding:6px 4px;border:0;background:transparent;color:var(--ui-muted);font-size:12px;min-height:44px}
body.standalone .procurement-record-period-grid{gap:10px 12px}
body.standalone .procurement-record-period-grid :is(input,select){min-height:44px;padding:10px 12px}
body.standalone .procurement-record-period-heading{margin-bottom:4px}
body.standalone .procurement-record-period-heading h4{font-size:14px}
body.standalone .procurement-record-edit-dialog[data-record-kind=imported_purchase] .procurement-record-section>.procurement-section-heading{margin-bottom:18px}
@media(max-width:650px){body.standalone .procurement-record-method-modes{gap:8px}body.standalone .procurement-record-method-modes .procurement-payment-mode{padding:12px 10px}body.standalone .procurement-record-period-grid{grid-template-columns:minmax(0,1fr)}}
.procurement-inline-invoice{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}.procurement-inline-invoice select,.procurement-inline-invoice button{min-height:44px;max-width:100%}.procurement-inline-invoice small{flex-basis:100%}.procurement-supplier-invoice-dialog{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px;border:1px solid var(--hb-border,#354157);border-radius:8px;background:var(--hb-surface,#19212e);color:var(--hb-ink,#edf2fc)}.procurement-supplier-invoice-dialog::backdrop{background:#0009}.procurement-supplier-invoice-dialog h2{margin:0 0 12px}.procurement-supplier-invoice-form label{display:flex;flex-direction:column;gap:8px;margin:18px 0}.procurement-supplier-invoice-form :is(select,input){width:100%;min-width:0;min-height:44px}.procurement-supplier-invoice-actions{display:flex;justify-content:flex-end;gap:8px}.procurement-supplier-invoice-actions button{min-height:44px}
.standalone .imported-purchase-workspace .procurement-inline-invoice select:has(option[value="否"]:checked){background-color:var(--hb-label-neutral-bg);border-color:var(--hb-label-neutral-border);color:var(--hb-label-neutral-text)}
.standalone .imported-purchase-workspace .procurement-inline-invoice select:has(option[value="是"]:checked){background-color:var(--hb-label-green-bg);border-color:var(--hb-label-green-border);color:var(--hb-label-green-text)}
.procurement-inline-invoice-upload svg{display:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.procurement-inline-invoice [role=status]:empty{display:none}
.procurement-purchase-invoice-item{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:8px 0}.procurement-purchase-invoice-item a{color:var(--hb-label-blue-text,#e4f1ff);text-decoration:underline;overflow-wrap:anywhere}.procurement-purchase-invoice-item small{color:var(--ui-muted,#adb9ca)}.procurement-purchase-invoice-item button{min-height:44px}

/* Member directory and explicit editor use the shared business theme. */
.member-backup-health:empty{display:none}
.member-backup-health{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;padding:14px 18px;margin-bottom:24px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);font-size:13px;color:var(--ui-muted)}
.member-backup-health strong{font-size:14px;font-weight:500;color:var(--ui-ink)}
.member-backup-health small{margin-left:8px;color:var(--ui-muted);font-size:12px}.member-backup-health .backup-ok{color:var(--ui-green)}.member-backup-health .backup-warning{color:var(--ui-amber)}
.member-backup-health details{margin-left:auto}.member-backup-health summary{min-height:32px;display:list-item}.member-backup-health details[open]{flex-basis:100%;margin-left:0}.member-backup-health p{font-size:12px;line-height:1.8;margin:8px 0 0;max-width:90ch}
@media(max-width:650px){.member-backup-health{gap:8px 16px;padding:12px}.member-backup-health strong{width:100%}.member-backup-health summary{min-height:44px;line-height:44px}}
body.standalone #member-management{border:0;padding:0;background:transparent;min-width:0}
.member-list-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px}
.member-list-heading h2{font-size:var(--ui-section-size,24px);font-weight:700;line-height:1.5;margin:0}
.member-list-heading h2 span{font-size:13px;font-weight:400;color:var(--ui-muted);margin-left:10px}
.member-list-heading p,.member-permission-guide p{font-size:13px;line-height:1.7;color:var(--ui-muted);margin:8px 0 0}
.member-list-actions{display:flex;gap:10px;flex:none}
.member-list-filters{display:grid;grid-template-columns:minmax(0,540px) 180px;gap:16px;align-items:end;margin-bottom:16px}
.member-list-filters label{display:grid;gap:8px;font-size:14px;color:var(--ui-muted)}
.member-list-filters :is(input,select){width:100%;font-size:16px}
#member-management-status:empty{display:none}
#member-management-status{font-size:13px;color:var(--ui-muted);line-height:1.7;margin:12px 0}
#member-list{border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);overflow:hidden}
.member-table{border-collapse:collapse;table-layout:fixed;width:100%;text-align:left}
.member-table th{background:var(--ui-soft);padding:12px 18px;font-size:12px;font-weight:500;color:var(--ui-muted)}
.member-table td{padding:14px 18px;border-top:1px solid var(--ui-line);font-size:14px;line-height:1.6;vertical-align:middle;overflow-wrap:anywhere}
.member-table th:nth-child(1){width:24%}.member-table th:nth-child(2){width:20%}.member-table th:nth-child(3){width:11%}.member-table th:nth-child(4){width:23%}.member-table th:last-child{width:190px}
.member-account strong{display:block;font-size:16px;font-weight:600;color:var(--ui-ink)}
.member-account small,.member-role small,.member-scope>small{display:block;font-size:12px;line-height:1.6;color:var(--ui-muted);margin-top:4px}
.member-account small{font-family:ui-monospace,Consolas,monospace}
.member-current{font:400 11px/1.6 "Segoe UI","Microsoft YaHei",sans-serif;margin-left:8px;color:var(--ui-muted);white-space:nowrap}
.member-state{display:inline-flex;padding:3px 8px;border-radius:5px;font-size:12px;line-height:1.6;white-space:nowrap}
.member-state.active{color:var(--ui-green);background:var(--ui-green-soft)}
.member-state.inactive{color:var(--ui-amber);background:var(--ui-amber-soft)}
body.standalone .member-table .member-scope-button{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:400;color:var(--ui-ink);border:0;background:transparent;padding:0 4px;min-height:28px;margin:0 -4px;box-shadow:none}
.member-scope-button::after{content:'›';color:var(--ui-muted);font-size:18px}
body.standalone .member-table .member-scope-button:hover{background:var(--ui-soft)}
.member-permission-guide{margin-top:20px;border-top:1px solid var(--ui-line);padding-top:12px}
.member-permission-guide summary{font-size:14px;color:var(--ui-muted);min-height:44px;line-height:44px;cursor:pointer}
.member-permission-guide p{max-width:85ch;margin:0 0 12px}
.member-empty{padding:32px;text-align:center;color:var(--ui-muted);font-size:14px}
body.standalone #member-editor-dialog{width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink);overflow:hidden}
#member-editor-dialog[open]{display:flex;flex-direction:column}
#member-editor-dialog::backdrop{background:#0009}
.member-dialog-head{padding:24px;display:flex;justify-content:space-between;gap:16px;flex:none;border-bottom:1px solid var(--ui-line)}
body.standalone #member-editor-title{font-size:28px;font-weight:750;margin:0;line-height:1.3}
#member-editor-context{color:var(--ui-muted);font-size:13px;line-height:1.7;margin:8px 0 0;overflow-wrap:anywhere}
#member-editor-close{margin:0;min-width:44px;min-height:44px;align-self:start}
#member-management-form{display:flex;flex-direction:column;min-height:0;margin:0}
.member-dialog-body{padding:0 24px;overflow:auto;min-height:0;scrollbar-width:thin;scroll-padding-block:16px}
.member-form-section{padding:24px 0;border-bottom:1px solid var(--ui-line)}
body.standalone .member-form-section h3{font-size:22px;font-weight:700;margin:0 0 18px;line-height:1.5}
body.standalone .member-form-section .draft-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px 20px;margin:0}
body.standalone #member-editor-dialog label{display:flex;flex-direction:column;gap:8px;font-size:14px;color:var(--ui-ink);min-width:0}
body.standalone #member-editor-dialog :is(input,select){width:100%;min-width:0;font-size:16px;min-height:46px;margin:0}
body.standalone #member-editor-dialog [required]{background:color-mix(in srgb,var(--ui-red) 12%,var(--ui-surface));border-color:color-mix(in srgb,var(--ui-red) 60%,var(--ui-line))}
body.standalone #member-editor-dialog input[readonly]{background:var(--ui-soft);border-color:var(--ui-line)}
.member-form-section label small{color:var(--ui-muted);font-size:12px;font-weight:400;line-height:1.7}
.member-wide{grid-column:1/-1}
#member-capability-preview{padding:16px 18px;margin-top:20px;background:var(--ui-soft);border-radius:var(--ui-radius,8px)}
body.standalone #member-capability-preview h4{font-size:14px;font-weight:600;margin:0 0 8px}
#member-capability-preview ul{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px;list-style:none;padding:0;margin:0;font-size:13px;line-height:1.7;color:var(--ui-muted)}
#member-capability-preview li::before{content:'✓';color:var(--ui-green);margin-right:8px}
#member-editor-status{font-size:13px;line-height:1.7;color:var(--ui-ink);overflow-wrap:anywhere}
#member-editor-status:empty{display:none}
.member-dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:18px 24px;border-top:1px solid var(--ui-line);flex:none;background:var(--ui-surface)}
.member-dialog-footer span{font-size:12px;color:var(--ui-muted);line-height:1.7;margin-right:auto}
.member-dialog-footer button{margin:0;white-space:nowrap;min-height:44px}
@media(max-width:1100px) and (min-width:651px){.member-table td,.member-table th{padding:12px 10px}.member-table th:last-child{width:150px}.member-table th:nth-child(1){width:22%}.member-table th:nth-child(2){width:17%}.member-table th:nth-child(3){width:12%}.member-account strong{font-size:14px}}
@media(max-width:900px){
 .member-list-heading{flex-direction:column;gap:16px}.member-list-heading h2{font-size:20px}.member-list-actions{width:100%;flex-wrap:wrap}.member-list-actions button{min-height:44px}
 .member-list-filters{grid-template-columns:minmax(0,1fr);gap:12px}.member-list-filters :is(input,select){min-height:44px}
 .member-table,.member-table tbody{display:block}.member-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .member-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;padding:16px;border-bottom:1px solid var(--ui-line)}.member-table tr:last-child{border-bottom:0}
 .member-table td{display:block;padding:0;border:0;min-width:0;font-size:14px}.member-table .member-account{grid-column:1;grid-row:1}.member-table td:nth-child(3){grid-column:2;grid-row:1;align-self:start}.member-table .member-role{grid-column:1;grid-row:2;align-self:center}.member-role small{margin-top:4px}.member-table .member-scope{grid-column:2;grid-row:2;max-width:150px}.member-scope>small{margin:0}body.standalone .member-table .member-scope-button{min-height:44px}.member-table td:last-child{grid-column:1/-1}.member-account strong{font-size:16px}
 body.standalone #member-editor-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);max-width:calc(100vw - 12px)}
 .member-dialog-head{padding:18px 16px}body.standalone #member-editor-title{font-size:24px}.member-dialog-body{padding:0 16px}
 body.standalone .member-form-section h3{font-size:20px}body.standalone .member-form-section .draft-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 #member-capability-preview ul{grid-template-columns:1fr}.member-dialog-footer{padding:12px 16px;flex-wrap:wrap}.member-dialog-footer span{width:100%}.member-dialog-footer button{flex:1}
}
.member-table td:last-child{white-space:normal}.member-table td:last-child button{font-size:13px;padding:8px 10px;min-height:36px}
body.standalone .member-table .member-delete-button{color:#ffb1bb;border-color:transparent;background:transparent}
body.standalone #member-delete-dialog{width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink)}
#member-delete-dialog::backdrop{background:#0009}.member-delete-body{padding:24px}
body.standalone #member-delete-title{font-size:24px;font-weight:700;margin:0 0 18px;line-height:1.4}
.member-delete-body>p:not(.dialog-business-identity){color:var(--ui-muted);font-size:13px;line-height:1.8;margin:14px 0 0}
#member-delete-status:empty{display:none}
@media(max-width:650px){.member-table td:last-child{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.member-table td:last-child button{flex:1;min-width:90px;margin:0;min-height:44px}.member-delete-body{padding:20px}}

.member-row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
body.standalone .member-row-actions button{margin:0}

@media(max-width:900px){.member-row-actions{width:100%}.member-table td:last-child .member-row-actions button{flex:1;width:auto;min-height:44px}}

/* Selectable permissions reuse the shared controls, palette and type scale. */
#member-capability-preview{background:transparent;padding:0;margin-top:24px}
.member-permission-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
body.standalone #member-capability-preview h4{font-size:20px;font-weight:700;margin:0;outline:none}
.member-permission-count{font-size:13px;color:var(--ui-muted)}
.member-permission-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 20px}
.member-permission-toolbar button{font-size:13px;min-height:36px}
.member-permission-group{border:0;padding:0;margin:0 0 20px;min-width:0}
.member-permission-group legend{font-size:16px;font-weight:650;color:var(--ui-text);margin-bottom:10px}
.member-permission-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.member-permission-option{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-soft);min-height:48px;cursor:pointer}
.member-permission-option.is-selected{border-color:var(--ui-green);background:color-mix(in srgb,var(--ui-green) 8%,var(--ui-soft))}
.member-permission-option input[type=checkbox]{width:18px!important;height:18px!important;min-height:0!important;flex:0 0 18px;margin:2px 0 0;accent-color:var(--ui-green)}
.member-permission-option strong{font-size:15px;font-weight:500;line-height:1.6;display:block;color:var(--ui-text)}
.member-permission-option small{display:block;font-size:12px;color:var(--ui-muted);line-height:1.5;margin-top:3px}
.member-permission-option.is-locked{cursor:default;background:transparent}
.member-permission-option.is-locked strong{color:var(--ui-muted)}
@media(max-width:640px){.member-permission-grid{grid-template-columns:1fr}.member-permission-toolbar button{min-height:44px}}

/* The matrix shares the member dialog shell and system controls. */
body.standalone #member-matrix-dialog{width:min(1180px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink);overflow:hidden}
#member-matrix-dialog[open]{display:flex;flex-direction:column}
#member-matrix-dialog::backdrop{background:#0009}
#member-matrix-dialog .member-dialog-head h2{font-size:var(--ui-section-size,24px);margin:0}
#member-matrix-dialog .member-dialog-head p{font-size:13px;margin:6px 0 0;color:var(--ui-muted)}
#member-matrix-dialog .member-dialog-body{padding-top:16px;padding-bottom:20px}
.member-matrix-filter{display:inline-flex;flex-direction:column;gap:8px;width:min(280px,100%);font-size:14px;margin:0 12px 12px 0;vertical-align:top}
#member-matrix-dialog .member-matrix-filter select{min-height:44px;margin:0;width:100%}
.member-matrix-scroll{overflow-x:auto;max-width:100%;isolation:isolate;scrollbar-width:thin}
.member-matrix{border-collapse:separate;border-spacing:0;width:100%;font-size:14px}
.member-matrix th,.member-matrix td{padding:12px;border-bottom:1px solid var(--ui-line);text-align:left;vertical-align:middle}
.member-matrix thead th{min-width:144px;background:var(--ui-surface);vertical-align:top;font-weight:500}
.member-matrix thead small{display:block;font-size:12px;color:var(--ui-muted);overflow-wrap:anywhere;margin-top:4px;font-weight:400}
.member-matrix thead button{min-height:44px;margin:8px 0 0;font-size:12px;white-space:normal}
.member-matrix th:first-child{position:sticky;left:0;z-index:1;min-width:200px;max-width:220px;background:var(--ui-surface);font-weight:500;box-shadow:1px 0 0 var(--ui-line)}
.member-matrix-group th{background:var(--ui-soft)!important;font-weight:600!important}
body.standalone .member-matrix-option{display:grid;grid-template-columns:18px 1fr;align-items:center;gap:8px;min-height:44px;cursor:pointer;font-size:13px;margin:0}
body.standalone .member-matrix-option input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--ui-red);padding:0}
.member-matrix-option small{grid-column:1/-1;font-size:12px;color:var(--ui-muted);line-height:1.5}
.member-matrix-option:has(input:disabled){cursor:default}
#member-matrix-status{font-size:13px;line-height:1.6;overflow-wrap:anywhere;color:var(--ui-muted)}
#member-matrix-changes{padding-top:20px;scroll-margin-top:16px}
#member-matrix-changes h3{font-size:18px;margin:0 0 14px}
.member-matrix-diff{border-top:1px solid var(--ui-line);padding:14px 0;overflow-wrap:anywhere;font-size:14px}
.member-matrix-diff p{font-size:13px;color:var(--ui-muted);line-height:1.8;margin:8px 0 0}
@media(max-width:650px){body.standalone #member-matrix-dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}.member-matrix th,.member-matrix td{padding:10px 8px}.member-matrix th:first-child{min-width:140px;max-width:160px}.member-matrix thead th{min-width:88px}.member-matrix-filter{width:100%;margin-right:0}.member-list-actions{flex-wrap:wrap}}

/* Password changes use the same member dialog and control system. */
#managed-reset-field{display:flex;flex-direction:column;gap:8px;align-items:flex-start;font-size:14px}#managed-reset-field[hidden]{display:none}#managed-reset-field button{margin:0;min-height:46px}#managed-reset-field small{color:var(--ui-muted)}
body.standalone #member-password-dialog{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink);overflow:auto}
#member-password-dialog::backdrop{background:#0009}#member-password-title{margin:0;font-size:24px}#member-password-close{min-width:44px;min-height:44px;margin:0;align-self:start}#member-password-form{margin:0}#member-password-form .member-dialog-body{padding:20px 24px}#member-password-form label{display:grid;gap:8px;margin-top:18px}#member-password-form input{width:100%;min-width:0;min-height:46px;font-size:16px}#member-password-form p,#member-password-form small{font-size:13px;line-height:1.7;color:var(--ui-muted);overflow-wrap:anywhere}#member-password-form button{min-height:44px}

.standalone:not([data-view=calendar]) #hanabi-calendar{display:none}
#hanabi-calendar-grid[data-mode=month] button.hanabi-day{border:1px solid var(--ui-line)}#hanabi-calendar-grid[data-mode=month] button.hanabi-day[data-today=true]{border-color:var(--ui-red)}
#hanabi-calendar{min-width:0;--calendar-hanabi:#CD3436;--calendar-national:#D8AD4A;--calendar-todo:#A3E635}.hanabi-calendar-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin-bottom:10px}.hanabi-calendar-toolbar label{display:grid;gap:8px;font-size:13px;color:var(--ui-muted)}.hanabi-calendar-toolbar select{min-height:44px;margin:0}.hanabi-calendar-toolbar button{min-height:44px;margin:0}.hanabi-calendar-modes{display:grid;grid-template-columns:repeat(3,56px);gap:4px;order:-1;flex:none}#hanabi-calendar .hanabi-calendar-modes button[aria-pressed=true]{background:color-mix(in srgb,var(--ui-muted) 18%,var(--ui-surface));color:var(--ui-ink);border-color:var(--ui-muted)}#hanabi-calendar .hanabi-calendar-modes button:focus-visible{outline-color:var(--ui-muted)}
.hanabi-calendar-legend{display:flex;flex-wrap:wrap;gap:16px;font-size:13px;color:var(--ui-muted);margin:8px 0}.hanabi-calendar-legend span:before{content:'';display:inline-block;width:12px;height:12px;margin-right:6px;border-radius:3px;background:var(--ui-soft);vertical-align:middle}.hanabi-calendar-legend .national:before{background:var(--calendar-national)}.hanabi-calendar-legend .company:before{background:var(--calendar-hanabi)}.hanabi-calendar-legend .weekend:before{background:#606c81}
#hanabi-calendar-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}#hanabi-calendar-grid[data-mode=month],#hanabi-calendar-grid[data-mode=week]{grid-template-columns:minmax(0,1fr);max-width:none}.hanabi-month{min-width:0;padding:16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface)}.hanabi-month>button{font-size:16px;font-weight:650;min-height:44px;margin:0 0 10px}.hanabi-month h2{font-size:22px;margin:0 0 16px}.hanabi-month-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.hanabi-weekday{text-align:center;font-size:12px;color:var(--ui-muted);padding:6px 0}.hanabi-day{display:flex;align-items:center;justify-content:center;min-width:0;min-height:30px;font-size:12px;border:1px solid transparent;border-radius:5px;position:relative}.hanabi-day[data-kinds~=weekend]{background:var(--ui-soft);color:var(--ui-muted)}.hanabi-day[data-kinds~=national]{background:color-mix(in srgb,var(--calendar-national) 22%,var(--ui-surface));color:var(--ui-ink)}.hanabi-day[data-kinds~=company]{background:color-mix(in srgb,var(--calendar-hanabi) 26%,var(--ui-surface));color:var(--ui-ink)}.hanabi-day[data-kinds~=national][data-kinds~=company]{box-shadow:inset 0 -3px var(--calendar-national)}.hanabi-day[data-today=true]{border-color:var(--ui-red);font-weight:800}#hanabi-calendar-grid[data-mode=month] .hanabi-day{min-height:64px;font-size:16px;background-color:var(--ui-surface);color:var(--ui-ink);margin:0;padding:4px}#hanabi-calendar-grid[data-mode=month] .hanabi-day[data-kinds~=national]{background:color-mix(in srgb,var(--calendar-national) 22%,var(--ui-surface))}#hanabi-calendar-grid[data-mode=month] .hanabi-day[data-kinds~=company]{background:color-mix(in srgb,var(--calendar-hanabi) 26%,var(--ui-surface))}#hanabi-calendar-grid[data-mode=month] .hanabi-day[data-kinds=weekend]{background:var(--ui-soft);color:var(--ui-muted)}
.hanabi-day-detail{padding:24px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px)}.hanabi-day-detail input{min-height:44px;font-size:16px}.hanabi-day-detail h2{font-size:26px}.hanabi-calendar-source,#hanabi-calendar-status{font-size:13px;color:var(--ui-muted);line-height:1.7}.hanabi-calendar-source a{color:var(--ui-ink)}#hanabi-company-holidays{font-size:14px;line-height:1.8}#hanabi-calendar>details{margin-top:8px;border-top:1px solid var(--ui-line);padding-top:4px}#hanabi-calendar>details>summary{min-height:44px}
body.standalone #hanabi-calendar-editor{width:min(900px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:hidden;background:var(--ui-surface);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px)}#hanabi-calendar-editor::backdrop{background:#0009}#hanabi-calendar-editor form{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);margin:0}#hanabi-calendar-editor .quotation-modal-head,#hanabi-calendar-editor .quotation-modal-actions{padding:20px 24px;flex:none}.hanabi-calendar-editor-body{padding:20px 24px;min-height:0;overflow:auto}.hanabi-calendar-editor-body label{display:grid;gap:8px;min-width:0;font-size:13px;color:var(--ui-muted);margin-bottom:14px}.hanabi-calendar-editor-body input,.hanabi-calendar-editor-body textarea{width:100%;min-width:0;min-height:44px;font-size:16px;margin:0}.hanabi-holiday-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:end;border-bottom:1px solid var(--ui-line);padding:16px 0}.hanabi-holiday-row button{min-height:44px;margin:0 0 14px}#hanabi-calendar-editor h2{font-size:24px;margin:0}
@media(min-width:651px) and (max-width:900px){#hanabi-calendar-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){#hanabi-calendar-grid{grid-template-columns:minmax(0,1fr);gap:16px}.hanabi-month{padding:12px}.hanabi-calendar-toolbar{gap:10px}.hanabi-holiday-row{grid-template-columns:repeat(2,minmax(0,1fr))}.hanabi-holiday-row label:first-child{grid-column:1/-1}.hanabi-holiday-row button{justify-self:start}.hanabi-calendar-editor-body{padding:12px 16px}#hanabi-calendar-editor .quotation-modal-head,#hanabi-calendar-editor .quotation-modal-actions{padding:16px}#hanabi-calendar-grid[data-mode=month] .hanabi-day{min-height:44px}.hanabi-day-detail{padding:16px}}

/* Annual overview uses the available desktop height without scaling the page. */
#hanabi-calendar-status{min-height:17px;margin:0 0 6px;font-size:12px;line-height:1.4}
.hanabi-calendar-source{margin:6px 0 10px}
#calendar-company-edit{background:var(--calendar-hanabi);border-color:var(--calendar-hanabi);color:#fff}
#calendar-national-edit{margin-left:auto}
#hanabi-calendar-grid[data-mode=year] .hanabi-month{box-sizing:border-box;height:clamp(158px,calc((100dvh - 300px)/3),240px);padding:6px 10px;display:flex;flex-direction:column}
#hanabi-calendar-grid[data-mode=year] .hanabi-month>button{align-self:flex-start;min-height:28px;font-size:14px;padding:2px 10px;margin:0 0 2px}
#hanabi-calendar-grid[data-mode=year] .hanabi-month-days{flex:1;min-height:0;grid-template-rows:12px repeat(6,minmax(0,1fr));gap:1px}
#hanabi-calendar-grid[data-mode=year] .hanabi-weekday{padding:0;font-size:11px;line-height:12px}
#hanabi-calendar-grid[data-mode=year] .hanabi-day{min-height:0;font-size:12px;line-height:1.25}
@media(min-width:901px){
 html body.standalone[data-view=calendar] main{max-width:1720px;padding:8px 28px}
 body.standalone[data-view=calendar] .app-page-heading{margin:4px 0 8px}
 body.standalone[data-view=calendar] .app-page-heading h1{font-size:28px}
 body.standalone[data-view=calendar] .app-page-heading .eyebrow{display:none}
 body.standalone[data-view=calendar] .app-topbar{padding-bottom:4px}
 body.standalone[data-view=calendar] .hanabi-calendar-toolbar>label{display:flex;align-items:center;gap:8px}
 .hanabi-calendar-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 20px}
 .hanabi-calendar-meta .hanabi-calendar-source{margin:0 0 10px}
 body.standalone[data-view=calendar] .app-page-heading .lead{margin-top:4px}
}
@media(max-width:650px){
 #calendar-national-edit{margin-left:0}
 #hanabi-calendar-grid[data-mode=year] .hanabi-month{height:252px;padding:12px}
 #hanabi-calendar-grid[data-mode=year] .hanabi-month>button{min-height:44px;font-size:16px}
 #hanabi-calendar-grid[data-mode=year] .hanabi-day{font-size:14px}
}

.hanabi-calendar-meta>details{position:relative;font-size:13px;margin:0 0 8px}
.hanabi-calendar-meta>details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;gap:6px}
.hanabi-calendar-meta>details>summary:before{content:'▸'}
.hanabi-calendar-meta>details[open]>summary:before{content:'▾'}
#hanabi-company-holidays{position:absolute;z-index:2;right:0;top:100%;min-width:240px;max-width:min(420px,calc(100vw - 48px));max-height:260px;overflow:auto;box-sizing:border-box;padding:12px 16px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);box-shadow:0 8px 24px #0003}
@media(max-width:900px){.hanabi-calendar-meta{display:flex;flex-wrap:wrap;gap:0 16px;align-items:center}#hanabi-company-holidays{left:0;right:auto}}

@media(min-width:901px){
 .hanabi-calendar-meta>details{margin:0}
 .hanabi-calendar-meta>details>summary{min-height:32px}
 .hanabi-calendar-meta .hanabi-calendar-legend{margin:4px 0}
 .hanabi-calendar-meta .hanabi-calendar-source{margin:0}
 .hanabi-calendar-meta{margin-bottom:8px;align-items:center}
}


/* Month occupies the full annual canvas; notes never affect holiday calculation. */
#hanabi-calendar-grid[data-mode=month] .hanabi-month{height:clamp(494px,calc(100dvh - 280px),740px);display:flex;flex-direction:column}
#hanabi-calendar-grid[data-mode=month] .hanabi-month-days{flex:1;min-height:0;grid-template-rows:28px repeat(var(--calendar-weeks),minmax(0,1fr))}
#hanabi-calendar-grid[data-mode=month] .hanabi-day{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;min-height:0;overflow:hidden;border:1px solid var(--ui-line);padding:6px 8px}
#hanabi-calendar-grid[data-mode=month] .hanabi-date-number{min-height:28px;align-self:flex-start;padding:0 4px;margin:0;font-size:13px;color:inherit;border:0;background:transparent;box-shadow:none}
.hanabi-todo-content{min-height:0;flex:1;overflow:auto;align-self:stretch;font-size:16px;line-height:1.65;color:#f1f3f7;text-align:left}
.hanabi-todo-content ol{margin:4px 0;padding:0;list-style:none}.hanabi-todo-content li{overflow-wrap:anywhere;margin:4px 0}.hanabi-todo-item{display:flex;align-items:flex-start;gap:6px;margin:0}.hanabi-todo-check{display:flex;align-items:flex-start;justify-content:center;min-width:24px;min-height:28px;margin:0;cursor:pointer}.hanabi-todo-item input[type=checkbox]{width:16px;height:16px;min-height:16px;flex:none;margin:5px 0 0;accent-color:var(--ui-red)}.hanabi-todo-label{min-width:0;color:inherit}.hanabi-todo-content li[data-done=true] .hanabi-todo-label{text-decoration:line-through;text-decoration-thickness:1.5px;color:#b6c0ce}
.hanabi-todo-content textarea{display:block;width:100%;height:100%;min-height:44px;resize:none;background:var(--ui-surface);color:var(--ui-ink);font:inherit;line-height:1.5;padding:6px;border:1px solid var(--ui-line);box-sizing:border-box}
.hanabi-todo-content.is-editing{display:flex;flex-direction:column;overflow:hidden;position:relative}.hanabi-todo-content.is-editing textarea{flex:1;min-height:0;height:auto;overflow:auto}.hanabi-todo-feedback{position:absolute;bottom:2px;left:6px;right:6px;max-height:50%;overflow:auto;padding:2px 4px;background:var(--ui-surface);font-size:11px;line-height:1.5;color:var(--ui-muted)}.hanabi-todo-feedback:empty{display:none}
@media(max-width:650px){#hanabi-calendar-grid[data-mode=month] .hanabi-month{height:auto;min-height:600px;padding:8px}#hanabi-calendar-grid[data-mode=month] .hanabi-month-days{grid-template-rows:24px repeat(var(--calendar-weeks),minmax(88px,auto));gap:2px}#hanabi-calendar-grid[data-mode=month] .hanabi-day{padding:2px}#hanabi-calendar-grid[data-mode=month] .hanabi-date-number{min-height:44px;min-width:30px;font-size:13px}.hanabi-todo-content{font-size:14px}.hanabi-todo-content ol{padding:0}.hanabi-todo-item{display:grid;grid-template-columns:minmax(0,1fr);gap:2px}.hanabi-todo-check{min-height:44px;justify-content:flex-start;align-items:center}.hanabi-todo-item input[type=checkbox]{width:16px;height:16px;margin-top:4px}.hanabi-todo-label{overflow-wrap:anywhere}.hanabi-todo-content textarea{font-size:16px}}

/* The annual desktop grid fills the remaining window, including tall displays. */
@media(min-width:901px){
 html body.standalone[data-view=calendar] main:has(#hanabi-calendar-grid:is([data-mode=year],[data-mode=month])){height:100dvh;display:flex;flex-direction:column}
 body.standalone[data-view=calendar] main:has(#hanabi-calendar-grid:is([data-mode=year],[data-mode=month]))>.app-topbar,
 body.standalone[data-view=calendar] main:has(#hanabi-calendar-grid:is([data-mode=year],[data-mode=month]))>.app-page-heading{flex:none}
 body.standalone[data-view=calendar] #hanabi-calendar:has(#hanabi-calendar-grid:is([data-mode=year],[data-mode=month])){display:flex;flex-direction:column;flex:1;min-height:0}
 body.standalone[data-view=calendar] #hanabi-calendar:has(#hanabi-calendar-grid:is([data-mode=year],[data-mode=month]))>:not(.hanabi-calendar-workspace){flex:none}
 #hanabi-calendar-grid[data-mode=year]{flex:1;min-height:494px;grid-template-rows:repeat(3,minmax(158px,1fr))}
 #hanabi-calendar-grid[data-mode=year] .hanabi-month{height:auto;container-type:size}
 #hanabi-calendar-grid[data-mode=year] .hanabi-month>button{font-size:clamp(14px,6cqh,20px)}
 #hanabi-calendar-grid[data-mode=year] .hanabi-month-days{grid-template-rows:clamp(12px,6cqh,20px) repeat(6,minmax(0,1fr));gap:clamp(1px,.8cqh,4px)}
 #hanabi-calendar-grid[data-mode=year] .hanabi-weekday{font-size:clamp(11px,4.8cqh,14px);line-height:1.2}
 #hanabi-calendar-grid[data-mode=year] .hanabi-day{font-size:clamp(12px,6cqh,18px)}
}


@media(min-width:901px){#hanabi-calendar-grid[data-mode=month]{flex:1;min-height:494px}#hanabi-calendar-grid[data-mode=month] .hanabi-month{height:auto;min-height:0}}

/* 03 uses the approved preview's shared tokens and panel regions. */
.hanabi-calendar-workspace{--calendar-panel-width:310px;display:grid;grid-template-columns:minmax(0,1fr);gap:20px;min-width:0}
#hanabi-calendar[data-holiday-panel=true] .hanabi-calendar-workspace{grid-template-columns:var(--calendar-panel-width) minmax(0,1fr)}
#hanabi-holiday-panel[hidden]{display:none}
#hanabi-holiday-panel{min-width:0;min-height:0;align-self:start;max-height:100%;overflow:auto;box-sizing:border-box;padding:0;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);color:var(--hb-text);font:var(--hb-body)/1.55 var(--hb-font);scrollbar-width:thin}
#hanabi-holiday-panel *{box-sizing:border-box}
#hanabi-holiday-panel button{margin:0;min-height:44px;padding:8px 12px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);color:var(--hb-text);font:inherit;white-space:normal;overflow-wrap:anywhere}
#hanabi-holiday-panel :is(input,select){width:100%;min-width:0;margin:0;min-height:44px;padding:8px 12px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);color:var(--hb-text);font:var(--hb-form-value)/1.55 var(--hb-font)}
#hanabi-holiday-panel label{display:grid;gap:7px;font-size:var(--hb-caption);color:var(--hb-muted)}
#hanabi-holiday-panel :is(button,input,select):focus-visible{outline:2px solid var(--hb-text);outline-offset:2px}
.holiday-panel-tabs{display:flex;gap:6px;padding:12px;border-bottom:1px solid var(--hb-border)}
.holiday-panel-tabs>button{flex:1}
#hanabi-holiday-panel .holiday-panel-tabs>[aria-selected=true]{border-color:var(--hb-brand)}
.holiday-panel-content{display:flex;flex-direction:column;gap:14px;padding:18px;min-width:0}
#hanabi-holiday-panel[data-tab=edit] .holiday-panel-content{background:var(--hb-group-deep)}
.holiday-view-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
#hanabi-holiday-panel .holiday-view-heading h3{margin:0;font-size:var(--hb-section-title);font-weight:650}
#hanabi-holiday-panel .index-hint{margin:0;color:var(--hb-muted);font-size:var(--hb-caption);font-weight:400}
.holiday-region-kicker{margin:0 0 -10px;color:var(--hb-muted);font-size:var(--hb-caption)}
.holiday-rule-list{display:grid;gap:6px;min-width:0}
.holiday-rule-row{display:flex;align-items:center;gap:6px;min-width:0}
#hanabi-holiday-panel .holiday-rule-button{display:grid;gap:5px;flex:1;min-width:0;padding:12px;text-align:left;border-color:transparent}
#hanabi-holiday-panel .holiday-rule-button strong{font-size:var(--hb-body);font-weight:600;overflow-wrap:anywhere}
.holiday-rule-button strong:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--hb-brand);vertical-align:middle;margin-right:7px}
.holiday-rule-button small{font-size:var(--hb-caption);line-height:1.5;color:var(--hb-muted)}
#hanabi-holiday-panel .holiday-rule-button:hover{background:var(--hb-subtle)}
#hanabi-holiday-panel .holiday-rule-button[aria-pressed=true]{background:color-mix(in srgb,var(--hb-brand) 10%,var(--hb-surface));border-color:color-mix(in srgb,var(--hb-brand) 60%,var(--hb-border))}
.holiday-mobile-edit{display:none}
.holiday-gesture-hint,.holiday-panel-status{margin:0;color:var(--hb-muted);font-size:var(--hb-caption);line-height:1.65}
.holiday-focus-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:12px;border-top:1px solid var(--hb-border);color:var(--hb-muted);font-size:var(--hb-caption)}
.holiday-focus-summary>div{min-width:0}.holiday-focus-summary strong{display:block;margin-bottom:4px;color:var(--hb-text);font-size:var(--hb-body);font-weight:600;overflow-wrap:anywhere}
#hanabi-holiday-panel .holiday-focus-summary>button{flex:none;border-color:transparent;background:transparent;color:var(--hb-muted);padding:4px 0;font-size:var(--hb-caption)}
.holiday-brush{display:flex;gap:6px}.holiday-brush>button{flex:1}
#hanabi-holiday-panel .holiday-brush>[aria-pressed=true]{border-color:var(--hb-brand);background:color-mix(in srgb,var(--hb-brand) 12%,var(--hb-surface))}
.holiday-selection-count{font-size:var(--hb-body);font-weight:650;color:var(--hb-text)}
.holiday-selection{display:flex;flex-wrap:wrap;gap:5px;max-height:120px;overflow:auto;min-height:0}
.holiday-selected-day{display:flex;flex:none;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);overflow:hidden}
#hanabi-holiday-panel .holiday-selected-day>button{min-height:32px;border:0;border-radius:0;padding:4px 6px;font-size:var(--hb-caption);font-variant-numeric:tabular-nums}
#hanabi-holiday-panel .holiday-selected-day>button+button{padding-left:2px;padding-right:6px}
.holiday-panel-status:empty{display:none}
#hanabi-holiday-panel #holiday-remove{align-self:start;border-color:transparent;background:transparent;color:var(--hb-muted);font-size:var(--hb-caption);padding:0}
.holiday-panel-footer{display:flex;gap:8px;padding:12px 0 0;margin-top:4px;position:sticky;bottom:0;background:var(--hb-group-deep)}
.holiday-panel-footer>button{flex:1}.holiday-mobile-count{display:none}
#hanabi-holiday-panel #holiday-confirm{background:var(--hb-brand);border-color:var(--hb-brand);color:var(--hb-on-brand)}
#hanabi-calendar-grid .hanabi-day{--calendar-day-base:transparent}
#hanabi-calendar-grid .hanabi-day[data-kinds~=weekend]{--calendar-day-base:var(--ui-soft)}
#hanabi-calendar-grid .hanabi-day[data-kinds~=national]{--calendar-day-base:color-mix(in srgb,var(--calendar-national) 22%,var(--ui-surface))}
#hanabi-calendar[data-holiday-editing=true] .hanabi-day{touch-action:none;user-select:none}
#hanabi-calendar-grid .hanabi-day[data-selected=true],#hanabi-calendar-grid .hanabi-day[data-holiday-focused=true]{outline:2px solid var(--calendar-hanabi);outline-offset:-2px}
#hanabi-calendar[data-holiday-editing=true] .hanabi-day:focus-visible{outline:2px solid var(--ui-ink);outline-offset:-2px}
@media(min-width:901px){.hanabi-calendar-workspace{flex:1;min-height:0}#hanabi-calendar-grid{min-width:0}html body.standalone[data-view=calendar] main:has(#hanabi-calendar[data-holiday-panel=true]){max-width:2000px}}
@media(max-width:1400px) and (min-width:901px){.hanabi-calendar-workspace{--calendar-panel-width:270px}#hanabi-calendar[data-holiday-panel=true] .hanabi-calendar-workspace{grid-template-columns:var(--calendar-panel-width) minmax(0,1fr);gap:14px}}
@media(max-width:1100px) and (min-width:901px){.hanabi-calendar-workspace{--calendar-panel-width:250px}#hanabi-calendar[data-holiday-panel=true] .hanabi-calendar-workspace{grid-template-columns:var(--calendar-panel-width) minmax(0,1fr)}}
@media(max-width:900px){#hanabi-calendar[data-holiday-panel=true] .hanabi-calendar-workspace{grid-template-columns:minmax(0,1fr);padding-bottom:80px}#hanabi-holiday-panel{max-height:600px}#hanabi-holiday-panel[data-tab=view]{max-height:500px}.holiday-mobile-edit{display:block}.holiday-rule-list{max-height:300px;overflow:auto}#hanabi-holiday-panel .holiday-selected-day>button{min-height:44px}.holiday-selection{max-height:150px}.holiday-panel-footer{position:fixed;z-index:30;left:14px;right:14px;bottom:calc(76px + env(safe-area-inset-bottom));padding:8px 10px;margin:0;align-items:center;border:1px solid var(--hb-border);border-radius:var(--hb-radius);box-shadow:0 4px 18px #0003}.holiday-mobile-count{display:block;flex:1;min-width:0;font-size:var(--hb-caption)}#hanabi-holiday-panel .holiday-panel-footer>button{flex:none;min-width:64px}#hanabi-calendar[data-holiday-editing=true] #hanabi-calendar-grid[data-mode=year] .hanabi-month{height:380px}#hanabi-calendar[data-holiday-editing=true] #hanabi-calendar-grid .hanabi-day{min-height:44px}}
@media(pointer:coarse){.holiday-mobile-edit{display:block}}

#hanabi-calendar-status:not(:empty){margin:0 0 6px;font-size:12px;line-height:1.4}
@media(min-width:901px){#hanabi-calendar-grid[data-mode=year]{min-height:470px;grid-template-rows:repeat(3,minmax(150px,1fr))}}

.hanabi-todo-mobile-count{display:none}.hanabi-day-detail>strong{display:block;margin:8px 0}.hanabi-day-detail>button{margin:4px 6px 4px 0}.hanabi-day-detail>.hanabi-todo-content{margin:16px 0;font-size:16px}.hanabi-day-detail .hanabi-todo-item{display:flex;gap:8px}.hanabi-day-detail .hanabi-todo-check{align-items:center;min-height:44px}.hanabi-day-detail .hanabi-todo-label{padding-top:8px}.hanabi-day-detail .hanabi-todo-content textarea{min-height:220px;font-size:16px}
@media(max-width:650px){#hanabi-calendar-grid[data-mode=month] .hanabi-todo-content>ol{display:none}#hanabi-calendar-grid[data-mode=month] .hanabi-todo-mobile-count{display:block;font-size:11px;line-height:1.5;color:#f1f3f7;overflow-wrap:anywhere}#hanabi-calendar-grid[data-mode=month] .hanabi-day{overflow:visible}.hanabi-day-detail>.hanabi-todo-content{font-size:16px}}

/* Today stays distinct without replacing national/company holiday colors. */
#hanabi-calendar-grid[data-mode=month] .hanabi-day[data-today=true]{border-color:var(--ui-red);outline:2px solid var(--ui-red);outline-offset:-2px}
#hanabi-calendar-grid[data-mode=month] .hanabi-day[data-today=true]::after{content:'今天';position:absolute;top:8px;right:8px;font-size:12px;font-weight:600;line-height:1.5;color:var(--ui-red);pointer-events:none}
#hanabi-calendar-grid[data-mode=month] .hanabi-day[data-today=true] .hanabi-date-number{color:var(--ui-red);font-weight:750}
@media(max-width:650px){#hanabi-calendar-grid[data-mode=month] .hanabi-day[data-today=true]::after{display:none}}

#hanabi-calendar-grid[data-mode=year] .hanabi-day[data-today=true]{border-color:var(--ui-red);outline:2px solid var(--ui-red);outline-offset:-2px;background:color-mix(in srgb,var(--ui-red) 24%,var(--ui-surface));color:var(--ui-ink);font-weight:800}
#hanabi-calendar-grid[data-mode=year] .hanabi-month[data-current-month=true]{border-color:color-mix(in srgb,var(--ui-red) 65%,var(--ui-line))}
#hanabi-calendar-grid[data-mode=year] .hanabi-month[data-current-month=true]>button::after{content:'本月';margin-left:8px;font-size:11px;font-weight:600;color:var(--ui-red)}

/* All day fills share the same padding box, including half-day overlays. */
#hanabi-calendar-grid:is([data-mode=year],[data-mode=month]) .hanabi-day[data-holiday-part]{box-sizing:border-box;isolation:isolate;--calendar-day-radius:5px;border-radius:var(--calendar-day-radius);background:var(--calendar-day-base);background-clip:padding-box;box-shadow:none}
#hanabi-calendar-grid[data-mode=year] .hanabi-day{border:0}
#hanabi-calendar-grid[data-mode=month] .hanabi-day{--calendar-day-border:1px}
#hanabi-calendar-grid .hanabi-day:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:calc(var(--calendar-day-radius) - var(--calendar-day-border,0px));background:linear-gradient(to top,var(--holiday-marker,transparent) 0 3px,transparent 3px),color-mix(in srgb,var(--calendar-hanabi) 26%,var(--ui-surface));clip-path:inset(calc(100% - var(--holiday-fill,0%)) 0 0);transition:clip-path 140ms ease-out}
#hanabi-calendar-grid .hanabi-day[data-kinds~=national]{--holiday-marker:var(--calendar-national)}
@media(prefers-reduced-motion:reduce){#hanabi-calendar-grid .hanabi-day:before{transition:none}}
@media(max-width:650px){#hanabi-calendar-grid[data-mode=year] .hanabi-month{height:380px}#hanabi-calendar-grid[data-mode=year] .hanabi-day{min-height:44px}}

/* A pending marker follows saved todo state, independently of holiday fills. */
#hanabi-calendar-grid .hanabi-todo-dot{position:absolute;top:3px;left:3px;width:7px;height:7px;border-radius:50%;background:var(--calendar-todo);box-shadow:0 0 0 1px color-mix(in srgb,var(--ui-surface) 75%,transparent);pointer-events:none;z-index:1}
#hanabi-calendar-grid[data-mode=year] .hanabi-todo-dot{top:2px;left:2px;width:clamp(4px,2.8cqh,7px);height:clamp(4px,2.8cqh,7px)}
#hanabi-calendar-grid[data-mode=year] .hanabi-day[data-pending-todos]:not([data-pending-todos="0"]){padding-top:2px}
#hanabi-calendar-grid[data-mode=week]{display:block}.hanabi-week{min-width:0}.hanabi-week-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}.hanabi-week-toolbar h2{font-size:18px;margin:0}.hanabi-week-toolbar button,.hanabi-week-toolbar input{min-height:44px;margin:0}.hanabi-week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.hanabi-week-days>.hanabi-day{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;padding:10px;min-height:140px;border:1px solid var(--ui-line);background-color:var(--ui-surface);font-size:14px}.hanabi-week-days .hanabi-date-number{margin:0;min-height:44px;font-size:15px;font-weight:650;text-align:left;white-space:normal}.hanabi-week-days .hanabi-todo-content{width:100%;min-width:0;color:var(--ui-ink);flex:0 1 auto;overflow:visible}.hanabi-week-days .hanabi-todo-content ol{padding:0;margin:0;list-style:none}.hanabi-week-days .hanabi-todo-item{display:flex;align-items:flex-start;gap:4px}.hanabi-week-days .hanabi-todo-label{overflow-wrap:anywhere;white-space:pre-wrap}.hanabi-week-days .hanabi-todo-content textarea{width:100%;font-size:16px;min-height:150px}.hanabi-week-reason,.hanabi-week-empty{font-size:13px;color:var(--ui-muted)}.hanabi-week-days .hanabi-todo-mobile-count{display:none}.hanabi-week-days .hanabi-todo-check{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}.hanabi-week-days .hanabi-todo-content li[data-done=true] .hanabi-todo-label{text-decoration:line-through;color:var(--ui-muted)}
@media(max-width:1000px){.hanabi-week-days{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.hanabi-week-days{grid-template-columns:minmax(0,1fr)}.hanabi-week-days>.hanabi-day{min-height:0}.hanabi-week-days .hanabi-todo-content ol{display:block}.hanabi-week-toolbar h2{flex-basis:100%}.hanabi-week-days .hanabi-todo-content textarea{min-height:100px}}

.work-todos{padding:20px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);margin-bottom:20px;background:var(--ui-surface);color:var(--ui-ink)}
.work-todos-heading,.work-todo-day-heading,.work-todo-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.work-todos-heading h2{margin:0;font-size:24px}.work-todos-heading p{margin:6px 0}.work-todo-actions{justify-content:flex-start}
.work-todo-groups{display:grid;gap:16px}.work-todo-group-days{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:0 20px;align-items:start}.work-todo-groups h3{font-size:18px;margin:12px 0}
.work-todo-day{padding:12px 0;border-top:1px solid var(--ui-line);min-width:0}.work-todo-day-heading{justify-content:flex-start}.work-todo-day-heading button{margin-left:auto}
.work-todo-list{list-style:none;padding:0;margin:6px 0}.work-todo-list li{margin:0;overflow-wrap:anywhere}.work-todo-list label{display:flex;align-items:flex-start;gap:10px;min-height:44px;padding:9px 0;margin:0;color:var(--ui-ink);font-size:16px;line-height:1.6}.work-todo-list input[type=checkbox]{flex:none;width:20px;height:20px;margin:3px 0}.work-todo-list [data-done=true] label span{text-decoration:line-through;color:var(--ui-muted)}
.work-todo-error{color:var(--ui-red);padding:8px 0}.work-todo-editor{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink)}
.work-todo-editor form{margin:0}.work-todo-editor-body{padding:18px 24px}.work-todo-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.work-todo-editor-body label{display:grid;gap:8px;color:var(--ui-muted);font-size:14px;margin-bottom:16px}.work-todo-editor-body input,.work-todo-editor-body select,.work-todo-editor-body textarea{width:100%;min-width:0;min-height:44px;margin:0;font-size:16px}.work-todo-editor-body textarea{resize:vertical;line-height:1.6}.work-todo-editor [role=status]{overflow-wrap:anywhere}.work-todo-editor [role=status] button{display:block;margin-top:10px}
.calendar-todo-scope{border-top:1px solid var(--ui-line);padding-top:4px;margin-top:4px}.calendar-todo-scope>header{display:flex;gap:6px;align-items:center;justify-content:space-between;font-size:12px;color:var(--ui-muted)}.calendar-todo-scope button{min-height:44px}.calendar-todo-scope .work-todo-list label{font-size:13px;gap:6px}.calendar-todo-scope .work-todo-list input[type=checkbox]{width:16px;height:16px}.hanabi-todo-content .work-todo-list li{display:block}
@media(max-width:650px){#hanabi-calendar-grid[data-mode=month] .calendar-todo-scope{display:none}}
@media(max-width:650px){.work-todos{padding:16px}.work-todos-heading{align-items:flex-start}.work-todo-actions{width:100%}.work-todo-editor-body{padding:16px}.work-todo-editor .quotation-modal-head,.work-todo-editor .quotation-modal-actions{padding:16px}.work-todo-editor-fields{grid-template-columns:1fr}.work-todo-groups{gap:8px}.work-todo-editor button,.work-todos button{min-height:44px}}
.work-overview-modules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}.work-overview-modules[data-modules="1"]{grid-template-columns:minmax(0,1fr)}.work-overview-modules>.work-todos,.work-module{min-width:0;margin:0;padding:18px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface)}.work-module>h2{font-size:22px;margin:0 0 18px}.work-module .work-overview-stat{padding:0 0 16px;margin-bottom:16px;border-bottom:1px solid var(--ui-line)}.work-module .work-overview-main,.work-module .work-overview-aside{min-width:0}.work-module .work-section-heading{flex-wrap:wrap;gap:8px}.work-module .work-side-block{padding:12px 0}.work-module .work-overview-stat>strong{font-size:clamp(24px,2vw,32px)}.work-module .work-task-top,.work-module .work-task-bottom{flex-wrap:wrap}.work-module .work-schedule-row{gap:8px;flex-wrap:wrap}.work-module .finance-submission-entry{flex-wrap:wrap;gap:8px}.work-module #work-source-followups .hpr-dialog{width:100%;max-width:100%;padding:16px}.work-module .work-source-review-entry{flex-wrap:wrap}.work-overview-modules .work-todo-groups{display:grid;gap:12px}.work-overview-modules .work-todo-group-days{grid-template-columns:minmax(0,1fr)}.work-overview-modules .work-todos-heading{align-items:flex-start}.work-overview-modules .work-todos-heading h2{font-size:22px}.work-overview-modules .work-todo-actions{width:100%}.work-overview-modules .work-todo-day-heading{gap:8px}.work-overview-modules .work-todo-day-heading strong{font-size:14px}
@media(min-width:651px) and (max-width:1150px){.work-overview-modules{grid-template-columns:repeat(2,minmax(0,1fr))}.work-overview-modules>#work-review-module{grid-column:1/-1}.work-review-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:650px){.work-overview-modules{grid-template-columns:minmax(0,1fr)}.work-overview-modules>.work-todos,.work-module{padding:16px}.work-module button{min-height:44px}.work-module .work-overview-stat>strong{font-size:28px}}
.work-monthly-reminder{margin:0 0 16px;padding:18px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface)}.work-monthly-reminder h2{margin:0;font-size:var(--ui-section-size,22px)}.work-monthly-reminder p{margin:8px 0;overflow-wrap:anywhere}.work-monthly-reminder summary{min-height:44px;align-content:center;font-weight:700}.work-monthly-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.work-monthly-actions button{min-height:44px}
.work-monthly-content{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;flex-wrap:wrap}.work-monthly-text{flex:1 1 280px;min-width:0}.work-monthly-content .work-monthly-actions{margin:0}.work-monthly-reminder p:last-child{margin-bottom:0}

.tencent-efficiency-dialog{width:min(1200px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface);color:var(--ui-ink)}.tencent-efficiency-dialog>.quotation-modal-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.tencent-efficiency-dialog .tencent-efficiency-view{padding:20px}.tencent-efficiency-view{min-width:0}.efficiency-heading{margin:4px 0 16px}.efficiency-heading h2{font-size:24px;margin:0 0 6px}.efficiency-heading p{margin:0}.efficiency-filters{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;gap:12px;align-items:end}.efficiency-filters label{display:grid;gap:8px;min-width:0;margin:0;color:var(--ui-muted)}.efficiency-filters input,.efficiency-filters select{width:100%;margin:0;min-height:44px}.efficiency-filters button{min-height:44px;margin:0}.efficiency-charts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}.efficiency-chart{min-width:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);padding:20px;background:var(--ui-surface);--efficiency-color:var(--ui-blue,var(--ui-red))}.efficiency-chart[data-metric=acceptance]{--efficiency-color:var(--ui-amber)}.efficiency-chart[data-metric=payment]{--efficiency-color:var(--ui-green)}.efficiency-chart-heading{display:grid;gap:4px;margin-bottom:18px}.efficiency-chart h3{font-size:18px;margin:0}.efficiency-chart-total{display:grid;gap:4px;margin:16px 0 22px}.efficiency-chart-total>strong{font-size:32px;line-height:1.25}.efficiency-chart-axis{display:flex;justify-content:space-between;font-size:12px;color:var(--ui-muted);border-bottom:1px solid var(--ui-line);padding-bottom:8px}.efficiency-chart-row{padding:16px 0;border-bottom:1px solid var(--ui-line);overflow-wrap:anywhere}.efficiency-chart-row:last-child{border-bottom:0}.efficiency-chart-identity{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:baseline}.efficiency-chart-identity>strong{font-size:16px;grid-column:1}.efficiency-chart-identity>span{grid-column:1;grid-row:2}.efficiency-chart-identity>b{grid-column:2;grid-row:1/3;font-size:18px;font-weight:700}.efficiency-chart-track{height:10px;margin:10px 0 7px;border-radius:5px;background:var(--ui-soft);overflow:hidden}.efficiency-chart-bar{display:block;height:100%;background:var(--efficiency-color);border-radius:inherit}.efficiency-chart-track[data-missing=true]{background:transparent;border-bottom:1px dashed var(--ui-line);border-radius:0}.efficiency-chart-row>small{display:block;line-height:1.6}.efficiency-chart-foot{margin:12px 0 0;padding-top:12px;border-top:1px solid var(--ui-line);line-height:1.6}.efficiency-empty{grid-column:1/-1;margin:0;padding:24px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px)}#finance-workspace .efficiency-management-page{display:block}#finance-workspace .efficiency-management-page>.management-panel{margin-top:20px}#finance-workspace .efficiency-management-page>.management-tabs{width:100%}
@media(max-width:1400px){.efficiency-charts{grid-template-columns:repeat(2,minmax(0,1fr))}.efficiency-chart-total{margin-bottom:16px}}
@media(max-width:650px){.tencent-efficiency-dialog .tencent-efficiency-view{padding:16px}.efficiency-filters{grid-template-columns:minmax(0,1fr) auto}.efficiency-filters>label:first-child{grid-column:1/-1}.efficiency-charts{gap:12px;grid-template-columns:1fr}.efficiency-chart{padding:16px}.efficiency-chart-bars{grid-template-columns:1fr}.efficiency-chart-total>strong{font-size:28px}.efficiency-chart-identity>b{font-size:18px}.tencent-efficiency-dialog button{min-height:44px}.tencent-efficiency-dialog>.quotation-modal-head{padding:16px}.efficiency-heading h2{font-size:22px}}

.tencent-efficiency-view>p[role=status]{margin:12px 0}.efficiency-filters[data-inline=true]{grid-template-columns:minmax(0,1fr) 180px}@media(max-width:650px){.efficiency-filters[data-inline=true]{grid-template-columns:1fr}.efficiency-filters[data-inline=true]>label:first-child{grid-column:auto}}

.efficiency-chart-unavailable{border-top:1px solid var(--ui-line);margin-top:8px}.efficiency-chart-unavailable>summary{min-height:44px;display:flex;align-items:center;gap:8px;color:var(--ui-muted);cursor:pointer;font-size:13px;list-style:none}.efficiency-chart-unavailable>summary::before{content:"›";font-size:20px;line-height:1}.efficiency-chart-unavailable[open]>summary::before{transform:rotate(90deg)}.efficiency-chart-unavailable .efficiency-chart-identity>b{font-size:16px;color:var(--ui-muted)}

.efficiency-chart[data-metric=overall]{border-top:3px solid var(--ui-red)}

body.standalone #quotation-edit-dialog:has(.quotation-native-project,.quotation-detail-compact){width:min(1020px,calc(100vw - 32px))}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project{display:flex;flex-direction:column;gap:0;color:var(--ui-muted)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project [hidden]{display:none!important}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-shared{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;padding:24px 0;border-bottom:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-section{min-width:0;margin:0;padding:0;border:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-section>h2,body.standalone #quotation-workspace #quotation-edit-dialog .native-overview-head>h2{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:600;color:var(--ui-ink);margin:0 0 20px;line-height:1.5}
body.standalone #quotation-workspace #quotation-edit-dialog .native-module-number{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border-radius:7px;background:var(--ui-soft);color:var(--ui-muted);font-size:12px;font-weight:400}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-shared>.native-project-section>h2{padding-bottom:14px;border-bottom:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-shared>.native-project-section+section{padding-left:24px;border-left:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .quotation-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-common-fields label:has([name=outsourced_platform_order]){grid-column:2}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .quotation-field{gap:6px;font-size:12px;color:var(--ui-muted);min-width:0;margin:0}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .quotation-field-label{font-size:12px;color:var(--ui-muted)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .quotation-field em{color:var(--ui-red);font-style:normal}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project :is(input:not([type=checkbox]):not([type=hidden]),select,textarea){min-height:40px;font-size:14px;line-height:1.5;padding:8px 10px;color:var(--ui-muted);border-radius:8px;min-width:0}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project [name=project_name]{height:44px!important;min-height:44px;resize:vertical}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project :is([name=project_name],[name=client_company]){background:var(--ui-red-soft);border-color:var(--ui-red)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .quotation-field-hint{font-size:11px;line-height:1.5;color:var(--ui-muted)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-main{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(320px,.92fr);gap:24px;padding:24px 0;align-items:start}
body.standalone #quotation-workspace #quotation-edit-dialog .native-overview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-overview-head>h2{margin:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-count{font-size:12px;font-weight:400;color:var(--ui-muted);white-space:nowrap}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-scroll{height:296px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-color:var(--ui-muted) var(--ui-surface)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:12px;color:var(--ui-muted)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table th{position:sticky;top:0;z-index:1;background:var(--ui-surface);font-weight:400;text-align:right;height:40px;padding:8px 6px;border-bottom:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table td{height:64px;border-bottom:1px solid var(--ui-line);text-align:right;padding:0 6px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table th:first-child,body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table td:first-child{text-align:left}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table tr{cursor:pointer}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table tr[aria-selected=true],body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table tbody tr:hover{background:var(--ui-soft)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table tr[aria-selected=true] td:first-child{box-shadow:inset 3px 0 var(--ui-red);padding-left:12px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-select{border:0;background:transparent;color:inherit;font-weight:400;box-shadow:none;padding:0;margin:0;min-height:63px;width:100%;text-align:left;white-space:normal;font-size:13px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-editor{padding:20px;background:var(--ui-soft);border-radius:12px;min-width:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:16px;margin-bottom:20px;border-bottom:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-editor-head h3{font-size:16px;font-weight:500;margin:0;color:var(--ui-ink)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-editor-head button{font-size:12px;background:transparent;border:0;color:var(--ui-muted);padding:5px;flex:none}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-card .quotation-fields label:has([name=requirement]){grid-column:1/-1}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-card textarea{min-height:40px!important;height:40px;resize:vertical}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0 0;padding:18px 0 0;border:0;border-top:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing>h2{font-size:14px;font-weight:500;grid-column:1;margin:0;align-self:center;color:var(--ui-ink)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing>.quotation-addition-add{grid-column:2;grid-row:1;margin:0;justify-self:end;background:transparent;border:0;color:var(--ui-muted);padding:4px;min-height:32px;font-size:12px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing>.quotation-field{grid-column:1/-1}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing>:is(.quotation-addition-editor,.quotation-manpower-total,.native-phase-rate){grid-column:1/-1}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing>.quotation-field-hint{grid-column:1/-1;font-size:11px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-addition-row{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-top:12px;padding:0;border:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-addition-row button{padding:4px;min-width:38px;font-size:12px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-manpower-total{font-size:12px;margin:0;padding:10px 0;background:transparent;display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-manpower-total strong{font-size:16px;font-weight:500}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-rate{margin:0;font-size:12px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers{margin-top:20px;padding-top:18px;border-top:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-supplier-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-supplier-head h3{font-size:14px;font-weight:500;color:var(--ui-ink);margin:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-supplier-head .quotation-cooperation-toggle{font-size:12px;margin:0;padding:0;min-height:32px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers .quotation-fields{grid-template-columns:minmax(0,1fr)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers .quotation-supplier-cost-editor{margin:0;padding:0;background:transparent;border:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers .quotation-supplier-cost-editor>h3{display:none}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers .quotation-supplier-cost-row{grid-template-columns:minmax(0,1fr) 110px;gap:12px;padding:12px 0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers .quotation-supplier-cost-name{font-size:12px;color:var(--ui-muted)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers .quotation-supplier-cost-total{font-size:12px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-summary{border-top:1px solid var(--ui-line);padding-top:20px;margin-top:24px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-project-totals{display:grid;gap:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-total{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;min-height:52px;padding:12px 0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-total+.native-total{border-top:1px solid var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-total span{font-size:12px;color:var(--ui-muted)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-total strong{font-size:19px;font-weight:500;color:var(--ui-ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body.standalone #quotation-workspace #quotation-edit-dialog .native-rates-button{font-size:12px;color:var(--ui-muted);background:transparent}
.native-workdays{grid-column:1/-1;min-width:0}
body.standalone #quotation-workspace #quotation-edit-dialog .native-footer-summary{display:grid;gap:5px;font-size:12px;max-width:65%;margin-right:auto}body.standalone #quotation-workspace #quotation-edit-dialog .native-footer-summary strong{font-size:24px;color:var(--ui-ink);font-variant-numeric:tabular-nums}body.standalone #quotation-workspace #quotation-edit-dialog .native-footer-summary span{color:var(--ui-muted)}
body.standalone #native-rate-dialog{width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:auto;background:var(--ui-surface);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px)}#native-rate-dialog::backdrop{background:#0009}#native-rate-dialog form{margin:0}#native-rate-dialog .quotation-modal-head,#native-rate-dialog .quotation-modal-actions,.native-rate-body{padding:20px 24px}.native-rate-body label{display:grid;gap:8px;margin:16px 0;font-size:14px;color:var(--ui-muted)}.native-rate-body input{width:100%;font-size:16px;min-height:44px}
@media(max-width:800px){body.standalone #quotation-workspace #quotation-edit-dialog .native-project-shared,body.standalone #quotation-workspace #quotation-edit-dialog .native-project-main{grid-template-columns:minmax(0,1fr)}body.standalone #quotation-workspace #quotation-edit-dialog .native-project-shared>.native-project-section+section{padding:20px 0 0;border-left:0;border-top:1px solid var(--ui-line)}}
@media(max-width:650px){body.standalone #quotation-edit-dialog:has(.quotation-native-project){width:calc(100vw - 12px)}body.standalone #quotation-workspace #quotation-edit-dialog .native-project-shared,body.standalone #quotation-workspace #quotation-edit-dialog .native-project-main{padding-block:20px;gap:24px}body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .quotation-fields{grid-template-columns:minmax(0,1fr)}body.standalone #quotation-workspace #quotation-edit-dialog .native-common-fields label:has([name=outsourced_platform_order]){grid-column:auto}body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project :is(input:not([type=checkbox]),select,textarea){font-size:16px;min-height:44px}body.standalone #quotation-workspace #quotation-edit-dialog .native-project-editor{padding:16px}body.standalone #quotation-workspace #quotation-edit-dialog .native-editor-head{flex-wrap:wrap}body.standalone #quotation-workspace #quotation-edit-dialog .native-editor-head button,body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing>.quotation-addition-add{min-height:44px}body.standalone #quotation-workspace #quotation-edit-dialog .native-overview-head>h2{font-size:17px;gap:6px}body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-addition-row{grid-template-columns:minmax(0,1fr) auto}body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-addition-row>label:nth-child(2){grid-column:1;grid-row:2}body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-addition-row>button{grid-column:2;grid-row:1/3;min-height:44px}body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-suppliers .quotation-supplier-cost-row{grid-template-columns:minmax(0,1fr)}body.standalone #quotation-workspace #quotation-edit-dialog .native-total{gap:12px}body.standalone #quotation-workspace #quotation-edit-dialog .native-footer-summary{max-width:100%;flex-basis:100%}body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table{font-size:11px}body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table td,body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-table th{padding-inline:3px}}
body.standalone #quotation-workspace #quotation-edit-dialog .native-common-fields>label{grid-column:auto}
body.standalone #quotation-workspace #quotation-edit-dialog .native-common-fields>label:has([name=outsourced_platform_order]){grid-column:2}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-card .quotation-field:has(.quotation-quantity-controls){grid-column:1/-1}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .native-phase-card .quotation-quantity-controls>input{width:0;flex:1 1 8ch}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-native-project .native-phase-card .quotation-quantity-controls>select{width:auto;min-inline-size:min(9em,100%);max-inline-size:100%;padding-inline-end:30px}
body.standalone #quotation-workspace #quotation-edit-dialog .native-phase-pricing .quotation-manpower-total>small{width:auto}
@media(max-width:650px){body.standalone #quotation-workspace #quotation-edit-dialog .native-common-fields>label:has([name=outsourced_platform_order]){grid-column:auto}}body.standalone #quotation-edit-dialog:has(.quotation-native-project)>.quotation-modal-head{padding:16px 24px}
body.standalone #quotation-edit-dialog:has(.quotation-native-project)>.quotation-modal-head>div{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;flex-wrap:wrap}
body.standalone #quotation-edit-dialog:has(.quotation-native-project)>.quotation-modal-head h2{font-size:24px;line-height:1.5}
body.standalone #quotation-workspace #quotation-edit-dialog .native-workdays{display:flex;align-items:baseline;gap:6px 12px;flex-wrap:wrap;margin:0;line-height:1.5}
body.standalone #quotation-workspace #quotation-edit-dialog .native-workdays>span{font-size:13px;color:var(--ui-muted)}
body.standalone #quotation-workspace #quotation-edit-dialog .native-workdays>strong{font-size:19px;font-weight:600;color:var(--ui-ink);font-variant-numeric:tabular-nums}
body.standalone #quotation-workspace #quotation-edit-dialog .native-workdays>p{flex-basis:100%;margin:0;font-size:12px;color:var(--ui-muted)}

body.standalone .quotation-title-row{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
body.standalone .quotation-title-row h1{margin:0}
body.standalone #quotation-category-rates{font-size:13px;min-height:40px;margin:0;padding:8px 14px;color:var(--ui-ink)}
body.standalone #quotation-category-rates[hidden]{display:none}
body.standalone #native-rate-dialog{width:min(680px,calc(100vw - 24px));overflow:hidden}
body.standalone #native-rate-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 24px)}
body.standalone #native-rate-dialog :is(.quotation-modal-head,.quotation-modal-actions){flex:none}
body.standalone #native-rate-dialog .native-rate-body{overflow:auto;min-height:0;padding-block:8px 16px}
body.standalone #native-rate-dialog .native-rate-body label{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,230px);align-items:center;gap:16px;margin:0;padding:12px 0;border-bottom:1px solid var(--ui-line);color:var(--ui-ink)}
body.standalone #native-rate-dialog .native-rate-value{display:flex;align-items:center;gap:10px;min-width:0}
body.standalone #native-rate-dialog .native-rate-value input{min-width:0;flex:1}
body.standalone #native-rate-dialog .native-rate-value>span{white-space:nowrap;font-size:12px;color:var(--ui-muted)}
@media(max-width:650px){body.standalone .quotation-title-row{gap:10px 16px}body.standalone #quotation-category-rates{min-height:44px}body.standalone #native-rate-dialog .native-rate-body label{grid-template-columns:minmax(0,1fr);gap:8px}}
/* Existing details use the same four-zone composition as project creation. */
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-fields{gap:12px 14px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-field{gap:6px;margin:0;font-size:12px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact :is(input:not([type=checkbox]):not([type=hidden]),select,textarea){box-sizing:border-box;min-height:44px;font-size:14px;line-height:1.5;padding:10px 12px;border-radius:var(--ui-radius,8px)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact textarea{min-height:44px;line-height:1.5}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact select[multiple]{height:110px;min-height:110px;padding:6px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-main{grid-template-columns:1.2fr 1fr}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-editor{padding:18px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-form-section{padding:0 0 14px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-section>h2{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:600;line-height:1.5;margin:0 0 16px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-form-notes{margin:12px 0 0;padding:0}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-form-notes>summary{min-height:44px;line-height:1.6;display:flex;align-items:center;padding:8px 0;cursor:pointer}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-form-notes>summary::before{content:'›';margin-right:8px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-form-notes[open]>summary::before{transform:rotate(90deg)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-form-notes>summary::marker{content:''}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-addition-add{min-height:44px;margin:8px 0;background:transparent;border-color:var(--ui-line)}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-manpower-total{margin:10px 0 0;padding:12px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-section-hint{margin:0 0 12px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-detail-suppliers .quotation-form-section>h2{display:none}
@media(max-width:650px){
 body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-shared,body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-main{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;padding:18px 0}
 body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-shared>.native-project-section+section{padding-left:0;border-left:0}
 body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-editor{padding:14px}
 body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact :is(input:not([type=checkbox]),select,textarea){font-size:16px}
 body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-fields{grid-template-columns:minmax(0,1fr)}
}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-manpower-total{font-size:16px;line-height:1.5}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .quotation-manpower-total small{font-size:11px;font-weight:400}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-shared{padding:18px 0;gap:20px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-main{padding:18px 0;gap:20px}
body.standalone #quotation-workspace #quotation-edit-dialog .quotation-detail-compact .native-project-main select[multiple]{height:96px;min-height:96px}

/* Shared controls use the app palette, type and rounded geometry. */
body.standalone .ui-select-menu{position:fixed;inset:auto;margin:0;padding:5px 18px 5px 5px;box-sizing:border-box;min-width:0;overflow:auto;z-index:10000;overscroll-behavior:contain;border:1px solid var(--ui-line);border-radius:var(--ui-radius,10px);background:var(--ui-surface);color:var(--ui-ink);font:inherit;font-size:14px;box-shadow:0 12px 32px #0006;max-width:calc(100vw - 16px)}
body.standalone .ui-select-menu::backdrop,body.standalone .ui-scroll-rail::backdrop{background:transparent;pointer-events:none}
body.standalone .ui-option{display:flex;align-items:center;min-height:40px;padding:9px 30px 9px 12px;position:relative;box-sizing:border-box;border-radius:6px;line-height:1.45;overflow-wrap:anywhere;white-space:normal}
body.standalone .ui-option:hover,body.standalone .ui-option.is-active{background:var(--ui-soft)}
body.standalone .ui-option[aria-selected=true]{background:color-mix(in srgb,var(--ui-red) 14%,var(--ui-surface));color:var(--ui-ink);font-weight:600}
body.standalone .ui-option[aria-selected=true]::after{content:'✓';position:absolute;right:10px;color:var(--ui-red)}
body.standalone .ui-option[aria-disabled=true]{opacity:.45}
body.standalone .ui-option-group{font-size:12px;color:var(--ui-muted);padding:10px 12px 5px}
html:has(body.standalone),body.standalone *{scrollbar-width:thin;scrollbar-color:var(--ui-muted) var(--ui-surface)}
.ui-scroll-managed{scrollbar-width:none!important;scroll-behavior:auto!important}.ui-scroll-managed::-webkit-scrollbar{display:none!important}
body.standalone .ui-scroll-rail{position:fixed;z-index:10001;inset:auto;margin:0;padding:0;border:0;background:transparent;overflow:visible;touch-action:none;user-select:none;min-width:0;min-height:0;max-width:none;max-height:none;box-sizing:border-box}
body.standalone .ui-scroll-thumb{position:absolute;left:3px;top:0;background:var(--ui-muted);opacity:.55;border-radius:8px;min-width:0;min-height:0;pointer-events:auto}
body.standalone .ui-scroll-rail[data-axis=x] .ui-scroll-thumb{left:0;top:3px}
body.standalone .ui-scroll-rail:hover .ui-scroll-thumb,body.standalone .ui-scroll-rail[data-dragging=true] .ui-scroll-thumb{opacity:.95}
@media(max-width:650px),(pointer:coarse){body.standalone .ui-option{min-height:44px;font-size:16px}}

body.standalone .ui-scroll-rail[hidden]{display:none!important}

/* One hover response across the business app; never brighten a whole card. */
body.standalone{--ui-control-hover-brightness:1.18}
body.standalone :is(button,select,input[type=checkbox],input[type=radio],a[href],.ui-option){transition-property:background-color,border-color,color,filter;transition-duration:120ms;transition-timing-function:ease}
@media(hover:hover){
 body.standalone :is(button,select,input[type=checkbox],input[type=radio],a[href],.ui-option):not(:disabled):not([aria-disabled=true]):hover{filter:brightness(var(--ui-control-hover-brightness))}
}
body.standalone :is(button,select,input[type=checkbox],input[type=radio],a[href],.ui-option):not(:disabled):not([aria-disabled=true]):focus-visible{filter:brightness(var(--ui-control-hover-brightness))}
body.standalone .ui-option.is-active:not([aria-disabled=true]){filter:brightness(var(--ui-control-hover-brightness))}
body.standalone :is(button,select,input[type=checkbox],input[type=radio],a[href],.ui-option):is(:disabled,[aria-disabled=true]){filter:none}
@media(prefers-reduced-motion:reduce){body.standalone :is(button,select,input[type=checkbox],input[type=radio],a[href],.ui-option){transition-duration:0s}}
/* Pointer selection/cancellation does not leave a native white focus outline. */
body.standalone select[data-pointer-focus=true]:focus{outline:none;box-shadow:none}
body.standalone select:not([data-pointer-focus=true]):focus-visible{outline:2px solid var(--ui-muted);outline-offset:2px}

.standalone .ledger-project-code-control{position:relative;min-width:0}
.standalone .ledger-project-code-input{position:relative}
body.standalone .ledger-project-code-control .ledger-project-code-input>input{display:block;box-sizing:border-box;width:100%;margin:0;padding-right:54px}
body.standalone .ledger-project-code-control .ledger-project-code-input>input:focus{outline:none;box-shadow:none;border-color:var(--ui-muted)}
body.standalone .ledger-project-code-control .ledger-project-code-input>input:not([data-pointer-focus=true]):focus-visible{outline:2px solid var(--ui-red);outline-offset:2px}
body.standalone .ledger-project-code-toggle{position:absolute;inset:1px 1px 1px auto;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;min-height:44px;padding:0;margin:0;border:0;background:transparent;color:var(--ui-muted);border-radius:0 var(--ui-radius,8px) var(--ui-radius,8px) 0}
body.standalone .ledger-project-code-toggle::after{content:'';width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg)}
body.standalone .ledger-project-code-toggle[aria-expanded=true]::after{transform:translateY(2px) rotate(225deg)}
.standalone .ledger-project-code-control small{display:block;margin-top:8px}
.standalone .ledger-project-code-menu{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:10;max-height:220px;overflow:auto;box-sizing:border-box;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);padding:4px;background:var(--ui-surface);box-shadow:0 8px 24px #0003;scrollbar-width:thin}
.standalone .ledger-project-code-menu[hidden]{display:none}
.standalone .ledger-project-code-option{display:block;width:100%;min-height:44px;margin:0;padding:10px 12px;border:0;border-radius:6px;background:transparent;color:var(--ui-ink);text-align:left;font:inherit;overflow-wrap:anywhere}
.standalone .ledger-project-code-option:is(:hover,[aria-selected=true]){background:var(--ui-red-soft);color:var(--ui-ink)}
.standalone .ui-payment-time-field{display:block;min-width:0}
.standalone .ui-payment-time-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;box-sizing:border-box;min-height:46px;width:100%;margin:0;padding:12px 14px;border:1px solid var(--ui-line);border-radius:var(--hb-radius,8px);background:var(--ui-surface);color:var(--ui-ink);font:inherit;text-align:left;white-space:normal}
.standalone .ui-payment-time-trigger>span:first-child{min-width:0;overflow-wrap:anywhere}
body.standalone .ui-payment-time-menu{padding:8px;overflow:auto}
.standalone .ui-payment-time-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px solid var(--ui-line)}
.standalone .ui-payment-time-head select{width:100px;min-height:44px;padding:8px;border:1px solid var(--ui-line);border-radius:var(--hb-radius,8px);background:var(--ui-surface);color:var(--ui-ink);font:inherit}
.standalone .ui-payment-time-menu button{min-height:44px;margin:0;font:inherit;white-space:normal}
.standalone .ui-payment-time-head button{padding:8px;font-size:12px}
.standalone .ui-payment-time-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding-top:8px}
.standalone .ui-payment-time-months{max-height:238px;overflow:auto;padding-right:4px;border-right:1px solid var(--ui-line)}
.standalone .ui-payment-time-columns button{width:100%;text-align:left;padding:10px 12px;border:0;background:transparent;color:var(--ui-ink)}
.standalone .ui-payment-time-months button[aria-pressed=true]{background:var(--ui-red-soft)}
.standalone .ui-payment-time-slots strong{display:block;color:var(--ui-muted);font-size:12px;padding:8px 12px}

/* Destructive editor actions share the application palette and touch target. */
.record-delete-button{min-height:44px!important;border:1px solid var(--ui-red)!important;background:var(--ui-red)!important;color:#fff!important;font-weight:650!important}.quotation-form-footer>.record-delete-button,.procurement-record-edit-footer>.record-delete-button{margin-right:auto}.record-delete-confirm{width:min(480px,calc(100vw - 24px));padding:22px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);color:var(--ui-ink)}.record-delete-confirm>strong{display:block;overflow-wrap:anywhere;margin:14px 0}.record-delete-confirm>p{line-height:1.6}.record-delete-confirm>footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.record-delete-confirm button{min-height:44px}@media(max-width:600px){.quotation-form-footer>.record-delete-button,.procurement-record-edit-footer>.record-delete-button{flex:1 1 100%;margin-right:0}.record-delete-confirm{padding:16px}}

@media(max-width:600px){#quotation-modal-footer .quotation-form-footer:has(.record-delete-button),.standalone .procurement-record-edit-footer:has(.record-delete-button){display:grid;grid-template-columns:1fr 1fr;gap:10px}#quotation-modal-footer .quotation-form-footer>.record-delete-button,.standalone .procurement-record-edit-footer>.record-delete-button{grid-column:1/-1;width:100%;margin:0;white-space:nowrap}}

.procurement-form-actions>.record-delete-button{margin-right:auto}@media(max-width:600px){#procurement-edit-footer .procurement-form-actions:has(.record-delete-button){display:grid;grid-template-columns:1fr 1fr;gap:10px}#procurement-edit-footer .procurement-form-actions>.record-delete-button{grid-column:1/-1;width:100%;margin:0;white-space:nowrap}}

/* Shared button and surface feedback */
@media (min-width: 1060px) {
body.standalone {
  --ui-control-duration: 120ms;
  --ui-popup-duration: 145ms;
  --ui-interaction-ease: cubic-bezier(.22, 1, .36, 1);
  --ui-control-focus: var(--ui-ink);
  --ui-control-highlight: color-mix(in srgb, var(--ui-ink) 12%, transparent);
}
body.standalone :where(button, input[type=submit], summary, a.secondary, [role=button]) {
  touch-action: manipulation;
}
body.standalone :is(button, input[type=submit], summary, a.secondary):not(:disabled, [aria-disabled=true]):focus-visible {
  outline: 2px solid var(--ui-control-focus);
  outline-offset: 2px;
}
body.standalone :is(button, input[type=submit], summary, a.secondary) {
  transition-property: background-color, border-color, color, box-shadow, filter, scale;
  transition-duration: var(--ui-control-duration);
  transition-timing-function: var(--ui-interaction-ease);
}
body.standalone :is(button.secondary, a.secondary, button[role=tab], button[aria-pressed], button[data-preview-icon], .quotation-icon-button, .quotation-row-edit):not(:disabled, [aria-disabled=true]):is(:hover, :focus-visible) {
  filter: none;
}
@media (hover: hover) {
  body.standalone :is(button.secondary, a.secondary):not(:disabled, [aria-disabled=true], [aria-pressed=true], [aria-selected=true], .record-delete-button):hover {
    background-color: var(--ui-soft);
    border-color: color-mix(in srgb, var(--ui-muted) 48%, var(--ui-line));
  }
  body.standalone :is(button:is([role=tab], [aria-pressed], [data-preview-icon]), .quotation-icon-button, .quotation-row-edit):not(:disabled, [aria-disabled=true], [aria-pressed=true], [aria-selected=true]):hover {
    background-color: var(--ui-soft);
    color: var(--ui-ink);
  }
  body.standalone :is(button.primary, .business-create-button, button[type=submit]:not(.secondary, .record-delete-button)):not(:disabled, [aria-disabled=true]):hover {
    box-shadow: inset 0 0 0 60px var(--ui-control-highlight);
    filter: none;
  }
}
body.standalone :is(.quotation-icon-button, button[data-preview-icon], .quotation-row-edit) {
  border-radius: var(--hb-radius, var(--ui-radius, 8px));
}
body.standalone button[aria-current=page] {
  font-weight: 650;
}
body.standalone :is(#finance-import, #calendar-schedule-toggle, #new-member) {
  border-color: color-mix(in srgb, var(--ui-red) 72%, var(--ui-line));
  background: color-mix(in srgb, var(--ui-red) 76%, var(--ui-surface));
  color: white;
  font-weight: 650;
}
@media (hover: hover) {
  body.standalone :is(#finance-import, #calendar-schedule-toggle, #new-member):not(:disabled, [aria-disabled=true]):hover {
    background: color-mix(in srgb, var(--ui-red) 88%, var(--ui-surface));
    border-color: var(--ui-red);
  }
}
body.standalone :is(.hanabi-calendar-modes > button, #supplier-subnavigation > button, .finance-submission-batch-tabs > button):is([aria-pressed=true], [aria-current=page], [aria-selected=true]) {
  color: var(--ui-ink);
  box-shadow: inset 0 -2px var(--ui-red);
}
@media (max-width: 650px), (pointer: coarse) {
  body.standalone :is(.quotation-icon-button, button[data-preview-icon], .quotation-row-edit) {
    min-inline-size: 44px;
    min-block-size: 44px;
  }
}
body.standalone button[data-copy-bank][data-copy-result=success] {
  color: var(--ui-green);
  border-color: color-mix(in srgb, var(--ui-green) 46%, var(--ui-line));
  background: var(--ui-green-soft);
}
body.standalone button[data-copy-bank][data-copy-result=success]::before {
  content: "✓" / "";
  margin-inline-end: 4px;
}
body.standalone button[data-copy-bank][data-copy-result=error] {
  color: var(--ui-amber);
}
body.standalone button[data-copy-bank]:not([data-copy-bank=all]) {
  min-inline-size: 5.75em;
}
body.standalone button[data-copy-bank=all] {
  min-inline-size: 10.5em;
}
body.standalone .ui-tab-travel {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 3px;
  background: var(--ui-red);
  border-radius: 3px;
  pointer-events: none;
  transform-origin: left center;
}
body.standalone [data-ui-tab-travel] {
  position: relative;
}
body.standalone button[data-ui-tab-travel] {
  /* The moving underline is the only underline during the transition. */
  box-shadow: none !important;
  border-bottom-color: transparent !important;
}
@media (prefers-reduced-motion: no-preference) {
  body.standalone :is(button.secondary, button.primary, .business-create-button, input[type=submit], button[type=submit], button[data-preview-icon], .quotation-icon-button, .quotation-row-edit, .procurement-edit-icon, .procurement-inline-invoice-upload):not(:disabled, [aria-disabled=true], .work-entry, .purchase-review-alert):active {
    scale: .985;
  }
  body.standalone dialog:modal {
    animation: ledger-dialog-appear var(--ui-popup-duration) var(--ui-interaction-ease) both;
  }
  body.standalone dialog:modal::backdrop {
    animation: ledger-surface-appear var(--ui-popup-duration) ease-out both;
  }
  body.standalone :is(.ui-select-menu:popover-open, .quotation-status-popover:popover-open, .layout-quote-note-popover:popover-open, .layout-quote-supplier-popover:popover-open, .purchase-filter-options:not([hidden])) {
    --ui-menu-offset: -4px;
    animation: ledger-menu-appear 115ms var(--ui-interaction-ease) both;
  }
  body.standalone :is(.ui-select-menu:popover-open, .purchase-filter-options:not([hidden]))[data-menu-side=above] { --ui-menu-offset: 4px; }
  body.standalone .ui-payment-time-slots:has(button) {
    animation: ledger-surface-appear 100ms var(--ui-interaction-ease) both;
  }
  body.standalone button[data-copy-bank][data-copy-result=success]::before {
    display: inline-block;
    animation: ledger-surface-appear var(--ui-control-duration) var(--ui-interaction-ease) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.standalone :is(button, input[type=submit], summary, a.secondary) { transition: none; }
}
@media (forced-colors: active) {
  body.standalone { --ui-control-focus: Highlight; }
}
@keyframes ledger-dialog-appear {
  from { transform: translateY(4px); }
  to { transform: none; }
}
@keyframes ledger-surface-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ledger-menu-appear {
  from { opacity: .85; transform: translateY(var(--ui-menu-offset)); }
  to { opacity: 1; transform: none; }
}
}

#app-navigation{--hb-notice-red:#ff453a;--hb-notice-yellow:#ffd60a;--hb-notice-green:#30d158;--hb-notice-text:#171b24;}

#finance-workspace .management-overview{display:grid;gap:22px;padding:0}
body[data-view=finance][data-management-overview=true] #finance-workspace{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px}
body[data-view=finance][data-management-overview=true] #finance-workspace>.business-controls{grid-column:2;grid-row:1;margin:0}
body[data-view=finance][data-management-overview=true] #finance-status{grid-column:1;grid-row:1;align-self:center;margin:0}
body[data-view=finance][data-management-overview=true] #finance-content{grid-column:1/-1;grid-row:2}
body[data-view=finance][data-management-overview=true] #finance-workspace>.business-controls>label{display:none}
#finance-workspace .management-analysis-controls{display:flex;gap:12px;flex-wrap:wrap;padding:16px 0}
#finance-workspace .management-analysis-controls label{display:grid;gap:6px;font-size:12px;color:var(--business-muted);min-width:0}
#finance-workspace .management-analysis-controls select{min-height:44px;max-width:100%;margin:0}
#finance-workspace .management-heading{display:flex;align-items:start;justify-content:space-between;gap:16px}
#finance-workspace .management-heading h2{margin:6px 0 0}
#finance-workspace .management-date{font-size:12px;color:var(--business-muted);white-space:nowrap;padding-top:8px}
#finance-workspace .management-tabs{margin:0;display:flex;width:100%;box-sizing:border-box}
#finance-workspace .management-tabs button{flex:1;min-height:44px}
#finance-workspace .management-panel{display:grid;gap:28px}
#finance-workspace .management-funds{padding:24px;background:var(--ui-soft);border:1px solid var(--ui-line);border-radius:8px}
#finance-workspace .management-funds .management-card{background:transparent;border-left:1px solid var(--ui-line);border-radius:0}
#finance-workspace .management-funds .management-hero{border:0}
#finance-workspace .management-funds .management-now{margin:12px 0 16px}
#finance-workspace .management-planning{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr);gap:20px;align-items:start}
#finance-workspace .management-planning>.business-panel{min-width:0;margin:0}
#finance-workspace .management-now{display:grid;grid-template-columns:1.25fr 1fr;gap:24px;border-bottom:1px solid var(--ui-line);padding-bottom:24px}
#finance-workspace .management-card{min-width:0;padding:20px;background:var(--ui-soft);border-radius:8px}
#finance-workspace .management-value{display:block;font-size:clamp(24px,2.4vw,34px);font-weight:700;font-variant-numeric:tabular-nums;margin:12px 0;overflow-wrap:anywhere}
#finance-workspace .management-hero{background:transparent;padding:12px 0}
#finance-workspace .management-hero .management-value{font-size:clamp(32px,3.6vw,48px)}
#finance-workspace .management-accounts{display:grid;gap:12px;align-content:center}
#finance-workspace .management-accounts>div{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;padding:12px 0;border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-account-value{text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-accounts .business-note{grid-column:1/-1}
#finance-workspace .management-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#finance-workspace .management-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
#finance-workspace .management-next{padding:16px 0;border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-period{display:flex;align-items:end;gap:16px;flex-wrap:wrap}
#finance-workspace .management-period>label{display:grid;gap:6px;font-size:12px;color:var(--business-muted)}
#finance-workspace .management-period select{min-height:44px;margin:0}
#finance-workspace .management-modules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}
#finance-workspace .management-module{min-width:0;border-bottom:1px solid var(--ui-line);padding:8px 0}
#finance-workspace .management-module summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;font-size:14px;list-style:none}
#finance-workspace .management-module summary::after{content:'＋';font-size:12px;color:var(--business-muted)}
#finance-workspace .management-module[open] summary::after{content:'−'}
#finance-workspace .management-module summary strong{margin-left:auto;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-module[data-pending=true] summary{color:var(--ui-amber)}
#finance-workspace .management-track{display:grid;gap:6px;padding:0 0 12px}
#finance-workspace .management-track progress{width:100%;height:5px;accent-color:var(--business-muted)}
#finance-workspace .management-legacy>summary{min-height:44px;display:flex;align-items:center}
#finance-workspace .management-budget-period{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-budget-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#finance-workspace .management-budget-values>div{display:grid;gap:6px;min-width:0}
#finance-workspace .management-budget-values strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-cost-toolbar{display:flex;gap:16px;flex-wrap:wrap;margin:16px 0}
#finance-workspace .management-cost-toolbar label{display:grid;gap:6px;font-size:12px;color:var(--business-muted)}
#finance-workspace .management-cost-toolbar select{min-height:44px;margin:0}
#finance-workspace .management-cost-heading{display:grid;grid-template-columns:minmax(130px,1.1fr) repeat(2,minmax(0,1fr));gap:16px;align-items:center}
#finance-workspace .management-cost-category>summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
#finance-workspace .management-cost-heading{font-size:12px;color:var(--business-muted);padding:12px 0;border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-cost-category{border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-cost-category>summary{min-height:76px;padding:14px 0;list-style:none;cursor:pointer}
#finance-workspace .management-cost-category .management-cost-identity{grid-column:1/-1}
#finance-workspace .management-cost-identity,#finance-workspace .management-cost-amount{display:grid;gap:5px;min-width:0}
#finance-workspace .management-cost-identity strong::after{content:' ＋';font-size:12px;color:var(--business-muted)}
#finance-workspace .management-cost-category[open] .management-cost-identity strong::after{content:' −'}
#finance-workspace .management-cost-amount strong{font-size:18px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-cost-amount>.management-mobile-label{display:block;font-size:12px;color:var(--business-muted)}
#finance-workspace .management-cost-detail{padding:12px 16px;background:var(--ui-soft);border-radius:8px;margin-bottom:14px}
#finance-workspace .management-cost-transactions{max-height:360px;overflow:auto;overscroll-behavior:contain}
#finance-workspace .management-cost-entry{display:grid;grid-template-columns:1fr auto;gap:8px;padding:14px 0;border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-cost-entry>span,#finance-workspace .management-cost-entry>small{grid-column:1/-1;overflow-wrap:anywhere}
#finance-workspace .management-forecast-header,#finance-workspace .management-forecast-row{display:grid;grid-template-columns:80px repeat(4,minmax(0,1fr));gap:12px;align-items:center;padding:16px 0;border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-forecast-header{font-size:12px;color:var(--business-muted)}
#finance-workspace .management-forecast-row strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-forecast-row [data-deficit=true]{color:var(--ui-amber)}
#finance-workspace .management-mobile-label{display:none}
#finance-workspace .management-cost-total{color:var(--ui-text);padding:18px 0}
#finance-workspace .management-cost-blocks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
#finance-workspace .management-cost-block{min-width:0;padding:18px 20px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-soft)}
#finance-workspace .management-cost-block-heading{padding-bottom:12px;border-bottom:1px solid var(--ui-line)}
#finance-workspace .management-cost-block-heading h3{margin:0;font-size:18px}
#finance-workspace .management-cost-block-people{grid-column:1/-1}
#finance-workspace .management-cost-block-body>.management-cost-category:last-child{border-bottom:0}
#finance-workspace .management-costs{border:0;background:transparent;padding:0}
#finance-workspace .management-cost-group>summary{display:grid;grid-template-columns:minmax(130px,1.1fr) repeat(2,minmax(0,1fr));gap:16px;align-items:center;min-height:84px;padding:12px 0;list-style:none;cursor:pointer}
#finance-workspace .management-cost-group>summary>strong{font-size:18px}
#finance-workspace .management-cost-group>summary .management-cost-amount strong{font-size:22px}
#finance-workspace .management-cost-amount[data-missing=true]>strong{font-size:14px;font-weight:500;color:var(--business-muted)}
#finance-workspace .management-cost-group>summary>strong::after{content:' ＋';color:var(--business-muted)}
#finance-workspace .management-cost-group[open]>summary>strong::after{content:' −'}
#finance-workspace .management-cost-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;padding-top:12px;border-top:1px solid var(--ui-line);margin-top:8px}
#finance-workspace .management-cost-children .management-cost-category:last-child{border-bottom:0}
@media(max-width:1100px){#finance-workspace .management-planning{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){#finance-workspace .management-cost-blocks,#finance-workspace .management-cost-children{grid-template-columns:minmax(0,1fr)}#finance-workspace .management-cost-block{padding:16px}#finance-workspace .management-funds{padding:16px}#finance-workspace .management-funds .management-card{border-left:0;border-top:1px solid var(--ui-line);padding:14px 0}#finance-workspace .management-funds .management-hero{border:0}#finance-workspace .management-cost-group>summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px 0 18px}#finance-workspace .management-cost-group>summary>strong{grid-column:1/-1}#finance-workspace .management-cost-children{gap:0;padding-left:0}}
@media(max-width:700px){#finance-workspace .management-cost-total{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#finance-workspace .management-cost-total>:first-child{grid-column:1/-1}}
@media(max-width:700px){#finance-workspace .management-cost-heading,#finance-workspace .management-forecast-header{display:none}#finance-workspace .management-cost-category>summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px 0}#finance-workspace .management-cost-identity{grid-column:1/-1;display:flex;align-items:center;gap:10px}#finance-workspace .management-mobile-label{display:block;font-size:12px;color:var(--business-muted)}#finance-workspace .management-cost-amount strong{font-size:17px}#finance-workspace .management-forecast-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}#finance-workspace .management-forecast-row>strong{grid-column:1/-1}#finance-workspace .management-forecast-row>div{display:grid;gap:6px}#finance-workspace .management-cost-detail{padding:10px}#finance-workspace .management-cost-entry{grid-template-columns:minmax(0,1fr)}#finance-workspace .management-cost-entry>span,#finance-workspace .management-cost-entry>small{grid-column:auto}}
@media(max-width:700px){#finance-workspace .management-budget-period{grid-template-columns:minmax(0,1fr)}#finance-workspace .management-budget-values{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){#finance-workspace .management-overview{gap:16px;padding:16px 0}#finance-workspace .management-heading{display:block}#finance-workspace .management-date{display:block;margin-top:8px}#finance-workspace .management-tabs{display:grid;grid-template-columns:1fr}#finance-workspace .management-tabs button{text-align:left}#finance-workspace .management-now,#finance-workspace .management-two,#finance-workspace .management-three,#finance-workspace .management-modules{grid-template-columns:minmax(0,1fr)}#finance-workspace .management-now{gap:12px}#finance-workspace .management-card{padding:16px}#finance-workspace .management-value{font-size:26px}#finance-workspace .management-hero .management-value{font-size:34px}}

/* Multi-year analysis uses shared surface, control sizing and semantic colors. */
#finance-workspace .management-year-field{display:grid;gap:6px;font-size:12px;color:var(--business-muted);min-width:150px;max-width:100%}
#finance-workspace .management-year-trigger{min-height:44px;margin:0;display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--ui-ink)}
#finance-workspace .management-year-trigger::after{content:'⌄';font-size:16px}
.management-year-menu{padding:12px!important;max-width:calc(100vw - 24px);color:var(--ui-ink)}
.management-year-menu>strong{display:block;padding:4px 8px 10px;font-size:14px}
.management-year-menu .management-year-option{display:flex;align-items:center;gap:12px;min-height:44px;padding:6px 10px;box-sizing:border-box;border-radius:6px;font-size:15px;color:var(--ui-ink);cursor:pointer}
.management-year-option:hover{background:var(--ui-soft)}.management-year-option:has(input:checked){background:color-mix(in srgb,var(--ui-red) 14%,var(--ui-surface))}
.management-year-menu input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--ui-red);flex:0 0 18px}
.management-year-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:10px;border-top:1px solid var(--ui-line)}.management-year-actions button{min-height:44px;margin:0}

#finance-workspace .management-year-menu .management-year-option{font-size:15px;color:var(--ui-ink)}#finance-workspace .management-year-menu .management-year-option>span{font-size:15px;color:inherit}#finance-workspace .management-year-field>span{display:none}

#finance-workspace .cash-charts{display:grid;gap:20px;min-width:0}
#finance-workspace .cash-chart-heading h2{margin:0 0 8px}
#finance-workspace .cash-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;min-width:0}
#finance-workspace .cash-chart-grid>.business-panel{min-width:0;margin:0;padding:20px;border:1px solid var(--ui-line);background:var(--ui-soft);border-radius:8px}
#finance-workspace .cash-chart-structure{grid-column:1/-1}
#finance-workspace .cash-chart-scroll{overflow-x:auto;overscroll-behavior-x:contain;max-width:100%}
#finance-workspace .cash-chart-bars{display:flex;align-items:end;min-width:620px;height:220px;border-bottom:1px solid var(--ui-line);gap:0}
#finance-workspace .cash-chart-month{flex:1;min-width:48px;padding:4px;border:0;background:transparent;display:grid;gap:6px;align-content:end;text-align:center;min-height:210px;color:var(--ui-ink)}
#finance-workspace .cash-chart-month small{font-size:11px;min-height:16px;color:var(--business-muted)}
#finance-workspace .cash-chart-pair{height:145px;display:flex;gap:4px;align-items:end;justify-content:center}
#finance-workspace .cash-chart-pair>span{width:13px;min-height:0;display:block;border-radius:3px 3px 0 0}
#finance-workspace .cash-chart-pair>.cash-chart-in{background:var(--business-muted)}
#finance-workspace .cash-chart-pair>.cash-chart-out{background:var(--ui-red)}
#finance-workspace .cash-chart-legend{display:flex;gap:20px;font-size:12px}
#finance-workspace .cash-chart-in{color:var(--business-muted)}
#finance-workspace .cash-chart-out{color:var(--ui-red)}
#finance-workspace .cash-chart-line{display:block;width:100%;min-width:620px;height:230px;overflow:visible}
#finance-workspace .cash-chart-gridline{stroke:var(--ui-line);stroke-dasharray:4 4}
#finance-workspace .cash-chart-stroke{stroke:var(--ui-red);stroke-width:2.5;fill:none}
#finance-workspace .cash-chart-axis{fill:var(--business-muted);font-size:12px;font-family:var(--ui-font)}
#finance-workspace .cash-chart-point{fill:var(--ui-ink);stroke:var(--ui-surface);stroke-width:2}
#finance-workspace .cash-chart-line [role=button]:focus-visible{outline:2px solid var(--ui-red)}
#finance-workspace .cash-chart-composition{display:grid;gap:16px}
#finance-workspace .cash-chart-donut{width:100%;max-width:300px;justify-self:center}
#finance-workspace .cash-chart-donut circle{fill:none;stroke-width:27}
#finance-workspace .cash-chart-donut-track{stroke:var(--ui-line)}
#finance-workspace .cash-chart-ring{stroke:var(--chart-color)}
#finance-workspace [data-color="salary"]{--chart-color:var(--ui-red)}
#finance-workspace [data-color="outsourcing"]{--chart-color:var(--business-muted)}
#finance-workspace [data-color="tax"]{--chart-color:var(--ui-green)}
#finance-workspace [data-color="reimbursement"]{--chart-color:var(--ui-amber)}
#finance-workspace [data-color="rent"]{--chart-color:color-mix(in srgb,var(--ui-red) 35%,var(--ui-ink))}
#finance-workspace .cash-chart-center{fill:var(--ui-ink);font-size:23px;font-weight:700;font-family:var(--ui-font)}
#finance-workspace .cash-chart-ranking{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}
#finance-workspace .cash-chart-rank{display:grid;align-content:start;min-width:0;gap:4px;padding:8px 0;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;background:transparent;text-align:left;min-height:64px}
#finance-workspace .cash-chart-rank-label{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--ui-ink)}
#finance-workspace .cash-chart-rank-label strong{font-variant-numeric:tabular-nums;white-space:nowrap}
#finance-workspace .cash-chart-rank progress{width:100%;max-width:220px;height:8px;appearance:none;border:0;border-radius:4px;overflow:hidden;background:var(--ui-line);accent-color:var(--chart-color)}
#finance-workspace .cash-chart-rank progress::-webkit-progress-bar{background:var(--ui-line);border-radius:4px}
#finance-workspace .cash-chart-rank progress::-webkit-progress-value{background:var(--chart-color);border-radius:4px}
#finance-workspace .cash-chart-rank progress::-moz-progress-bar{background:var(--chart-color);border-radius:4px}
#finance-workspace .cash-chart-detail{padding:20px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-soft);scroll-margin-top:20px}
#finance-workspace .cash-chart-detail[hidden]{display:none}
#finance-workspace .cash-chart-records{max-height:420px;overflow:auto;overscroll-behavior:contain}
#finance-workspace .management-support>summary{min-height:48px;display:flex;align-items:center;font-size:16px}
@media(max-width:1150px){#finance-workspace .cash-chart-grid{grid-template-columns:minmax(0,1fr)}#finance-workspace .cash-chart-line,#finance-workspace .cash-chart-bars{min-width:620px}}
@media(min-width:1200px){#finance-workspace .cash-chart-ranking{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 28px}}
@media(max-width:600px){#finance-workspace .cash-chart-ranking{grid-template-columns:minmax(0,1fr)}#finance-workspace .cash-chart-priority{grid-template-columns:minmax(0,1fr);gap:8px}#finance-workspace .cash-chart-donut{max-width:230px}#finance-workspace .cash-chart-grid>.business-panel{padding:16px}#finance-workspace .cash-chart-records .management-cost-entry{grid-template-columns:minmax(0,1fr)}#finance-workspace .cash-chart-records strong{overflow-wrap:anywhere}#finance-workspace .cash-chart-detail{padding:16px}}

#finance-workspace [data-color="utilities"]{--chart-color:color-mix(in srgb,var(--ui-green) 65%,var(--ui-ink))}
#finance-workspace [data-color="social"]{--chart-color:color-mix(in srgb,var(--ui-red) 65%,var(--ui-ink))}
#finance-workspace [data-color="fund"]{--chart-color:color-mix(in srgb,var(--ui-green) 45%,var(--ui-ink))}
#finance-workspace [data-color="bonus"]{--chart-color:color-mix(in srgb,var(--ui-amber) 65%,var(--ui-ink))}
#finance-workspace [data-color="welfare"]{--chart-color:color-mix(in srgb,var(--ui-red) 40%,var(--ui-green))}
#finance-workspace [data-color="office"]{--chart-color:color-mix(in srgb,var(--ui-amber) 40%,var(--business-muted))}
#finance-workspace [data-color="cats"]{--chart-color:color-mix(in srgb,var(--ui-red) 40%,var(--ui-amber))}
#finance-workspace [data-color="finance"]{--chart-color:color-mix(in srgb,var(--ui-green) 40%,var(--business-muted))}
#finance-workspace [data-color="other"]{--chart-color:color-mix(in srgb,var(--business-muted) 65%,var(--ui-surface))}
#finance-workspace [data-color="unclassified"]{--chart-color:color-mix(in srgb,var(--ui-amber) 75%,var(--ui-muted))}
@media(min-width:601px){#finance-workspace .cash-chart-bars,#finance-workspace .cash-chart-line{min-width:0}}

#finance-workspace [data-color="recruitment"]{--chart-color:color-mix(in srgb,var(--ui-green) 60%,var(--ui-amber))}
#finance-workspace [data-color="deposit"]{--chart-color:color-mix(in srgb,var(--ui-amber) 60%,var(--ui-ink))}

#finance-workspace [data-color="financing_movement"]{--chart-color:color-mix(in srgb,var(--ui-muted) 70%,var(--ui-green))}

#finance-workspace .cash-chart-priority{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr);gap:32px;align-items:center}
#finance-workspace .cash-chart-priority[hidden]{display:none}
#finance-workspace .cash-chart-major{display:grid;min-width:0}
#finance-workspace .cash-chart-structure .cash-chart-group-title{grid-column:1/-1;margin:0 0 4px;font-size:13px;color:var(--business-muted);font-weight:500}
#finance-workspace .cash-chart-rank-major{padding:8px 0;min-height:70px;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:20px}
#finance-workspace .cash-chart-rank-major .cash-chart-rank-label{grid-column:1/-1;align-items:baseline}
#finance-workspace .cash-chart-rank-major .cash-chart-rank-label strong{font-size:24px;line-height:1.25}
#finance-workspace .cash-chart-rank-major small{text-align:right}
#finance-workspace .cash-chart-rank:not(.cash-chart-rank-major){min-height:52px;padding:6px 0;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px}
#finance-workspace .cash-chart-rank:not(.cash-chart-rank-major) .cash-chart-rank-label{grid-column:1/-1}
#finance-workspace .cash-chart-rank:not(.cash-chart-rank-major) small{text-align:right}
@media(max-width:600px){#finance-workspace .cash-chart-priority{grid-template-columns:minmax(0,1fr);gap:8px}#finance-workspace .cash-chart-rank-major .cash-chart-rank-label strong{font-size:20px}#finance-workspace .cash-chart-rank-major{min-height:70px}}

/* Shared management dashboard */
body.standalone[data-view=finance][data-management-overview=true] .app-page-heading{margin:12px 0;padding:0}
body.standalone[data-view=finance][data-management-overview=true] .app-page-heading h1{font-size:30px;margin:0;line-height:1.25}
body.standalone[data-view=finance][data-management-overview=true] .app-page-heading .eyebrow{display:none}
body.standalone[data-view=finance][data-management-overview=true] .app-page-heading .lead{margin:4px 0 0;font-size:12px}
body.standalone[data-view=finance][data-management-overview=true] .app-topbar{padding-top:10px;padding-bottom:10px}
#finance-workspace .management-overview{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
#finance-workspace .management-tabs{grid-column:1;grid-row:1;display:flex;gap:0;width:100%;margin:0;border-bottom:1px solid var(--ui-line);background:transparent;padding:0;border-radius:0}
#finance-workspace .management-tabs button{flex:0 0 auto;min-width:64px;min-height:44px;padding-inline:12px;white-space:nowrap;font-size:14px;border-radius:6px 6px 0 0;border-bottom:2px solid transparent}
#finance-workspace .management-tabs button[aria-selected=true]{background:var(--ui-soft);border-bottom-color:var(--ui-red)}
#finance-workspace .management-period{grid-column:2;grid-row:1;display:flex;gap:12px;align-items:center;justify-content:flex-end}
#finance-workspace .management-period[hidden]{display:none}
#finance-workspace .management-period>label{display:grid;gap:4px;min-width:0;margin:0;color:var(--business-muted);font-size:var(--hb-caption)}
#finance-workspace .management-period .management-year-field{min-width:0;gap:4px}
#finance-workspace .management-period .management-year-field>span{display:block}
#finance-workspace .management-period :is(select,.management-year-trigger){width:100%;min-width:0;min-height:44px;margin:0}
#finance-workspace .management-review{display:grid;gap:12px;min-width:0}
#finance-workspace .management-review>details,#finance-workspace .management-review>.business-panel{margin:0}
#finance-workspace .management-review-editor form{margin-top:12px}
#finance-workspace .management-period>.business-note{display:none}
#finance-workspace .management-panel,#finance-workspace .management-provenance{grid-column:1/-1}
#finance-workspace .management-panel{gap:14px}
#finance-workspace .management-dashboard{display:grid;gap:10px}
#finance-workspace .management-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#finance-workspace .management-kpi{display:grid;align-content:start;gap:4px;padding:10px 14px;background:var(--ui-soft);border:1px solid var(--ui-line);border-radius:8px;min-width:0}
#finance-workspace .management-kpi>strong{font-size:24px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-kpi.management-hero>strong{font-size:28px}
#finance-workspace .management-kpi[data-missing=true]>strong{font-size:20px;color:var(--business-muted);font-weight:500}
#finance-workspace .management-kpi .business-note{line-height:1.4}
#finance-workspace .management-bank-strip{display:flex;gap:8px 24px;flex-wrap:wrap;color:var(--business-muted);font-size:11px}
#finance-workspace .management-dashboard-grid{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.65fr);gap:12px;align-items:stretch}
#finance-workspace .management-dashboard-column>.business-panel{padding:12px 14px;display:flex;flex-direction:column;gap:4px;margin:0}
#finance-workspace .management-dashboard-grid .business-panel-heading{margin:0}
body.standalone #finance-workspace .management-dashboard .business-panel-heading h2{font-size:var(--ui-identity-size);line-height:1.25;margin:0}
#finance-workspace .management-dashboard .business-panel-heading .business-note{font-size:11px;line-height:1.4;margin:2px 0 0}
#finance-workspace .management-page-link{align-self:flex-start;min-height:32px;background:transparent;border:0;color:var(--business-muted);padding:4px 0;margin:0;font-size:12px;text-align:left;line-height:1.35}
#finance-workspace .management-page-link:hover{color:var(--ui-ink)}
#finance-workspace .management-flow-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#finance-workspace .management-flow-totals>div{display:grid;gap:3px;min-width:0}
#finance-workspace .management-flow-totals strong{font-size:16px;line-height:1.3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-money-short{display:none}
#finance-workspace .management-mini-plot{min-width:0}
#finance-workspace .management-mini-plot svg{display:block;width:100%;height:150px;overflow:visible}
#finance-workspace .management-mini-plot text{fill:var(--business-muted);font-family:var(--ui-font);font-size:11px}
#finance-workspace .management-mini-plot .cash-chart-point{r:3.5px;color:var(--management-positive);transition:r 160ms ease,filter 160ms ease,stroke-width 160ms ease}
#finance-workspace .management-mini-plot .cash-chart-point[data-sign=negative]{color:var(--management-negative)}
#finance-workspace .management-mini-plot .cash-chart-point[data-sign=zero]{color:var(--ui-muted)}
#finance-workspace .management-mini-plot [data-focus=true] .cash-chart-point{r:5.5px;stroke:var(--ui-ink);stroke-width:1.6}
#finance-workspace .management-mini-plot .management-focus-month{fill:var(--ui-ink);font-weight:700}
#finance-workspace .management-mini-plot[data-signed] [data-period]:is(:hover,:focus-visible) .cash-chart-point{r:7px;stroke:var(--ui-ink);stroke-width:1.6;filter:drop-shadow(0 0 4px currentColor)}
@media(prefers-reduced-motion:reduce){#finance-workspace .management-mini-plot .cash-chart-point{transition:none}}
#finance-workspace .management-mini-plot [role=button]:focus-visible{outline:2px solid var(--ui-red)}
#finance-workspace .management-mini-plot .management-plot-readout{min-height:20px;font-size:11px}
#finance-workspace .management-dashboard-grid .management-mini-plot svg{height:100px}
#finance-workspace .management-dashboard-grid .management-mini-plot .management-plot-readout{line-height:1.4;min-height:16px}
#finance-workspace .management-mini-composition{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.2fr);gap:20px;align-items:center;flex:1;min-width:0}
#finance-workspace .management-mini-composition svg{width:min(100%,420px);height:auto;aspect-ratio:1;justify-self:end;display:block}
#finance-workspace .management-cost-preview{container-type:inline-size}
@container(max-width:460px){#finance-workspace .management-cost-preview .management-mini-composition{grid-template-columns:minmax(0,1fr);gap:12px}#finance-workspace .management-cost-preview .management-mini-composition svg{width:min(100%,320px);justify-self:center}}
#finance-workspace .management-mini-composition circle{fill:none;stroke-width:27}
#finance-workspace .management-mini-composition text{fill:var(--business-muted);font-family:var(--ui-font);font-size:12px}
#finance-workspace .management-mini-composition .cash-chart-center{fill:var(--ui-ink);font-size:24px}
#finance-workspace .management-mini-categories{display:grid;min-width:0}
#finance-workspace .management-mini-categories button{display:grid;gap:4px;min-height:48px;border-bottom:1px solid var(--ui-line);width:100%;color:var(--ui-ink);border-radius:0;box-shadow:none}
#finance-workspace .management-mini-categories strong{font-size:16px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#finance-workspace .management-budget-alert{display:grid;gap:3px;padding-left:10px;border-left:3px solid var(--ui-line);font-size:12px}
#finance-workspace .management-budget-alert[data-deficit=true]{border-left-color:var(--ui-amber)}
#finance-workspace .management-budget-picker{display:flex;gap:8px;align-items:center;color:var(--business-muted);font-size:12px}
#finance-workspace .management-budget-picker select{min-height:44px;margin:0}
#finance-workspace .management-budget-selected{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:8px}
#finance-workspace .management-budget-selected>div{display:grid;gap:5px;min-width:0}
#finance-workspace .management-budget-selected strong{font-size:18px;overflow-wrap:anywhere}
#finance-workspace .management-operation-summary{display:flex;gap:32px;padding:4px 0}
#finance-workspace .management-operation-summary>div{display:flex;align-items:baseline;gap:8px}
#finance-workspace .management-operation-summary strong{font-size:24px}
#finance-workspace .management-operation-summary [data-urgent=true] strong{color:var(--ui-amber)}
#finance-workspace .management-dashboard-grid .business-task{padding:6px 0;min-height:44px;gap:3px;border-bottom:1px solid var(--ui-line);background:transparent;margin:0}
#finance-workspace .management-dashboard-grid .business-task strong{font-size:12px}
#finance-workspace .management-dashboard-grid .business-task .business-note{font-size:11px}
#finance-workspace .management-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
#finance-workspace .management-cost-chart-page>.cash-chart-structure{margin:0}
#finance-workspace .management-support{margin:0}
#finance-workspace .management-dashboard-column>.business-panel>.management-page-link:last-child{margin-top:6px}
#finance-workspace .management-mini-progress{display:grid;gap:6px}
#finance-workspace .management-mini-progress>div>div{display:flex;justify-content:space-between;gap:8px;font-size:12px;align-items:baseline}
#finance-workspace .management-mini-progress progress{appearance:none;display:block;height:4px;width:100%;border:0;background:var(--ui-line);margin:2px 0;border-radius:2px;overflow:hidden}
#finance-workspace .management-mini-progress progress::-webkit-progress-bar{background:var(--ui-line)}
#finance-workspace .management-mini-progress progress::-webkit-progress-value{background:var(--business-muted)}
#finance-workspace .management-mini-progress progress[data-source=software]::-webkit-progress-value{background:var(--ui-red)}
#finance-workspace .management-mini-progress progress::-moz-progress-bar{background:var(--business-muted)}
#finance-workspace .management-mini-progress progress[data-source=software]::-moz-progress-bar{background:var(--ui-red)}
@media(min-width:701px){body[data-view=finance][data-management-overview=true] #finance-refresh{min-height:34px;padding:6px 12px}}
@media(max-width:1100px){#finance-workspace .management-kpi>strong{font-size:20px}#finance-workspace .management-kpi.management-hero>strong{font-size:24px}}
@media(max-width:1100px){#finance-workspace .management-overview{grid-template-columns:minmax(0,1fr)}#finance-workspace .management-tabs{grid-column:1;grid-row:1}#finance-workspace .management-period{grid-column:1;grid-row:2;justify-content:flex-start}}
@media(max-width:700px){
 #finance-workspace .management-tabs{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));width:100%;gap:0}
 #finance-workspace .management-tabs button{grid-column:span 3;min-width:0;padding:6px 2px;font-size:var(--hb-caption);text-align:center}
 #finance-workspace .management-tabs button:nth-child(n+5){grid-column:span 4}
 #finance-workspace .management-period{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
 #finance-workspace .management-period[hidden]{display:none}
 #finance-workspace .management-period select{width:100%;min-width:0;min-height:44px;font-size:12px}
 #finance-workspace .management-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #finance-workspace .management-kpi{padding:10px}
 #finance-workspace .management-kpi>strong,#finance-workspace .management-kpi.management-hero>strong{font-size:20px}
 #finance-workspace .management-dashboard-grid{grid-template-columns:minmax(0,1fr)}


 #finance-workspace .management-page-link{min-height:44px}
 #finance-workspace .management-budget-chart>.business-panel-heading{flex-wrap:wrap}
 #finance-workspace .management-budget-selected{grid-template-columns:repeat(2,minmax(0,1fr))}
 #finance-workspace .management-budget-selected strong{font-size:16px}
 #finance-workspace .management-progress-grid{grid-template-columns:minmax(0,1fr)}
 #finance-workspace .management-money-full{display:none}
 #finance-workspace .management-money-short{display:inline}
 #finance-workspace .management-flow-totals strong{font-size:13px;white-space:nowrap}
 #finance-workspace .management-operation-summary{gap:20px}
}
/* Signed cash movement follows the requested red-above / green-below convention. */
#finance-workspace{--management-positive:var(--ui-red);--management-negative:#67bd98}
#finance-workspace .management-sign-legend{display:flex;flex-wrap:wrap;gap:6px 18px;align-items:center;margin:10px 0 4px;font-size:12px;color:var(--ui-muted)}
#finance-workspace .management-sign-legend span{display:inline-flex;align-items:center;gap:6px}
#finance-workspace .management-sign-legend span::before{content:'';width:14px;height:3px;border-radius:3px;background:var(--management-positive)}
#finance-workspace .management-sign-legend .management-sign-negative::before{background:var(--management-negative)}
#finance-workspace .management-mini-plot .management-zero-line{stroke:var(--ui-muted);stroke-width:1.4;stroke-dasharray:4 4;opacity:.8}
#finance-workspace .management-mini-plot .management-zero-label{fill:var(--ui-ink);font-weight:650}
#finance-workspace .management-mini-plot[data-signed=true] .cash-chart-point[data-sign=positive]{fill:var(--management-positive);stroke:var(--ui-surface);stroke-width:1.4}
#finance-workspace .management-mini-plot[data-signed=true] .cash-chart-point[data-sign=negative]{fill:var(--management-negative);stroke:var(--ui-surface);stroke-width:1.4}
#finance-workspace .management-mini-plot[data-signed=true] .cash-chart-point[data-sign=zero]{fill:var(--ui-muted);stroke:var(--ui-surface);stroke-width:1.4}
#finance-workspace .management-mini-plot[data-signed=true] .management-plot-readout[data-sign=positive]{color:var(--management-positive)}
#finance-workspace .management-mini-plot[data-signed=true] .management-plot-readout[data-sign=negative]{color:var(--management-negative)}
#finance-workspace .management-signed-stroke{stroke-width:2.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
#finance-workspace .management-dashboard-grid .management-mini-plot[data-signed=true] svg{height:140px}
#finance-workspace [data-chart-tooltip-host=true]{position:relative}
#finance-workspace .management-chart-tooltip{position:absolute;z-index:20;display:grid;gap:4px;box-sizing:border-box;width:max-content;max-width:min(280px,calc(100% - 16px));padding:11px 14px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);color:var(--ui-ink);box-shadow:0 8px 24px #0007;pointer-events:none;text-align:left;line-height:1.5;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#finance-workspace .management-chart-tooltip[hidden]{display:none!important}
#finance-workspace .management-chart-tooltip>span{font-size:12px;color:var(--ui-muted)}
#finance-workspace .management-chart-tooltip>strong{font-size:17px;font-weight:700;line-height:1.4}
#finance-workspace .management-chart-tooltip>small{font-size:12px;color:var(--ui-muted)}
#finance-workspace .management-mini-composition .cash-chart-ring[role=button]{cursor:pointer;transition:stroke-width 160ms ease,filter 160ms ease}
#finance-workspace .management-mini-composition .cash-chart-ring:is(:hover,:focus-visible){outline:none;stroke-width:36;filter:brightness(1.18) drop-shadow(0 0 3px var(--chart-color))}
@media(prefers-reduced-motion:reduce){#finance-workspace .management-mini-composition .cash-chart-ring[role=button]{transition:none}}


#finance-workspace .management-dashboard-column{display:grid;gap:12px;min-width:0;align-content:stretch}
#finance-workspace .management-dashboard-column[data-column=trends]{grid-template-rows:1fr 1fr}
#finance-workspace .management-dashboard-column[data-column=summary]{grid-template-rows:auto 1fr auto}


#finance-workspace .management-company-status{border-top:3px solid var(--hb-border)}
#finance-workspace .management-company-status[data-state=profit]{--company-status-color:var(--management-positive);border-top-color:var(--company-status-color)}
#finance-workspace .management-company-status[data-state=flat]{--company-status-color:var(--hb-amber);border-top-color:var(--company-status-color)}
#finance-workspace .management-company-status[data-state=loss]{--company-status-color:var(--management-negative);border-top-color:var(--company-status-color)}
#finance-workspace .management-company-label{font-size:26px;line-height:1.25;color:var(--company-status-color,var(--hb-muted));margin-top:8px}
#finance-workspace .management-company-amount{font-size:34px;line-height:1.2;color:var(--company-status-color);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#finance-workspace .management-company-basis{color:var(--hb-muted);margin:4px 0;font-size:12px}
#finance-workspace .management-company-status .business-details{margin-top:8px;font-size:12px}
#finance-workspace .management-dashboard-column[data-column=trends] .management-mini-plot{margin-block:auto}

@media(max-width:700px){#finance-workspace .management-dashboard-column{display:contents}#finance-workspace .management-dashboard-grid .management-flow-preview{order:1}#finance-workspace .management-dashboard-grid .management-dashboard-column>.business-panel:not(.management-flow-preview):not(.management-budget-chart):not(.management-operation-card):not(.management-company-status){order:2}#finance-workspace .management-dashboard-grid .management-budget-chart{order:3}#finance-workspace .management-dashboard-grid .management-operation-card{order:4}}

@media(max-width:700px){#finance-workspace .management-dashboard-grid .management-company-status{order:0}}

#finance-workspace .management-dashboard-column[data-column=trends]:has(>.business-empty){grid-template-rows:auto auto;align-content:start}

@media(max-width:700px){#finance-workspace .management-mini-plot{overflow-x:auto}#finance-workspace .management-mini-plot svg{width:var(--management-plot-width);min-width:100%;max-width:none}}
@media(max-width:700px){#finance-workspace .management-mini-plot[data-month-context=true] svg{width:100%;min-width:0;max-width:100%}}

#finance-workspace .management-chart-tooltip[data-outside=true]{position:fixed;inset:auto;margin:0;max-width:min(280px,calc(100vw - 24px));max-height:calc(100dvh - 24px);z-index:10020}#finance-workspace .management-chart-tooltip[data-outside=true]::backdrop{background:transparent;pointer-events:none}


#finance-workspace .management-chart-tooltip[data-outside=true]{background:var(--hb-chart-tooltip-surface);color:var(--hb-chart-tooltip-text);border-color:var(--hb-chart-tooltip-border);box-shadow:0 8px 28px #0005}#finance-workspace .management-chart-tooltip[data-outside=true] strong{color:var(--hb-chart-tooltip-text)}#finance-workspace .management-chart-tooltip[data-outside=true] span,#finance-workspace .management-chart-tooltip[data-outside=true] small{color:var(--hb-chart-tooltip-muted)}
#finance-workspace .management-company-pending{color:var(--hb-amber);margin:8px 0 0;overflow-wrap:anywhere}
#finance-workspace [data-provisional=true] .management-company-label{display:block}
#finance-workspace [data-provisional=true] .management-company-amount{display:block;font-size:clamp(24px,6vw,34px);margin-top:4px}
#finance-workspace .management-company-pending-list{padding-inline-start:20px;line-height:1.7;overflow-wrap:anywhere}
#finance-workspace [data-color="unreviewed"]{--chart-color:var(--ui-amber)}

#finance-workspace .management-company-summary{display:flex;flex-wrap:wrap;gap:4px 16px}#finance-workspace .management-company-summary>span{white-space:nowrap}

.management-coverage-item{padding:16px 0;border-top:1px solid var(--hb-border);min-width:0}.management-coverage-item h3{margin:0;font-size:var(--hb-body)}.management-coverage-form{display:grid;grid-template-columns:minmax(160px,.4fr) minmax(0,1fr);gap:12px;align-items:start}.management-coverage-form label{display:grid;gap:6px;color:var(--hb-muted);font-size:var(--hb-caption)}.management-coverage-form :is(input,textarea){box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0}.management-coverage-actions{display:flex;gap:8px;flex-wrap:wrap;grid-column:1/-1}.management-coverage-actions button{min-height:44px;margin:0}.management-coverage-form>[role=status]{grid-column:1/-1;margin:0}.management-coverage-item p{overflow-wrap:anywhere}@media(max-width:650px){.management-coverage-form{grid-template-columns:minmax(0,1fr)}}

.management-receipt-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.management-receipt-form label{display:grid;gap:6px;min-width:0;color:var(--hb-muted)}
.management-receipt-form :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0}
@media(max-width:650px){.management-receipt-form{grid-template-columns:minmax(0,1fr)}}

.finance-import-dialog{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:auto;color:var(--hb-text);background:var(--hb-surface);border:1px solid var(--hb-border);border-radius:var(--hb-radius)}
.finance-import-heading,.finance-import-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px;border-bottom:1px solid var(--hb-border)}
.finance-import-heading h2{margin:0;font-size:var(--hb-section-title)}
.finance-import-dialog .member-dialog-body{padding:20px;overflow:visible;max-height:none}
.finance-import-actions{justify-content:flex-end;border-bottom:0;border-top:1px solid var(--hb-border)}
.finance-import-picker{display:grid;gap:8px;margin-block:20px}
.finance-import-picker input{width:100%;min-height:44px;box-sizing:border-box}
.finance-import-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-block:12px}
.finance-import-counts>div{display:grid;gap:8px}
.finance-import-counts small{color:var(--hb-muted)}
.finance-import-counts strong{font-size:var(--hb-section-title);font-variant-numeric:tabular-nums}
.finance-import-report li,.finance-import-error{overflow-wrap:anywhere;line-height:1.6}
.finance-import-error{color:var(--hb-danger);border-left:3px solid currentColor;padding-left:12px}
.finance-import-dialog button{min-height:44px}
@media(max-width:600px){.finance-import-heading,.finance-import-actions,.finance-import-dialog .member-dialog-body{padding:12px}.finance-import-actions>button{flex:1}.finance-import-counts{gap:8px}}

#finance-workspace #finance-import,#finance-workspace #finance-refresh{min-height:44px}

body:not([data-view=finance]) #finance-import{display:none}

@media (max-width: 1059px) {
.finance-submissions-dialog{width:min(840px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:auto;background:var(--ui-surface);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px)}
.finance-submissions-heading,.finance-submission-list-heading,.finance-submission-entry{display:flex;align-items:center;justify-content:space-between;gap:12px}
.finance-submissions-heading{padding:16px 20px;border-bottom:1px solid var(--ui-line)}
.finance-submissions-heading h2{font-size:22px;margin:0}
.finance-submissions-dialog .member-dialog-body{padding:16px 20px;max-height:none;overflow:visible}
.finance-submissions-dialog button{min-height:44px;flex-shrink:0}
.finance-submission-drop{position:relative;display:grid;gap:8px;text-align:center;padding:22px 16px;margin:16px 0 10px;border:1px dashed var(--ui-muted);border-radius:var(--ui-radius,8px);background:var(--ui-soft)}
.finance-submission-drop:focus-within,.finance-submission-drop.is-dragging{border-color:var(--ui-red);outline:2px solid var(--ui-red);outline-offset:2px}
.finance-submission-drop input{display:block;max-width:100%;margin:auto;min-height:44px}
.finance-submission-files{list-style:none;padding:0;margin:0}
.finance-submission-files li,.finance-submission-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--ui-line);padding:8px 0}
.finance-submission-files li>span,.finance-submission-row>div{min-width:0;overflow-wrap:anywhere}
.finance-submission-row p{margin:4px 0 0}
.finance-submission-upload-actions{display:flex;gap:16px;align-items:center;justify-content:space-between;margin:12px 0}
.finance-submission-upload-actions>span{max-width:480px}
.finance-submission-status{min-height:24px;margin:12px 0;color:var(--ui-ink);overflow-wrap:anywhere}
.finance-submission-list,.finance-submission-review{border-top:1px solid var(--ui-line);padding-top:16px;margin-top:16px}
.finance-submission-review textarea{width:100%;box-sizing:border-box;min-height:70px;font:inherit;background:var(--ui-soft);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);padding:10px}
.finance-submission-review .finance-import-error{color:var(--ui-red)}
.finance-submission-review-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.finance-submission-entry{border-bottom:1px solid var(--ui-line);padding:0 0 16px;margin-bottom:16px}
.finance-submission-entry h3,.finance-submission-entry p{margin:0 0 4px}
@media(max-width:600px){.finance-submissions-heading,.finance-submissions-dialog .member-dialog-body{padding:12px}.finance-submissions-heading h2{font-size:18px}.finance-submission-drop{padding:16px 10px}.finance-submission-upload-actions{display:grid}.finance-submission-upload-actions>button{width:100%}.finance-submission-row{align-items:flex-start}.finance-submission-review-actions>button{flex:1}.finance-submission-entry{flex-wrap:wrap}}

}
@media (min-width: 1060px) {
.finance-submissions-dialog {
  width: min(940px, calc(100vw - 24px));
  block-size: min(566px, calc(100dvh - 24px));
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  background: var(--ui-surface);
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius, 12px);
}
.finance-submissions-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.finance-submissions-heading, .finance-submission-list-heading, .finance-submission-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.finance-submissions-heading { padding: 12px 18px; border-bottom: 1px solid var(--ui-line); }
.finance-submissions-heading h2 { margin: 0; font-size: var(--ui-section-size, 22px); }
.finance-submissions-dialog .member-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: start;
  gap: 16px;
  padding: 16px 18px;
  min-block-size: 0;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable;
}
.finance-submissions-dialog button { min-height: 44px; margin: 0; }
.finance-submissions-dialog h3 { font-size: var(--ui-identity-size, 17px); margin: 0; }
.finance-submission-upload, .finance-submission-queue {
  min-width: 0;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius, 10px);
  padding: 12px;
}
.finance-submission-upload { display: grid; align-content: start; gap: 10px; }
.finance-submission-queue {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-block-size: 0;
}
.finance-submission-list {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-block-size: 0;
}
.finance-submission-drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
  padding: 14px 10px;
  margin: 0;
  border: 1px dashed var(--ui-muted);
  border-radius: var(--ui-radius, 8px);
  background: var(--ui-soft);
  color: var(--ui-ink);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.finance-submission-drop:is(:hover, :focus-within, .is-dragging) {
  border-color: var(--ui-red);
  background: color-mix(in srgb, var(--ui-red) 8%, var(--ui-soft));
}
.finance-submission-drop:focus-within { outline: 2px solid var(--ui-red); outline-offset: 2px; }
.finance-submission-drop-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--ui-radius, 8px);
  background: color-mix(in srgb, var(--ui-red) 12%, var(--ui-soft));
  color: var(--ui-red);
  font-size: 20px;
  line-height: 1;
}
.finance-submission-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.finance-submission-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: space-between;
}
.finance-submission-upload-actions > button { margin-inline-start: auto; }
.finance-submission-files, .finance-submission-names {
  display: grid;
  gap: 3px;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.finance-submission-files:empty, .finance-submission-status:empty { display: none; }
.finance-submission-files li, .finance-submission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-block-end: 1px solid var(--ui-line);
  padding: 6px 0;
}
.finance-submission-files li > span, .finance-submission-row > div { min-width: 0; overflow-wrap: anywhere; }
.finance-submission-row button { flex: none; }
.finance-submission-names { color: var(--ui-ink); font-weight: 650; }
.finance-submission-row p { margin: 4px 0 0; }
.finance-submission-status { margin: 0; color: var(--ui-ink); overflow-wrap: anywhere; }
.finance-submission-batch-entries {
  min-block-size: 0;
  overflow: auto;
  padding-inline-end: 20px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}
.finance-submission-batch-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-block-start: 8px;
}
.finance-submission-batch-tabs {
  display: flex;
  gap: 5px;
  margin-block: 8px 4px;
  padding: 3px;
  border-radius: var(--ui-radius, 8px);
  background: var(--ui-soft);
}
.finance-submission-batch-tabs button {
  flex: 1 1 0;
  background: transparent;
  border-color: transparent;
}
.finance-submissions-dialog .finance-submission-batch-tabs button[aria-pressed="true"] {
  color: var(--ui-ink);
  background: color-mix(in srgb, var(--ui-red) 12%, var(--ui-surface));
  border-color: color-mix(in srgb, var(--ui-red) 45%, var(--ui-line));
  font-weight: 650;
}
.finance-submission-empty { margin: 10px 0 0; }
.finance-submission-queue:has(> .finance-submission-review:not([hidden])) > .finance-submission-list { display: none; }
.finance-submission-review { min-block-size: 0; overflow: auto; scrollbar-gutter: stable; }
.finance-submission-review :is(ul, p) { margin-block: 8px; overflow-wrap: anywhere; }
.finance-submission-review textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 70px;
  font: inherit;
  background: var(--ui-soft);
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius, 8px);
  padding: 8px;
}
.finance-submissions-dialog .finance-import-error { color: var(--ui-red); }
.finance-submission-review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.finance-submission-entry { border-bottom: 1px solid var(--ui-line); padding: 0 0 16px; margin-bottom: 16px; }
.finance-submission-entry h3, .finance-submission-entry p { margin: 0 0 4px; }
@media (min-width: 701px) {
  .finance-submissions-dialog .member-dialog-body { grid-template-rows: minmax(0, 1fr); }
  .finance-submission-queue { align-self: stretch; }
  .finance-submission-upload { max-block-size: 100%; box-sizing: border-box; overflow: auto; }
}
@media (max-width: 700px) {
  .finance-submissions-heading, .finance-submissions-dialog .member-dialog-body { padding: 10px; }
  .finance-submissions-dialog .member-dialog-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .finance-submission-queue { block-size: min(420px, 66dvh); box-sizing: border-box; }
  .finance-submission-upload-actions > button { width: 100%; }
  .finance-submission-review-actions > button { flex: 1; }
  .finance-submission-entry { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .finance-submission-drop { transition: none; }
}

}
/* Shared ledger tokens; update states use a single compact notification layout. */
html[data-ledger-resuming=true]{overflow-anchor:none;scroll-behavior:auto}
html[data-ledger-resuming=true] body>main,html[data-ledger-resuming=true] body>.app-sidebar,html[data-ledger-resuming=true] body>dialog{visibility:hidden}
html[data-ledger-resuming=true] body::after{content:'正在恢复工作位置…';position:fixed;inset:0;display:grid;place-items:center;background:var(--ui-bg,#191e29);color:var(--ui-muted,#b3bdcc);font:inherit;z-index:11990}
#ledger-release-notice{--release-accent:color-mix(in srgb,var(--ui-red,#ed5264) 78%,var(--ui-ink,#f2f4f8));position:fixed;z-index:12000;inset:20px 24px auto auto;margin:0;width:min(500px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;box-sizing:border-box;padding:0;border:1px solid var(--ui-line,#465064);border-top:3px solid var(--release-accent);border-radius:var(--ui-radius,12px);background:var(--ui-surface,#222936);color:var(--ui-ink,#f2f4f8);box-shadow:0 16px 48px #0005;font:inherit;font-size:14px;line-height:1.55;isolation:isolate}
#ledger-release-notice::backdrop{background:transparent;pointer-events:none}
#ledger-release-notice[data-complete=true]{--release-accent:#68dfa8}
#ledger-release-notice[data-failed=true]{--release-accent:#ffd16e}
#ledger-release-notice [hidden]{display:none!important}
#ledger-release-notice .ledger-release-header{display:flex;align-items:center;gap:10px;padding:14px 20px 0;color:var(--ui-muted,#b3bdcc);font-size:12px}
#ledger-release-notice .ledger-release-brand{display:flex;align-items:center;gap:7px;font-weight:600;letter-spacing:.03em}
#ledger-release-notice .ledger-release-brand::before{content:'';width:7px;height:7px;background:var(--release-accent);border-radius:50%}
#ledger-release-notice .ledger-release-phase{margin-left:auto;font-size:12px;border:1px solid color-mix(in srgb,var(--release-accent) 35%,var(--ui-line));border-radius:20px;padding:2px 9px;color:var(--release-accent);background:color-mix(in srgb,var(--release-accent) 7%,var(--ui-surface))}
#ledger-release-notice .ledger-release-close{display:grid;place-items:center;margin:-10px -12px -10px 0;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent;color:var(--ui-muted);font-size:23px}
#ledger-release-notice .ledger-release-main{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;align-items:start;padding:18px 20px 16px}
#ledger-release-notice .ledger-release-symbol{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:color-mix(in srgb,var(--release-accent) 13%,var(--ui-surface));color:var(--release-accent);font-size:22px;line-height:1}
#ledger-release-notice .ledger-release-copy{min-width:0}
#ledger-release-notice .ledger-release-title{display:block;margin:0;font-size:20px;line-height:1.4;font-weight:650;color:var(--ui-ink);letter-spacing:-.02em}
#ledger-release-notice .ledger-release-message{margin:7px 0 0;font-size:14px;line-height:1.65;color:var(--ui-muted);overflow-wrap:anywhere;text-wrap:pretty}
#ledger-release-notice .ledger-release-countdown{display:grid;gap:0;justify-items:center;min-width:65px;padding:0 0 0 10px;border-left:1px solid var(--ui-line);color:var(--release-accent)}
#ledger-release-notice .ledger-release-countdown>strong{font-size:34px;line-height:1.1;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:-.04em}
#ledger-release-notice .ledger-release-countdown>span{font-size:12px;margin-top:5px;color:var(--ui-muted)}
#ledger-release-notice .ledger-release-progress{display:block;width:calc(100% - 40px);height:3px;margin:0 20px 16px;border:0;border-radius:3px;overflow:hidden;accent-color:var(--release-accent);background:var(--ui-soft)}
#ledger-release-notice .ledger-release-progress::-webkit-progress-bar{background:var(--ui-soft)}#ledger-release-notice .ledger-release-progress::-webkit-progress-value{background:var(--release-accent)}
#ledger-release-notice .ledger-release-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 20px;border-top:1px solid var(--ui-line);background:color-mix(in srgb,var(--ui-soft) 50%,var(--ui-surface))}
#ledger-release-notice .ledger-release-footnote{min-width:0;color:var(--ui-muted);font-size:12px;line-height:1.55}
#ledger-release-notice .ledger-release-action{flex:0 0 auto;min-height:44px;padding:10px 18px;margin:0;border:1px solid var(--release-accent);border-radius:var(--ui-radius,8px);background:var(--release-accent);color:#10251c;font:inherit;font-size:14px;font-weight:650;line-height:1.3}
#ledger-release-notice[data-failed=true] .ledger-release-action{color:#392800}
#ledger-release-notice .ledger-release-action:hover{filter:brightness(1.07)}
#ledger-release-notice :is(button,summary):focus-visible{outline:2px solid var(--release-accent);outline-offset:3px}
#ledger-release-notice .ledger-release-changes{margin:0;padding:0 20px 14px;border-top:1px solid var(--ui-line)}
#ledger-release-notice .ledger-release-changes>summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;gap:12px;list-style:none;font-size:12px;color:var(--ui-muted);cursor:pointer}
#ledger-release-notice .ledger-release-changes>summary::-webkit-details-marker{display:none}
#ledger-release-notice .ledger-release-changes>summary::after{content:'＋';font-size:15px}#ledger-release-notice .ledger-release-changes[open]>summary::after{content:'−'}
#ledger-release-notice .ledger-release-changes ul{margin:0;padding:0 0 0 18px;display:grid;gap:8px;font-size:13px;color:var(--ui-muted);line-height:1.6}#ledger-release-notice .ledger-release-changes li::marker{color:var(--release-accent)}
@media(max-width:650px){#ledger-release-notice{inset:12px 12px auto auto;width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}#ledger-release-notice .ledger-release-header{padding:12px 16px 0}#ledger-release-notice .ledger-release-main{grid-template-columns:minmax(0,1fr) auto;padding:16px;gap:12px}#ledger-release-notice .ledger-release-symbol{display:none}#ledger-release-notice .ledger-release-title{font-size:19px}#ledger-release-notice .ledger-release-message{font-size:13px}#ledger-release-notice .ledger-release-countdown{min-width:52px}#ledger-release-notice .ledger-release-countdown>strong{font-size:30px}#ledger-release-notice .ledger-release-progress{width:calc(100% - 32px);margin-inline:16px}#ledger-release-notice .ledger-release-footer{padding:12px 16px;flex-wrap:wrap;gap:10px}#ledger-release-notice .ledger-release-action{width:100%}#ledger-release-notice .ledger-release-changes{padding-inline:16px}}
.ledger-edit-presence{padding:10px 12px;margin:8px 0;background:var(--ui-soft,#242936);border:1px solid var(--ui-line,#434b5b);border-radius:var(--ui-radius,8px);color:var(--ui-text,#fff);line-height:1.5;font-size:14px}.ledger-edit-presence strong{display:block}
#ledger-checkpoint-recovery{position:fixed;z-index:11990;bottom:16px;right:16px;width:min(520px,calc(100vw - 32px));max-height:55vh;overflow:auto;box-sizing:border-box;padding:16px;background:var(--ui-surface,#242936);color:var(--ui-text,#fff);border:1px solid var(--ui-line,#576074);border-radius:12px;box-shadow:0 8px 32px #0006}#ledger-checkpoint-recovery summary{min-height:44px;padding:10px 0}#ledger-checkpoint-recovery label{display:block;font-size:12px;margin:8px 0}#ledger-checkpoint-recovery textarea{display:block;width:100%;box-sizing:border-box}#ledger-checkpoint-recovery button,#ledger-checkpoint-recovery a{min-height:44px}

/* Shared holiday design tokens */
#hanabi-holiday-panel{--hb-canvas:light-dark(#f5f6f8,#11151b);--hb-notice-red:#ff453a;--hb-notice-yellow:#ffd60a;--hb-notice-green:#30d158;--hb-notice-text:#171b24;--hb-chart-tooltip-surface:#fff4d6;--hb-chart-tooltip-text:#1c2635;--hb-chart-tooltip-muted:#5f5140;--hb-chart-tooltip-border:#d8b86e;--hb-surface:light-dark(#ffffff,#191f28);--hb-subtle:light-dark(#eef1f5,#222a36);--hb-group-deep:light-dark(#eaf0f6,#1a2330);--hb-group-light:light-dark(#f8fafc,#263243);--hb-text:light-dark(#1c2635,#eef2f8);--hb-muted:light-dark(#526177,#acb8ca);--hb-border:light-dark(#d7dee8,#344153);--hb-brand:light-dark(#cc233b,#d72843);--hb-on-brand:#ffffff;--hb-project-alternate-surface:light-dark(#f7f9fc,#222b38);--hb-original-header:color-mix(in srgb,var(--hb-brand) 72%,#000);--hb-original-header-alternate:var(--hb-brand);--hb-project-alternate-header:light-dark(#edf1f7,#2c384b);--hb-project-alternate-border:light-dark(#cfd8e4,#47576d);--hb-multiphase-alternate-surface:light-dark(#fff8fb,#412f3b);--hb-multiphase-alternate-header:light-dark(#fdebf3,#523949);--hb-multiphase-alternate-border:light-dark(#e5c5d5,#8a637d);--hb-multiphase-surface:light-dark(#fff3f7,#30232d);--hb-multiphase-header:light-dark(#fbe2ed,#402b3a);--hb-multiphase-subtle:light-dark(#f5d9e6,#493143);--hb-multiphase-border:light-dark(#dfb8c9,#735268);--hb-multiphase-muted:light-dark(#745469,#d0bac9);--hb-label-green-bg:light-dark(#c8eddf,#235f4b);--hb-label-green-text:light-dark(#154b36,#ddfff0);--hb-label-green-border:light-dark(#579b7c,#63cfa4);--hb-label-blue-bg:light-dark(#d8eaff,#2a5283);--hb-label-blue-text:light-dark(#21456e,#e4f1ff);--hb-label-blue-border:light-dark(#6a98c9,#88b7f2);--hb-label-amber-bg:light-dark(#ffebbc,#775719);--hb-label-amber-text:light-dark(#624108,#fff0b5);--hb-label-amber-border:light-dark(#b78c34,#e3bc63);--hb-label-pink-bg:light-dark(#f8dce9,#713c58);--hb-label-pink-text:light-dark(#73364f,#ffe6f0);--hb-label-pink-border:light-dark(#c17e9b,#dfa0bd);--hb-label-neutral-bg:light-dark(#e0e5f1,#444e69);--hb-label-neutral-text:light-dark(#35415e,#f0f3ff);--hb-label-neutral-border:light-dark(#8b99b6,#a4b2d3);--hb-label-complete:light-dark(#078852,#5cf1b3);--hb-production-emphasis:light-dark(#deebff,#284c76);--hb-production-outline:light-dark(#98b6e0,#507eaf);--hb-good:light-dark(#156342,#8cdeaf);--hb-danger:light-dark(#b42336,#ff9aa6);--hb-amber:light-dark(#7d5b09,#efd08b);--hb-radius:8px;--hb-page-title:24px;--hb-year-title:20px;--hb-section-title:16px;--hb-group-title:18px;--hb-body:14px;--hb-caption:12px;--hb-display-title:32px;--hb-form-section-title:22px;--hb-form-subheading:16px;--hb-form-value:16px;--hb-font:"Segoe UI","Microsoft YaHei",system-ui,sans-serif;--hb-brand:var(--calendar-hanabi);color-scheme:dark}

#hanabi-schedule-panel{--hb-canvas:light-dark(#f5f6f8,#11151b);--hb-notice-red:#ff453a;--hb-notice-yellow:#ffd60a;--hb-notice-green:#30d158;--hb-notice-text:#171b24;--hb-chart-tooltip-surface:#fff4d6;--hb-chart-tooltip-text:#1c2635;--hb-chart-tooltip-muted:#5f5140;--hb-chart-tooltip-border:#d8b86e;--hb-surface:light-dark(#ffffff,#191f28);--hb-subtle:light-dark(#eef1f5,#222a36);--hb-group-deep:light-dark(#eaf0f6,#1a2330);--hb-group-light:light-dark(#f8fafc,#263243);--hb-text:light-dark(#1c2635,#eef2f8);--hb-muted:light-dark(#526177,#acb8ca);--hb-border:light-dark(#d7dee8,#344153);--hb-brand:light-dark(#cc233b,#d72843);--hb-on-brand:#ffffff;--hb-project-alternate-surface:light-dark(#f7f9fc,#222b38);--hb-original-header:color-mix(in srgb,var(--hb-brand) 72%,#000);--hb-original-header-alternate:var(--hb-brand);--hb-project-alternate-header:light-dark(#edf1f7,#2c384b);--hb-project-alternate-border:light-dark(#cfd8e4,#47576d);--hb-multiphase-alternate-surface:light-dark(#fff8fb,#412f3b);--hb-multiphase-alternate-header:light-dark(#fdebf3,#523949);--hb-multiphase-alternate-border:light-dark(#e5c5d5,#8a637d);--hb-multiphase-surface:light-dark(#fff3f7,#30232d);--hb-multiphase-header:light-dark(#fbe2ed,#402b3a);--hb-multiphase-subtle:light-dark(#f5d9e6,#493143);--hb-multiphase-border:light-dark(#dfb8c9,#735268);--hb-multiphase-muted:light-dark(#745469,#d0bac9);--hb-label-green-bg:light-dark(#c8eddf,#235f4b);--hb-label-green-text:light-dark(#154b36,#ddfff0);--hb-label-green-border:light-dark(#579b7c,#63cfa4);--hb-label-blue-bg:light-dark(#d8eaff,#2a5283);--hb-label-blue-text:light-dark(#21456e,#e4f1ff);--hb-label-blue-border:light-dark(#6a98c9,#88b7f2);--hb-label-amber-bg:light-dark(#ffebbc,#775719);--hb-label-amber-text:light-dark(#624108,#fff0b5);--hb-label-amber-border:light-dark(#b78c34,#e3bc63);--hb-label-pink-bg:light-dark(#f8dce9,#713c58);--hb-label-pink-text:light-dark(#73364f,#ffe6f0);--hb-label-pink-border:light-dark(#c17e9b,#dfa0bd);--hb-label-neutral-bg:light-dark(#e0e5f1,#444e69);--hb-label-neutral-text:light-dark(#35415e,#f0f3ff);--hb-label-neutral-border:light-dark(#8b99b6,#a4b2d3);--hb-label-complete:light-dark(#078852,#5cf1b3);--hb-production-emphasis:light-dark(#deebff,#284c76);--hb-production-outline:light-dark(#98b6e0,#507eaf);--hb-good:light-dark(#156342,#8cdeaf);--hb-danger:light-dark(#b42336,#ff9aa6);--hb-amber:light-dark(#7d5b09,#efd08b);--hb-radius:8px;--hb-page-title:24px;--hb-year-title:20px;--hb-section-title:16px;--hb-group-title:18px;--hb-body:14px;--hb-caption:12px;--hb-display-title:32px;--hb-form-section-title:22px;--hb-form-subheading:16px;--hb-form-value:16px;--hb-font:"Segoe UI","Microsoft YaHei",system-ui,sans-serif;--hb-brand:var(--calendar-hanabi);color-scheme:dark}
#hanabi-calendar[data-scheduling=true] .hanabi-calendar-workspace{grid-template-columns:var(--calendar-panel-width) minmax(0,1fr);align-items:start}
#hanabi-calendar[data-scheduling=true] #hanabi-calendar-grid{align-self:stretch}
#hanabi-schedule-panel[hidden]{display:none}
#hanabi-schedule-panel{min-width:0;max-height:none;overflow:visible;padding:16px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-group-deep);color:var(--hb-text);font:var(--hb-body)/1.55 var(--hb-font);display:flex;flex-direction:column;gap:12px}
#hanabi-schedule-panel *{box-sizing:border-box}#hanabi-schedule-panel>*{flex-shrink:0}
#hanabi-schedule-panel :is(h2,h3,p){margin:0}#hanabi-schedule-panel h2{font-size:var(--hb-section-title)}#hanabi-schedule-panel h3{font-size:var(--hb-body);font-weight:600}#hanabi-schedule-panel h3.ledger-section-heading{font-size:var(--hb-group-title);font-weight:650}
#hanabi-schedule-panel button{margin:0;min-height:44px;padding:8px 10px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);color:var(--hb-text);font:inherit;white-space:normal;text-align:left}
#hanabi-schedule-panel :is(input,select){margin:0;width:100%;min-width:0;min-height:44px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);color:var(--hb-text);padding:8px;font:var(--hb-form-value)/1.4 var(--hb-font)}
#hanabi-schedule-panel label{display:grid;gap:6px;color:var(--hb-muted);font-size:var(--hb-caption)}
.schedule-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.schedule-panel-head button{font-size:var(--hb-caption)!important}
.schedule-demo-note{margin:0 0 8px;font-size:12px;color:var(--ui-muted)}
.schedule-library,.schedule-node-list{display:grid;gap:8px;min-width:0}.schedule-node-list{flex-shrink:0}
.schedule-stage-group{display:grid;gap:8px;border-left:2px solid var(--hb-border);padding-left:10px;min-width:0}.schedule-stage-pick{font-weight:650!important}.schedule-stage-group .schedule-node-row{margin-left:6px}
.schedule-stage-title{margin:0;font-size:var(--hb-caption);font-weight:650;color:var(--hb-muted)}
.schedule-saved-row{display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--hb-border);padding-top:12px;min-width:0}
#hanabi-schedule-panel small{font-size:var(--hb-caption);color:var(--hb-muted)}
.schedule-view-node small,.schedule-node-row small{display:flex;flex-wrap:wrap;gap:2px 8px;margin-top:4px;font-size:var(--hb-caption);color:var(--hb-muted)}.schedule-period{white-space:nowrap}
.schedule-node-row{display:flex;flex-wrap:wrap;gap:6px;align-items:stretch;min-width:0}.schedule-node-row>button:first-child{flex:1 1 calc(100% - 50px);min-width:0}.schedule-node-row>button+button{flex:none;width:44px;text-align:center!important}
#hanabi-schedule-panel button[aria-pressed=true]{border-color:#7AA2F7;background:color-mix(in srgb,#7AA2F7 12%,var(--hb-surface))}
.schedule-date-actions{display:flex;gap:8px;flex-wrap:wrap}.schedule-date-actions>button{flex:1}
.schedule-help,.schedule-range-hint,.schedule-status{color:var(--hb-muted);font-size:var(--hb-caption);line-height:1.7;overflow-wrap:anywhere}.schedule-status:empty{display:none}
.schedule-footer{position:static;display:flex;gap:8px;background:var(--hb-group-deep);padding:10px 0 4px}.schedule-footer>button{flex:1;text-align:center!important}#hanabi-schedule-panel #schedule-save{background:var(--hb-brand);border-color:var(--hb-brand);color:var(--hb-on-brand)}
#hanabi-calendar-grid .schedule-markers{position:absolute;left:18%;right:18%;bottom:5px;display:grid;gap:2px;pointer-events:none;z-index:1}
#hanabi-calendar-grid .schedule-range-bar{display:block;height:3px;border-radius:3px;background:#7AA2F7}
#hanabi-calendar-grid .schedule-range-bar[data-active=true]{background:#B8D1FF}
#hanabi-calendar-grid .schedule-overlap-count{position:absolute;right:-8px;bottom:0;font-size:12px;line-height:14px;color:var(--ui-ink);background:var(--ui-surface);border-radius:3px;padding:0 2px}
#hanabi-calendar-grid .hanabi-day[data-schedule-selected=true]:not([data-today=true]){outline:2px solid #7AA2F7;outline-offset:-3px}
#hanabi-calendar[data-scheduling=true] .hanabi-day{touch-action:manipulation}#hanabi-calendar[data-scheduling=true]:has(#schedule-node-name) .hanabi-day{touch-action:none;user-select:none}
@media(max-width:1200px) and (min-width:901px){#hanabi-calendar[data-scheduling=true] .hanabi-calendar-workspace{gap:12px}}
@media(max-width:900px){#hanabi-calendar[data-scheduling=true] .hanabi-calendar-workspace{grid-template-columns:minmax(0,1fr)}#hanabi-schedule-panel{max-height:none;padding:14px}.schedule-footer{bottom:0}#hanabi-calendar[data-scheduling=true] #hanabi-calendar-grid[data-mode=year] .hanabi-month{height:380px}#hanabi-calendar[data-scheduling=true] .hanabi-calendar-workspace{padding-bottom:0}}

.schedule-stage-head{display:flex;align-items:center;gap:8px;min-width:0}.schedule-stage-head .schedule-stage-pick{flex:1;min-width:0;overflow-wrap:anywhere}.schedule-stage-head>small{flex:none}.schedule-stage-head>[data-stage-toggle]{flex:none;font-size:var(--hb-caption)!important}.schedule-stage-body{display:grid;gap:8px;min-width:0}.schedule-stage-body[hidden]{display:none}

/* The whole panel may scroll; individual stages keep their natural height. */
@media(min-width:901px){
 #hanabi-calendar[data-scheduling=true] .hanabi-calendar-workspace{grid-template-rows:minmax(0,1fr)}
 #hanabi-schedule-panel{box-sizing:border-box;min-height:0;max-height:100%;overflow:auto;scrollbar-width:thin}
 #hanabi-calendar[data-scheduling=true] #hanabi-calendar-grid:is([data-mode=year],[data-mode=month]){min-height:0;height:100%;box-sizing:border-box}
 #hanabi-calendar[data-scheduling=true] #hanabi-calendar-grid[data-mode=year]{grid-template-rows:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){#hanabi-schedule-panel{box-sizing:border-box;max-height:calc(100dvh - 100px);overflow:auto;scrollbar-width:thin}}

.schedule-project-results{display:grid;grid-auto-rows:max-content;align-content:start;gap:6px;max-height:260px;overflow:auto}.schedule-project-candidate small{display:block;margin-top:4px}.schedule-project-candidate{overflow-wrap:anywhere}
#hanabi-calendar .hanabi-calendar-modes{grid-template-columns:repeat(3,56px) auto}#hanabi-calendar[data-project-view=true] .hanabi-calendar-workspace{display:block;height:auto}#hanabi-calendar[data-project-view=true] #hanabi-schedule-panel{display:none}#hanabi-calendar-grid[data-mode=projects]{display:block}.calendar-project-controls{display:flex;align-items:end;gap:16px;margin:10px 0}.calendar-project-controls label{display:grid;gap:6px;min-width:0;max-width:320px}.calendar-project-controls input{margin:0;min-height:44px;font-size:16px}.calendar-project-scroll{overflow:auto;max-height:calc(100dvh - 320px);min-height:180px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px)}.calendar-project-table{--project-name:230px;--project-day:32px;min-width:calc(var(--project-name) + var(--project-days) * var(--project-day))}.calendar-project-dates,.calendar-project-row{display:grid;grid-template-columns:var(--project-name) repeat(var(--project-days),minmax(var(--project-day),1fr))}.calendar-project-dates{position:sticky;top:0;z-index:3;background:var(--ui-surface);border-bottom:1px solid var(--ui-line)}.calendar-project-name{position:sticky;left:0;grid-column:1;grid-row:1;z-index:2;background:var(--ui-surface);border-right:1px solid var(--ui-line);display:grid;align-content:center;gap:4px;padding:8px 12px;overflow-wrap:anywhere}.calendar-project-name strong{font-size:14px}.calendar-project-name small{font-size:12px;color:var(--ui-muted)}.calendar-project-date{padding:8px 2px;display:grid;gap:4px;justify-items:center;font-size:13px}.calendar-project-date[data-kinds~=weekend]{background:var(--ui-soft)}.calendar-project-date[data-kinds~=national]{box-shadow:inset 0 -3px var(--calendar-national)}.calendar-project-date[data-kinds~=company]{box-shadow:inset 0 -3px var(--calendar-hanabi)}.calendar-project-group{border-bottom:1px solid var(--ui-line)}.calendar-project-row{min-height:44px;background:repeating-linear-gradient(to right,transparent,transparent calc((100% - var(--project-name))/var(--project-days) - 1px),var(--ui-line) calc((100% - var(--project-name))/var(--project-days) - 1px),var(--ui-line) calc((100% - var(--project-name))/var(--project-days)));background-position:right;background-size:calc(100% - var(--project-name)) 100%;background-repeat:no-repeat}.calendar-project-group .calendar-project-name{box-shadow:inset 3px 0 var(--project-color)}#hanabi-calendar .calendar-project-bar{grid-row:1;align-self:center;min-height:36px;margin:4px 1px;padding:3px;color:var(--ui-ink);border:1px solid var(--project-color);background:color-mix(in srgb,var(--project-color) 18%,var(--ui-surface));font-size:12px;white-space:nowrap}#calendar-project-detail{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;background:var(--ui-surface);color:var(--ui-ink);border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);padding:20px}#calendar-project-detail p{overflow-wrap:anywhere}.calendar-project-detail-head{display:flex;justify-content:space-between;align-items:start;gap:12px}.calendar-project-detail-head h2{font-size:20px;margin:0}.calendar-project-detail-head button{flex:none;min-height:44px;margin:0}
@media(max-width:650px){#hanabi-calendar .hanabi-calendar-modes{width:100%;grid-template-columns:repeat(3,1fr) 1.5fr}.calendar-project-table{--project-name:150px;--project-day:44px}.calendar-project-controls{align-items:stretch;flex-direction:column;gap:6px}.calendar-project-scroll{max-height:70dvh}#hanabi-calendar .calendar-project-bar{min-height:44px}.calendar-project-name{padding:6px 8px}}
/* Minimal controls in the existing calendar; the primary action stays distinct. */
#hanabi-calendar[data-scheduling=true] .hanabi-calendar-workspace{grid-template-columns:var(--calendar-panel-width) minmax(0,1fr)}#hanabi-schedule-panel{background:var(--hb-surface);gap:14px}#hanabi-schedule-panel button{border-color:transparent;background:transparent;transition:background .12s ease}#hanabi-schedule-panel button:hover{background:var(--hb-subtle)}#hanabi-schedule-panel button:focus-visible{outline:2px solid var(--hb-text);outline-offset:2px}#hanabi-schedule-panel button[aria-pressed=true]{border-color:var(--hb-border);background:var(--hb-subtle)}#hanabi-schedule-panel .schedule-project-candidate{padding:10px 12px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-group-deep)}#hanabi-schedule-panel .schedule-project-candidate[aria-pressed=true]{border-color:var(--hb-brand);background:var(--hb-subtle)}#hanabi-schedule-panel .schedule-node-row>button:first-child{background:var(--hb-subtle)}#hanabi-schedule-panel .schedule-node-row>button[aria-pressed=true]{border-color:var(--hb-brand)}#hanabi-schedule-panel .schedule-node-row>button+button{align-self:start;width:44px;min-width:44px;padding:6px;text-align:center;color:var(--hb-muted)}#hanabi-schedule-panel .schedule-node-row>button+button:hover{color:var(--hb-brand)}#hanabi-schedule-panel [data-add-stage-node]{justify-self:start;color:var(--hb-muted);font-size:var(--hb-caption)}.schedule-node-editor{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px;background:var(--hb-subtle);border-radius:var(--hb-radius)}.schedule-node-editor>p,.schedule-node-editor>.schedule-date-actions{grid-column:1/-1}.schedule-panel-head{position:sticky;top:-16px;z-index:3;background:var(--hb-surface);padding:10px 0;border-bottom:1px solid var(--hb-border)}#hanabi-schedule-panel #schedule-save{background:var(--hb-brand);color:var(--hb-on-brand);text-align:center;border-color:var(--hb-brand)}#hanabi-schedule-panel .schedule-footer{background:var(--hb-surface);border-top:1px solid var(--hb-border);padding-top:12px;gap:8px}#hanabi-schedule-panel .schedule-footer button:not(#schedule-save){border-color:var(--hb-border);text-align:center}.schedule-stage-head>small{font-size:var(--hb-caption)}
@media(max-width:900px){#hanabi-calendar[data-scheduling=true] .hanabi-calendar-workspace{grid-template-columns:minmax(0,1fr)}.schedule-panel-head{top:-14px}}@media(prefers-reduced-motion:reduce){#hanabi-schedule-panel button{transition:none}}
.schedule-date-help{grid-column:1/-1;border-top:1px solid var(--hb-border);padding-top:4px}.schedule-date-help summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--hb-muted);font-size:var(--hb-caption)}.schedule-date-help summary:before{content:'＋';margin-right:6px}.schedule-date-help[open] summary:before{content:'−'}.schedule-date-help p{padding-bottom:6px}.schedule-stage-body>.schedule-node-editor{margin-left:6px;border:1px solid var(--hb-border);border-top:0;border-radius:0 0 var(--hb-radius) var(--hb-radius);margin-top:-8px}.schedule-node-row.is-editing{background:var(--hb-subtle);border-radius:var(--hb-radius) var(--hb-radius) 0 0}.schedule-stage-editor{display:grid;gap:6px;padding:10px;background:var(--hb-subtle);border-radius:var(--hb-radius)}#hanabi-schedule-panel .schedule-footer{display:grid;grid-template-columns:1fr 1fr;position:sticky;bottom:-16px;z-index:2}#hanabi-schedule-panel .schedule-footer-count{grid-column:1/-1}#hanabi-calendar #calendar-schedule-toggle{background:var(--ui-red);border:1px solid var(--ui-red);color:#fff;font-weight:650;min-height:44px;padding:8px 16px;box-shadow:0 2px 8px #0002}#hanabi-calendar #calendar-schedule-toggle:hover{filter:brightness(1.08)}#hanabi-calendar #calendar-schedule-toggle[aria-expanded=true]{background:var(--ui-soft);border-color:var(--ui-line);color:var(--ui-ink);box-shadow:none}

.schedule-form-section{display:grid;gap:12px;min-width:0}.schedule-form-section+.schedule-form-section{border-top:1px solid var(--hb-border);padding-top:16px}.schedule-form-section .schedule-project-results{gap:6px}.schedule-form-section #schedule-selected-project:empty{display:none}#hanabi-schedule-panel #schedule-new{width:100%;border-color:var(--hb-brand);background:var(--hb-brand);color:var(--hb-on-brand);font-weight:650;text-align:center}#hanabi-schedule-panel #schedule-new:disabled{border-color:var(--hb-border);background:var(--hb-subtle);color:var(--hb-muted);opacity:1}#hanabi-schedule-panel .schedule-library-heading{font-size:var(--hb-group-title);font-weight:650;color:var(--hb-text)}.schedule-node-editor>.ledger-section-heading{grid-column:1/-1;padding-bottom:10px;border-bottom:1px solid var(--hb-border)}

.schedule-plan-summary{display:grid;gap:8px;min-width:0}.schedule-plan-summary:empty{display:none}.schedule-plan-row{display:grid;gap:3px;padding:8px 10px;background:var(--hb-subtle);border-radius:var(--hb-radius);font-size:var(--hb-caption);overflow-wrap:anywhere}.schedule-plan-row :is(span,small){color:var(--hb-muted)}.schedule-plan-warning{flex:0 0 100%;grid-column:1/-1;color:var(--hb-brand);font-size:var(--hb-caption);overflow-wrap:anywhere}.schedule-plan-warning[hidden]{display:none}.schedule-plan-range{opacity:.45;border:1px dashed currentColor}.calendar-project-bar.schedule-plan-bar{opacity:.65;border-style:dashed!important}


 .hpt-runtime{color:var(--hb-text);font:var(--hb-body,14px)/1.6 var(--hb-font,sans-serif);min-width:0}
 .hpt-runtime *{box-sizing:border-box}.hpt-runtime [hidden]{display:none!important}
 .hpt-milestones{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:18px 0 12px;border-top:1px solid var(--hb-border);padding-top:14px}
 .hpt-milestones span,.hpt-runtime dt{font-size:var(--hb-caption,12px);color:var(--hb-muted)}
 .hpt-milestones strong{display:block;font-weight:500;font-size:var(--hb-body,14px);overflow-wrap:anywhere}
 .hpt-plot{position:relative;min-width:0}.hpt-plot svg{display:block;width:100%;overflow:visible}
 .hpt-plot text{font:var(--hb-caption,12px) var(--hb-font,sans-serif);fill:var(--hb-muted);font-variant-numeric:tabular-nums}
 .hpt-runtime .hpt-hit{position:absolute;padding:0;border:0;background:transparent;touch-action:pan-y;cursor:crosshair;border-radius:0;min-height:44px}
 .hpt-hit:focus-visible{outline:2px solid var(--hb-brand);outline-offset:4px}
 .hpt-readout{border-top:1px solid var(--hb-border);padding:14px 0 4px;min-height:122px}
 .hpt-readout-head{display:flex;justify-content:space-between;gap:8px;align-items:baseline;flex-wrap:wrap;margin-bottom:10px}
 .hpt-readout-head strong{font-size:var(--hb-body,14px);font-weight:500}.hpt-readout-head span{font-size:var(--hb-caption,12px);color:var(--hb-muted)}
 .hpt-month-select{display:flex;align-items:center;gap:12px;color:var(--hb-muted);font-size:var(--hb-caption,12px);margin-bottom:12px;max-width:100%}
 .hpt-month-select select{min-height:44px;min-width:0;max-width:100%;padding:8px 30px 8px 12px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);color:var(--hb-text);font:inherit;flex:1}
 .hpt-month-select select:focus-visible{outline:2px solid var(--hb-brand);outline-offset:3px}
 .hpt-runtime dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}
 .hpt-runtime dd{margin:3px 0 0;font-size:var(--hb-body,14px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 .hpt-runtime .is-positive{color:var(--hb-good)}.hpt-runtime .is-negative{color:var(--hb-danger)}
 .hpt-note{font-size:var(--hb-caption,12px);color:var(--hb-muted);margin:10px 0 0;line-height:1.7}
 .hpt-unavailable{padding:28px 0;min-height:128px;color:var(--hb-muted);font-size:var(--hb-body,14px)}
 .hpt-unavailable strong{display:block;font-weight:500;color:var(--hb-text);margin-bottom:4px}
 @media(max-width:700px){.hpt-milestones{gap:12px}.hpt-runtime dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hpt-readout{min-height:168px}}
 @media(prefers-reduced-motion:reduce){.hpt-runtime *{transition:none!important;animation:none!important}}
/* Shared quotation design tokens */
#finance-workspace,#quotation-workspace,#imported-purchases,#imported-payment-records,#procurement-task-navigation,#purchase-payment-periods{--hb-canvas:light-dark(#f5f6f8,#11151b);--hb-notice-red:#ff453a;--hb-notice-yellow:#ffd60a;--hb-notice-green:#30d158;--hb-notice-text:#171b24;--hb-chart-tooltip-surface:#fff4d6;--hb-chart-tooltip-text:#1c2635;--hb-chart-tooltip-muted:#5f5140;--hb-chart-tooltip-border:#d8b86e;--hb-surface:light-dark(#ffffff,#191f28);--hb-subtle:light-dark(#eef1f5,#222a36);--hb-group-deep:light-dark(#eaf0f6,#1a2330);--hb-group-light:light-dark(#f8fafc,#263243);--hb-text:light-dark(#1c2635,#eef2f8);--hb-muted:light-dark(#526177,#acb8ca);--hb-border:light-dark(#d7dee8,#344153);--hb-brand:light-dark(#cc233b,#d72843);--hb-on-brand:#ffffff;--hb-project-alternate-surface:light-dark(#f7f9fc,#222b38);--hb-original-header:color-mix(in srgb,var(--hb-brand) 72%,#000);--hb-original-header-alternate:var(--hb-brand);--hb-project-alternate-header:light-dark(#edf1f7,#2c384b);--hb-project-alternate-border:light-dark(#cfd8e4,#47576d);--hb-multiphase-alternate-surface:light-dark(#fff8fb,#412f3b);--hb-multiphase-alternate-header:light-dark(#fdebf3,#523949);--hb-multiphase-alternate-border:light-dark(#e5c5d5,#8a637d);--hb-multiphase-surface:light-dark(#fff3f7,#30232d);--hb-multiphase-header:light-dark(#fbe2ed,#402b3a);--hb-multiphase-subtle:light-dark(#f5d9e6,#493143);--hb-multiphase-border:light-dark(#dfb8c9,#735268);--hb-multiphase-muted:light-dark(#745469,#d0bac9);--hb-label-green-bg:light-dark(#c8eddf,#235f4b);--hb-label-green-text:light-dark(#154b36,#ddfff0);--hb-label-green-border:light-dark(#579b7c,#63cfa4);--hb-label-blue-bg:light-dark(#d8eaff,#2a5283);--hb-label-blue-text:light-dark(#21456e,#e4f1ff);--hb-label-blue-border:light-dark(#6a98c9,#88b7f2);--hb-label-amber-bg:light-dark(#ffebbc,#775719);--hb-label-amber-text:light-dark(#624108,#fff0b5);--hb-label-amber-border:light-dark(#b78c34,#e3bc63);--hb-label-pink-bg:light-dark(#f8dce9,#713c58);--hb-label-pink-text:light-dark(#73364f,#ffe6f0);--hb-label-pink-border:light-dark(#c17e9b,#dfa0bd);--hb-label-neutral-bg:light-dark(#e0e5f1,#444e69);--hb-label-neutral-text:light-dark(#35415e,#f0f3ff);--hb-label-neutral-border:light-dark(#8b99b6,#a4b2d3);--hb-label-complete:light-dark(#078852,#5cf1b3);--hb-production-emphasis:light-dark(#deebff,#284c76);--hb-production-outline:light-dark(#98b6e0,#507eaf);--hb-good:light-dark(#156342,#8cdeaf);--hb-danger:light-dark(#b42336,#ff9aa6);--hb-amber:light-dark(#7d5b09,#efd08b);--hb-radius:8px;--hb-page-title:24px;--hb-year-title:20px;--hb-section-title:16px;--hb-group-title:18px;--hb-body:14px;--hb-caption:12px;--hb-display-title:32px;--hb-form-section-title:22px;--hb-form-subheading:16px;--hb-form-value:16px;--hb-font:"Segoe UI","Microsoft YaHei",system-ui,sans-serif;color-scheme:dark}

/* Approved quotation layout, using shared design tokens and existing API controls. */
#quotation-workspace{container-type:inline-size;container-name:quotation;color:var(--hb-text)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) [hidden]{display:none!important}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-dashboard-actions{display:flex;justify-content:flex-end;gap:8px;margin-bottom:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-toolbar[hidden],:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-filters[hidden]{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-overview{margin-bottom:18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-period-tabs{margin-bottom:10px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-year-label{font-size:var(--hb-body);font-weight:650}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-total{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 8px;margin-bottom:10px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-metric{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:7px;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-metric:first-child{grid-column:1/-1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-metric strong{font-size:17px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-metric:first-child strong{font-size:30px;line-height:1.1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-metric span{color:var(--hb-muted);font-size:14px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .summary-metric small{color:var(--hb-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .status-card{display:grid;align-content:start;gap:3px;padding:6px 8px;min-height:44px;margin:0;background:transparent;color:var(--hb-text);border:1px solid var(--hb-border);border-radius:8px;text-align:left;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .status-card .amount{font-size:17px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .status-card-label{font-size:14px;color:var(--hb-text)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) [data-status=已提单] .status-card-label{color:#9ac5fb}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) [data-status=待开票] .status-card-label{color:#f1cd85}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) [data-status=已开票] .status-card-label{color:#d6b5ef}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) [data-status=待回款] .status-card-label{color:#efbb91}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) [data-status=已回款] .status-card-label{color:#9edbc9}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .status-card[aria-pressed=true]{border-color:var(--hb-brand)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-overview-basis{color:var(--hb-muted);font-size:12px;margin-top:12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-overview-basis p{font-size:12px;margin:6px 0 0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-review-workspace{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(0,1.3fr);gap:16px;align-items:start;margin-bottom:16px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-review-workspace .quotation-selection-panel{margin:0;min-width:0;display:flex;flex-direction:column;padding:16px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-top{flex-direction:column;align-items:flex-start;gap:12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-controls{justify-content:flex-start}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-metrics{flex:none;align-content:start;margin-top:12px;padding-top:12px;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-metric strong{font-size:26px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .search-region{padding:16px;border:1px solid var(--hb-border);border-radius:8px;background:var(--hb-surface);min-width:0;display:flex;flex-direction:column;gap:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .search-region label{display:grid;gap:5px;margin:0;font-size:12px;color:var(--hb-muted);min-width:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .search-region input{margin:0;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .search-region .qm-search-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .search-region :is(input,select,.qm-filter-trigger,#quotation-filters-reset){min-height:44px;margin:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-filters-reset{align-self:flex-start}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-trigger::after{content:"";width:6px;height:6px;flex:none;margin-inline:8px 2px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg) translateY(-2px)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) #quotation-collapse-page{margin:0 0 12px auto;display:block}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-column-head{display:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary{cursor:pointer}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary:focus-visible{outline:2px solid var(--hb-brand);outline-offset:-4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);align-items:center;gap:12px;padding:14px 16px;background:var(--hb-surface)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.qm-metadata-leading,.qm-metadata-trailing){display:flex;align-items:center;gap:16px;flex-wrap:wrap;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact{display:grid;gap:6px;flex:1;min-width:70px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact .quotation-support-label{font-size:12px;color:var(--hb-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact .quotation-project-value{font-size:14px;font-weight:600}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-production-date{flex:0 0 clamp(108px,8cqw,140px);min-width:108px;box-sizing:border-box;padding:0;background:transparent;box-shadow:none}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-production-date .quotation-support-label{color:var(--hb-text);font-weight:600}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-production-date .quotation-project-value{font-size:var(--hb-group-title);font-weight:700;font-variant-numeric:tabular-nums;line-height:1.3}
@media(max-width:720px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact[data-group-field="schedule"]{grid-column:1/-1}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-production-date{padding:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-production-date .quotation-project-value{font-size:var(--hb-section-title)}}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-outsourcing-facts{flex:0 0 clamp(220px,16cqw,320px);max-width:320px;min-width:0;display:flex;flex-wrap:wrap;gap:6px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-outsourcing-facts .quotation-outsourcing-tag{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
@media(max-width:720px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-outsourcing-facts{max-width:100%}}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modern-record{display:block;padding:0;min-width:0;border-top:1px solid var(--hb-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modern-record .quotation-row-details{display:block}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modern-varying{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:8px 16px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modern-varying:has(>.quotation-modern-row-tools:only-child){padding:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modern-row-tools{display:flex;align-items:center;gap:8px;margin-left:auto}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modern-row-tools button{margin:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-detail{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:12px;padding:16px;min-width:0;--qm-soft-border:var(--hb-border);--qm-production:color-mix(in srgb,#6da6ef 5%,var(--hb-surface));--qm-finance:color-mix(in srgb,#5bb39c 7%,var(--hb-surface))}
.qm-production-block,.qm-finance-block{display:grid;gap:16px;padding:12px 14px;border:1px solid var(--qm-soft-border);border-radius:var(--hb-radius);min-width:0}
.qm-production-block{grid-template-columns:64px minmax(120px,1fr) minmax(150px,1.15fr) 150px;background:var(--qm-production)}
.qm-finance-block{grid-template-columns:minmax(125px,.8fr) minmax(185px,1.2fr);background:var(--qm-finance)}
.qm-card-cell{display:flex;flex-direction:column;gap:8px;min-width:0;padding:0;border:0;background:transparent}
.qm-card-days{border-left:1px solid var(--qm-soft-border);padding-left:16px}
.qm-card-cell .qm-cell-body>strong{font-size:20px;overflow-wrap:anywhere}.qm-card-cell small{font-size:var(--hb-body);color:var(--hb-muted);overflow-wrap:anywhere}
.qm-card-category .qm-cell-body>strong{font-size:18px;padding:4px 8px;border-radius:6px;background:var(--hb-group-deep);width:fit-content}
.qm-card-days,.qm-card-cost,.qm-card-income{container-type:inline-size}.qm-card-days .qm-cell-body>strong,.qm-card-cost .qm-cell-body>strong,.qm-card-income .qm-cell-body>strong{font-size:clamp(36px,12cqw,38px);line-height:1.2;font-variant-numeric:tabular-nums}.qm-metric-value{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.qm-metric-number{white-space:nowrap;font-weight:700;letter-spacing:-.5px}.qm-metric-unit{font-size:16px;font-weight:500}.qm-card-cell .qm-cell-body>strong[data-missing="true"]{font-size:20px;font-weight:500;color:var(--hb-muted)}.qm-card-cell>.qm-caption{font-size:var(--hb-body)}
.qm-card-income{text-align:right;align-items:flex-end;border-left:1px solid var(--qm-soft-border);padding-left:16px}
.qm-card-income .qm-cell-body>strong{font-size:clamp(32px,12cqw,40px)}.qm-card-income small:last-child{padding-top:0;margin-top:0}
.qm-card-media button{height:76px;font-size:24px!important;background:var(--hb-subtle)!important;color:var(--hb-muted)!important}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-common .qm-detail-button{grid-column:auto;grid-row:auto;margin-left:0;min-height:34px;padding:6px 10px;align-self:center}
/* Project notes occupy the space between cost and income. */
.qm-finance-block{grid-template-columns:minmax(160px,.8fr) minmax(120px,.9fr) minmax(230px,1.45fr)}
.qm-inline-notes{min-width:0;display:flex;flex-direction:column;gap:8px;padding:0 12px;border-left:1px solid var(--qm-soft-border)}
.qm-note-display{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:var(--hb-body);min-height:44px;cursor:text;border-radius:4px}
.qm-note-display[data-empty=true]{color:var(--hb-muted)}
.qm-note-display:focus-visible{outline:2px solid var(--hb-brand);outline-offset:4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-input{width:100%;min-width:0;resize:none;overflow:hidden;font:inherit;line-height:1.65;padding:6px 8px;border:1px solid var(--hb-border);border-radius:4px;color:var(--hb-text);background:var(--hb-surface);box-sizing:border-box}
.qm-note-input:focus{outline:2px solid var(--hb-brand);outline-offset:1px}
/* Titles share a fixed top line; only each field body is vertically centered. */
.qm-cell-body,.qm-note-body{display:flex;flex-direction:column;justify-content:center;gap:8px;flex:1;min-width:0;width:100%;align-items:inherit}
.qm-card-cell>.qm-caption,.qm-inline-notes>.qm-caption{font-size:var(--hb-body);line-height:1.5;flex-shrink:0;margin:0}
.qm-card-header{cursor:pointer}.qm-card-header:focus-visible{outline:2px solid var(--hb-brand);outline-offset:-4px}
.qm-card-identity .qm-record-title{margin:0;cursor:inherit}

/* Compact immediate filters with month and year choice panels. */
.qm-search-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.qm-search-field{display:flex;flex-direction:column;gap:5px;min-width:0}.qm-search-label{color:var(--hb-muted);font-size:var(--hb-caption)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-trigger{width:100%;display:flex;align-items:center;text-align:left;justify-content:space-between;font-size:var(--hb-body);font-weight:400;min-height:38px;padding:7px 10px;white-space:normal;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-trigger[data-active=true]{background:var(--hb-group-deep);border-color:var(--hb-muted)}
.qm-filter-picker{position:fixed;z-index:40;box-sizing:border-box;overflow:auto;padding:12px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);box-shadow:0 12px 32px #0003;color:var(--hb-text)}
.qm-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.qm-picker-heading strong{font-size:var(--hb-body)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-clear{min-height:32px;padding:4px 8px;font-size:var(--hb-caption)}
.qm-picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.qm-picker-grid[data-kind=choices]{grid-template-columns:minmax(0,1fr)}.qm-picker-grid[data-kind=years]{grid-template-columns:repeat(3,minmax(0,1fr))}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-grid button{min-height:38px;font-size:var(--hb-body);padding:6px;white-space:normal;overflow-wrap:anywhere}.qm-picker-grid[data-kind=choices] button{text-align:left}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-picker button[aria-pressed=true]{background:var(--hb-group-deep);border-color:var(--hb-muted);font-weight:650}
.qm-picker-modes{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding-bottom:10px;margin-bottom:8px;border-bottom:1px solid var(--hb-border)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-modes button{font-size:var(--hb-caption);min-height:36px;padding:6px}
@media(max-width:720px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-trigger,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-grid button,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-clear,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-modes button{min-height:44px}.qm-search-grid{gap:10px}}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-production-block{grid-template-columns:64px minmax(90px,1fr) minmax(120px,1fr) 130px;gap:12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-production-block[data-fields="3"]{grid-template-columns:64px minmax(0,1fr) minmax(0,1fr)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-finance-block{grid-template-columns:minmax(145px,.8fr) minmax(110px,.9fr) minmax(210px,1.45fr);gap:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-detail[data-finance-count="1"]>.qm-finance-block{grid-template-columns:minmax(0,1fr)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-detail[data-finance-count="2"]>.qm-finance-block{grid-template-columns:repeat(2,minmax(0,1fr))}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-detail[data-finance-count="0"]{grid-template-columns:minmax(0,1fr)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-cell>.qm-caption{font-size:14px;line-height:1.5;color:var(--hb-muted)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-inline-notes>.qm-caption{color:var(--hb-muted)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-cell .qm-cell-body>strong{font-size:20px;line-height:1.3;margin:0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-category .qm-cell-body>strong{font-size:18px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.qm-card-days,.qm-card-cost,.qm-card-income) .qm-cell-body>strong{font-size:32px;font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-cell-body small{font-size:13px;color:var(--hb-muted);line-height:1.5;margin:0;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-media .quotation-row-preview{display:block;padding:0;margin:0;width:64px;min-width:0;height:76px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-media .quotation-row-preview::before{display:none}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-media .quotation-row-preview button{width:64px;min-width:0;margin:0;height:76px;min-height:76px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-media .quotation-media-frame{max-width:64px}
@container quotation (max-width:1100px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-detail{grid-template-columns:minmax(0,1fr)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-review-workspace{grid-template-columns:minmax(260px,.9fr) minmax(0,1.3fr)}}
@container quotation (max-width:700px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-review-workspace{grid-template-columns:minmax(0,1fr)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-selection-metrics{grid-template-columns:minmax(0,1fr)}}
@container quotation (max-width:520px){
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-production-block{grid-template-columns:64px minmax(0,1fr)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-category{grid-column:2}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-days{grid-column:1/-1;border-left:0;border-top:1px solid var(--hb-border);padding:12px 0 0}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-production-block[data-fields="3"]{grid-template-columns:64px minmax(0,1fr)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-detail>.qm-finance-block{grid-template-columns:minmax(0,1fr)!important}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-inline-notes,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-income{border-left:0;border-top:1px solid var(--hb-border);padding:12px 0 0;align-items:flex-start;text-align:left}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-display{min-height:44px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-card-detail{padding:12px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-review-workspace .quotation-selection-panel,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .search-region{padding:14px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact{flex:0 0 calc(50% - 8px)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-modern-row-tools{flex-basis:100%;justify-content:flex-end}}

/* Compact immediate filters with month and year choice panels. */
.qm-search-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.qm-search-field{display:flex;flex-direction:column;gap:5px;min-width:0}.qm-search-label{color:var(--hb-muted);font-size:var(--hb-caption)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-trigger{width:100%;display:flex;align-items:center;text-align:left;justify-content:space-between;font-size:var(--hb-body);font-weight:400;min-height:38px;padding:7px 10px;white-space:normal;overflow-wrap:anywhere}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-trigger[data-active=true]{background:var(--hb-group-deep);border-color:var(--hb-muted)}
.qm-filter-picker{position:fixed;z-index:40;box-sizing:border-box;overflow:auto;padding:12px;border:1px solid var(--hb-border);border-radius:var(--hb-radius);background:var(--hb-surface);box-shadow:0 12px 32px #0003;color:var(--hb-text)}
.qm-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.qm-picker-heading strong{font-size:var(--hb-body)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-clear{min-height:32px;padding:4px 8px;font-size:var(--hb-caption)}
.qm-picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.qm-picker-grid[data-kind=choices]{grid-template-columns:minmax(0,1fr)}.qm-picker-grid[data-kind=years]{grid-template-columns:repeat(3,minmax(0,1fr))}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-grid button{min-height:38px;font-size:var(--hb-body);padding:6px;white-space:normal;overflow-wrap:anywhere}.qm-picker-grid[data-kind=choices] button{text-align:left}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-picker button[aria-pressed=true]{background:var(--hb-group-deep);border-color:var(--hb-muted);font-weight:650}
.qm-picker-modes{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding-bottom:10px;margin-bottom:8px;border-bottom:1px solid var(--hb-border)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-modes button{font-size:var(--hb-caption);min-height:36px;padding:6px}
@media(max-width:720px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-filter-trigger,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-grid button,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-clear,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-picker-modes button{min-height:44px}.qm-search-grid{gap:10px}}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-metric-unit{font-size:16px;font-weight:500}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-metric-number{white-space:normal;max-width:100%;overflow-wrap:anywhere}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-metric-number{font-size:clamp(22px,calc(100cqw / var(--qm-number-length,10) * 1.55),36px)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-metric-value{max-width:100%;overflow:visible}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-body{justify-content:flex-start}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-display:empty{min-height:0;height:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-display:empty[role=button]{min-height:44px;height:auto;order:1}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-body>small{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-display:empty[role=button]::before{content:"＋ 添加备注";color:var(--hb-muted);font-size:13px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-note-display[hidden]{display:none!important}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact[data-group-field="schedule"]{min-width:148px}@media(max-width:720px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata .quotation-project-fact[data-group-field="schedule"]{min-width:0}}

@container quotation (max-width:1100px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata{display:flex;flex-wrap:wrap;gap:16px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.qm-metadata-leading,.qm-metadata-trailing){display:contents}}
@media(max-width:720px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.qm-metadata-leading,.qm-metadata-trailing){display:contents}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-metadata :is(.quotation-outsourcing-facts,.quotation-internal-tag,.quotation-modern-row-tools,.quotation-tencent-evidence){grid-column:1/-1}}

/* Multi-phase work reads as one project with subordinate, compact rows. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-phase-object,:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-phase-original{display:block;overflow-wrap:anywhere;font-size:var(--hb-caption);line-height:1.5}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-phase-suppliers{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;min-width:0}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-phase-suppliers>span{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:var(--hb-caption)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .quotation-modern-varying{padding:6px 16px;gap:12px;font-size:var(--hb-caption)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-card-detail{padding:4px 16px 10px;gap:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] :is(.qm-production-block,.qm-finance-block){border:0;border-radius:0;padding:6px 0;background:transparent;gap:12px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-production-block{grid-template-columns:44px minmax(120px,1.2fr) minmax(110px,.9fr) 90px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-production-block[data-fields="3"]{grid-template-columns:44px minmax(0,1fr) minmax(0,1fr)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-card-cell{gap:4px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-cell-body>strong{font-size:var(--hb-section-title)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] :is(.qm-card-category .qm-cell-body>strong,.qm-caption){font-size:var(--hb-caption)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-metric-number{font-size:20px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-metric-unit{font-size:var(--hb-caption)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-card-media :is(.quotation-row-preview,.quotation-row-preview button){width:44px;min-width:0;height:54px;min-height:54px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-card-media .quotation-media-frame{max-width:44px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] [data-group-field=quote_total]{flex:1 1 220px;min-width:180px;gap:4px;text-align:right}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] [data-group-field=quote_total] .quotation-project-value{font-size:28px;font-weight:700;line-height:1.25;font-variant-numeric:tabular-nums}
@container quotation (max-width:520px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-production-block{grid-template-columns:44px minmax(0,1fr)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-production-block[data-fields="3"]{grid-template-columns:44px minmax(0,1fr)}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-card-days{grid-column:1/-1}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-card-detail{padding:4px 12px 8px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] [data-group-field=quote_total]{grid-column:1/-1;text-align:left}}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-cell-body{gap:3px}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .qm-cell-body>small{font-size:var(--hb-caption);line-height:1.4}
@media(min-width:721px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .quotation-modern-varying{padding-top:4px;padding-bottom:4px}:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .quotation-modern-row-tools button{min-height:32px;padding:4px 8px;font-size:var(--hb-caption)}}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-phase-suppliers>span{background:transparent;border:0;padding:0;margin:0;color:var(--hb-muted);line-height:1.4}

/* A rose family identifies the complete multi-phase project, independent of status. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true]{--hb-surface:var(--hb-multiphase-surface);--hb-subtle:var(--hb-multiphase-header);--hb-group-deep:var(--hb-multiphase-subtle);--hb-border:var(--hb-multiphase-border);--hb-muted:var(--hb-multiphase-muted);background:var(--hb-surface);border-color:var(--hb-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .quotation-modern-record{background:transparent}

:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-multi=true] .quotation-project-primary{background:var(--hb-subtle)}

/* Stripe complete projects in rendered order, not individual production phases. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-stripe=light][data-multi=false]{--hb-surface:var(--hb-project-alternate-surface);--hb-subtle:var(--hb-project-alternate-header);--hb-border:var(--hb-project-alternate-border);--ui-surface:var(--hb-project-alternate-surface);--ui-soft:var(--hb-project-alternate-header);--ui-line:var(--hb-project-alternate-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-stripe=light][data-multi=true]{--hb-multiphase-surface:var(--hb-multiphase-alternate-surface);--hb-multiphase-header:var(--hb-multiphase-alternate-header);--hb-multiphase-border:var(--hb-multiphase-alternate-border)}

/* Business labels stay legible on both neutral and rose project stripes. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.quotation-project-status,.quotation-outsourcing-tag).category-tone-0{--tag-bg:var(--hb-label-blue-bg);--tag-fg:var(--hb-label-blue-text);--quotation-tag-border:var(--hb-label-blue-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.quotation-project-status,.quotation-outsourcing-tag).category-tone-2{--tag-bg:var(--hb-label-green-bg);--tag-fg:var(--hb-label-green-text);--quotation-tag-border:var(--hb-label-green-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-status.category-tone-3{--tag-bg:var(--hb-label-amber-bg);--tag-fg:var(--hb-label-amber-text);--quotation-tag-border:var(--hb-label-amber-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-status.category-tone-4{--tag-bg:var(--hb-label-pink-bg);--tag-fg:var(--hb-label-pink-text);--quotation-tag-border:var(--hb-label-pink-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-status.category-tone-6{--tag-bg:var(--hb-label-neutral-bg);--tag-fg:var(--hb-label-neutral-text);--quotation-tag-border:var(--hb-label-neutral-border)}
body.standalone :is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) :is(.quotation-project-status,.quotation-outsourcing-tag){background:var(--tag-bg);color:var(--tag-fg);border:1px solid var(--quotation-tag-border);font-weight:600}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-internal-tag{background:var(--hb-label-pink-bg);color:var(--hb-label-pink-text);border-color:var(--hb-label-pink-border);font-weight:600}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-primary[data-complete=true]::before{background:var(--hb-label-complete)}
/* Confirmed HANABI original projects share the procurement brand identity. */
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-project-identity=hanabi-original][data-stripe][data-multi]{--hb-surface:color-mix(in srgb,var(--hb-brand) 30%,var(--hb-canvas));--hb-subtle:var(--hb-original-header);--hb-border:color-mix(in srgb,var(--hb-brand) 70%,var(--hb-project-alternate-border));--hb-multiphase-surface:var(--hb-surface);--hb-multiphase-header:var(--hb-subtle);--hb-multiphase-border:var(--hb-border);--ui-surface:var(--hb-surface);--ui-soft:var(--hb-subtle);--ui-line:var(--hb-border)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-project-identity=hanabi-original][data-stripe=light][data-multi]{--hb-subtle:var(--hb-original-header-alternate)}
:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .quotation-project-block[data-project-identity=hanabi-original]>.quotation-project-primary{--hb-text:var(--hb-on-brand);--hb-muted:var(--hb-on-brand);color:var(--hb-on-brand)}

@container quotation (max-width:1000px){:is(#quotation-workspace,#imported-purchases:where([data-ledger-layout=quotation]),#imported-payment-records) .qm-search-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Quotation supplies the visual skeleton. These rules adapt procurement fields only. */
#imported-purchases[data-ledger-layout=quotation]{container-type:inline-size;container-name:purchase quotation}
:is(#imported-purchases,#imported-payment-records) .quotation-year{padding:0;margin-bottom:20px}
:is(#imported-purchases,#imported-payment-records) .quotation-year-body{padding:0}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-group{border:0;border-top:1px solid var(--hb-border);border-radius:0;margin:0;padding:0;background:transparent}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-group-heading{display:flex;align-items:center;gap:12px;padding:13px 16px;min-height:48px;box-sizing:border-box;font-size:14px;color:var(--hb-text)}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-group-heading small{margin-left:auto;color:var(--hb-muted);font-size:12px}
:is(#imported-purchases,#imported-payment-records) .quotation-year-body>.procurement-quote-group:first-child{border-top:0}
:is(#imported-purchases,#imported-payment-records) .quotation-project-primary{flex-wrap:nowrap}
:is(#imported-purchases,#imported-payment-records) .quotation-project-identity{flex:1 1 240px}
:is(#imported-purchases,#imported-payment-records) .quotation-project-select{display:flex;align-items:center;flex-wrap:nowrap;white-space:nowrap;gap:6px;font-size:12px;min-width:56px}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-tools{grid-template-columns:minmax(140px,200px) 44px 44px;gap:8px;flex:0 0 auto;min-width:0;width:auto;align-items:center}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-tools .procurement-inline-payment{min-width:0;width:100%}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-tools select{width:100%;min-width:0;margin:0}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-tools button{margin:0}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-state{display:flex;gap:6px;flex-wrap:wrap}
:is(#imported-purchases,#imported-payment-records) .quotation-outsourcing-facts .imported-purchase-supplier{display:inline-flex;align-items:center;gap:4px;background:var(--hb-label-green-bg);color:var(--hb-label-green-text);border:1px solid var(--hb-label-green-border);border-radius:var(--hb-radius);padding:6px 8px;max-width:100%;box-sizing:border-box;font-size:12px;font-weight:650;white-space:normal;overflow-wrap:anywhere}
:is(#imported-purchases,#imported-payment-records) .quotation-outsourcing-facts small{max-width:100%}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .qm-production-block{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .qm-inline-notes{border-left:0;padding-left:0}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .qm-cell-body{min-height:80px;display:flex;align-items:flex-start}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .qm-card-income .qm-cell-body{align-items:flex-end}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .qm-metric-value{font-size:clamp(24px,2.1vw,32px);font-variant-numeric:tabular-nums;line-height:1.3;overflow-wrap:anywhere}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .imported-order-context{margin:0;padding:0 16px;border-top:1px solid var(--hb-border)}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .imported-order-context>summary{min-height:44px;display:flex;align-items:center;color:var(--hb-muted);font-size:12px}
:is(#imported-purchases,#imported-payment-records) .procurement-quote-order .imported-purchase-body{background:transparent;padding:0 0 16px}
.standalone .procurement-edit-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;box-sizing:border-box;margin:0;color:var(--ui-muted)}
.standalone .procurement-edit-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.standalone .imported-payment-row-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end;min-width:0}
.standalone .imported-unlinked-supplier{display:grid;gap:4px;min-width:0}
.standalone .imported-payment-context{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,.65fr) minmax(0,.65fr) minmax(0,2fr);gap:16px;padding-top:12px;border-top:1px solid var(--ui-line);min-width:0}
.standalone .imported-payment-context>div{min-width:0}
.standalone .imported-payment-context span{font-size:12px;color:var(--ui-muted)}
.standalone .imported-payment-context p{font-size:14px;line-height:1.7;margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.standalone :is(.imported-payment-table-heading,.imported-payment-summary){grid-template-columns:minmax(0,1.65fr) minmax(130px,.65fr) minmax(0,.8fr) minmax(150px,.7fr) 72px}
@container quotation (max-width:800px){
 :is(#imported-purchases,#imported-payment-records) .quotation-project-primary{flex-wrap:wrap}
 :is(#imported-purchases,#imported-payment-records) .procurement-quote-tools{margin-left:auto}
}
@media(max-width:650px){
 :is(#imported-purchases,#imported-payment-records) .quotation-group-rows{padding:12px}
 :is(#imported-purchases,#imported-payment-records) .quotation-project-primary{gap:12px;padding:14px}
 :is(#imported-purchases,#imported-payment-records) .quotation-project-select{flex:0 0 56px;align-self:flex-start}
 :is(#imported-purchases,#imported-payment-records) .quotation-project-identity{flex:1 1 140px}
 :is(#imported-purchases,#imported-payment-records) .procurement-quote-tools{width:100%;grid-template-columns:minmax(0,1fr) 44px 44px}
 :is(#imported-purchases,#imported-payment-records) .quotation-outsourcing-facts{flex:1 1 100%;max-width:100%}
 :is(#imported-purchases,#imported-payment-records) .quotation-project-metadata{grid-template-columns:minmax(0,1fr)}
 :is(#imported-purchases,#imported-payment-records) .quotation-project-metadata .quotation-production-date{flex:1 1 100%;min-width:0}
 :is(#imported-purchases,#imported-payment-records) .procurement-quote-order .qm-cell-body{min-height:44px}
 :is(#imported-purchases,#imported-payment-records) .procurement-quote-order .qm-card-income .qm-cell-body{align-items:flex-start}
 :is(#imported-purchases,#imported-payment-records) .procurement-quote-tools>.quotation-project-toggle{grid-column:auto;grid-row:auto}
 .standalone .imported-payment-summary{grid-template-columns:minmax(0,1fr) 72px}
 .standalone .imported-payment-row-actions{grid-column:2;grid-row:1}
 .standalone .imported-payment-context{grid-row:5;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .standalone .imported-payment-context>div:last-child{grid-column:1/-1}
}

/* The same complete list supports both ordering modes. */
.standalone #imported-purchases{display:none!important}
.standalone:is([data-view=orders],[data-view=payments])[data-purchase-stat-source=source] #imported-payment-records{display:block}
.standalone:not([data-view=orders]):not([data-view=payments]) #imported-payment-records{display:none}
.standalone #procurement-task-navigation{display:none!important}
.standalone #imported-payment-records .purchase-review-workspace{grid-template-columns:minmax(280px,.9fr) minmax(0,1.3fr);align-items:start}
.standalone #imported-payment-records .purchase-selection-panel{display:flex;flex-direction:column;gap:10px;padding:16px}
.standalone #imported-payment-records .purchase-selection-actions{grid-column:1;grid-row:2}
.standalone #imported-payment-records .purchase-selection-metrics{border-top:1px solid var(--hb-border);padding:12px 0 0;min-width:0}
.standalone #imported-payment-records .purchase-selection-metrics strong{font-size:26px}
.standalone #imported-payment-records .purchase-selection-basis{grid-column:1/-1}
.standalone #imported-payment-records .purchase-search-region .imported-purchase-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-top:12px;align-items:start}
.standalone .purchase-list-primary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.standalone #imported-payment-records .purchase-list-primary>label{display:grid;gap:8px;min-width:0;margin:0;font-size:12px;color:var(--ui-muted)}
.standalone .purchase-list-filters{display:flex;flex-wrap:wrap;gap:12px;min-width:0;align-items:start}
.standalone .purchase-list-filters>.purchase-filter-field{flex:1 1 130px}
.standalone .purchase-filter-field{display:grid;gap:8px;min-width:0;font-size:12px;color:var(--ui-muted)}
.standalone .purchase-multi-filter{position:relative;min-width:0;margin:0;padding:0;border:0;background:transparent;overflow:visible}
.standalone .purchase-multi-filter>summary{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;margin:0;padding:10px 12px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);color:var(--ui-ink);font-size:13px;line-height:1.6;overflow-wrap:anywhere;cursor:pointer}
.standalone .purchase-multi-filter>summary::after{content:'⌄';flex-shrink:0}
.standalone .purchase-filter-options{position:fixed;z-index:50;max-width:calc(100vw - 24px);max-height:360px;overflow:auto;padding:8px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);box-shadow:0 12px 30px #0008}
.standalone .purchase-filter-options label{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;padding:4px 8px;line-height:1.6;color:var(--ui-ink);font-size:14px;cursor:pointer}
.standalone .purchase-filter-options input{width:18px;height:18px;min-height:0;flex-shrink:0;margin:0;accent-color:var(--ui-red)}
.standalone .purchase-filter-options span{overflow-wrap:anywhere}
.standalone .purchase-filter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 8px 8px;border-bottom:1px solid var(--ui-line);margin-bottom:4px}.standalone .purchase-filter-heading strong{color:var(--ui-ink);font-size:14px}.standalone .purchase-filter-options button{min-height:44px;margin:0;padding:6px 10px;width:auto;font-size:12px}
.standalone #imported-payment-records .imported-payment-state-tabs{display:none}
.standalone .purchase-timeline-year{padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);margin:16px 0;overflow:hidden}
.standalone .purchase-timeline-year>h3{margin:0;padding:18px 20px;background:var(--ui-soft);font-size:22px}
.standalone .purchase-timeline-code{padding:0 16px 16px}
.standalone .purchase-timeline-code>h4{margin:0;padding:16px 4px;font-size:17px}
.standalone .purchase-project-group{margin:0 0 16px;padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);overflow:hidden}
.standalone .purchase-project-group:nth-of-type(even){background:var(--ui-soft)}
.standalone .purchase-project-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;min-height:64px;padding:16px 20px;box-sizing:border-box;cursor:pointer;background:var(--ui-soft)}
.standalone .purchase-project-heading>strong:first-child{font-size:19px;flex:1;overflow-wrap:anywhere}
.standalone .purchase-project-heading>span{font-size:12px;color:var(--ui-muted)}
.standalone .purchase-project-heading .purchase-group-amount{font-size:16px;font-variant-numeric:tabular-nums}
.standalone .purchase-project-heading::before{content:'▸';color:var(--ui-muted)}
.standalone .purchase-project-group[open]>.purchase-project-heading::before{content:'▾'}
.standalone #imported-payment-records .purchase-select-label{justify-self:start}
@media(max-width:1100px){.standalone .purchase-list-primary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.standalone .purchase-list-primary{grid-template-columns:minmax(0,1fr)}.standalone #imported-payment-records .purchase-selection-panel{display:flex}.standalone #imported-payment-records .purchase-selection-metrics{min-width:0}.standalone .purchase-timeline-code{padding:0 8px 8px}.standalone .purchase-project-heading{padding:14px;gap:8px}.standalone .purchase-project-heading .purchase-group-amount{flex-basis:100%;font-size:14px}.standalone .purchase-project-heading>strong:first-child{font-size:17px}}

.standalone #imported-payment-records .imported-purchase-controls>[hidden]{display:none!important}


/* Unified procurement uses quotation cards and their inline-note interaction. */
#imported-payment-records{container-type:inline-size;container-name:purchase quotation}
#imported-payment-records .quotation-project-block{margin:16px;overflow:hidden}
#imported-payment-records .purchase-timeline-year>.quotation-project-block{margin:16px}
#imported-payment-records .purchase-year-heading{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 20px;box-sizing:border-box;background:var(--hb-subtle);cursor:pointer}
#imported-payment-records .purchase-year-heading strong{font-size:22px}
#imported-payment-records .purchase-year-heading small{margin-left:auto;color:var(--hb-muted);font-size:12px}
#imported-payment-records .purchase-year-heading::before{content:'▸';color:var(--hb-muted)}
#imported-payment-records .purchase-timeline-year[open]>.purchase-year-heading::before{content:'▾'}
#imported-payment-records .qm-note-body{justify-content:flex-start}
#imported-payment-records .qm-note-display:empty[role=button]::before{content:'＋ 添加备注';color:var(--hb-muted);font-size:13px}
#imported-payment-records .qm-note-display[hidden]{display:none!important}
#imported-payment-records .procurement-quote-order .qm-cell-body{min-height:44px}
@media(max-width:650px){#imported-payment-records .quotation-project-block,#imported-payment-records .purchase-timeline-year>.quotation-project-block{margin:10px}#imported-payment-records .purchase-year-heading{padding:12px;font-size:18px}#imported-payment-records .purchase-year-heading strong{font-size:20px}}

@container quotation (min-width:800px) and (max-width:1100px){
 #imported-payment-records .procurement-quote-order .qm-card-detail{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr)}
 #imported-payment-records .procurement-quote-order .qm-production-block{grid-template-columns:repeat(2,minmax(0,1fr))}
 #imported-payment-records .procurement-quote-order .qm-finance-block{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}

.standalone .purchase-filter-options[hidden]{display:none!important}

/* Compact purchase records share quotation controls and tokens, with one aligned fact grid. */
.standalone #imported-payment-records .purchase-compact-order{--hb-surface:var(--hb-project-alternate-surface);--hb-subtle:var(--hb-project-alternate-header);--hb-border:var(--hb-project-alternate-border);--ui-surface:var(--hb-surface);--ui-soft:var(--hb-subtle);--ui-line:var(--hb-border);margin:10px 12px;background:var(--hb-surface);border-color:var(--hb-border);color:var(--hb-text)}
.standalone #imported-payment-records .purchase-compact-order[data-stripe=light]{--hb-surface:color-mix(in srgb,var(--hb-project-alternate-surface) 86%,var(--hb-text));--hb-subtle:color-mix(in srgb,var(--hb-project-alternate-header) 82%,var(--hb-text));--hb-border:color-mix(in srgb,var(--hb-project-alternate-border) 70%,var(--hb-text));--hb-muted:color-mix(in srgb,var(--hb-text) 85%,var(--hb-project-alternate-header))}
/* Installment terms use warm gold; the complete card alternates with its visible neighbors. */
.standalone #imported-payment-records .purchase-compact-order[data-payment-method=installment]{--hb-surface:color-mix(in srgb,var(--hb-label-amber-bg) 35%,var(--hb-project-alternate-surface));--hb-subtle:color-mix(in srgb,var(--hb-label-amber-bg) 60%,var(--hb-project-alternate-header));--hb-border:color-mix(in srgb,var(--hb-label-amber-border) 60%,var(--hb-project-alternate-border));--hb-muted:color-mix(in srgb,var(--hb-label-amber-text) 70%,var(--hb-text))}
.standalone #imported-payment-records .purchase-compact-order[data-payment-method=installment][data-stripe=light]{--hb-surface:color-mix(in srgb,var(--hb-label-amber-bg) 85%,var(--hb-project-alternate-surface));--hb-subtle:color-mix(in srgb,var(--hb-label-amber-bg) 90%,var(--hb-text));--hb-border:var(--hb-label-amber-border)}
.standalone #imported-payment-records .purchase-compact-head{background:var(--hb-subtle)}
/* HANABI originals have an explicit brand identity, independent of payment terms. */
.standalone #imported-payment-records .purchase-compact-order[data-project-identity=hanabi-original][data-payment-method]{--hb-surface:color-mix(in srgb,var(--hb-brand) 30%,var(--hb-canvas));--hb-subtle:var(--hb-original-header);--hb-border:color-mix(in srgb,var(--hb-brand) 70%,var(--hb-project-alternate-border));--hb-muted:color-mix(in srgb,var(--hb-text) 75%,var(--hb-brand))}
.standalone #imported-payment-records .purchase-compact-order[data-project-identity=hanabi-original][data-stripe=light]{--hb-subtle:var(--hb-original-header-alternate);--hb-surface:color-mix(in srgb,var(--hb-brand) 30%,var(--hb-project-alternate-surface))}
.standalone #imported-payment-records .purchase-compact-order[data-project-identity=hanabi-original] .purchase-compact-head{--hb-text:var(--hb-on-brand);--hb-muted:var(--hb-on-brand);color:var(--hb-on-brand)}
.standalone #imported-payment-records .purchase-compact-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(112px,160px) auto;gap:12px;align-items:center;min-height:64px;padding:10px 14px;box-sizing:border-box}
.standalone #imported-payment-records .purchase-compact-order[data-selectable=true] .purchase-compact-head{grid-template-columns:52px minmax(0,1fr) minmax(112px,160px) auto}
.standalone #imported-payment-records .purchase-compact-head .quotation-project-identity{min-width:0;margin:0}
.standalone #imported-payment-records .purchase-compact-head .quotation-code{font-size:12px;line-height:1.4;margin:0 0 2px;color:var(--hb-muted)}
.standalone #imported-payment-records .purchase-compact-head .quotation-project-title{font-size:18px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.standalone #imported-payment-records .purchase-compact-head .purchase-select-label{font-size:12px;gap:4px;min-width:0;min-height:44px}
.standalone #imported-payment-records .purchase-compact-tools{display:grid;grid-template-columns:minmax(128px,144px) 44px 44px;align-items:center;gap:8px;min-width:0}
.standalone #imported-payment-records .purchase-compact-order[data-editable=false] .purchase-compact-tools{grid-template-columns:minmax(128px,144px) 44px}
.standalone #imported-payment-records .purchase-compact-tools .procurement-inline-payment{min-width:0;width:100%}
.standalone #imported-payment-records .purchase-compact-tools :is(button,select){margin:0;min-width:0}
.standalone #imported-payment-records .purchase-compact-tools select{width:100%;min-height:44px}
/* Saturated state fills remain independent of neutral, gold and brand-red card themes. */
.standalone #imported-payment-records .purchase-compact-tools .state-badge{box-sizing:border-box;min-height:44px;border:1px solid #a6b2c8;background:#d7dce6;color:#293344;font-weight:650}
.standalone #imported-payment-records .purchase-compact-tools .state-badge.amber{background:#f5c34b;color:#342200;border-color:#ffe095}
.standalone #imported-payment-records .purchase-compact-tools .state-badge.sage{background:#46dc94;color:#073b25;border-color:#91f1be}
.standalone #imported-payment-records .purchase-compact-tools .procurement-edit-icon{background:var(--hb-surface);color:var(--hb-text);border:1px solid var(--hb-border)}
.standalone #imported-payment-records .purchase-compact-order[data-project-identity=hanabi-original] .procurement-edit-icon{background:var(--hb-on-brand);color:var(--hb-brand);border-color:var(--hb-on-brand)}
.standalone #imported-payment-records .purchase-compact-tools :is(select.state-badge,.procurement-edit-icon):hover:not(:disabled){filter:brightness(1.06)}
.standalone #imported-payment-records .purchase-compact-amount{display:grid;gap:2px;text-align:right;min-width:0;font-variant-numeric:tabular-nums}
.standalone #imported-payment-records .purchase-compact-amount>span,.standalone #imported-payment-records .purchase-compact-amount>small{color:var(--hb-muted);font-size:12px;line-height:1.4}
.standalone #imported-payment-records .purchase-compact-amount>strong{font-size:24px;line-height:1.25;overflow-wrap:anywhere}
.standalone #imported-payment-records .purchase-compact-facts{display:grid;grid-template-columns:minmax(200px,2fr) minmax(0,1fr) minmax(0,.8fr) minmax(0,.9fr) minmax(0,1fr) minmax(0,.85fr);gap:12px;align-items:stretch;padding:10px 14px;border-top:1px solid var(--hb-border)}
.standalone #imported-payment-records .purchase-compact-fact{display:grid;align-content:start;gap:4px;min-width:0}
.standalone #imported-payment-records .purchase-compact-fact>span:first-child{font-size:12px;line-height:1.5;color:var(--hb-muted)}
.standalone #imported-payment-records .purchase-compact-fact>strong{font-size:14px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.standalone #imported-payment-records .purchase-compact-tools .procurement-quote-state .state-badge{display:flex;align-items:center;width:100%;padding-inline:10px}
.standalone #imported-payment-records .registered-purchase-note{display:flex;align-items:baseline;gap:12px;min-width:0;padding-block:9px}
.standalone #imported-payment-records .registered-purchase-note>small{flex:none;color:var(--hb-muted)}
.standalone #imported-payment-records .registered-purchase-note>span{overflow-wrap:anywhere;white-space:pre-wrap}
.standalone #imported-payment-records .purchase-source-label{align-self:center;padding-block:6px;color:var(--hb-muted);font-size:var(--hb-caption)}
.registered-purchase-editor{box-sizing:border-box;width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--ui-line);border-radius:var(--ui-radius,12px);background:var(--ui-surface,#191d26);color:var(--ui-ink);overflow:hidden}
.registered-purchase-editor::backdrop{background:#0009}
.registered-purchase-editor form{display:flex;flex-direction:column;max-height:calc(100dvh - 26px);margin:0}
.registered-purchase-editor .quotation-modal-head,.registered-purchase-editor .quotation-modal-actions{background:var(--ui-surface,#191d26);padding:16px 20px;flex:none}
.registered-purchase-editor .quotation-modal-head{border-bottom:1px solid var(--ui-line)}
.registered-purchase-editor .quotation-modal-actions{border-top:1px solid var(--ui-line);display:flex;gap:8px;justify-content:flex-end}
.registered-purchase-editor .quotation-modal-head>div{font-size:20px;font-weight:700}
.registered-purchase-editor .quotation-modal-head>small{color:var(--ui-muted);overflow-wrap:anywhere}
.registered-purchase-fields,.registered-purchase-period{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.registered-purchase-fields{padding:16px 20px;min-height:0;overflow:auto;align-items:start}
.registered-purchase-fields label{display:grid;gap:4px;min-width:0;color:var(--ui-muted)}
.registered-purchase-fields :is(input,select,textarea){width:100%;min-width:0;min-height:44px;box-sizing:border-box;margin:0}
.registered-purchase-fields label[hidden]{display:none}
.registered-purchase-fields label:has(textarea),.registered-purchase-terms{grid-column:1/-1}
.registered-purchase-terms{display:grid;gap:10px;padding-top:12px;border-top:1px solid var(--ui-line)}
.registered-purchase-terms h3{margin:0;font-size:16px}
.registered-purchase-periods:empty{display:none}
.registered-purchase-periods{display:grid;gap:10px}
.registered-purchase-period-split{grid-template-columns:repeat(3,minmax(0,1fr));padding:10px;background:var(--ui-soft);border-radius:var(--ui-radius,10px)}
.registered-purchase-invoice{display:grid;gap:6px;justify-items:start}
.registered-purchase-invoice label{width:100%}
.registered-purchase-editor [role=status]{margin:0;padding-inline:16px}
.registered-purchase-editor [role=status]:empty{display:none}
@media(max-width:520px){
 .registered-purchase-fields,.registered-purchase-period{grid-template-columns:minmax(0,1fr)}
 .registered-purchase-fields{padding:12px 16px}
}
.standalone #imported-payment-records .purchase-compact-supplier .imported-purchase-supplier{display:inline-flex;justify-self:start;gap:4px;max-width:min(100%,320px);min-height:44px;box-sizing:border-box;padding:6px 10px;border:1px solid var(--hb-label-green-border);border-radius:var(--hb-radius);background:var(--hb-label-green-bg);color:var(--hb-label-green-text);font-size:18px;line-height:1.5;font-weight:650;white-space:normal;overflow-wrap:anywhere}
.standalone #imported-payment-records .purchase-compact-supplier :is(small,.imported-purchase-supplier-pending){font-size:12px;line-height:1.4}
.standalone #imported-payment-records .purchase-compact-support{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 16px;align-items:start;padding:0 14px;border-top:1px solid var(--hb-border)}
.standalone #imported-payment-records .purchase-compact-support>.qm-inline-notes{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px;align-items:start;padding:0;border:0;min-width:0}
.standalone #imported-payment-records .purchase-compact-support>.qm-inline-notes>.qm-caption{padding-top:12px;font-size:12px;color:var(--hb-muted)}
.standalone #imported-payment-records .purchase-compact-support .qm-note-body{padding:6px 0;min-width:0;justify-content:flex-start;box-sizing:border-box}
.standalone #imported-payment-records .purchase-compact-support .qm-note-display{min-height:32px;padding:6px 0;box-sizing:border-box;font-size:14px;line-height:1.5}
.standalone #imported-payment-records .purchase-compact-source{margin:0;padding:0;border:0;min-width:0;background:transparent}
.standalone #imported-payment-records .purchase-compact-source>summary{display:flex;align-items:center;min-height:44px;font-size:12px;color:var(--hb-muted);cursor:pointer}
.standalone #imported-payment-records .purchase-compact-source[open]{grid-column:1/-1}
.standalone #imported-payment-records .purchase-compact-source .imported-purchase-body{padding:0 0 12px}
@container quotation (max-width:900px){.standalone #imported-payment-records .purchase-compact-facts{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){
 .standalone #imported-payment-records .purchase-compact-order{margin:8px}
 .standalone #imported-payment-records .purchase-compact-head,.standalone #imported-payment-records .purchase-compact-order[data-selectable=true] .purchase-compact-head{grid-template-columns:44px minmax(0,1fr);gap:8px;padding:10px 12px}
 .standalone #imported-payment-records .purchase-compact-head .quotation-project-identity{grid-column:2;grid-row:1}
 .standalone #imported-payment-records .purchase-compact-head .quotation-project-title{font-size:16px}
 .standalone #imported-payment-records .purchase-compact-order[data-selectable=false] .quotation-project-identity{grid-column:1/-1}
 .standalone #imported-payment-records .purchase-compact-head .purchase-select-label{grid-column:1;grid-row:1;flex-direction:column;gap:2px;align-self:center}
 .standalone #imported-payment-records .purchase-compact-amount{grid-column:1/-1;text-align:left;display:flex;align-items:baseline;gap:8px}
 .standalone #imported-payment-records .purchase-compact-amount>strong{font-size:22px}
 .standalone #imported-payment-records .purchase-compact-tools{grid-column:1/-1;grid-template-columns:minmax(0,1fr) 44px 44px;width:100%}
 .standalone #imported-payment-records .purchase-compact-order[data-editable=false] .purchase-compact-tools{grid-template-columns:minmax(0,1fr) 44px}
 .standalone #imported-payment-records .purchase-compact-facts{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 12px;gap:10px 12px}
 .standalone #imported-payment-records .purchase-compact-supplier{grid-column:1/-1}
 .standalone #imported-payment-records .purchase-compact-support{grid-template-columns:minmax(0,1fr);padding:0 12px}
 .standalone #imported-payment-records .purchase-compact-support>.qm-inline-notes{grid-template-columns:minmax(0,1fr);gap:0}
 .standalone #imported-payment-records .purchase-compact-support>.qm-inline-notes>.qm-caption{padding-top:10px}
 .standalone #imported-payment-records .purchase-compact-support .qm-note-display{min-height:44px}
 .standalone #imported-payment-records .purchase-compact-source{border-top:1px solid var(--hb-border)}
}
.standalone #imported-payment-records .purchase-compact-supplier .procurement-personal-supplier,.standalone #imported-purchases .procurement-personal-supplier{background:var(--hb-label-blue-bg);color:var(--hb-label-blue-text);border-color:var(--hb-label-blue-border)}
.standalone #imported-payment-records .purchase-compact-order.purchase-navigation-target{border-color:var(--hb-brand);box-shadow:0 0 0 2px var(--hb-brand)}
.standalone #imported-payment-records .purchase-navigation-active{overflow-anchor:none}.standalone #imported-payment-records .purchase-navigation-active .quotation-project-block{content-visibility:visible;contain-intrinsic-block-size:none}
.standalone #imported-payment-records .purchase-compact-amount .purchase-confirmed-balance{display:block;font-size:14px;font-weight:650;color:var(--hb-text)}

/* Search, stat drilldown and totals form one task panel. */
.standalone #imported-payment-records .purchase-selection-panel>.purchase-search-region{grid-column:1/-1;padding:14px 0 0;border:0;border-top:1px solid var(--hb-border);border-radius:0;background:transparent}
.standalone #imported-payment-records .purchase-search-region h3{font-size:14px;margin:0}
.standalone #imported-payment-records .purchase-active-filter{min-height:44px;margin:4px 0 0 12px;white-space:normal}
.standalone .purchase-period-value[aria-pressed=true]{border-color:var(--hb-brand);box-shadow:inset 0 0 0 1px var(--hb-brand);background:var(--hb-subtle)}

@container purchase (max-width:800px){.standalone #imported-payment-records .purchase-review-workspace{grid-template-columns:minmax(0,1fr)}}


:is(#work-source-followups,#layout-work-detail){
  --hpr-preview-ink:var(--hb-muted,light-dark(#526177,#acb8ca));
  --hpr-page-ink:var(--hb-text,light-dark(#1c2635,#eef2f8));
  --hpr-radius:var(--hb-radius,8px);
  color:var(--hpr-page-ink);color-scheme:light dark;
  font:400 var(--hb-body,14px)/1.55 var(--hb-font,"Segoe UI","Microsoft YaHei",system-ui,sans-serif);
}
:is(#work-source-followups,#layout-work-detail) *{box-sizing:border-box;min-width:0}
:is(#work-source-followups,#layout-work-detail) [hidden]{display:none!important}
:is(#work-source-followups,#layout-work-detail) .hpr-page-heading{margin-bottom:24px}
:is(#work-source-followups,#layout-work-detail) .hpr-page-heading h2{margin:0;font-size:var(--hb-page-title,24px);line-height:1.4;font-weight:600}
:is(#work-source-followups,#layout-work-detail) .hpr-preview-note{margin:8px 0 0;color:var(--hpr-preview-ink);font-size:14px}
:is(#work-source-followups,#layout-work-detail) .hpr-stage{display:flex;justify-content:center;align-items:flex-start;min-height:640px;padding:24px 0}
:is(#work-source-followups,#layout-work-detail) .hpr-dialog{
  --hpr-bg:light-dark(#c62d40,#942039);
  --hpr-ink:light-dark(#fff7f8,#fff7f8);
  --hpr-muted:light-dark(#ffe9ed,#ffe9ed);
  --hpr-line:light-dark(#ffffff4d,#ffffff4d);
  --hpr-field:var(--hb-surface,light-dark(#ffffff,#191f28));
  --hpr-field-ink:var(--hb-text,light-dark(#1c2635,#eef2f8));
  --hpr-field-muted:var(--hb-muted,light-dark(#526177,#acb8ca));
  --hpr-field-line:var(--hb-border,light-dark(#d7dee8,#344153));
  --hpr-primary:light-dark(#fff4f6,#fff4f6);
  --hpr-primary-ink:light-dark(#731125,#731125);
  --hpr-soft:light-dark(#ffffff1a,#ffffff1a);
  --hpr-tone:var(--hpr-ink);
  width:100%;max-width:560px;padding:24px;
  background:var(--hpr-bg);color:var(--hpr-ink);
  border:1px solid var(--hpr-line);border-radius:var(--hpr-radius);
  overflow-wrap:anywhere;
}
:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="overdue"]{--hpr-bg:light-dark(#941b2b,#6f1325);--hpr-tone:light-dark(#a5213a,#ff3b61)}
:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="today"],:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="partial"]{--hpr-bg:light-dark(#b42535,#861d30);--hpr-tone:light-dark(#a52d40,#ff6678)}
:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="tomorrow"]{--hpr-bg:light-dark(#94401c,#693015);--hpr-tone:light-dark(#8b4d06,#ff9553);--hpr-muted:#ffe4d5;--hpr-primary:#fff4e8;--hpr-primary-ink:#62270f}
:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="soon"]{--hpr-bg:light-dark(#efbf43,#bea034);--hpr-tone:light-dark(#765000,#ffe927);--hpr-ink:light-dark(#322607,#322607);--hpr-muted:light-dark(#49380d,#3b2d06);--hpr-line:light-dark(#624c164d,#56401066);--hpr-primary:light-dark(#382908,#302307);--hpr-primary-ink:light-dark(#fff7dd,#fff7dd);--hpr-soft:light-dark(#ffffff2b,#ffffff25)}
:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="later"],:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="settled"]{--hpr-bg:light-dark(#166447,#164835);--hpr-ink:light-dark(#f1fff7,#f1fff7);--hpr-muted:light-dark(#ddf8e8,#ddf8e8);--hpr-primary:light-dark(#effff5,#effff5);--hpr-primary-ink:light-dark(#174630,#174630)}
:is(#work-source-followups,#layout-work-detail) .hpr-dialog[data-tone="unknown"]{--hpr-bg:light-dark(#5b3d91,#412a66);--hpr-tone:light-dark(#694393,#cdb1ff);--hpr-ink:light-dark(#fcf8ff,#fcf8ff);--hpr-muted:light-dark(#efe5ff,#efe5ff);--hpr-primary:light-dark(#f8efff,#f8efff);--hpr-primary-ink:light-dark(#43226b,#43226b)}
:is(#work-source-followups,#layout-work-detail) .hpr-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;margin-bottom:24px}
:is(#work-source-followups,#layout-work-detail) .hpr-app{color:var(--hpr-ink);font-weight:600}
:is(#work-source-followups,#layout-work-detail) .hpr-app-detail{color:var(--hpr-muted);font-size:12px;font-weight:400}
:is(#work-source-followups,#layout-work-detail) .hpr-status{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid var(--hpr-line);border-radius:var(--hpr-radius);background:transparent;color:var(--hpr-ink);font-size:12px;font-weight:500}
:is(#work-source-followups,#layout-work-detail) .hpr-status-dot{flex:none;width:4px;height:4px;border-radius:50%;background:currentColor}
:is(#work-source-followups,#layout-work-detail) .hpr-tone-line{display:flex;align-items:flex-start;gap:8px;margin:0 0 24px;color:var(--hpr-ink);font-size:24px;line-height:1.4;font-weight:600}
:is(#work-source-followups,#layout-work-detail) .hpr-tone-line .hpr-message{text-wrap:balance}
:is(#work-source-followups,#layout-work-detail) .hpr-tone-line .hpr-phrase{display:inline-block;white-space:nowrap}
:is(#work-source-followups,#layout-work-detail) .hpr-tone-line i,:is(#work-source-followups,#layout-work-detail) .hpr-tone-line svg{flex:none;width:24px;height:24px;margin-top:4px}
:is(#work-source-followups,#layout-work-detail) .hpr-amount-label{margin:0 0 4px;color:var(--hpr-muted);font-size:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-amount{display:flex;align-items:baseline;gap:8px;margin:0 0 24px;color:var(--hpr-ink);font-size:32px;line-height:1.25;font-weight:600;font-variant-numeric:tabular-nums}
:is(#work-source-followups,#layout-work-detail) .hpr-amount span{font-size:16px;font-weight:500}
:is(#work-source-followups,#layout-work-detail) .hpr-amount.hpr-amount-unknown{font-size:24px;line-height:1.4}
:is(#work-source-followups,#layout-work-detail) .hpr-project,:is(#work-source-followups,#layout-work-detail) .hpr-header-title{margin:0 0 4px;font-size:16px;line-height:1.5;font-weight:600}
:is(#work-source-followups,#layout-work-detail) .hpr-project{display:flex;align-items:baseline;gap:8px}
:is(#work-source-followups,#layout-work-detail) .hpr-code{flex:none;padding:4px 8px;border:1px solid var(--hpr-line);border-radius:var(--hpr-radius);font-size:12px;font-weight:600}
:is(#work-source-followups,#layout-work-detail) .hpr-supplier{margin:0 0 16px;color:var(--hpr-muted)}
:is(#work-source-followups,#layout-work-detail) .hpr-facts{margin:0;padding-top:8px;border-top:1px solid var(--hpr-line)}
:is(#work-source-followups,#layout-work-detail) .hpr-facts>div{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:8px 0}
:is(#work-source-followups,#layout-work-detail) .hpr-facts dt{flex:none;color:var(--hpr-muted);font-weight:400}
:is(#work-source-followups,#layout-work-detail) .hpr-facts dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder{max-width:none;padding:14px}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder[data-tone="later"]{--hpr-bg:var(--ui-soft);--hpr-ink:var(--ui-ink);--hpr-muted:var(--ui-muted);--hpr-line:var(--ui-line);--hpr-primary:var(--ui-ink);--hpr-primary-ink:var(--ui-surface)}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-head{margin:0 0 10px}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-status{background:var(--hpr-soft);font-weight:700}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder:is([data-tone="overdue"],[data-tone="today"],[data-tone="tomorrow"],[data-tone="soon"],[data-tone="unknown"]) .hpr-status{background:var(--hpr-tone);border-color:var(--hpr-tone);color:light-dark(#fff,#1a1014)}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-project{flex-wrap:wrap;gap:2px 8px;margin:0 0 2px;font-size:18px;line-height:1.35}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-code{border:0;padding:0;color:var(--hpr-muted)}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-supplier{margin:0 0 16px;font-size:12px}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-amount{display:block;margin:0 0 10px;font-weight:700}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-warning-title{margin:0 0 12px;color:var(--hpr-muted);font-size:12px;line-height:1.5}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-facts{padding-top:4px;font-size:12px}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-facts>div{padding:5px 0}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-facts>div:first-child dd{font-weight:700}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-mini-amounts{margin:0 0 10px;padding:0;border:0}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-review{margin-top:8px;border-top:1px solid var(--hpr-line)}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-review summary{min-height:44px;padding-block:12px;cursor:pointer;font-size:12px}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-review ul{padding-inline-start:18px;margin:0;font-size:12px}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-review p{margin:3px 0 8px;color:var(--hpr-muted)}
:is(#work-source-followups,#layout-work-detail) .work-source-reminder .hpr-actions{margin-top:8px}
:is(#work-source-followups,#layout-work-detail) .hpr-mini-amounts{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:16px;padding-top:16px;border-top:1px solid var(--hpr-line);color:var(--hpr-muted);font-size:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-mini-amounts strong{color:var(--hpr-ink);font-weight:500;font-variant-numeric:tabular-nums}
:is(#work-source-followups,#layout-work-detail) .hpr-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
:is(#work-source-followups,#layout-work-detail) .hpr-action{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:40px;padding:8px 12px;border:1px solid var(--hpr-line);border-radius:var(--hpr-radius);background:transparent;color:var(--hpr-ink);font:inherit;font-weight:500}
:is(#work-source-followups,#layout-work-detail) .hpr-action-primary{border-color:var(--hpr-primary);background:var(--hpr-primary);color:var(--hpr-primary-ink)}
:is(#work-source-followups,#layout-work-detail) .hpr-actions-support{gap:0 12px;margin-top:12px;align-items:center}
:is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action{flex:0 1 auto;justify-content:flex-start;gap:6px;min-height:44px;padding:4px 2px;border:0;background:transparent;color:var(--hpr-muted);font-size:12px;line-height:1.35;text-align:start;cursor:pointer;transition:color 140ms ease-out}
:is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action::after{content:"";flex:none;width:5px;height:5px;margin-inline-end:3px;border-block-start:1px solid currentColor;border-inline-end:1px solid currentColor;transform:rotate(45deg);transition:transform 140ms ease-out}
:is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action:focus-visible{outline:2px solid var(--hpr-ink);outline-offset:1px;color:var(--hpr-ink)}
:is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action:active{color:var(--hpr-ink);text-decoration:underline;text-underline-offset:3px}
:is(#work-source-followups,#layout-work-detail) .hpr-actions-support + .hpr-payment-controls{margin-top:4px}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls{display:grid;gap:8px;margin-top:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-decision{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:8px}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls [hidden]{display:none}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-action{min-width:0;min-height:44px;padding-inline:8px;line-height:1.3;text-align:center;cursor:pointer;transition:background-color 160ms ease-out,border-color 160ms ease-out,box-shadow 160ms ease-out,transform 120ms ease-out}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-confirm-paid{font-weight:700}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-reject-payment{background:var(--hpr-soft)}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-payment-recovery{justify-self:start}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-action:focus-visible{outline:2px solid var(--hpr-ink);outline-offset:2px}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-action:enabled:active{transform:scale(.975)}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-action:disabled{opacity:.72;cursor:default}
:is(#work-source-followups,#layout-work-detail) .hpr-confirm-paid[aria-busy="true"]::before{content:"";flex:none;width:.9em;height:.9em;border:2px solid currentColor;border-inline-end-color:transparent;border-radius:50%;animation:hpr-payment-spin 700ms linear infinite}
:is(#work-source-followups,#layout-work-detail) .hpr-payment-feedback:empty{margin:0}
@keyframes hpr-payment-spin{to{transform:rotate(1turn)}}
@media(hover:hover){
 :is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action:hover{color:var(--hpr-ink);text-decoration:underline;text-underline-offset:3px}
 :is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action:hover::after{transform:translateX(2px) rotate(45deg)}
 :is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-confirm-paid:enabled:hover{background:color-mix(in srgb,var(--hpr-primary) 91%,var(--hpr-primary-ink));box-shadow:0 2px 8px #0002}
 :is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-action:not(.hpr-confirm-paid):enabled:hover{background:color-mix(in srgb,var(--hpr-soft) 86%,var(--hpr-ink));border-color:var(--hpr-muted)}
}
@media(prefers-reduced-motion:reduce){
 :is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action,:is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action::after{transition:none}
 :is(#work-source-followups,#layout-work-detail) .hpr-actions-support .hpr-action:hover::after{transform:rotate(45deg)}
 :is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-action{transition:none}
 :is(#work-source-followups,#layout-work-detail) .hpr-payment-controls .hpr-action:enabled:active{transform:none}
 :is(#work-source-followups,#layout-work-detail) .hpr-confirm-paid[aria-busy="true"]::before{animation:none}
}
:is(#work-source-followups,#layout-work-detail) .hpr-small-note{margin:12px 0 0;color:var(--hpr-muted);font-size:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-close-note{margin:0;color:var(--hpr-muted);text-align:center;font-size:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-back{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 0;border:0;border-radius:var(--hpr-radius);background:transparent;color:var(--hpr-muted);font:inherit;font-weight:500}
:is(#work-source-followups,#layout-work-detail) .hpr-back i,:is(#work-source-followups,#layout-work-detail) .hpr-back svg{width:16px;height:16px}
:is(#work-source-followups,#layout-work-detail) .hpr-form{display:grid;gap:16px}
:is(#work-source-followups,#layout-work-detail) .hpr-field-label{display:block;margin-bottom:8px;color:var(--hpr-muted);font-size:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-field-input{width:100%;height:40px;min-height:40px;padding:8px 12px;border:1px solid var(--hpr-field-line);border-radius:var(--hpr-radius);background:var(--hpr-field);color:var(--hpr-field-ink);font:inherit;font-size:16px}
:is(#work-source-followups,#layout-work-detail) .hpr-field-input::placeholder{color:var(--hpr-field-muted);opacity:1}
:is(#work-source-followups,#layout-work-detail) .hpr-field-input[type="file"]{padding:4px 8px;font-size:16px}
:is(#work-source-followups,#layout-work-detail) .hpr-field-input[type="file"]::file-selector-button{height:24px;margin-right:8px;padding:0 8px;border:0;border-radius:var(--hpr-radius);background:var(--hpr-primary);color:var(--hpr-primary-ink);font:inherit}
:is(#work-source-followups,#layout-work-detail) .hpr-form-summary{margin:0 0 16px;padding-bottom:16px;border-bottom:1px solid var(--hpr-line);color:var(--hpr-muted)}
:is(#work-source-followups,#layout-work-detail) .hpr-form-summary p{margin:0}
:is(#work-source-followups,#layout-work-detail) .hpr-form-summary .hpr-amount-label{margin-bottom:4px}
:is(#work-source-followups,#layout-work-detail) .hpr-form-amount{color:var(--hpr-ink);font-size:24px;line-height:1.4;font-weight:600;font-variant-numeric:tabular-nums}
:is(#work-source-followups,#layout-work-detail) .hpr-form-summary .hpr-form-caption{margin-top:8px;font-size:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-form-summary .hpr-mini-amounts{margin-top:12px;padding-top:12px}
:is(#work-source-followups,#layout-work-detail) .hpr-error{margin:0;padding:12px;border-radius:var(--hpr-radius);background:light-dark(#fff2d6,#382904);color:light-dark(#573600,#fff0c4);font-size:12px;font-weight:500}
:is(#work-source-followups,#layout-work-detail) .hpr-saved{margin-bottom:16px;padding:12px;border:1px solid var(--hpr-line);border-radius:var(--hpr-radius);background:var(--hpr-soft);color:var(--hpr-ink);font-weight:500}
@media(max-width:700px){
  :is(#work-source-followups,#layout-work-detail) .hpr-stage{min-height:720px;padding:16px 0}
  :is(#work-source-followups,#layout-work-detail) .hpr-dialog{padding:16px}
  :is(#work-source-followups,#layout-work-detail) .hpr-app-detail{display:none}
  :is(#work-source-followups,#layout-work-detail) .hpr-action,:is(#work-source-followups,#layout-work-detail) .hpr-back,:is(#work-source-followups,#layout-work-detail) .hpr-field-input{min-height:44px}
  :is(#work-source-followups,#layout-work-detail) .hpr-field-input{height:44px}
  :is(#work-source-followups,#layout-work-detail) .hpr-action{padding:8px}
}
@media(pointer:coarse){:is(#work-source-followups,#layout-work-detail) .hpr-action,:is(#work-source-followups,#layout-work-detail) .hpr-back,:is(#work-source-followups,#layout-work-detail) .hpr-field-input{min-height:44px}:is(#work-source-followups,#layout-work-detail) .hpr-field-input{height:44px}}
@media(max-width:360px){:is(#work-source-followups,#layout-work-detail) .hpr-tone-line>i,:is(#work-source-followups,#layout-work-detail) .hpr-tone-line>svg{display:none}}

#app-navigation .work-reminder-badge[data-tone="overdue"],.layout-work-reminder[data-tone="overdue"]{--hpr-tone:light-dark(#a5213a,#ff3b61)}
#app-navigation .work-reminder-badge[data-tone="today"],.layout-work-reminder[data-tone="today"],#app-navigation .work-reminder-badge[data-tone="partial"],.layout-work-reminder[data-tone="partial"]{--hpr-tone:light-dark(#a52d40,#ff6678)}
#app-navigation .work-reminder-badge[data-tone="tomorrow"],.layout-work-reminder[data-tone="tomorrow"]{--hpr-tone:light-dark(#8b4d06,#ff9553)}
#app-navigation .work-reminder-badge[data-tone="soon"],.layout-work-reminder[data-tone="soon"]{--hpr-tone:light-dark(#765000,#ffe927)}
#app-navigation .work-reminder-badge[data-tone="unknown"],.layout-work-reminder[data-tone="unknown"]{--hpr-tone:light-dark(#694393,#cdb1ff)}
#work-source-followups{color-scheme:dark} #work-source-followups .hpr-action{min-height:44px;margin:0}
/* Mobile shell layout. Business state, palettes and permissions stay with their owners. */
.standalone .mobile-procurement-entry,.standalone .mobile-procurement-sections{display:none}
.standalone .mobile-account-menu,.standalone .mobile-header-shortcuts{display:none}
@media(max-width:650px){
 .standalone #app-navigation>button:is([data-view=orders],[data-view=suppliers]),.standalone #app-navigation button:is([data-view=cash],[data-view=archive],[data-view=calendar],[data-view=admin]){display:none!important}
 .standalone .app-topbar{position:relative;flex-wrap:nowrap}
 .standalone #app-account{justify-content:flex-start}
 .standalone .mobile-account-menu{display:block;min-width:0}
 .standalone .mobile-account-menu>summary{display:flex;align-items:center;gap:8px;min-height:44px;list-style:none;font-size:12px;line-height:1.5;color:var(--ui-muted);cursor:pointer;overflow-wrap:anywhere}
 .standalone .mobile-account-menu>summary::-webkit-details-marker{display:none}
 .standalone .mobile-account-menu>summary::after{content:'';width:6px;height:6px;flex:none;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);margin-top:-4px}
 .standalone .mobile-account-actions{position:absolute;top:calc(100% + 6px);left:0;right:0;padding:12px;z-index:40;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-surface);box-shadow:0 8px 24px #0003}
 .standalone .mobile-account-menu:not([open])>.mobile-account-actions{display:none}
 .standalone .mobile-account-actions #member-status{margin:0 0 12px}
 .standalone #app-mobile-shortcuts{display:flex;align-items:center;gap:4px;flex:none}
 .standalone #app-mobile-shortcuts button{display:flex;align-items:center;justify-content:center;min-width:44px;width:44px;min-height:44px;margin:0;padding:10px;border:0;background:transparent;color:var(--ui-muted)}
 .standalone #app-mobile-shortcuts button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .standalone #app-mobile-shortcuts button[aria-current=page]{background:var(--ui-red-soft);color:var(--ui-red)}
 .standalone .mobile-account-menu[hidden],.standalone #app-mobile-shortcuts[hidden],.standalone #app-mobile-shortcuts button[hidden]{display:none}
 .standalone #app-navigation>.mobile-procurement-entry{display:flex}
 .standalone #app-navigation>.app-navigation-more{display:none!important}
 .standalone .holiday-panel-footer{bottom:calc(var(--mobile-navigation-height,116px) + 12px)}
 .standalone .mobile-procurement-sections{display:flex;gap:4px;padding:4px;margin:0 0 18px;border:1px solid var(--ui-line);border-radius:var(--ui-radius,8px);background:var(--ui-soft)}
 .standalone .mobile-procurement-sections button{flex:1;min-width:0;min-height:44px;margin:0;padding:9px 12px;border:0;background:transparent;color:var(--ui-muted);font-size:14px;line-height:1.5}
 .standalone .mobile-procurement-sections button[aria-current=page]{background:var(--ui-surface);color:var(--ui-ink);font-weight:650}
 .standalone .mobile-procurement-sections[hidden],.standalone #app-navigation>.mobile-procurement-entry[hidden]{display:none}
 .standalone #app-back-to-top{right:max(14px,env(safe-area-inset-right));bottom:calc(180px + env(safe-area-inset-bottom))}
 .standalone[data-authenticated=true] main{padding-bottom:calc(var(--mobile-navigation-height,116px) + 20px)!important}
 .standalone .app-topbar{padding-bottom:10px;border-bottom:1px solid var(--ui-line)}
 .standalone #app-account p{font-size:12px;line-height:1.5;color:var(--ui-muted)}
 .standalone .app-page-heading{gap:12px;margin:20px 0;align-items:center}
 .standalone .app-page-heading>div{flex:1 1 0;min-width:0}
 .standalone .app-page-heading h1{font-size:24px;line-height:1.35;letter-spacing:-.02em}
 .standalone .app-page-heading .lead{font-size:12px;line-height:1.65;max-width:32em;margin-top:6px}
 .standalone .app-page-heading>button:not(.app-mobile-back){width:auto;max-width:100%;min-height:44px;padding:10px 12px;font-size:12px}
 body.standalone[data-view=suppliers] .app-page-heading{margin:16px 0;flex-wrap:nowrap}
 body.standalone[data-view=suppliers] .app-page-heading .lead{display:none}
 body.standalone[data-view=suppliers] .app-page-heading>#supplier-library-add.business-create-button{flex-basis:auto;width:auto;padding:9px 12px;font-size:12px;min-height:44px}
 .standalone #supplier-library .supplier-search-controls label:has(#supplier-library-search){font-size:0;gap:0}
 .standalone #app-navigation{display:grid;grid-template-columns:repeat(var(--mobile-nav-columns,3),minmax(0,1fr));height:auto;min-height:60px;box-sizing:border-box;gap:4px;padding:5px max(8px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:var(--ui-surface);border-top:1px solid var(--ui-line)}
 .standalone #app-navigation>button,.standalone .app-navigation-more>summary{min-height:50px;padding:5px 2px;gap:4px;line-height:1.2;font-size:11px;border-radius:var(--ui-radius,8px)}
 .standalone #app-navigation>button svg,.standalone .app-navigation-more>summary svg{width:22px;height:22px;flex:none}
 .standalone #app-navigation>button[aria-current=page]{font-weight:700;background:var(--ui-red-soft)}
 .standalone :is(#procurement-overview-search,.supplier-search-controls,.quotation-toolbar){margin-bottom:16px}
 .standalone .supplier-search-controls{gap:10px}
 .standalone .supplier-search-controls:not(:has(select)){grid-template-columns:minmax(0,1fr)}
 .standalone .mobile-sort-control{margin:-6px 0 8px;font-size:12px;color:var(--ui-muted)}
 .standalone .mobile-sort-control>summary{display:flex;align-items:center;min-height:44px;cursor:pointer;line-height:1.5}
 .standalone .mobile-sort-control>summary::after{content:'';width:6px;height:6px;margin:0 4px 3px auto;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
 .standalone .mobile-sort-control>label{display:grid;gap:6px;margin:4px 0 12px}
 /* Align two supporting tools on one row when supplier management is available. */
 .standalone[data-view=suppliers]:not([data-supplier-panel=evaluations]) #supplier-library:has(.supplier-group-tools>button:not([hidden])):has(.supplier-group-tools>.index-hint:empty){display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px}
 .standalone #supplier-library> *{min-width:0;grid-column:1/-1}
 .standalone[data-view=suppliers]:not([data-supplier-panel=evaluations]) #supplier-library:has(.supplier-group-tools>button:not([hidden])):has(.supplier-group-tools>.index-hint:empty)>.mobile-sort-control{grid-column:1;margin:0;align-self:center}
 .standalone[data-view=suppliers]:not([data-supplier-panel=evaluations]) #supplier-library:has(.supplier-group-tools>button:not([hidden])):has(.supplier-group-tools>.index-hint:empty)>.supplier-group-tools{grid-column:2;margin:0;align-self:center}
 /* The search field already shows the query; keep one explicit clear action. */
 .standalone .supplier-active-filters button[data-clear-filter=supplier-library-search]{font-size:0}
 .standalone .supplier-active-filters button[data-clear-filter=supplier-library-search]::after{content:'清除搜索 ×';font-size:12px}
 .standalone .supplier-active-filters:has(>[data-clear-filter=supplier-library-search]):not(:has(>[data-clear-filter]:not([data-clear-filter=supplier-library-search])))>[data-clear-all]{display:none}
 .standalone :is(#supplier-library-search,#order-search,#quotation-search){min-height:48px}
 .standalone .supplier-library-card{padding:16px;margin-bottom:12px}
 .standalone .supplier-card-head{gap:12px;align-items:flex-start}
 .standalone .supplier-card-identity{min-width:0;flex:1}
 .standalone .supplier-card-head h3{font-size:18px;line-height:1.5;overflow-wrap:anywhere}
 .standalone .supplier-cooperation-summary{font-size:12px;line-height:1.5;color:var(--ui-muted)}
 .standalone .supplier-card-footer{gap:10px;flex-wrap:wrap}
 .standalone .supplier-card-footer>.supplier-main-action{flex:1;min-height:44px;font-size:14px}
 .standalone .bank-info-row{min-width:0;column-gap:10px}
 .standalone .bank-info-value{overflow-wrap:anywhere;min-width:0}
 /* A one-page result needs a count and page-size control, not disabled paging rows. */
 .standalone .list-pagination:has([data-page-jump]>option:only-child) .list-pagination-controls{display:none}
 .standalone .list-pagination[data-pagination-position=bottom]:has([data-page-jump]>option:only-child){display:none}
 .standalone .list-pagination{margin-block:10px;padding-block:10px}
 .standalone .work-overview-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .standalone .work-overview-stat:first-child{grid-column:1/-1}
 .standalone .work-overview-stat:first-child>strong{font-size:32px}
 .standalone .work-task-summary h3,.standalone .work-task-summary h4{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
 .standalone .work-task-bottom{flex-wrap:wrap;gap:12px}
 .standalone .work-task-bottom>div{max-width:100%;flex:1 1 160px}
 .standalone .work-task-bottom p{font-size:12px;line-height:1.6}
 .standalone .procurement-form-section{padding-block:20px}
 .standalone .procurement-section-fields{gap:18px}
 .standalone #procurement-draft-form label{font-size:13px;line-height:1.6}
 .standalone #procurement-draft-form textarea{min-height:96px}
 .standalone[data-mobile-keyboard=true] #app-navigation{display:none}
 .standalone :is(button,summary,input,select,textarea):focus-visible{outline:2px solid var(--ui-red);outline-offset:3px}
}

/* Shared ledger layout used by the application and isolated preview. */
.layout-preview-header:empty { display: none; }
body.layout-preview .app-sidebar .app-brand {
  background-color: var(--ui-soft);
  background-image: linear-gradient(105deg, color-mix(in srgb, var(--ui-red) 10%, var(--ui-surface)), var(--ui-soft));
}
body.layout-preview .layout-preview-notice {
  margin: 0 0 12px;
  padding: 7px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.5;
}
body.layout-preview .app-page-heading {
  gap: 12px 18px;
  margin-block-end: 16px;
}
body.layout-preview .work-overview-modules,
body.layout-preview .work-overview-main,
body.layout-preview .work-overview-aside,
body.layout-preview #finance-workspace .management-dashboard-grid,
body.layout-preview #finance-workspace .management-dashboard-column {
  gap: 12px;
}
body.layout-preview .layout-payment-dates {
  display: grid;
  gap: 3px;
}
body.layout-preview .layout-payment-dates time {
  white-space: nowrap;
}
@media (min-width: 1001px) {
  html body.layout-preview[data-sidebar-collapsed=false] {
    grid-template-columns: 308px minmax(0, 1fr);
  }
  html body.layout-preview main {
    min-width: 0;
    max-width: 1800px;
    padding-inline: clamp(16px, 2vw, 30px);
  }
  body.layout-preview .app-sidebar {
    gap: 16px;
    padding-inline: 14px;
  }
  body.layout-preview[data-sidebar-collapsed=false] .app-sidebar {
    margin: 14px 0 0 14px;
    padding: 18px 12px 14px;
    height: auto;
    max-height: calc(100dvh - 28px);
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    overflow: auto;
    top: 14px;
  }
  body.layout-preview[data-sidebar-collapsed=false] .app-brand {
    flex-direction: row;
    justify-content: flex-start;
    text-align: start;
    padding-inline-end: 26px;
  }
  body.layout-preview[data-sidebar-collapsed=false] .app-brand .company-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }
  body.layout-preview[data-sidebar-collapsed=false] #app-navigation.desktop-grouped {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  body.layout-preview[data-sidebar-collapsed=false] #app-navigation.desktop-grouped .app-navigation-group:not([hidden]) {
    display: contents;
  }
  body.layout-preview[data-sidebar-collapsed=false] #app-navigation.desktop-grouped .app-navigation-group > button {
    padding-inline: 8px;
    min-width: 0;
  }
  body.layout-preview .app-navigation-group {
    gap: 5px;
  }
  body.layout-preview .app-navigation-group > button {
    min-height: 40px;
  }
  body.layout-preview #supplier-library-list {
    width: min(100%, 1024px);
    gap: 16px;
  }
  body.layout-preview #supplier-library-list .supplier-library-card {
    box-sizing: border-box;
    width: min(100%, 480px);
  }
}

.layout-ledger-columns { display: none; }
.layout-purchase-meta { display: contents; }

body.layout-preview[data-view="orders"] #imported-payment-records.layout-ledger:not([hidden]),
body.layout-preview[data-view="quotations"] #quotation-browser.layout-ledger:not([hidden]),
body.layout-preview[data-view="suppliers"] #supplier-library.layout-ledger:not([hidden]) {
  display: grid !important;
  grid-template-columns: clamp(242px, 25%, 325px) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
body.layout-preview .layout-ledger > :not(.layout-ledger-side, .layout-ledger-board) {
  grid-column: 1 / -1;
}
.layout-ledger-side, .layout-ledger-board { min-width: 0; }
.layout-ledger-side { display: grid; gap: 10px; }
.layout-ledger-board,
.layout-ledger-side-panel,
#supplier-library .layout-ledger-side {
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}
.layout-ledger-board { container: aligned-ledger / inline-size; }
.layout-ledger-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  border-bottom: 1px solid var(--ui-line);
  padding-bottom: 9px;
}
body.layout-preview .layout-ledger h2 { margin: 0; }
.layout-ledger-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-inline-start: auto;
}
.layout-ledger-controls :is(#quotation-new, #app-new-order, #supplier-library-add) {
  margin-inline-start: auto;
}
.layout-ledger-controls :is(.quotation-dashboard-actions, .imported-purchase-heading) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.layout-ledger-controls .imported-purchase-heading > div { display: none; }
.layout-ledger-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  border-bottom: 1px solid var(--ui-line);
  margin-block: 6px 10px;
}
body.layout-preview .layout-ledger-tabs button {
  background: transparent;
  color: var(--ui-muted);
  border: 0;
  border-radius: 0;
  min-height: 38px;
  padding: 5px;
}
body.layout-preview .layout-ledger-tabs button[aria-pressed="true"] {
  color: var(--ui-ink);
  background: var(--ui-soft);
  box-shadow: inset 0 -2px var(--ui-red);
}
body.layout-preview .layout-ledger-side :is(.purchase-review-workspace, #quotation-review-workspace) {
  display: block;
  margin: 0;
}
body.layout-preview .layout-ledger-side .purchase-period-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}
body.layout-preview .layout-ledger-side :is(.purchase-period-heading, .purchase-period-card, #purchase-payment-periods) {
  min-width: 0;
  padding: 7px;
}
body.layout-preview .layout-ledger-side .purchase-period-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.layout-preview .layout-ledger-side :is(.purchase-period-amount, .purchase-period-amount strong) {
  font-size: clamp(13px, 1vw, 17px);
  white-space: nowrap;
}
body.layout-preview .layout-ledger-side :is(.purchase-list-filters, .purchase-search-region, .supplier-search-controls, .supplier-opinion-filters-grid) {
  grid-template-columns: minmax(0, 1fr);
}
body.layout-preview #quotation-workspace .search-region.layout-quote-search {
  padding: 0;
  border: 0;
  background: transparent;
  gap: 14px;
}
body.layout-preview #quotation-workspace .layout-quote-search .qm-search-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
body.layout-preview #quotation-workspace .layout-quote-search :is(input, select, .qm-filter-trigger, #quotation-filters-reset) {
  min-height: 44px;
  margin: 0;
}
body.layout-preview #quotation-workspace .layout-quote-search #quotation-filters-reset { align-self: flex-start; }
body.layout-preview #quotation-selection-panel #quotation-selection-context,
body.layout-preview #quotation-selection-panel[data-selected="false"] #quotation-selection-count { display: none; }
body.layout-preview #quotation-workspace .layout-quote-search .qm-filter-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  margin-inline: 8px 2px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg) translateY(-2px);
}
body.layout-preview .layout-ledger-side :is(input, select, textarea) { min-width: 0; max-width: 100%; }
body.layout-preview .layout-ledger-side .purchase-list-primary > label:has(> #imported-payment-records-search) { grid-column: 1 / -1; }
body.layout-preview .layout-ledger #supplier-library-list { width: 100%; }
body.layout-preview .layout-ledger-board :is(.quotation-group-rows, .purchase-year-group) { min-width: 0; }

/* Shared navigation, filters and content panels for the other ledger views. */
body.layout-preview .layout-module-frame {
  display: grid;
  gap: var(--ledger-column-gap, 12px);
  min-width: 0;
  align-items: start;
}
body.layout-preview .layout-module-frame [hidden] { display: none !important; }
body.layout-preview .layout-module-frame .layout-ledger-scroll { min-width: 0; padding-block-start: 12px; }
body.layout-preview .layout-module-tools { display: grid; gap: 12px; }
body.layout-preview .layout-module-tools h2 { font-size: 19px; }
body.layout-preview .layout-module-tabs { display: flex; gap: 0; }
body.layout-preview .layout-module-tabs button { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
body.layout-preview .layout-module-filters { display: grid; gap: 10px; }
body.layout-preview .layout-module-search { display: grid; gap: 4px; margin: 0; color: var(--ui-muted); }
body.layout-preview .layout-module-tools :is(input, select) { width: 100%; margin: 0; }
body.layout-preview .layout-module-tools :is(button, input, select) { min-height: 44px; }
body.layout-preview[data-ledger-module] .app-page-heading { display: none; }
body.layout-preview .layout-module-frame .layout-ledger-heading h1 {
  margin: 0;
  font-size: var(--ledger-title-font, 24px);
}

/* Calendar, members and source records share the ledger frame and its controls. */
body.layout-preview .layout-module-frame:has(> .layout-ledger-board > .layout-ledger-scroll > :is(#member-management, #archive-workspace, #hanabi-calendar)[hidden]) {
  display: none;
}
body.layout-preview :is([data-module="calendar"], [data-module="admin"], [data-module="archive"]) .layout-ledger-scroll > :is(#hanabi-calendar, #member-management, #archive-workspace) {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
body.layout-preview :is([data-module="calendar"], [data-module="admin"], [data-module="archive"]) .layout-module-tools :is(.member-list-filters,.overview-controls,.layout-calendar-dates) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 8px;
  margin: 0;
}
body.layout-preview :is([data-module="calendar"], [data-module="admin"], [data-module="archive"]) .layout-module-tools label {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  font-size: var(--hb-caption, 12px);
  color: var(--ui-muted);
}
body.layout-preview :is([data-module="admin"], [data-module="archive"]) .layout-module-tools label:has(input[type="search"]) {
  grid-column: 1 / -1;
}
body.layout-preview [data-module="admin"] .layout-module-tools .member-list-filters {
  grid-template-columns: minmax(0, 1fr);
}
body.layout-preview [data-module="calendar"] .layout-calendar-dates:has(label[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
body.layout-preview [data-module="calendar"] #hanabi-calendar .hanabi-calendar-toolbar {
  gap: 6px 8px;
  align-items: center;
  margin: 0 0 8px;
}
body.layout-preview [data-module="calendar"] #hanabi-calendar .hanabi-calendar-modes {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0;
}
body.layout-preview [data-module="calendar"] #hanabi-calendar .hanabi-calendar-modes button {
  flex: 0 0 auto;
  padding-inline: 10px;
  background: transparent;
  border-color: transparent;
  border-radius: 6px 6px 0 0;
}
body.layout-preview [data-module="calendar"] #hanabi-calendar .hanabi-calendar-modes button[aria-pressed="true"] {
  background: var(--ui-soft);
  border-color: transparent;
  box-shadow: inset 0 -2px var(--ui-red);
  color: var(--ui-ink);
}
body.layout-preview [data-module="calendar"] #calendar-national-edit { margin-inline-start: 0; }
body.layout-preview [data-module="calendar"] #hanabi-calendar:has(#calendar-schedule-toggle:not([hidden])) #calendar-company-edit:not([aria-expanded="true"]) {
  border-color: var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-ink);
}
body.layout-preview [data-module="calendar"] #hanabi-calendar-status:empty,
body.layout-preview [data-module="calendar"] #hanabi-calendar-source:empty {
  display: none;
}

body.layout-preview [data-module="admin"] .member-list-heading,
body.layout-preview [data-module="archive"] #archive-workspace > h2 {
  display: none;
}
body.layout-preview [data-module="admin"] #member-count {
  margin-inline-start: 10px;
  font-size: var(--ledger-minor-font, 13px);
  font-weight: 500;
  color: var(--ui-muted);
  white-space: nowrap;
}
body.layout-preview [data-module="admin"] .member-list-actions {
  flex-wrap: wrap;
  gap: 6px 8px;
}
body.layout-preview [data-module="admin"] .member-list-actions button { margin: 0; min-height: 44px; }
body.layout-preview [data-module="admin"] .member-backup-health {
  gap: 6px 14px;
  margin-block-end: 10px;
  padding: 8px 12px;
}
body.layout-preview [data-module="admin"] #member-list .member-table td {
  padding-block: 10px;
}
body.layout-preview [data-module="admin"] #member-list tbody tr:nth-child(even) {
  background: var(--ledger-stripe, var(--ui-soft));
}
body.layout-preview [data-module="admin"] #member-list .member-table :is(td, th) {
  overflow-wrap: anywhere;
}
body.layout-preview [data-module="archive"] #archive-workspace > p {
  margin: 0 0 8px;
}
body.layout-preview [data-module="archive"] #source-workbook-panel {
  margin: 0 0 12px;
  padding: 0 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius, 8px);
}
body.layout-preview [data-module="archive"] #source-workbook-panel > summary {
  min-height: 44px;
  align-content: center;
  font-size: var(--ledger-body-font, 14px);
  cursor: pointer;
}
body.layout-preview [data-module="archive"] #source-workbook-panel[open] { padding-bottom: 12px; }
body.layout-preview [data-module="archive"] #source-workbook-panel .overview-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
body.layout-preview [data-module="archive"] :is(#history-list,.source-workbook-scroll) { min-width: 0; }
body.layout-preview [data-module="archive"] .source-workbook-scroll { scrollbar-gutter: stable; }
body.layout-preview [data-module="archive"] #history-list > .index-hint { margin: 8px 0; }
body.layout-preview [data-module="archive"] #history-list .imported-purchase-year { margin-block: 8px; }
body.layout-preview [data-module="archive"] #history-list .imported-purchase-year-heading {
  min-height: 44px;
  padding: 6px 12px;
}
body.layout-preview [data-module="archive"] #history-list .history-card .procurement-project-primary {
  padding: 8px 12px;
}
body.layout-preview [data-module="archive"] #history-list .history-card h3 {
  margin: 0;
  font-size: var(--ui-identity-size, 16px);
  line-height: 1.35;
}
body.layout-preview [data-module="archive"] #history-list .history-card .procurement-detail-row {
  padding: 8px 12px;
  gap: 8px 12px;
}

@media (min-width: 1060px) {
  body.layout-preview [data-module="calendar"] .layout-ledger-board:has(#hanabi-calendar:not([data-holiday-panel="true"], [data-scheduling="true"], [data-project-view="true"]) #hanabi-calendar-grid:is([data-mode="year"], [data-mode="month"], [data-mode="week"])) {
    block-size: calc(100dvh - var(--preview-header-height, 44px) - 20px);
  }
  body.layout-preview [data-module="calendar"] .layout-ledger-scroll:has(#hanabi-calendar:not([data-holiday-panel="true"], [data-scheduling="true"], [data-project-view="true"]) #hanabi-calendar-grid:is([data-mode="year"], [data-mode="month"], [data-mode="week"])) {
    display: flex;
    flex-direction: column;
  }
  body.layout-preview [data-module="calendar"] #hanabi-calendar:not([data-holiday-panel="true"], [data-scheduling="true"], [data-project-view="true"]):has(#hanabi-calendar-grid:is([data-mode="year"], [data-mode="month"], [data-mode="week"])) {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
  }
  body.layout-preview [data-module="calendar"] #hanabi-calendar:not([data-holiday-panel="true"], [data-scheduling="true"]) #hanabi-calendar-grid[data-mode="year"] {
    grid-template-columns: repeat(var(--calendar-year-columns, 4), minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(150px, 1fr);
    min-block-size: 0;
  }
  body.layout-preview [data-module="calendar"] #hanabi-calendar:not([data-holiday-panel="true"], [data-scheduling="true"]) #hanabi-calendar-grid[data-mode="month"] .hanabi-month-days {
    grid-template-rows: 28px repeat(var(--calendar-weeks), minmax(70px, 1fr));
  }
  body.layout-preview [data-module="calendar"] #hanabi-calendar-grid[data-mode="week"],
  body.layout-preview [data-module="calendar"] #hanabi-calendar-grid[data-mode="week"] > .hanabi-week {
    display: flex;
    flex-direction: column;
  }
  body.layout-preview [data-module="calendar"] #hanabi-calendar-grid[data-mode="week"] :is(.hanabi-week, .hanabi-week-days) {
    flex: 1 0 auto;
  }
  body.layout-preview [data-module="calendar"] #hanabi-calendar-grid[data-mode="week"] .hanabi-week-days {
    grid-auto-rows: minmax(min-content, 1fr);
  }
  @container aligned-ledger (max-width: 800px) {
    body.layout-preview [data-module="calendar"] #hanabi-calendar-grid[data-mode="year"] { --calendar-year-columns: 3; }
  }
}
@media (max-width: 1059px) {
  body.layout-preview :is([data-module="calendar"], [data-module="admin"], [data-module="archive"]) .layout-module-tools {
    gap: 6px;
  }
}

body.layout-preview[data-view="finance"] #finance-workspace.layout-business-root { display: block; min-width: 0; margin: 0; }
body.layout-preview #finance-workspace .layout-ledger-heading .management-tabs {
  display: flex !important;
  flex: 1 0 100%;
  flex-wrap: nowrap;
  position: relative;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  border: 0;
}
body.layout-preview #finance-workspace .layout-ledger-heading .management-tabs button {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 44px;
  padding-inline: 12px;
  white-space: nowrap;
}
body.layout-preview #finance-workspace .layout-ledger-heading .management-tabs button[aria-selected="true"] { color: var(--hb-brand); }
body.layout-preview #finance-workspace .layout-module-tools .management-period {
  display: grid;
  width: 100%;
  grid-column: 1 / -1;
  grid-row: auto;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  justify-content: start;
  gap: 8px;
}
body.layout-preview #finance-workspace .layout-module-tools .management-period > :only-child { grid-column: 1 / -1; }
body.layout-preview #finance-workspace.layout-business-management .business-controls { display: none; }
body.layout-preview #finance-workspace .layout-ledger-scroll {
  container: finance-report / inline-size;
  --report-gap: 12px;
  --report-card-padding: clamp(12px, 1.5cqi, 20px);
}
body.layout-preview #finance-workspace.layout-business-root :is(.management-overview, .management-panel) { gap: 12px; padding: 0; }
body.layout-preview #finance-workspace.layout-business-root .management-overview { display: block; min-width: 0; }
body.layout-preview #finance-workspace.layout-business-root .management-panel { grid-column: auto; grid-row: auto; }
body.layout-preview #finance-workspace.layout-business-root #finance-status { margin-block: 0 8px; }
body.layout-preview #finance-workspace.layout-business-root #finance-status:empty { display: none; }
body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid {
  align-items: start;
}
body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid > .management-dashboard-column {
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
}
body.layout-preview #finance-workspace.layout-business-root .management-dashboard-column > .business-panel {
  justify-content: flex-start;
  min-height: 0;
  gap: 8px;
}
body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid .management-mini-plot {
  flex: none;
  margin-block: 0;
}
body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid .management-page-link {
  flex: none;
  margin-block: 0;
}
body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid .management-cost-preview {
  container: report-composition / inline-size;
}
body.layout-preview #finance-workspace.layout-business-root .management-cost-preview .management-mini-composition {
  flex: none;
  gap: 8px;
}
body.layout-preview #finance-workspace.layout-business-root .management-cost-preview .management-mini-composition svg {
  width: min(100%, 184px);
  justify-self: center;
}
@container report-composition (min-width: 285px) {
  body.layout-preview #finance-workspace.layout-business-root .management-cost-preview .management-mini-composition {
    grid-template-columns: minmax(0, 1fr) minmax(130px, .95fr);
  }
}
body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid .management-mini-plot svg {
  height: clamp(148px, 15cqi, 190px);
}
body.layout-preview #finance-workspace .layout-ledger-scroll:has(.management-dashboard-grid) {
  display: flex;
  flex-direction: column;
}
@container finance-report (min-width: 690px) {
  body.layout-preview #finance-workspace .layout-ledger-scroll :is(#finance-content, .management-overview, #management-panel, .management-dashboard):has(.management-dashboard-grid) {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
  }
  body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid {
    flex: 1 0 auto;
    align-items: stretch;
  }
  body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid > .management-dashboard-column {
    grid-auto-rows: auto;
    align-content: stretch;
  }
  body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid > [data-column="summary"] {
    grid-template-rows: max-content auto auto;
  }
  body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid .management-mini-plot {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
  }
  body.layout-preview #finance-workspace.layout-business-root .management-dashboard-grid .management-mini-plot svg {
    flex: 1 0 auto;
  }
  body.layout-preview #finance-workspace.layout-business-root .management-cost-preview .management-mini-composition {
    flex: 1 0 auto;
    align-content: center;
  }
}
body.layout-preview #finance-workspace #management-panel {
  align-content: start;
  min-inline-size: 0;
}
body.layout-preview #finance-workspace #management-panel :is(.business-panel, .cash-chart-detail, .efficiency-chart) {
  padding: var(--report-card-padding);
}
body.layout-preview #finance-workspace #management-panel .business-panel-heading {
  margin: 0 0 8px;
  gap: 6px 12px;
}
body.layout-preview #finance-workspace #management-panel :is(.business-panel-heading h2, .cash-chart-heading h2, .efficiency-heading h2) {
  margin: 0;
  font-size: var(--ui-identity-size);
  line-height: 1.25;
}
body.layout-preview #finance-workspace #management-panel :is(.business-panel-heading, .cash-chart-heading, .efficiency-heading) .business-note {
  margin: 4px 0 0;
  line-height: 1.45;
}
body.layout-preview #finance-workspace #management-panel :is(.cash-charts, .cash-chart-grid, .cash-chart-composition, .management-review, .efficiency-charts) {
  gap: var(--report-gap);
  align-content: start;
}
body.layout-preview #finance-workspace #management-panel .business-details {
  padding-block-start: 0;
  margin-block-start: 0;
  min-inline-size: 0;
}
body.layout-preview #finance-workspace #management-panel .business-details > summary {
  min-block-size: 44px;
  box-sizing: border-box;
  padding-block: 12px;
  overflow-wrap: anywhere;
}
body.layout-preview #finance-workspace #management-panel .business-data-list {
  margin-block-start: 4px;
}

/* 收支 */
body.layout-preview #finance-workspace #management-panel[aria-labelledby="management-tab-past"] .management-three {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 8px;
}
body.layout-preview #finance-workspace #management-panel .cash-charts .management-card {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px var(--report-card-padding);
}
body.layout-preview #finance-workspace #management-panel .cash-charts .management-value {
  font-size: clamp(18px, 3cqi, 30px);
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}
body.layout-preview #finance-workspace #management-panel .cash-charts .management-card p { margin: 0; }
body.layout-preview #finance-workspace #management-panel .cash-chart-grid > .business-panel {
  display: grid;
  align-content: start;
  gap: 8px;
}
body.layout-preview #finance-workspace #management-panel .cash-chart-grid > .business-panel .business-note { margin: 0; }
body.layout-preview #finance-workspace #management-panel .cash-chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(48px, 1fr);
  grid-template-rows: auto auto auto;
  align-items: stretch;
  block-size: auto;
  row-gap: 4px;
}
body.layout-preview #finance-workspace #management-panel .cash-chart-month {
  grid-row: span 3;
  grid-template-rows: subgrid;
  min-block-size: 0;
}
body.layout-preview #finance-workspace #management-panel .cash-chart-month small:empty {
  min-block-size: 0;
}
body.layout-preview #finance-workspace #management-panel .cash-chart-grid > .business-panel .cash-chart-line {
  block-size: 190px;
}

/* 成本 */
body.layout-preview #finance-workspace #management-panel .cash-chart-priority {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 16px;
}
body.layout-preview #finance-workspace #management-panel .cash-chart-donut { width: min(100%, 216px); }
body.layout-preview #finance-workspace #management-panel .cash-chart-ranking {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  column-gap: 14px;
}
body.layout-preview #finance-workspace #management-panel .cash-chart-rank { min-block-size: 44px; }
body.layout-preview #finance-workspace #management-panel .management-support > .business-panel { margin-block-start: 6px; }

/* 预算 */
body.layout-preview #finance-workspace #management-panel .layout-budget-records {
  display: grid;
  align-content: start;
  gap: var(--report-gap);
  min-inline-size: 0;
  container: finance-budget-records / inline-size;
}
body.layout-preview #finance-workspace #management-panel .management-budget-chart > .business-note {
  margin: 8px 0 0;
}
body.layout-preview #finance-workspace #management-panel .management-budget-chart .management-budget-selected { margin-block-start: 4px; }
body.layout-preview #finance-workspace #management-panel section:has(> .management-budget-periods) {
  display: grid;
  align-content: start;
  gap: 0 var(--report-gap);
}
body.layout-preview #finance-workspace #management-panel section:has(> .management-budget-periods) > :is(.business-panel-heading, .management-budget-periods, .business-details[open], .business-note) {
  grid-column: 1 / -1;
}

/* 项目 */
body.layout-preview #finance-workspace #management-panel .management-operation-card {
  display: grid;
  align-content: start;
  gap: 8px var(--report-gap);
}
body.layout-preview #finance-workspace #management-panel .layout-project-operations {
  display: grid;
  align-content: start;
  gap: 8px;
  min-inline-size: 0;
}
body.layout-preview #finance-workspace #management-panel .management-operation-summary {
  flex-wrap: wrap;
  gap: 4px 16px;
}
body.layout-preview #finance-workspace #management-panel .management-operation-card > .business-panel {
  background: var(--ui-soft);
}
body.layout-preview #finance-workspace #management-panel .management-progress-grid { gap: var(--report-gap); }

/* 核对、项目效率 */
body.layout-preview #finance-workspace #management-panel .management-review { align-items: start; }
body.layout-preview #finance-workspace #management-panel .management-review > .business-details[open] { grid-column: 1 / -1; }
body.layout-preview #finance-workspace #management-panel .tencent-efficiency-view {
  display: grid;
  align-content: start;
  gap: 8px;
}
body.layout-preview #finance-workspace #management-panel :is(.efficiency-heading, .efficiency-filters, .tencent-efficiency-view > p[role="status"]) { margin: 0; }
body.layout-preview #finance-workspace #management-panel .efficiency-charts {
  grid-template-columns: minmax(0, 1fr);
}
body.layout-preview #finance-workspace #management-panel .efficiency-chart-total { margin-block-end: 8px; }

@container finance-report (min-width: 560px) {
  body.layout-preview #finance-workspace #management-panel .cash-chart-priority {
    grid-template-columns: minmax(132px, .65fr) minmax(0, 1fr);
  }
  body.layout-preview #finance-workspace #management-panel .efficiency-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container finance-report (min-width: 820px) {
  body.layout-preview #finance-workspace #management-panel .management-flow-preview {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
  }
  body.layout-preview #finance-workspace #management-panel .management-flow-preview > :not(.management-page-link) {
    grid-column: 1 / -1;
  }
  body.layout-preview #finance-workspace #management-panel .management-flow-preview > .management-page-link {
    justify-self: start;
  }
  body.layout-preview #finance-workspace #management-panel .cash-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.layout-preview #finance-workspace #management-panel .management-operation-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: start;
  }
  body.layout-preview #finance-workspace #management-panel .management-review:has(> .business-panel:nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container finance-report (min-width: 900px) {
  body.layout-preview #finance-workspace #management-panel[aria-labelledby="management-tab-future"] {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: start;
  }
}
@container finance-budget-records (min-width: 470px) {
  body.layout-preview #finance-workspace #management-panel section:has(> .management-budget-periods) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container finance-report (min-width: 1040px) {
  body.layout-preview #finance-workspace #management-panel .efficiency-charts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
body.layout-preview #finance-workspace .layout-business-summary .management-kpis {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
body.layout-preview #finance-workspace .layout-business-summary .management-kpi { padding: 10px 12px; }
body.layout-preview #finance-workspace .layout-business-summary #finance-status { overflow-wrap: anywhere; }
body.layout-preview #finance-workspace .layout-business-summary > .business-panel {
  margin: 0;
  padding: 0;
  border: 0;
}
body.layout-preview #finance-workspace .layout-business-summary .business-panel-heading {
  margin-block: 0 4px;
}
body.layout-preview #finance-workspace .layout-business-summary .business-data-row {
  align-items: baseline;
  gap: 4px 10px;
  padding-block: 8px;
}
body.layout-preview #finance-workspace .layout-business-summary .business-data-row > strong {
  flex-shrink: 0;
}
@media (min-width: 380px) and (max-width: 1059px) {
  body.layout-preview #finance-workspace .layout-business-summary .management-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.layout-preview #finance-workspace .layout-business-summary .management-kpi > strong { font-size: 18px; }
}

body.layout-preview [data-module="overview"] {
  --work-gap: 12px;
  --work-pad: clamp(12px, 1.55cqi, 20px);
}
body.layout-preview [data-module="overview"] .layout-module-tools { display: none; }
body.layout-preview [data-module="overview"] .layout-ledger-heading { gap: 8px 12px; }
body.layout-preview [data-module="overview"] .layout-work-search {
  width: min(100%, 265px);
  min-height: 44px;
  margin: 0;
}
body.layout-preview [data-module="overview"] #work-overview {
  display: grid;
  gap: var(--work-gap);
  min-width: 0;
  margin: 0;
}
body.layout-preview [data-module="overview"] .work-overview-modules {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--work-gap);
}
body.layout-preview [data-module="overview"] :is(.work-module, .work-todos) {
  margin: 0;
  padding: var(--work-pad);
  min-width: 0;
}
body.layout-preview [data-module="overview"] :is(.work-module > h2, .work-todos-heading h2) {
  margin: 0;
  font-size: var(--ui-identity-size);
  line-height: 1.3;
}
body.layout-preview [data-module="overview"] .work-monthly-reminder {
  margin: 0;
  padding: 8px var(--work-pad);
}
body.layout-preview [data-module="overview"] .work-monthly-reminder:has(details) {
  padding-block: 0;
}
body.layout-preview [data-module="overview"] .work-monthly-reminder:has(details[open]) { padding-block-end: 8px; }
body.layout-preview [data-module="overview"] :is(.work-monthly-reminder summary, .work-source-followups > details > summary) {
  min-height: 44px;
  align-content: center;
}
body.layout-preview [data-module="overview"] :is(#work-purchase-module, .work-overview-main, .work-overview-aside, .work-review-content) {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}
body.layout-preview [data-module="overview"] .work-overview-aside:empty { display: none; }
body.layout-preview [data-module="overview"] .work-overview-main > :is(.work-task-list, .work-section-heading)[hidden] { display: none; }
body.layout-preview [data-module="overview"] .work-overview-stat {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--ui-radius, 8px);
  background: var(--ui-soft);
}
body.layout-preview [data-module="overview"] .work-overview-stat > strong {
  margin: 0;
  line-height: 1.25;
}
body.layout-preview [data-module="overview"] .work-overview-stat > button {
  justify-self: start;
  min-height: 44px;
  margin: 4px 0 0;
}
body.layout-preview [data-module="overview"] #work-purchase-module > .work-overview-stat {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
}
body.layout-preview [data-module="overview"] #work-purchase-module > .work-overview-stat > :not(button) { grid-column: 1; }
body.layout-preview [data-module="overview"] #work-purchase-module > .work-overview-stat > button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  margin: 0;
}
body.layout-preview [data-module="overview"] .work-review-content {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block-start: 10px;
}
body.layout-preview [data-module="overview"] .work-review-content > :not(.work-overview-stat) { grid-column: 1 / -1; }
body.layout-preview [data-module="overview"] .work-review-content :is(.finance-submission-entry, .work-side-block) { margin: 0; }
body.layout-preview [data-module="overview"] .work-quiet-list { gap: 0; }
body.layout-preview [data-module="overview"] .work-quiet-list .work-entry {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  min-height: 44px;
  border-bottom: 1px solid var(--ui-line);
}
body.layout-preview [data-module="overview"] .work-entry > .procurement-project-content-value {
  margin: 0;
  font-size: inherit;
  line-height: 1.45;
  color: var(--ui-muted);
  overflow-wrap: anywhere;
}
body.layout-preview [data-module="overview"] .work-section-heading { margin: 0; gap: 6px 10px; }
body.layout-preview [data-module="overview"] .work-section-heading button { min-height: 44px; }
body.layout-preview [data-module="overview"] :is(.work-overview-note, .work-overview-empty, .work-todos .index-hint) { margin: 0; }
body.layout-preview [data-module="overview"] .work-source-followups {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 8px;
}
body.layout-preview [data-module="overview"] .work-source-tasks {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
body.layout-preview [data-module="overview"] :is(.work-source-followups > details, .layout-work-reminder) { min-width: 0; }
body.layout-preview [data-module="overview"] .layout-work-reminder {
  --reminder-accent: var(--hpr-tone,var(--ui-muted));
  --reminder-emphasis: 6%;
  --reminder-surface: color-mix(in srgb, var(--reminder-accent) var(--reminder-emphasis), var(--ui-surface));
  border-radius: var(--ui-radius, 8px);
  border: 1px solid var(--ui-line);
  border-inline-start: 3px solid var(--reminder-accent);
  background: var(--reminder-surface);
  overflow: clip;
}
body.layout-preview [data-module="overview"] .layout-work-reminder[data-tone="overdue"] { --reminder-emphasis: 13%; }
body.layout-preview [data-module="overview"] .layout-work-reminder[data-tone="today"] { --reminder-emphasis: 10%; }
body.layout-preview [data-module="overview"] .layout-work-reminder[data-tone="tomorrow"] { --reminder-emphasis: 8%; }
body.layout-preview [data-module="overview"] .layout-work-reminder[data-tone="soon"] { --reminder-emphasis: 7%; }
body.layout-preview [data-module="overview"] .layout-work-reminder-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 10px;
  grid-template-areas: "status status arrow" "project amount arrow";
  align-items: center;
  gap: 4px 10px;
  padding: 9px 12px;
  min-height: 44px;
  cursor: pointer;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: start;
  transition: background-color 140ms ease-out;
}
body.layout-preview [data-module="overview"] .layout-work-reminder-summary::after {
  content: "";
  grid-area: arrow;
  width: 6px;
  height: 6px;
  justify-self: center;
  color: var(--ui-muted);
  border-inline-end: 1px solid;
  border-block-end: 1px solid;
  transform: rotate(-45deg);
  transition: transform 140ms ease-out;
}
body.layout-preview [data-module="overview"] .layout-work-reminder-status {
  grid-area: status;
  color: var(--reminder-accent);
  font-size: var(--hb-caption, 12px);
  font-weight: 650;
}
body.layout-preview [data-module="overview"] .layout-work-reminder-project { grid-area: project; }
body.layout-preview [data-module="overview"] .layout-work-reminder-amount {
  grid-area: amount;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
body.layout-preview [data-module="overview"] .layout-work-reminder-summary :is(strong, small) {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
body.layout-preview [data-module="overview"] .layout-work-reminder-summary small {
  color: var(--ui-muted);
  font-size: var(--hb-caption, 12px);
}
body.layout-preview [data-module="overview"] .work-source-group > .layout-work-reminder {
  margin-block-end: 6px;
}
body.layout-preview [data-module="overview"] .layout-work-reminder > button:is([aria-expanded="true"], :hover) {
  background: color-mix(in srgb, var(--reminder-accent) 8%, transparent);
}
body.layout-preview [data-module="overview"] .layout-work-reminder > button[aria-expanded="true"]::after {
  transform: rotate(45deg);
}
body.layout-preview [data-module="overview"] .layout-work-reminder > button:focus-visible {
  outline: 2px solid var(--ui-ink);
  outline-offset: -3px;
}
body.layout-preview [data-module="overview"] .layout-work-detail {
  display: grid;
  min-inline-size: 0;
  gap: 8px;
  padding-inline-end: 14px;
}
body.layout-preview [data-module="overview"] .layout-work-detail-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body.layout-preview [data-module="overview"] .layout-work-detail-heading h2 { font-size: 16px; margin: 0; }
body.layout-preview [data-module="overview"] #layout-work-detail .work-source-reminder {
  margin: 0;
  padding: 12px;
  border-radius: var(--ui-radius, 8px);
}
body.layout-preview [data-module="overview"] #layout-work-detail .hpr-facts > div { gap: 8px; }
body.layout-preview [data-module="overview"] #layout-work-detail:not([hidden]) .work-source-reminder {
  animation: work-reminder-enter 170ms ease-out both;
}
@keyframes work-reminder-enter {
  from { opacity: .55; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  body.layout-preview [data-module="overview"] #layout-work-detail:not([hidden]) .work-source-reminder { animation: none; }
  body.layout-preview [data-module="overview"] .layout-work-reminder-summary,
  body.layout-preview [data-module="overview"] .layout-work-reminder-summary::after { transition: none; }
}
body.layout-preview [data-module="overview"] .work-todos {
  display: grid;
  align-content: start;
  gap: 10px;
}
body.layout-preview [data-module="overview"] .work-todos-heading > div:first-child p { display: none; }
body.layout-preview [data-module="overview"] :is(.work-todos-heading, .work-todo-actions) {
  gap: 6px;
  align-items: center;
}
body.layout-preview [data-module="overview"] .work-todo-actions { width: auto; }
body.layout-preview [data-module="overview"] .work-todo-actions button { min-height: 44px; margin: 0; }
body.layout-preview [data-module="overview"] .work-todo-groups { gap: 8px; }
body.layout-preview [data-module="overview"] .work-todo-groups > section {
  padding: 8px 10px;
  border-radius: var(--ui-radius, 8px);
  background: var(--ui-soft);
}
body.layout-preview [data-module="overview"] .work-todo-groups h3 { font-size: 14px; margin: 0 0 4px; }
body.layout-preview [data-module="overview"] .work-todo-day { padding: 6px 0 0; }
body.layout-preview [data-module="overview"] .work-todo-list { margin: 0; }
body.layout-preview [data-module="overview"] .work-todo-list label { font-size: 14px; }
body.layout-preview [data-module="overview"] .work-monthly-reminder + #work-overview-modules { min-width: 0; }
body.layout-preview [data-module="overview"] #work-overview-status,
body.layout-preview [data-module="overview"] .layout-work-no-results { margin: 0; color: var(--ui-muted); }
body.layout-preview [data-module="overview"] .layout-work-no-results {
  padding-block: 6px 12px;
}
body.layout-preview [data-module="overview"] .layout-work-filtered { display: none !important; }

@container aligned-ledger (min-width: 760px) {
  body.layout-preview [data-module="overview"] .work-overview-modules:has(> #work-purchase-module):has(> #work-review-module) {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  body.layout-preview [data-module="overview"] .work-overview-modules:has(> #work-review-module) > #work-purchase-module { grid-column: 1; grid-row: 1 / span 2; }
  body.layout-preview [data-module="overview"] .work-overview-modules:has(> #work-purchase-module) > #work-review-module { grid-column: 2; }
}
@container aligned-ledger (min-width: 950px) {
  body.layout-preview [data-module="overview"] .layout-work-reminder-summary {
    grid-template-columns: minmax(86px, .55fr) minmax(0, 2fr) minmax(100px, 1fr) 10px;
    grid-template-areas: "status project amount arrow";
  }
}
@media (max-width: 650px) {
  body.layout-preview [data-module="overview"] .layout-ledger-heading > .layout-ledger-controls {
    flex-basis: 100%;
    justify-content: start;
  }
  body.layout-preview [data-module="overview"] .layout-work-search { width: 100%; }
  body.layout-preview [data-module="overview"] #work-purchase-module > .work-overview-stat {
    grid-template-columns: minmax(0, 1fr);
  }
  body.layout-preview [data-module="overview"] #work-purchase-module > .work-overview-stat > button {
    grid-column: 1;
    grid-row: auto;
    margin-block-start: 4px;
  }
}

body.layout-preview .layout-module-frame :is(#supplier-library, #supplier-evaluation-workspace) { padding: 0; margin: 0; border: 0; background: transparent; }
body.layout-preview .layout-module-frame :is(.supplier-library-heading, #supplier-evaluation-workspace > h2) { display: none; }
body.layout-preview .layout-module-frame[data-supplier-mode="records"] .layout-supplier-review-tools,
body.layout-preview .layout-module-frame[data-supplier-mode="evaluations"] :is(.layout-supplier-record-tools, #supplier-library-add) { display: none; }
body.layout-preview .layout-module-frame :is(.supplier-search-controls, .layout-supplier-review-tools .overview-controls, .supplier-filter-drawer .overview-controls) { gap: 8px; }
body.layout-preview .layout-module-frame #supplier-library-list .supplier-library-card { min-width: 0; width: 100%; }
body.layout-preview .layout-module-frame #supplier-library-list { --supplier-grid-gap: 12px; margin: 0; gap: var(--supplier-grid-gap); }
body.layout-preview .layout-module-frame .supplier-library-card { gap: 8px; padding: 12px; }
body.layout-preview .layout-module-frame .supplier-card-head h3 { overflow-wrap: anywhere; }
body.layout-preview .layout-module-frame :is(#supplier-library-status, #supplier-evaluation-status):empty { display: none; }
body.layout-preview .layout-module-frame :is(#supplier-library-status, #supplier-evaluation-status) { margin-block: 0 8px; }
body.layout-preview .layout-module-frame #supplier-evaluation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: start;
  gap: 12px;
}
@media (min-width: 1060px) {
  body.layout-preview .layout-module-frame { grid-template-columns: clamp(260px, 21vw, var(--ledger-side-width, 440px)) minmax(0, 1fr); }
  body.layout-preview[data-layout-aligned]:not([data-view="quotations"], [data-view="orders"]) :is(.app-topbar, .app-page-heading) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
@media (max-width: 1059px) {
  body.layout-preview .layout-module-frame .layout-ledger-board { padding: 10px; }
}

.layout-ledger-board {
    --layout-purchase-cols: minmax(180px, 1fr) minmax(96px, .26fr) minmax(104px, .27fr) minmax(88px, .22fr) minmax(128px, .35fr);
  }
@container aligned-ledger (min-width: 620px) {
  .layout-ledger .layout-purchase-columns,
  body.layout-preview .layout-ledger .purchase-compact-order {
    display: grid;
    grid-template-columns: var(--layout-purchase-cols);
    gap: 4px 8px;
    align-items: center;
    padding: 9px;
  }
  .layout-purchase-columns {
    background: var(--ui-soft, var(--ui-surface));
    color: var(--ui-muted);
    font-size: 13px;
  }
  .layout-purchase-columns > span:not(:first-child) { text-align: center; }
  body.layout-preview .layout-ledger .purchase-compact-order {
    margin: 0;
    border-radius: 0;
  }
  body.layout-preview .layout-ledger .purchase-compact-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    background: transparent;
    padding: 0;
    border: 0;
  }
  body.layout-preview .layout-ledger .purchase-compact-order .quotation-project-select {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
  }
  body.layout-preview .layout-ledger .purchase-compact-head .quotation-project-identity {
    grid-column: 1;
    grid-row: 1;
    margin-inline-start: 44px;
    min-width: 0;
  }
  body.layout-preview .layout-ledger .purchase-compact-order[data-selectable="false"] .quotation-project-identity { margin-inline-start: 0; }
  body.layout-preview .layout-ledger .purchase-compact-head .purchase-compact-amount {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    min-width: 0;
  }
  body.layout-preview .layout-ledger .purchase-compact-head .purchase-compact-amount strong {
    font-size: clamp(16px, 1.3vw, 22px);
    overflow-wrap: anywhere;
  }
  body.layout-preview .layout-ledger .purchase-compact-head .purchase-compact-tools {
    grid-column: 5;
    grid-row: 1;
    min-width: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px;
  }
  body.layout-preview .layout-ledger .procurement-quote-contents:not([hidden]),
  body.layout-preview .layout-ledger .purchase-compact-facts {
    display: contents;
  }
  body.layout-preview .layout-ledger .layout-purchase-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
  }
  body.layout-preview .layout-purchase-meta .purchase-compact-fact {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 6px;
    padding: 0;
    min-width: 0;
  }
  body.layout-preview .layout-ledger :is(.layout-purchase-due, .layout-purchase-invoice) {
    grid-row: 1;
    text-align: center;
    justify-items: center;
    align-self: center;
    padding: 0;
    min-width: 0;
  }
  .layout-purchase-due { grid-column: 3; }
  .layout-purchase-invoice { grid-column: 4; }
  body.layout-preview .layout-ledger .purchase-compact-support {
    grid-column: 1 / -1;
    grid-row: 3;
    padding: 3px 0 0;
  }
}
.layout-ledger-board {
    --layout-quote-cols: minmax(148px, 1.1fr) minmax(100px, .85fr) minmax(70px, .45fr) minmax(83px, .58fr) minmax(97px, .68fr) minmax(120px, .88fr);
  }
@container aligned-ledger (min-width: 740px) {
  .layout-ledger .layout-quote-columns,
  body.layout-preview .layout-ledger .quotation-group-rows .quotation-project-block {
    display: grid;
    grid-template-columns: var(--layout-quote-cols);
    align-items: center;
    gap: 4px 8px;
    padding: 9px;
  }
  .layout-quote-columns { background: var(--ui-soft, var(--ui-surface)); color: var(--ui-muted); font-size: 13px; }
  body.layout-preview .layout-ledger .quotation-group-rows .quotation-project-block { margin: 0; border-radius: 0; }
  body.layout-preview .layout-ledger .quotation-project-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    background: transparent;
    padding: 0;
  }
  body.layout-preview .layout-ledger .quotation-project-strip .quotation-project-primary { grid-column: 1 / 4; padding: 0; min-width: 0; }
  body.layout-preview .layout-ledger .quotation-project-strip .quotation-project-tools { grid-column: 4 / -1; justify-self: end; }
  body.layout-preview .layout-ledger .quotation-project-contents:not([hidden]),
  body.layout-preview .layout-ledger .quotation-modern-record,
  body.layout-preview .layout-ledger .quotation-row-details,
  body.layout-preview .layout-ledger .qm-production-block,
  body.layout-preview .layout-ledger .qm-finance-block:not([hidden]) { display: contents; }
  body.layout-preview .layout-ledger .quotation-project-metadata { grid-column: 1 / -1; padding: 4px 0; min-width: 0; }
  body.layout-preview .layout-ledger .qm-card-detail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: start;
    padding: 3px 0;
    gap: 4px 8px;
    min-width: 0;
  }
  body.layout-preview .layout-ledger .qm-card-detail > :is(.qm-production-block, .qm-finance-block) > * {
    grid-column: 2;
    min-width: 0;
    padding: 3px 0;
  }
  body.layout-preview .layout-ledger .qm-card-detail .qm-card-days { grid-column: 3; grid-row: 1; }
  body.layout-preview .layout-ledger .qm-card-detail .qm-card-cost { grid-column: 4; grid-row: 1; }
  body.layout-preview .layout-ledger .qm-card-detail .qm-card-income { grid-column: 5; grid-row: 1; }
  body.layout-preview .layout-ledger .qm-card-detail .qm-metric-value { font-size: clamp(13px, 1.05vw, 18px); }
  body.layout-preview .layout-ledger .quotation-modern-record > :not(.quotation-row-details) { grid-column: 1 / -1; }
  body.layout-preview .layout-ledger .quotation-row-details > :not(.qm-card-detail),
  body.layout-preview .layout-ledger .quotation-project-contents > :not(.quotation-modern-record) { grid-column: 1 / -1; }
}
body.layout-preview .layout-ledger-side .purchase-period-heading {
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}
body.layout-preview .layout-ledger-side .purchase-period-heading label {
  min-width: 0;
  width: 100%;
}
body.layout-preview .layout-ledger-side .purchase-period-pair { margin-top: 5px; gap: 5px; }
body.layout-preview .layout-ledger-side button.purchase-period-value {
  min-height: 56px;
  gap: 2px;
}
body.layout-preview .layout-ledger-side button.purchase-period-value > strong {
  font-size: clamp(13px, 1vw, 16px);
  white-space: nowrap;
}
body.layout-preview .layout-ledger-side button.purchase-period-value + button { padding-left: 6px; }
body.layout-preview #supplier-library .layout-ledger-side > .supplier-search-controls { order: 0; }
body.layout-preview #supplier-library .layout-ledger-side > h2 { order: -1; }
@container aligned-ledger (min-width: 620px) {
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-head {
    grid-template-columns: subgrid;
    min-height: 0;
    gap: inherit;
    padding: 0;
    background: transparent;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-head .quotation-project-identity {
    margin-inline-start: 48px;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-selectable="false"] .purchase-compact-head .quotation-project-identity {
    margin-inline-start: 0;
  }
}
body.layout-preview #quotation-overview .summary-period-tabs { margin: 0 0 10px; }
body.layout-preview #quotation-overview .summary-year-label {
  display: block;
  min-height: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--ledger-minor-font, 14px);
}
body.layout-preview #quotation-overview .quotation-summary-panel { padding: 0; border: 0; background: transparent; }
body.layout-preview #quotation-overview .summary-total {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 8px;
  padding: 0;
  margin: 0 0 10px;
  border: 0;
}
body.layout-preview #quotation-overview .summary-metric {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 7px;
}
body.layout-preview #quotation-overview .summary-metric strong { font-size: 17px; line-height: 1.2; }
body.layout-preview #quotation-overview .summary-metric:first-child { grid-column: 1 / -1; }
body.layout-preview #quotation-overview .summary-metric:first-child strong { font-size: 30px; line-height: 1.1; }
body.layout-preview #quotation-overview .status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
body.layout-preview #quotation-overview .status-card {
  display: grid;
  gap: 3px;
  min-height: 44px;
  min-width: 0;
  padding: 6px 8px;
  background: transparent;
}
body.layout-preview #quotation-overview .status-card-label {
  padding: 0;
  background: transparent;
  font-size: var(--ledger-minor-font, 14px);
}
body.layout-preview #quotation-overview .status-card .amount {
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
body.layout-preview .layout-ledger-side :is(.purchase-selection-panel, #quotation-selection-panel) {
  padding: 10px;
  margin: 0;
}
@container aligned-ledger (min-width: 620px) {
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-facts { display: contents !important; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-amount {
    justify-items: center;
    align-content: center;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-amount strong {
    font-size: 16px;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools select {
    min-width: 0;
    width: auto;
    max-width: 100%;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-fact :is(strong,time) { min-width: 0; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head :is(.quotation-project-toggle, .purchase-select-label) {
    min-height: 32px;
  }
}
@container aligned-ledger (min-width: 740px) {
  body.layout-preview #quotation-browser.layout-ledger .quotation-group-rows :is(.quotation-modern-record,.quotation-row-details) {
    display: contents;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-strip {
    display: contents;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-strip .quotation-project-primary {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    padding: 0;
    min-height: 0;
    background: transparent;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-select {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
    min-height: 34px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-identity {
    grid-row: 1;
    grid-column: 1;
    margin-inline-start: 52px;
    min-width: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-tools {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-strip > :not(.quotation-project-primary) {
    grid-column: 1 / -1;
    width: auto;
  }
  body.layout-preview #quotation-browser.layout-ledger :is(.quotation-modern-varying, .quotation-row-expanded:not([hidden])) {
    grid-column: 1 / -1;
  }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    width: auto;
  }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail :is(.qm-card-days,.qm-card-cost,.qm-card-income) {
    justify-items: start;
  }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail :is(.qm-metric-value,.qm-cell-body) {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: normal;
  }
}
@container aligned-ledger (min-width: 620px) {
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-head {
    grid-row: 1;
    pointer-events: none;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-head > * {
    pointer-events: auto;
  }
  body.layout-preview #imported-payment-records.layout-ledger :is(.layout-purchase-due, .layout-purchase-invoice) {
    position: relative;
    z-index: 1;
  }
}
body.layout-preview #quotation-browser .layout-ledger-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
body.layout-preview #quotation-browser .layout-ledger-controls { display: contents; }
body.layout-preview #quotation-browser .layout-ledger-controls #quotation-new { grid-row: 1; grid-column: 2; }
body.layout-preview #quotation-browser .layout-ledger-controls #quotation-count { grid-column: 1 / -1; }
body.layout-preview #quotation-browser .layout-ledger-controls .quotation-dashboard-actions {
  grid-column: 2;
  grid-row: 3;
}
body.layout-preview #quotation-browser .layout-ledger-controls #quotation-collapse-page {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
}
@container aligned-ledger (min-width: 740px) {
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-card-media { grid-column: 1; grid-row: 1 / 4; }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-card-production { grid-column: 2; grid-row: 1; }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-card-category { grid-column: 2; grid-row: 2; }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-inline-notes { grid-column: 2 / -1; grid-row: 3; padding-block: 0; }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail :is(.qm-card-days,.qm-card-cost,.qm-card-income) { grid-row: 1 / 3; }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-metric-value {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px 4px;
    align-items: baseline;
    font-size: 16px;
  }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-metric-number { font-size: inherit; white-space: nowrap; }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-metric-unit { font-size: .8em; }
}
@container aligned-ledger (max-width: 520px) {
  body.layout-preview #quotation-browser .layout-ledger-heading { display: flex; }
  body.layout-preview #quotation-browser .layout-ledger-controls { display: flex; }
}
/* Desktop procurement follows the approved two-column ledger. */
@media (min-width: 1060px) {
  html body.layout-preview[data-view="orders"] { display: block; }
  html body.layout-preview[data-view="orders"] main {
    width: 100%;
    max-width: none;
    padding: 0 10px 16px;
  }
  body.layout-preview[data-view="orders"] .layout-preview-notice {
    margin: 0 -10px 10px;
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 13px 12px;
  }
  body.layout-preview[data-view="orders"] :is(.app-topbar, .app-page-heading) {
    position: absolute;
    top: 5px;
    right: 12px;
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
  }
  body.layout-preview[data-view="orders"] .app-topbar > :not(#app-account),
  body.layout-preview[data-view="orders"] .app-page-heading > div:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  body.layout-preview[data-view="orders"] #app-account { gap: 8px; }
  body.layout-preview[data-view="orders"] #app-account button { min-height: 30px; }
  body.layout-preview[data-view="orders"] #imported-payment-records.layout-ledger {
    grid-template-columns: clamp(280px, 17.4vw, 440px) minmax(0, 1fr);
    gap: 14px;
    margin: 0;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-side .app-sidebar {
    position: relative;
    inset: auto;
    width: auto;
    margin: 0;
    max-height: none;
    overflow: visible;
    gap: 10px;
    padding: 14px;
    background: var(--ui-surface);
  }
  body.layout-preview[data-view="orders"] .layout-ledger-side .app-brand {
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    padding: 8px 34px 8px 10px;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-side .app-brand strong { font-size: clamp(21px, 1.35vw, 29px); }
  body.layout-preview[data-view="orders"] .layout-ledger-side .app-brand small,
  body.layout-preview[data-view="orders"] .layout-ledger-side .app-sidebar > footer { display: none; }
  body.layout-preview[data-view="orders"] .layout-ledger-heading {
    margin-inline: -12px;
    padding: 0 12px 9px;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-controls {
    flex: 1 1 auto;
    margin: 0;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-controls .list-pagination {
    display: flex;
    order: -1;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0;
    border: 0;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-controls .list-pagination :is(button, select) {
    min-height: 33px;
    padding: 4px 7px;
    margin: 0;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-controls #app-new-order { order: 3; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-selection-panel {
    display: grid;
    gap: 5px;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-selection-panel p { margin: 0; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-selection-actions { gap: 4px; padding: 0; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-selection-actions button { min-height: 29px; padding: 3px 6px; margin: 0; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-selection-metrics { padding-block: 3px; margin: 0; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-selection-basis { font-size: 11px; }
  body.layout-preview[data-view="orders"] .layout-ledger-tabs button[aria-pressed="true"] {
    color: var(--hb-brand);
  }
  body.layout-preview[data-view="orders"] .layout-ledger-side #purchase-payment-periods {
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
  }
  body.layout-preview[data-view="orders"] .purchase-period-heading h2 { display: none; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-period-card { border: 0; background: transparent; padding: 2px 0; }
  body.layout-preview[data-view="orders"] .layout-ledger-side button.purchase-period-value {
    background: var(--ui-soft);
    border: 1px solid var(--ui-line);
    border-radius: 8px;
    padding: 6px 8px;
  }
  body.layout-preview[data-view="orders"] #imported-payment-records-status { margin: 6px 0; }
  body.layout-preview[data-view="orders"] #imported-payment-records-list {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    gap: 5px 8px;
  }
  body.layout-preview[data-view="orders"] #imported-payment-records-list > :is(.quotation-year-group, .list-pagination, .procurement-quote-group) {
    flex: 1 0 100%;
    min-width: 0;
    margin: 0;
  }
  body.layout-preview[data-view="orders"] #imported-payment-records-list > :is(button, .quote-procurement-reviews) {
    margin: 0;
  }
  body.layout-preview[data-view="orders"] #imported-payment-records-list > .quote-procurement-reviews:not([open]) > summary,
  body.layout-preview[data-view="orders"] #imported-payment-records-list > button {
    min-height: 30px;
    padding: 4px 8px;
  }
  body.layout-preview[data-view="orders"] #imported-payment-records-list > .quote-procurement-reviews[open] { flex: 1 0 100%; }
}
@container aligned-ledger (min-width: 620px) {
  body.layout-preview #imported-payment-records.layout-ledger :is(.purchase-compact-order, .layout-purchase-columns) {
    --layout-purchase-cols: minmax(136px, 1fr) minmax(88px, 10%) minmax(84px, 10%) minmax(104px, 8%) minmax(148px, 12%);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order {
    --hb-surface: var(--hb-canvas);
    --hb-muted: var(--ui-muted);
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--ui-line);
    border-radius: 0;
    padding: 8px 10px;
    background: var(--hb-canvas);
    grid-template-rows: auto auto auto;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-stripe="light"] {
    background: var(--hb-subtle);
    --hb-subtle: var(--hb-project-alternate-header);
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-columns {
    grid-template-columns: var(--layout-purchase-cols);
    padding-inline: 10px;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-head {
    grid-row: 1 / 4;
    grid-template-rows: subgrid;
    align-items: center;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-compact-amount,
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-compact-tools,
  body.layout-preview #imported-payment-records.layout-ledger :is(.layout-purchase-due, .layout-purchase-invoice) { grid-row: 1 / 4; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .quotation-project-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1px 5px;
    margin-inline-start: 35px;
    flex-direction: row;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .quotation-project-title {
    order: -1;
    font-size: clamp(17px, 1.05vw, 25px);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-select-label {
    font-size: 0;
    gap: 0;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-compact-amount > span,
  body.layout-preview #imported-payment-records.layout-ledger :is(.layout-purchase-due, .layout-purchase-invoice) > span:first-child,
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-supplier > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-compact-amount strong {
    font-size: clamp(16px, 1.05vw, 24px);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order .purchase-compact-tools {
    display: grid;
    grid-template-columns: 84px 28px 28px;
    gap: 4px;
    align-items: center;
    justify-content: center;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools > :is(.procurement-inline-payment,.procurement-quote-state) { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools > .procurement-edit-icon { grid-column: 2; grid-row: 1; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools > .quotation-project-toggle { grid-column: 3; grid-row: 1; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools :is(button, select, .state-badge) {
    min-height: 32px;
    border-radius: 6px;
    font-size: 13px;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools select.state-badge { width: 100%; height: 32px; margin: 0; padding: 3px 3px 3px 6px; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools .procurement-quote-state .state-badge { justify-content: center; padding: 3px 5px; text-align: center; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools .state-badge.amber {
    color: var(--hb-label-amber-text);
    background: var(--hb-label-amber-bg);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools > :is(.procurement-edit-icon,.quotation-project-toggle) {
    width: 28px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ui-muted);
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice {
    display: grid;
    grid-template-columns: 72px 28px;
    gap: 4px;
    align-items: center;
    justify-content: center;
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice > strong {
    justify-self: center;
    width: 104px;
  }
  body.layout-preview #imported-payment-records.layout-ledger :is(.layout-purchase-invoice, .layout-purchase-invoice .procurement-inline-invoice) > strong {
    box-sizing: border-box;
    padding-inline: 6px;
    text-align: start;
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice > select {
    width: 100%;
    min-height: 32px;
    margin: 0;
    padding: 3px 3px 3px 6px;
    border: 1px solid var(--ui-line);
    border-radius: 6px;
    background-color: transparent;
    color: var(--ui-ink);
    font-size: 13px;
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice > select:has(option[value=""]:checked) { color: var(--ui-muted); }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice > select:has(option[value="是"]:checked) { color: var(--hb-label-green-text); }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice-upload:not([hidden]) {
    display: grid;
    place-items: center;
    width: 28px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--ui-muted);
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice-upload svg { display: block; }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice-upload-label { display: none; }
  body.layout-preview #imported-payment-records.layout-ledger :is(.purchase-compact-tools,.layout-purchase-invoice) :is(.procurement-edit-icon,.quotation-project-toggle,.procurement-inline-invoice-upload):hover {
    color: var(--ui-ink);
    background: var(--ui-soft);
    border-color: var(--ui-line);
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-invoice .procurement-inline-invoice > :is([role=status],button:not(.procurement-inline-invoice-upload)) {
    grid-column: 1 / -1;
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-meta {
    grid-column: 1;
    margin-inline-start: 35px;
    align-items: center;
    gap: 2px 8px;
  }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-meta .purchase-compact-fact { display: inline; font-size: 12px; }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-meta .purchase-compact-fact > span { margin-inline-end: 3px; }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-meta :is(strong,button) { font-size: 12px; }
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-meta button { min-height: 24px; padding: 2px 5px; margin: 0; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-support {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    min-width: 0;
    border: 0;
    padding: 0;
  }
  body.layout-preview #imported-payment-records.layout-ledger :is(.registered-purchase-note,.purchase-compact-source) {
    padding: 0;
    margin: 0;
    font-size: 12px;
    background: transparent;
  }
}
@media (min-width: 1060px) {
  body.layout-preview[data-view="orders"] #imported-payment-records-list > .purchase-timeline-year {
    flex: 1 0 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  body.layout-preview[data-view="orders"] #imported-payment-records-list .purchase-year-heading {
    min-height: 0;
    padding: 6px 0;
    background: transparent;
    border: 0;
  }
  body.layout-preview[data-view="orders"] .layout-purchase-actions {
    font-size: 12px;
    margin: 0;
    color: var(--ui-muted);
  }
  body.layout-preview[data-view="orders"] .layout-purchase-actions summary { padding: 3px 0; cursor: pointer; }
  body.layout-preview[data-view="orders"] .layout-purchase-actions[open] { flex-basis: 100%; }
  body.layout-preview[data-view="orders"] .layout-purchase-actions .imported-purchase-heading > div { display: none; }
  body.layout-preview[data-view="orders"] .layout-ledger-heading .list-pagination-summary,
  body.layout-preview[data-view="orders"] .layout-ledger-heading .list-pagination-controls { gap: 4px; }
  body.layout-preview[data-view="orders"] .layout-ledger-heading .list-pagination button { font-size: 12px; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-period-heading { order: 1; margin: 5px 0 0; }
  body.layout-preview[data-view="orders"] .layout-ledger-side #purchase-payment-periods { display: flex; flex-direction: column; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-period-pair button { width: 100%; }
}
@container aligned-ledger (min-width: 620px) {
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-compact-amount > span:not(.layout-purchase-column-label),
  body.layout-preview #imported-payment-records.layout-ledger .layout-purchase-due > span:first-child:not(.layout-purchase-column-label) {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    overflow: visible;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-tools select { min-width: 74px; white-space: nowrap; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-stripe="dark"] { background: var(--ui-surface); }
}
@media (min-width: 1060px) {
  body.layout-preview[data-view="orders"] .layout-ledger-side .app-sidebar > .app-sidebar-caption { display: none; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .app-sidebar .app-brand { min-height: 62px; }
  body.layout-preview[data-view="orders"] .layout-ledger-side .purchase-selection-panel .purchase-panel-heading > span { font-size: 11px; }
  body.layout-preview[data-view="orders"] .layout-calculator-options { margin-top: 2px; color: var(--ui-muted); font-size: 12px; }
  body.layout-preview[data-view="orders"] .layout-calculator-options > summary { cursor: pointer; }
}
@container aligned-ledger (min-width: 620px) {
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .quotation-project-title {
    font-size: clamp(19px, 1.25vw, 25px);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-compact-amount strong {
    font-size: clamp(18px, 1.15vw, 24px);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-stripe="light"] {
    background: color-mix(in srgb, var(--hb-text) 6%, var(--hb-canvas));
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-stripe="dark"] {
    background: color-mix(in srgb, var(--hb-text) 2.5%, var(--hb-canvas));
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .quotation-project-identity { margin-inline-start: 35px; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-selectable="false"] .purchase-compact-head .quotation-project-identity { margin-inline-start: 0; }
}
@media (min-width: 1060px) {
  body.layout-preview[data-view="orders"] #imported-payment-records.layout-ledger:not([hidden]) {
    grid-template-columns: clamp(260px, 17.4vw, 440px) minmax(0, 1fr);
  }
  body.layout-preview[data-view="orders"] .layout-ledger-heading .layout-ledger-controls {
    flex-grow: 1;
    justify-content: flex-start;
  }
  body.layout-preview[data-view="orders"] .layout-ledger-controls > #app-new-order {
    margin-inline-start: auto;
    margin-inline-end: 0;
  }
}

/* 对齐台账 uses the table preset in quotation-split-layouts.html. */
body.layout-preview {
  --ledger-side-width: 440px;
  --ledger-column-gap: 15px;
  --ledger-panel-radius: 14px;
  --ledger-nav-padding: 15px;
  --ledger-board-padding: 14px;
  --ledger-row-padding: 12px;
  --ledger-project-font: 25px;
  --ledger-title-font: 23px;
  --ledger-value-font: 22px;
  --ledger-minor-font: 13px;
  --ledger-stripe: light-dark(#f7f9fc, #222b38);
}
@media (min-width: 1060px) {
  html body.layout-preview[data-layout-aligned] { display: block; }
  html body.layout-preview[data-layout-aligned] main {
    width: 100%;
    max-width: none;
    padding: 0 10px 16px;
  }
  body.layout-preview[data-view="quotations"] .layout-preview-notice {
    margin: 0 -10px 10px;
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 13px 12px;
  }
  body.layout-preview[data-view="quotations"] :is(.app-topbar, .app-page-heading) {
    position: absolute;
    top: 5px;
    right: 12px;
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
  }
  body.layout-preview[data-view="quotations"] .app-topbar > :not(#app-account),
  body.layout-preview[data-view="quotations"] .app-page-heading > div:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  body.layout-preview[data-view="quotations"] #app-account button { min-height: 30px; }
  body.layout-preview[data-view="orders"] #imported-payment-records.layout-ledger:not([hidden]),
  body.layout-preview[data-view="quotations"] #quotation-browser.layout-ledger:not([hidden]) {
    grid-template-columns: clamp(260px, 21vw, var(--ledger-side-width)) minmax(0, 1fr);
    gap: var(--ledger-column-gap);
    margin: 0;
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-side {
    gap: var(--ledger-column-gap);
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-sidebar {
    position: relative;
    inset: auto;
    width: auto;
    margin: 0;
    max-height: none;
    overflow: visible;
    gap: 10px;
    padding: var(--ledger-nav-padding);
    border-radius: var(--ledger-panel-radius);
    background: var(--ui-surface);
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-brand {
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    padding: 8px 34px 8px 10px;
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-brand strong { font-size: 28px; line-height: 1.15; }
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-brand small,
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-sidebar > footer { display: none; }
  body.layout-preview[data-layout-aligned] #app-navigation button { min-height: 36px; font-size: 14px; }
  body.layout-preview[data-layout-aligned] :is(.layout-ledger-board,.layout-ledger-side-panel) {
    background: var(--ui-surface);
    border-radius: var(--ledger-panel-radius);
    padding: var(--ledger-board-padding);
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-heading h2 { font-size: var(--ledger-title-font); }
  body.layout-preview #quotation-browser .layout-ledger-heading { display: flex; }
  body.layout-preview #quotation-browser .layout-ledger-controls {
    display: flex;
    flex: 1 1 auto;
    margin: 0;
  }
  body.layout-preview #quotation-browser #quotation-pagination-top { order: -1; }
  body.layout-preview #quotation-browser #quotation-pagination-top .list-pagination {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    border: 0;
    gap: 6px;
  }
  body.layout-preview #quotation-browser #quotation-pagination-top .list-pagination :is(button,select) { min-height: 34px; padding: 4px 8px; }
  body.layout-preview #quotation-browser .layout-ledger-controls #quotation-new { margin-inline-start: auto; order: 3; }
  body.layout-preview .layout-ledger-utilities { font-size: var(--ledger-minor-font); color: var(--ui-muted); }
  body.layout-preview .layout-ledger-utilities summary { cursor: pointer; }
  body.layout-preview .layout-ledger-utilities[open] { flex-basis: 100%; }
  body.layout-preview .layout-ledger-utilities[open] button { margin: 4px 4px 0 0; }
  body.layout-preview #quotation-browser.layout-ledger :is(.quotation-year,.quotation-year-body,.quotation-group,.quotation-group-rows) {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
    background: transparent;
  }
  body.layout-preview #quotation-browser.layout-ledger :is(.quotation-year-summary,.quotation-group-summary) {
    padding: 5px 0;
    min-height: 0;
    background: transparent;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-year-label {
    font-size: var(--ledger-title-font);
  }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #imported-payment-records.layout-ledger :is(.purchase-compact-order,.layout-purchase-columns) {
    --ledger-purchase-tracks: minmax(0,1fr) clamp(132px,12cqw,200px) clamp(108px,10cqw,165px) clamp(95px,8cqw,125px) clamp(162px,15cqw,218px);
  }
  body.layout-preview #imported-payment-records.layout-ledger :is(.purchase-compact-order,.layout-purchase-columns) {
    grid-template-columns: var(--ledger-purchase-tracks);
    column-gap: clamp(9px,1cqw,24px);
    padding: var(--ledger-row-padding);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .quotation-project-title {
    font-size: var(--ledger-project-font);
    line-height: 1.25;
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-head .purchase-compact-amount strong {
    font-size: var(--ledger-value-font);
    line-height: 1.2;
  }
  body.layout-preview #imported-payment-records.layout-ledger :is(.layout-purchase-due,.layout-purchase-invoice) { font-size: 16px; }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-stripe="dark"] {
    background: var(--ui-surface);
  }
  body.layout-preview #imported-payment-records.layout-ledger .purchase-compact-order[data-stripe="light"] { background: var(--ledger-stripe); }

  body.layout-preview #quotation-browser.layout-ledger :is(.layout-ledger-scroll > #quotation-list, .layout-quote-fixed-columns) {
    --ledger-quote-metric-tracks: clamp(62px,6.8cqw,175px) clamp(110px,9.5cqw,235px) clamp(132px,12.5cqw,275px) clamp(262px,17cqw,345px);
    --ledger-quote-tracks: minmax(0,1fr) var(--ledger-quote-metric-tracks);
    --ledger-quote-phase-tracks: minmax(0,1fr) clamp(105px,12cqw,175px) var(--ledger-quote-metric-tracks);
    --ledger-quote-gap: clamp(12px,1.25cqw,32px);
  }
  body.layout-preview #quotation-browser.layout-ledger :is(.layout-quote-columns,.quotation-group-rows > .quotation-project-block) {
    grid-template-columns: var(--ledger-quote-tracks);
    column-gap: var(--ledger-quote-gap);
    padding: var(--ledger-row-padding);
    border: 0;
    border-bottom: 1px solid var(--ui-line);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-columns span:not(:first-child) { text-align: center; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-group-rows > .quotation-project-block {
    background: var(--ui-surface);
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-group-rows > .quotation-project-block[data-stripe="light"] {
    background: var(--ledger-stripe);
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-block .quotation-project-title {
    font-size: var(--ledger-project-font);
    line-height: 1.25;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-block .quotation-project-primary {
    grid-template-columns: subgrid;
    grid-row: 1 / 5;
    grid-template-rows: subgrid;
    align-self: stretch;
    pointer-events: none;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-block .quotation-project-primary > * { pointer-events: auto; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-block .quotation-project-primary .quotation-project-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1px 6px;
    margin-inline-start: 32px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-title { order: -1; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-select { font-size: 0; gap: 0; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-tools {
    grid-column: 5;
    grid-row: 1 / 5;
    justify-content: center;
    gap: 4px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-tools .quotation-project-status { width: auto; min-width: 110px; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-tools .quotation-invoice-links { display: flex; flex-wrap: wrap; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-contents > .quotation-project-metadata {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    margin-inline-start: 32px;
    background: transparent;
    padding: 0;
    border: 0;
    gap: 4px 8px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata :is(.qm-metadata-leading,.qm-metadata-trailing) { gap: 4px 8px; flex-wrap: wrap; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-project-fact {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 5px;
    padding: 0;
    min-width: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-annotation {
    grid-column: 1;
    grid-row: 4;
    position: relative;
    margin-inline-start: 32px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail { display: contents; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail > :is(.qm-production-block,.qm-finance-block) > * {
    position: relative;
    min-width: 0;
    padding: 0;
    border: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail :is(.qm-card-days,.qm-card-cost,.qm-card-income) {
    grid-row: 1 / 5;
    justify-items: center;
    align-self: center;
    text-align: center;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-days { grid-column: 2; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-cost { grid-column: 3; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-income { grid-column: 4; }
  body.layout-preview #quotation-browser.layout-ledger .qm-card-detail .qm-metric-value { font-size: var(--ledger-value-font); }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single :is(.qm-card-days,.qm-card-cost,.qm-card-income) > .qm-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail :is(.qm-card-production,.qm-card-category,.qm-card-media,.layout-quotation-note) {
    grid-column: 1;
    grid-row: auto;
    margin-inline-start: 32px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail .qm-card-media { grid-row: 6; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail .layout-quotation-note { grid-row: 7; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-modern-varying { grid-column: 1 / -1; grid-row: 8; }
}
@media (min-width: 1060px) {
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-brand strong {
    font-size: clamp(21px, 1.5vw, 28px);
  }
  body.layout-preview[data-layout-aligned] #app-navigation.desktop-grouped button {
    padding-inline: 5px;
    white-space: nowrap;
    gap: 5px;
  }
  body.layout-preview[data-layout-aligned] #app-navigation.desktop-grouped svg { width: 14px; height: 14px; }
  body.layout-preview[data-view="quotations"] #quotation-browser .list-pagination-summary { gap: 6px; }
  body.layout-preview[data-view="quotations"] #quotation-browser #quotation-pagination-top .list-pagination {
    display: flex;
    gap: 5px 8px;
  }
  body.layout-preview[data-view="quotations"] #quotation-browser #quotation-pagination-top .list-pagination-note { display: none; }
  body.layout-preview[data-view="quotations"] #quotation-browser #quotation-pagination-top .list-pagination :is(button,select) { margin: 0; }
}
@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .quotation-group-rows > .quotation-project-block {
    margin: 0;
    border-radius: 0;
    row-gap: 3px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-tools {
    flex-wrap: wrap;
    align-content: center;
    min-width: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-tools .quotation-invoice-links {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    gap: 3px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-tools :is(.quotation-invoice-button,.quotation-project-status) {
    width: auto;
    font-size: 13px;
    min-height: 32px;
    min-width: 0;
    padding: 4px 6px;
    margin: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-tools .quotation-project-status { min-width: 98px; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-contents > .quotation-project-metadata {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata :is(.qm-metadata-leading,.qm-metadata-trailing) {
    display: flex;
    width: auto;
    justify-content: start;
    flex: 0 1 auto;
    min-width: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-project-fact {
    flex: 0 1 auto;
    width: auto;
    min-width: min(100%, 79px);
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-project-value { white-space: normal; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail .layout-quote-facts {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 9px;
    margin-inline-start: 32px;
    padding: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .qm-card-cell {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .qm-card-cell:not(.qm-card-media) {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 4px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .qm-cell-body {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 4px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .qm-cell-body strong {
    font-size: 13px;
    font-weight: 600;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail .layout-quotation-note {
    grid-row: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    align-self: start;
    gap: 5px;
    min-height: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-note :is(.qm-note-body,.qm-note-display) {
    min-height: 0;
    padding: 1px 4px;
    margin: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-modern-varying {
    grid-row: 6;
    padding: 0;
    margin: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-modern-varying:empty { display: none; }
}
body.layout-preview .layout-quote-facts { display: contents; }
body.layout-preview #quotation-workspace .quotation-project-title { cursor: text; }

body.layout-preview #quotation-browser.layout-ledger .qm-inline-notes {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
}
body.layout-preview #quotation-browser .qm-inline-notes:has(> .layout-quote-note-trigger) > .qm-caption {
  display: none;
}
body.layout-preview #quotation-browser .layout-quote-note-popover .qm-note-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 6px;
  width: 100%;
  padding: 0;
}
body.layout-preview #quotation-browser .layout-quote-note-trigger {
  display: block;
  width: 100%;
  height: 36px;
  min-height: 0;
  margin: 0;
  padding: 0 9px;
  border: 0;
  border-radius: var(--hb-radius, 8px);
  background: color-mix(in srgb, var(--ui-ink) 7%, transparent);
  color: var(--ui-ink);
  font-size: var(--ledger-minor-font, 13px);
  font-weight: normal;
  text-align: start;
}
body.layout-preview #quotation-browser .layout-quote-note-trigger:is(:hover, :focus-visible, :has(+ :popover-open)) {
  background: color-mix(in srgb, var(--ui-ink) 15%, transparent);
}
body.layout-preview #quotation-browser .layout-quote-note-trigger[hidden] { display: none; }
.layout-quote-note-summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.layout-preview #quotation-browser .layout-quote-note-popover { width: min(360px, calc(100vw - 16px)); }
body.layout-preview #quotation-browser .layout-quote-note-popover .qm-note-display:empty { display: none; }
body.layout-preview #quotation-browser .layout-quote-note-popover .qm-note-display { min-height: 0; }
.layout-quote-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
body.layout-preview #quotation-browser .layout-quote-note-popover .qm-note-input {
  max-height: min(240px, 42dvh);
  overflow-y: auto;
}
@media (max-width: 1059px), (pointer: coarse) {
  body.layout-preview #quotation-browser .layout-quote-note-trigger { height: 44px; }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-block .quotation-project-primary { grid-row: 1 / 4; }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-primary .quotation-project-tools,
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail :is(.qm-card-days,.qm-card-cost,.qm-card-income) {
    grid-row: 1 / 4;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts .qm-card-cell:not(.qm-card-media),
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts .qm-card-cell:not(.qm-card-media) .qm-cell-body {
    display: flex !important;
    flex-flow: row wrap;
    align-items: baseline;
    gap: 2px 5px;
    min-height: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts .qm-phase-suppliers { display: inline-flex; padding: 0; margin: 0; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-extra {
    grid-column: 1;
    grid-row: 4;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 0;
    margin-inline-start: 32px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-extra > :not(.qm-inline-notes) {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-extra button,
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-modern-row-tools button {
    min-height: 29px;
    padding: 2px 6px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single :is(.qm-card-days,.qm-card-cost,.qm-card-income) .qm-cell-body {
    width: 100%;
    justify-items: center;
    text-align: center;
  }
}
@container aligned-ledger (min-width: 1160px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single {
    --quote-extra-width: clamp(166px,14cqw,325px);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-extra {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
    justify-self: end;
    width: var(--quote-extra-width);
    margin: 0;
    padding-inline-start: 12px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single :is(.quotation-project-identity,.quotation-project-metadata,.layout-quote-facts) {
    margin-inline-end: calc(var(--quote-extra-width) + 16px);
  }
}
@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .qm-metadata-leading,
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .qm-metadata-leading > * {
    flex: 0 1 auto;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-tencent-identifiers {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-tencent-identifiers .quotation-project-fact {
    display: inline-flex;
    width: auto;
    min-width: 0;
    flex-wrap: wrap;
    gap: 3px;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-modern-row-tools {
    flex-wrap: wrap;
    width: auto;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-metadata .quotation-project-value { font-size: 13px; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single :is(.qm-card-days,.qm-card-cost,.qm-card-income) .qm-cell-body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.layout-quote-phase { display: contents; }

@container aligned-ledger (min-width: 740px) {
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: var(--ledger-quote-phase-tracks, var(--layout-quote-cols));
    align-items: center;
    gap: 0 var(--ledger-quote-gap, 8px);
    padding: 7px 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .qm-card-detail {
    display: contents;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .layout-quote-phase {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
    grid-column: 1;
    grid-row: 1;
    padding: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-phase .qm-card-cell > .qm-caption {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .qm-inline-notes {
    grid-column: 2;
    grid-row: 1;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .layout-quote-note-trigger:has(> .layout-quote-note-summary:empty) {
    width: auto;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .layout-quote-note-trigger:has(> .layout-quote-note-summary:empty):not(:is(:hover, :focus-visible, :has(+ :popover-open))) {
    background: transparent;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .layout-quote-note-summary:empty::before {
    content: "备注";
    color: var(--ui-muted);
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] :is(.qm-card-days,.qm-card-cost,.qm-card-income) {
    grid-row: 1;
    gap: 2px;
    padding: 0;
    border: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .quotation-modern-varying {
    grid-column: 6;
    grid-row: 1;
    justify-content: flex-end;
    gap: 3px 8px;
    padding: 0;
    min-width: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .quotation-modern-record[data-multi="true"] .quotation-modern-row-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
  }
}

body.layout-preview #app-sidebar-toggle { display: none !important; }
.layout-quote-notes-heading { display: none; }

@media (min-width: 1060px) {
  body.layout-preview[data-layout-aligned] .layout-ledger-side {
    position: sticky;
    top: 10px;
    align-self: start;
    max-block-size: calc(100dvh - 20px);
    overflow-y: auto;
    overscroll-behavior-y: auto;
    scrollbar-width: thin;
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-brand {
    padding: 8px 10px;
    margin-bottom: 0;
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-side .app-principles { display: none; }
  body.layout-preview[data-layout-aligned] #app-navigation.desktop-grouped .app-navigation-group > button {
    min-height: 36px;
    padding: 2px 8px;
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-tabs button[aria-pressed="true"] {
    color: var(--hb-brand);
    font-weight: 700;
  }
  body.layout-preview #quotation-browser.layout-ledger #quotation-selection-panel {
    background: var(--ui-surface);
    border-radius: var(--ledger-panel-radius);
    padding: 16px;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px 10px;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-heading { display: contents; }
  body.layout-preview #quotation-selection-panel .quotation-selection-heading > strong {
    font-size: 22px;
    order: -2;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-heading > span {
    flex: 1 0 100%;
    order: 2;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-metrics {
    grid-template-columns: repeat(3, minmax(0,1fr));
    align-items: start;
    gap: 5px 8px;
    border: 0;
    margin: 6px 0 0;
    padding: 0;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-metric { min-width: 0; }
  body.layout-preview #quotation-selection-panel .quotation-selection-metric strong { font-size: clamp(15px,1.2vw,19px); }
  body.layout-preview #quotation-selection-panel .quotation-selection-status { margin: 4px 0 0; line-height: 1.35; }
  body.layout-preview #quotation-selection-panel .layout-ledger-utilities > summary { white-space: nowrap; }
  body.layout-preview #quotation-selection-panel .layout-ledger-utilities[open] { flex: 1 0 100%; }
  body.layout-preview #quotation-browser .layout-ledger-controls #quotation-collapse-page {
    order: -1;
    min-height: 34px;
    margin: 0;
    padding: 4px 8px;
  }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-primary .quotation-project-tools {
    justify-content: center;
    gap: 4px 6px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools :is(.quotation-invoice-links,.quotation-modern-row-tools) {
    display: contents;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools :is([data-preview-icon],.quotation-row-edit) {
    display: inline-grid;
    place-items: center;
    width: 29px;
    min-height: 29px;
    padding: 0;
    font-size: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ui-muted);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools :is([data-preview-icon],.quotation-row-edit):is(:hover,:focus-visible) {
    border-color: var(--ui-line);
    background: var(--ui-soft);
  }

}
@container aligned-ledger (min-width: 1160px) {
  body.layout-preview .layout-quote-column-heading {
    display: grid;
    grid-template-columns: minmax(0,1fr) clamp(166px,14cqw,325px);
    column-gap: 16px;
    align-items: center;
  }
  body.layout-preview .layout-quote-notes-heading {
    display: block;
    padding-inline-start: 12px;
  }
}
@media (min-width: 1060px) {
  body.layout-preview #quotation-selection-panel .quotation-selection-top {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-heading > span { grid-column: 1 / -1; grid-row: 3; }
  body.layout-preview #quotation-selection-panel .quotation-selection-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 4px;
    grid-column: 2;
    grid-row: 1;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-controls button {
    display: inline-grid;
    place-items: center;
    font-size: 0;
    min-height: 30px;
    min-width: 30px;
    padding: 0;
    margin: 0;
  }
  body.layout-preview #quotation-selection-panel .quotation-selection-controls button::before {
    content: var(--ledger-calculator-symbol);
    font: 16px/1 system-ui;
  }
  body.layout-preview #quotation-select-page { --ledger-calculator-symbol: "☑"; }
  body.layout-preview #quotation-select-matching { --ledger-calculator-symbol: "▾"; }
  body.layout-preview #quotation-selection-clear { --ledger-calculator-symbol: "×"; }
  body.layout-preview #quotation-selection-copy { --ledger-calculator-symbol: "▣"; }
  body.layout-preview #quotation-selection-panel .layout-ledger-utilities { grid-column: 1 / -1; grid-row: 4; }
}
@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools .quotation-row-edit { order: 1; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools .quotation-row-toggle { order: 2; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools .quotation-invoice-button { order: 3; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-primary[data-complete="true"]::before { display: none; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single:has(.quotation-project-primary[data-complete="true"]) {
    box-shadow: inset 3px 0 var(--hb-label-complete);
  }
}

@media (min-width: 1060px) {
  body.layout-preview[data-layout-aligned] .layout-preview-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 -10px 10px;
    padding: 5px 12px;
    min-height: 44px;
    background: var(--ui-surface);
    border-bottom: 1px solid var(--ui-line);
  }
  body.layout-preview[data-layout-aligned] .layout-preview-header .layout-preview-notice {
    border: 0;
    margin: 0;
    padding: 0;
  }
  body.layout-preview[data-layout-aligned] .layout-preview-header #app-account {
    position: static;
    margin: 0 0 0 auto;
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-side {
    top: calc(var(--preview-header-height, 44px) + 10px);
    max-block-size: calc(100dvh - var(--preview-header-height, 44px) - 20px);
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-board {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    position: sticky;
    top: calc(var(--preview-header-height, 44px) + 10px);
    max-block-size: calc(100dvh - var(--preview-header-height, 44px) - 20px);
  }
  body.layout-preview[data-view="finance"] .layout-module-frame > .layout-ledger-board {
    box-sizing: border-box;
    block-size: calc(100dvh - var(--preview-header-height, 44px) - 46px);
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-scroll {
    min-block-size: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }
  body.layout-preview[data-layout-aligned] :is(.layout-ledger-scroll, .layout-ledger-side, .source-workbook-scroll) {
    scrollbar-width: none;
  }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts {
    align-items: baseline;
    column-gap: 12px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts .qm-card-cell:not(.qm-card-media) {
    flex: 0 1 auto;
    margin: 0;
    width: auto;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts .qm-card-cell:not(.qm-card-media) .qm-cell-body {
    flex: 0 1 auto;
    width: auto;
    line-height: 1.4;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts .qm-caption {
    margin: 0;
    line-height: 1.4;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts .layout-quote-duplicate-supplier {
    display: none;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-metadata-leading .quotation-outsourcing-facts {
    order: 1;
    flex: 0 1 auto;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-support {
    grid-column: 1;
    grid-row: 4;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding-top: 4px;
    margin-inline-start: 32px;
    font-size: 12px;
    color: var(--ui-muted);
    border-top: 1px solid var(--ui-line);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-extra { grid-row: 5; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform .quotation-tencent-identifiers {
    display: flex;
    flex-wrap: wrap;
    flex: 1 0 100%;
    gap: 2px 10px;
    font-size: inherit;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform .quotation-project-fact {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    min-width: 0;
    gap: 3px;
    font-size: inherit;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform .quotation-support-label {
    font-size: inherit;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform [data-tencent-number] {
    overflow-wrap: anywhere;
  }
}
@container aligned-ledger (min-width: 1160px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-extra { grid-row: 1 / 5; }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-support {
    margin-inline-end: calc(var(--quote-extra-width) + 16px);
  }
}

.layout-quote-tool-icon { display: none; }
@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .quotation-project-tools .layout-quote-tool-icon {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    pointer-events: none;
  }
}
@container aligned-ledger (min-width: 1160px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-columns .layout-quote-notes-heading {
    text-align: start;
  }
}

@media (min-width: 1060px) {
  html:has(> body.layout-preview[data-layout-aligned]) {
    overflow: clip;
  }
  html body.layout-preview[data-layout-aligned] main {
    block-size: 100dvh;
    min-block-size: 0;
    margin-block: 0;
    padding-block-end: 0;
    overflow: clip;
  }
}

body.layout-preview #quotation-list .quotation-project-identity > .quotation-code { display: none; }

body.layout-preview #quotation-browser.layout-ledger .qm-card-production > .qm-caption {
  display: none;
}
body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .qm-card-production:has(> .qm-cell-body:empty) {
  display: none !important;
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity > [data-quote-production-type] {
  display: inline-block;
  max-width: 100%;
  margin-inline-start: 3px;
  padding: 1px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--ui-soft);
  color: var(--ui-muted);
  font-size: var(--ledger-minor-font);
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity > [data-quote-production-type="分镜"] {
  background: light-dark(#e1f4f1,#1e3832);
  color: light-dark(#216e63,#a6ded0);
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity > [data-quote-production-type="动画"] {
  background: light-dark(#ffecd0,#44301c);
  color: light-dark(#86501a,#f1c894);
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity > [data-quote-production-type="特效"] {
  background: light-dark(#dcf3f7,#1c343c);
  color: light-dark(#216978,#a6dce9);
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity > [data-quote-production-type="剪辑"] {
  background: light-dark(#f8e5fb,#3c2540);
  color: light-dark(#87418c,#e6b5ec);
}

body.layout-preview .layout-quote-supplier-picker :is(.qm-phase-suppliers, .quotation-outsourcing-facts > .quotation-outsourcing-tag:not(button)) {
  display: none !important;
}
body.layout-preview #quotation-browser button.layout-quote-supplier-button {
  margin: 0;
  min-height: 29px;
  padding: 3px 7px;
  cursor: pointer;
}
body.layout-preview #quotation-browser button.layout-quote-supplier-button::after {
  content: "";
  display: inline-block;
  margin: 0 0 2px 5px;
  border: 3px solid transparent;
  border-bottom: 0;
  border-top-color: currentColor;
}
body.layout-preview :is(.layout-quote-supplier-popover, .layout-quote-note-popover) {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  width: max-content;
  max-width: min(360px, calc(100vw - 16px));
  max-height: min(360px, 65dvh);
  overflow: auto;
  padding: 12px 14px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
  font-size: 13px;
}
body.layout-preview .layout-quote-supplier-popover ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-inline-start: 18px;
  overflow-wrap: anywhere;
}

@media (max-width: 1059px), (pointer: coarse) {
  body.layout-preview #quotation-browser button.layout-quote-supplier-button { min-height: 44px; }
}

@media (min-width: 1060px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-ledger-controls .layout-quote-toolbar-trigger {
    min-height: 34px;
    padding: 4px 9px;
    margin: 0;
    white-space: nowrap;
  }
  body.layout-preview .layout-quote-toolbar-trigger::after {
    content: "";
    display: inline-block;
    margin: 0 0 2px 6px;
    border: 3px solid transparent;
    border-bottom: 0;
    border-top-color: currentColor;
  }
  body.layout-preview .layout-quote-toolbar-menu {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 6px;
    max-width: calc(100vw - 16px);
    border: 1px solid var(--ui-line);
    border-radius: 9px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
  }
  body.layout-preview .layout-quote-toolbar-menu:popover-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  body.layout-preview .layout-quote-toolbar-menu :is(#quotation-count, .quotation-dashboard-actions[hidden]) {
    display: none;
  }
  body.layout-preview #quotation-browser .layout-quote-toolbar-menu .quotation-dashboard-actions:not([hidden]) {
    display: contents;
  }
  body.layout-preview #quotation-browser .layout-quote-toolbar-menu button:not([hidden]) {
    width: 100%;
    min-height: 34px;
    margin: 0;
    padding: 4px 9px;
    text-align: start;
    white-space: nowrap;
  }
  body.layout-preview #quotation-browser #quotation-pagination-top :is(.list-pagination-size,.list-pagination-jump) > span {
    display: none;
  }
  body.layout-preview #quotation-browser #quotation-pagination-top [data-page-action] {
    min-width: 30px;
    padding-inline: 4px;
    font-size: 0;
  }
  body.layout-preview #quotation-browser #quotation-pagination-top [data-page-action]::before {
    content: var(--quote-paging-symbol);
    font: 16px/1 system-ui;
  }
  body.layout-preview #quotation-pagination-top [data-page-action="first"] { --quote-paging-symbol: "«"; }
  body.layout-preview #quotation-pagination-top [data-page-action="previous"] { --quote-paging-symbol: "‹"; }
  body.layout-preview #quotation-pagination-top [data-page-action="next"] { --quote-paging-symbol: "›"; }
  body.layout-preview #quotation-pagination-top [data-page-action="last"] { --quote-paging-symbol: "»"; }
}

body.layout-preview #quotation-browser.layout-ledger .layout-ledger-board {
  grid-template-rows: auto auto minmax(0, 1fr);
}
body.layout-preview #quotation-browser.layout-ledger .layout-ledger-heading { grid-row: 1; }
body.layout-preview #quotation-browser.layout-ledger .layout-ledger-scroll { grid-row: 3; }
.layout-quote-fixed-columns { display: none; }
@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-fixed-columns:not([hidden]) {
    display: block;
    grid-row: 2;
    min-width: 0;
    overflow: hidden;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-fixed-columns:not([hidden]) {
    scrollbar-gutter: auto;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-primary .quotation-project-tools {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-primary .quotation-project-tools > .quotation-project-status {
    flex: 0 1 auto;
    width: clamp(96px, calc(100% - 156px), 118px);
    min-width: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools :is([data-preview-icon], .quotation-row-edit) {
    flex: 0 0 26px;
    width: 26px;
    min-height: 29px;
  }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools :is([data-preview-icon], .quotation-row-edit) {
    position: relative;
    height: 32px;
    min-height: 32px;
    line-height: 0;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .quotation-project-tools :is([data-preview-icon], .quotation-row-edit) > svg {
    position: absolute;
    inset: 0;
    width: 17px;
    height: 17px;
    margin: auto;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

body.layout-preview #quotation-browser.layout-ledger .quotation-year > .quotation-year-summary::before {
  content: "▸";
  display: grid;
  place-items: center;
  flex: 0 0 14px;
  width: 14px;
  font-size: 16px;
  line-height: 1;
  transform: none;
}
body.layout-preview #quotation-browser.layout-ledger .quotation-year[open] > .quotation-year-summary::before {
  content: "▾";
  transform: none;
}

body.layout-preview #quotation-list .qm-card-days .qm-metric-unit {
  display: none;
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single:has(.layout-quote-support) .quotation-project-primary,
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single:has(.layout-quote-support) .quotation-project-primary .quotation-project-tools,
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single:has(.layout-quote-support) .qm-card-detail :is(.qm-card-days,.qm-card-cost,.qm-card-income) {
    grid-row: 1 / 5;
  }
}

body.layout-preview #quotation-browser.layout-ledger .quotation-year > .quotation-year-summary,
body.layout-preview #imported-payment-records.layout-ledger .purchase-timeline-year > .purchase-year-heading {
  background: light-dark(#e3ecf7, #29384d);
  border-block: 1px solid light-dark(#bfcfe3, #435977);
  box-shadow: inset 3px 0 light-dark(#54759d, #89a9d3);
  padding-inline: 10px;
}

@media (min-width: 1060px) {
  body.layout-preview[data-layout-aligned] .layout-ledger-board {
    --ledger-scroll-lane: 20px;
  }
  body.layout-preview[data-layout-aligned] .layout-ledger-board :is(.layout-ledger-scroll, .layout-quote-fixed-columns) {
    padding-inline-end: var(--ledger-scroll-lane);
    background-image: linear-gradient(to left,
      var(--ui-surface) 0 calc(var(--ledger-scroll-lane) - 1px),
      var(--ui-line) calc(var(--ledger-scroll-lane) - 1px) var(--ledger-scroll-lane),
      transparent var(--ledger-scroll-lane));
  }
  body.layout-preview[data-view="finance"] #finance-workspace .layout-ledger-scroll,
  body.layout-preview[data-layout-aligned] :is([data-module="overview"],[data-module="calendar"],[data-module="admin"],[data-module="archive"]) .layout-ledger-board .layout-ledger-scroll {
    padding-inline-end: calc(var(--ledger-scroll-lane) + 12px);
  }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts > .quotation-outsourcing-facts {
    display: inline-flex;
    flex: 0 1 auto;
    align-self: center;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .qm-card-detail .layout-quote-facts {
    align-items: center;
    gap: 5px 10px;
    padding-block: 2px 4px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts > .qm-card-cell.qm-card-production {
    flex: 0 1 94px;
    min-width: min(100%, 94px);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quotation-single .layout-quote-facts > .qm-card-cell.qm-card-category {
    flex: 0 1 145px;
    min-width: min(100%, 145px);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts :is(.qm-caption, .qm-cell-body, .qm-cell-body strong) {
    line-height: 1.35;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts :is(.qm-card-category .qm-cell-body strong, .quotation-outsourcing-facts > :is(.quotation-outsourcing-tag,.quotation-internal-tag)) {
    box-sizing: border-box;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    font-size: 13px;
    line-height: 1.35;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts > .quotation-outsourcing-facts button.layout-quote-supplier-button {
    min-height: 26px;
    padding: 3px 7px;
  }
}

body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity > .quotation-together-sync {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px 5px;
  max-width: 100%;
  width: auto;
  padding: 0;
  margin: 0 0 0 6px;
  border: 0;
  font-size: var(--ledger-minor-font);
  line-height: 1.35;
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity .quotation-together-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity .quotation-together-actions :is(button, a) {
  min-height: 28px;
  margin: 0;
  padding: 2px 5px;
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity [data-preview-identity-edit] {
  position: relative;
  width: 28px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: var(--ui-muted);
}
body.layout-preview #quotation-browser.layout-ledger .quotation-project-identity [data-preview-identity-edit] .layout-quote-tool-icon {
  display: block;
  position: absolute;
  inset: 0;
  width: 15px;
  height: 15px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

@container aligned-ledger (min-width: 870px) {
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .layout-quote-quantity {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 7px;
    color: var(--ui-muted);
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .qm-card-category {
    column-gap: 7px !important;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform,
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform .quotation-tencent-identifiers {
    column-gap: 14px;
    row-gap: 4px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform .quotation-project-fact {
    column-gap: 7px;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform .quotation-support-label,
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .qm-card-category > .qm-caption {
    color: var(--ui-muted);
    font-weight: 400;
  }
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-platform .quotation-project-fact > :not(.quotation-support-label),
  body.layout-preview #quotation-browser.layout-ledger .layout-quote-facts .layout-quote-quantity > strong {
    color: var(--ui-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
}
