/* Clear information hierarchy with restrained technical styling. */
:root{--ink:#1c304a;--muted:#64748b;--line:#dfe7f1;--accent:#1677a8;--surface:#fff;--shadow-soft:0 5px 20px #20395808}
.customer-source-detail[hidden]{display:none!important}.sales-commission{margin:8px 0;padding:7px 10px;background:#f4f8fc;border:1px solid #dce7f1;border-radius:7px}.sales-commission>summary{font-weight:600;padding:3px 0}.sales-commission p{font-size:12px;margin:6px 0}.sales-commission td,.sales-commission th{padding:7px 8px}
#app>main{padding-top:10px}
#app>main>.app-header{position:sticky;top:0;z-index:8;min-height:56px;padding:9px 14px;margin-bottom:6px;border-radius:8px;background:#fffffff5;backdrop-filter:blur(8px);gap:10px;flex-wrap:nowrap}
#app .app-header h1{font-size:20px;margin:0;line-height:1.3}
#app .app-header #subtitle{font-size:11px;line-height:1.3}
#app .app-header .header-title{flex:0 1 auto;min-width:100px;width:auto}
#app .app-header .header-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:5px;min-width:0;width:auto}
#app .app-header #identity{font-size:12px;white-space:nowrap;flex:0 0 auto;margin:0}
#app .app-header button{min-height:30px;padding:5px 8px;font-size:12px;white-space:nowrap;flex:0 0 auto}
#app .app-header [hidden]{display:none!important}
#app .app-guidance{margin:1px 0 4px}
#app .app-guidance>summary{font-size:11px;padding:1px 0;line-height:1.5}
#content .my-orders-scope{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:12px;color:#47627d}
#companybar .scope-filter>.company-filter{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;align-items:start;padding:7px 10px}
#companybar .company-filter>.row{grid-column:2;grid-row:1;margin:0!important;gap:5px}
#companybar .company-choices{grid-column:1;grid-row:1;grid-template-columns:repeat(auto-fit,minmax(175px,240px));gap:6px;margin:0}
#companybar .company-choice{min-height:46px;padding:6px 8px;gap:8px;border-radius:6px}
#companybar .company-choice img{width:30px;height:24px}
#companybar .company-choice input{width:20px;height:20px;flex-basis:20px}
#companybar .company-choice b{font-size:14px}
#companybar .company-choice small{font-size:10px;margin-top:1px;line-height:1.3}
#companybar .company-filter>small{grid-column:1/-1;font-size:11px;line-height:1.4}
#companybar .company-filter button,#datebar .scope-filter button{min-height:28px;padding:4px 8px;font-size:12px}
#datebar .scope-filter>.panel{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:end;padding:7px 10px}
#datebar .scope-filter .actions{margin:0;gap:5px;align-self:end}
#datebar #dateform>div{gap:6px!important}
#datebar #dateform label{width:125px;font-size:11px;gap:3px}
#datebar #dateform input{padding:5px 7px;min-height:30px;font-size:12px}
#datebar .scope-filter .panel>p{flex-basis:100%;font-size:11px;line-height:1.4;margin:1px 0 0}
@media(max-width:800px){
 #app>main{padding-top:8px}
 #app>main>.app-header{flex-wrap:wrap;padding:7px 9px;gap:5px;min-height:0}
 #app .app-header .header-title{width:100%}
 #app .app-header h1{font-size:18px}
 #app .app-header #subtitle{display:none}
 #app .app-header .header-actions{width:100%;max-width:100%;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;padding-bottom:2px;gap:5px}
 #app .app-header #identity{font-size:11px;flex:0 0 auto}
 #app .app-header button{min-height:44px;padding:7px 9px;font-size:13px}
 #companybar .scope-filter>.company-filter{grid-template-columns:minmax(0,1fr);padding:7px 9px}
 #companybar .company-choices{grid-template-columns:repeat(2,minmax(0,1fr));grid-column:1;grid-row:1}
 #companybar .company-filter>.row{grid-column:1;grid-row:2}
 #companybar .company-filter>small{grid-column:1;grid-row:3}
 #companybar .company-choice{min-height:48px;padding:6px}
 #companybar .company-filter button,#datebar .scope-filter button{min-height:44px;font-size:13px}
 #datebar #dateform input{min-height:44px;font-size:16px}
 #datebar #dateform label{width:125px}
}
body{background:radial-gradient(ellipse at 90% 0,#e9f4ff 0,transparent 45%),#f4f7fb;line-height:1.55;-webkit-font-smoothing:antialiased}
aside,.company-themed aside{background:linear-gradient(165deg,#122a43,#0d1c30);border-right:1px solid #2c4761}
aside h2{font-size:28px;letter-spacing:5px;text-shadow:0 0 22px #4bc8ff35}
#nav button{border-radius:9px;line-height:1.4;letter-spacing:.2px}
#nav button.active{box-shadow:inset 3px 0 0 #72e4e1,0 4px 14px #0001!important;background:linear-gradient(100deg,#1b506b,#233f61)!important}
#nav button::before{content:'›';display:inline-block;width:17px;color:#74c7dc;font-weight:700}
main>header{background:#ffffffeb;border:1px solid #e0e9f3;padding:19px 22px;border-radius:14px;box-shadow:var(--shadow-soft);margin-bottom:22px}
h1{font-size:25px;font-weight:750;letter-spacing:.4px;line-height:1.35}
h3{font-size:17px;letter-spacing:.2px;line-height:1.5}h4{font-size:14px}
#subtitle{font-size:12px}#identity{font-weight:600;font-size:13px;color:#38506d}
button{border-radius:8px;min-height:36px;font-weight:600;box-shadow:0 1px 2px #16334e08;transition:background .12s,border-color .12s,box-shadow .12s}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #62b9e8;outline-offset:3px}
button:not(:disabled):active{filter:brightness(.96)}button:disabled{box-shadow:none;opacity:.8}
.company-themed button:not(.primary):not(.dashboard-card):not(.dashboard-bar):not(.process-comparison-row):not(.priority-urgent):not(.priority-high):not(.priority-normal):not([style*="background"]):not(:disabled){background:#fff!important;color:var(--company-main,#1769cc)!important;border-color:#cbd8e8!important}
.primary,.company-themed .primary:not(:disabled){background:linear-gradient(115deg,var(--company-main,#1769cc),#137f99)!important;border-color:var(--company-main,#1769cc)!important;color:#fff!important;box-shadow:0 3px 8px #1769cc18}
button.primary:hover{box-shadow:0 4px 13px #1769cc2b}
.card,.panel{border-color:#e0e8f2;box-shadow:var(--shadow-soft);border-radius:12px}
.card{position:relative}.card strong{font-size:30px;font-variant-numeric:tabular-nums;letter-spacing:-.5px;line-height:1.2;margin:12px 0}
.card small{font-weight:600;color:#62728a}.card .muted{font-weight:400}
.card:hover{border-color:#b4cee6}.panel>h3:first-child{padding-bottom:12px;border-bottom:1px solid #e8eef5;margin-bottom:18px}
.toolbar{gap:14px}.toolbar input{background:#f8fafc}
input,select,textarea{border-color:#cfdbe9;color:var(--ink);border-radius:7px;line-height:1.4;box-shadow:inset 0 1px 2px #16334e03}
input::placeholder,textarea::placeholder{color:#8291a6}
input:focus,select:focus,textarea:focus,.company-themed input:focus,.company-themed select:focus,.company-themed textarea:focus{border-color:#3c9cc7;outline:2px solid #3c9cc726;outline-offset:1px;box-shadow:0 0 0 3px #3c9cc710}
input:disabled,select:disabled,textarea:disabled{background:#f3f6fa;color:#64748b;opacity:1}
label{color:#405571;font-weight:500;font-size:13px}label input,label textarea,label select{font-weight:400}
table{font-variant-numeric:tabular-nums}th,.company-themed th{background:#edf3f9;color:#526780;font-size:12px;font-weight:650;letter-spacing:.1px;line-height:1.5}
td{line-height:1.6;font-size:13px}td,th{border-bottom-color:#e5edf5}tbody tr:nth-child(even){background:#fafcfe}tbody tr:hover{background:#edf7fc}
td strong,td b{color:#214867}td small{font-size:11px}
.badge{font-size:12px;font-weight:600;border-radius:6px}
.parallel-status{line-height:2.3;font-size:12px}.parallel-status .badge{margin-inline:3px}
.notice,.company-themed .notice{background:linear-gradient(100deg,#eef6fc,#f5f9fd);color:#3c607f;border:1px solid #dcecf8;border-left:3px solid #3c9cc7;font-size:13px}
.company-choice{box-shadow:none;border-width:1px}.company-choice.selected{box-shadow:0 0 0 1px var(--choice-color)}
.company-choice img{border-radius:5px;background:#fff}.company-choice small{color:#64748b}
.company-filter .row b{color:#3d526d}.company-filter>small{line-height:1.7}
dialog{box-shadow:0 24px 80px #10253e40;border:1px solid #d6e2f0;background:#fbfdff}
dialog::backdrop{background:#10283f88;backdrop-filter:blur(2px)}
dialog>.row:first-child{padding-bottom:14px;border-bottom:1px solid #e1eaf4;margin-bottom:16px}
.history{border-left-color:#64b7ce;background:#f5f9fc;border-radius:0 7px 7px 0;padding:12px 15px;margin:10px 0}
.history p{margin-bottom:0;line-height:1.7}details>summary{cursor:pointer;line-height:1.7;padding-block:6px;color:#3b5f83}
.error{line-height:1.6}.empty{background:#f8fbfd;border:1px dashed #cadbe9;border-radius:10px;font-size:14px}
.task-rail{border-color:#ccdced;box-shadow:0 8px 25px #20395816}.task-rail header{background:linear-gradient(100deg,#164b79,#176f9a)!important;font-size:13px}
.task-rail .task-rail-list .task-open{background:#f0f6fc!important;color:#214867!important;border-color:#d5e4f1!important}
.task-rail .task-open small{color:#60758e}.task-rail .task-dismiss{background:#fff!important;color:#476b91!important;border-color:#cadbe9!important}
.task-rail-note{line-height:1.7}.task-rail-list .task-notification{margin-bottom:10px}
.login{border:1px solid #dce7f3;box-shadow:0 16px 55px #24456712}.login h1{color:#174d72;letter-spacing:5px}.login .primary{width:100%}
#page-dashboard button.dashboard-card{border-color:#dce6f0;box-shadow:var(--shadow-soft);border-radius:10px}
#page-dashboard .dashboard-card strong{color:#204c71}#page-dashboard .dashboard-track{height:7px}
#page-dashboard .dashboard-alerts button{margin:4px 0}#page-dashboard .dashboard-filters label{font-weight:600}
.quote-status-track{background:#f5f8fc;border-radius:8px;border:1px solid #e4edf5}.quote-status-separator{color:#8aabc2}
@media(max-width:800px){main>header{padding:15px 14px}.notice,.company-themed .notice{font-size:13px}.panel>h3:first-child{padding-bottom:10px}.task-rail{border-radius:10px}}

.scope-filter{background:#fff;border:1px solid #e0e8f2;border-radius:11px;margin-bottom:12px;box-shadow:var(--shadow-soft)}
.scope-filter>summary{display:flex;align-items:center;gap:10px;padding:13px 18px;min-height:48px;list-style:none;font-size:13px;font-weight:600;color:#405571}
.scope-filter>summary::-webkit-details-marker{display:none}.scope-filter>summary::before{content:'▸';color:#708aa2}.scope-filter[open]>summary::before{content:'▾'}
.scope-filter>summary b{margin-left:auto;color:var(--company-main,#1769cc);font-size:12px;text-align:right}.scope-filter>summary::after{content:'展开';font-size:11px;color:#8293a7;font-weight:400}.scope-filter[open]>summary::after{content:'收起'}
.scope-filter>.panel{border:0;margin:0!important;box-shadow:none;padding-top:5px}.scope-filter .company-filter .row>b{display:none}.scope-filter .company-filter .row{justify-content:flex-end}
.app-guidance{margin:0 0 14px;font-size:12px;color:#6a8098}.app-guidance>summary{display:inline-block;padding:2px 0;color:#72869d}.app-guidance>p{background:#f0f6fc;border-radius:7px;padding:10px 14px;margin:5px 0 0}
@media(max-width:800px){.scope-filter>summary{padding:12px}.scope-filter>.panel{padding:8px 12px 12px}.app-guidance{margin-bottom:12px}}

.personal-hidden{display:none!important}body.personal-hide-task-rail main{margin-right:0!important}
.settings-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 24px}
.settings-choice{display:flex;align-items:center;gap:12px;margin:0;padding:12px 14px;min-height:48px;border:1px solid #dbe5ef;border-radius:8px;background:white;cursor:pointer;color:#34516c;font-size:14px}
.settings-choice input{width:22px;height:22px;flex:0 0 22px;accent-color:var(--company-main,#1769cc)}.settings-choice:has(input:checked){background:#eff7fd;border-color:#9dc7e4}.settings-choice:focus-within{outline:2px solid #3c9cc7;outline-offset:2px}
@media(max-width:800px){.settings-choices{grid-template-columns:minmax(0,1fr)}.settings-choice{font-size:15px}}

.record-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 20px;padding:14px 16px;border:1px solid #e2eaf2;border-radius:10px;background:#f7faff;margin:12px 0}
.record-summary p{margin:0;line-height:1.5;overflow-wrap:anywhere}.record-summary small{display:inline-block;margin-bottom:3px}.part-followup-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}.part-followup-choices label{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid #dce7ef;border-radius:6px;margin:0}.part-followup-choices input{width:20px;height:20px;flex:0 0 20px}.draft-delete{color:#b42335;border-color:#efb5bd}
@media(max-width:800px){.record-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}.part-followup-choices{grid-template-columns:1fr}}

/* Compact department dashboards; keep record forms and dialogs unchanged. */
#content .record-list-panel{padding:12px 14px}
#content .record-list-panel .toolbar{margin-bottom:8px;gap:8px}
#content .record-list-panel .toolbar h3{font-size:15px;margin:0}
#content .record-list-panel .toolbar>div{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
#content .record-list-panel .record-filters{grid-template-columns:minmax(140px,.7fr) minmax(140px,.7fr) minmax(220px,1.6fr);gap:8px;align-items:end}
#content .record-list-panel label{font-size:12px;gap:3px;margin-bottom:7px}
#content .record-list-panel input,#content .record-list-panel select{min-height:32px;padding:6px 8px;font-size:12px}
#content .record-list-panel button{min-height:30px;padding:5px 9px;font-size:12px}
#content .record-list-panel td,#content .record-list-panel th{padding:7px 8px;font-size:12px;line-height:1.45}
#content .record-list-panel table{min-width:1000px}
#content .record-list-panel table.record-has-dates{min-width:1300px}
#content .record-date{white-space:nowrap;font-size:11px!important;font-variant-numeric:tabular-nums}
.delivery-marker{display:inline-flex;flex-direction:column;gap:1px;padding:2px 5px;border-radius:5px;line-height:1.35;font-variant-numeric:tabular-nums;font-size:11px}
.delivery-marker>small{font-size:10px!important;font-weight:600;color:inherit!important;line-height:1.35!important}
.delivery-normal{color:#466579;background:#f1f6fa}.delivery-soon{color:#805d00;background:#fff7d6}.delivery-urgent,.delivery-today{color:#a24800;background:#fff0df}.delivery-overdue,.delivery-late-shipped{color:#b42335;background:#fff0f1}.delivery-shipped{color:#61758a;background:#f0f4f7}
#content .record-list-panel th{white-space:nowrap}
#content .record-list-panel td:first-child{min-width:170px}
#content .record-list-panel .record-status{min-width:260px}
#content .record-list-panel .record-created,#content .record-list-panel td:last-child{white-space:nowrap}
#content .record-list-panel td small{font-size:10px;line-height:1.3}
#content .record-list-panel td button{min-height:28px;padding:4px 7px;font-size:11px}
#content .record-list-panel .badge{display:inline-block;padding:3px 6px;font-size:11px;line-height:1.5}
#content .record-list-panel .parallel-status{display:inline-flex;align-items:center;white-space:nowrap;font-size:11px;line-height:1.6}
#content .record-list-panel .empty{padding:24px}
@media(max-width:800px){
 #content .record-list-panel{padding:10px}
 #content .record-list-panel .record-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
 #content .record-list-panel .record-search{grid-column:1/-1}
 #content .record-list-panel input,#content .record-list-panel select{min-height:44px;font-size:16px}
 #content .record-list-panel button,#content .record-list-panel td button{min-height:44px;font-size:13px;padding:7px 9px}
}
#content .cards{gap:8px;margin:6px 0 9px}
#content .cards>.card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:start;align-items:center;gap:4px 6px;padding:8px 10px;min-width:0;border-radius:8px}
#content .cards>.card>small{grid-column:1/-1}
#content .cards>.card>small{font-size:12px;line-height:1.5}
#content .cards>.card>strong{font-size:20px!important;line-height:1.2;letter-spacing:-.3px;margin:0;max-width:100%;overflow-wrap:anywhere}
#content .cards>.card>p{margin:0;font-size:12px;line-height:1.45}
#content .cards>.card>button{grid-column:2;grid-row:2;min-height:26px;padding:3px 7px;font-size:11px;line-height:1.4;margin:0;justify-self:end}
#content .cards>.card>.dashboard-help{grid-column:1/-1}
#content .dashboard-help{margin:0;font-size:11px;color:var(--muted)}
#content .dashboard-help>summary{padding:0;min-height:0;line-height:1.5;font-size:11px;color:#70829a;width:max-content}
#content .dashboard-help>p{margin:4px 0 6px;font-size:12px;line-height:1.5}
#content .cards>.card .dashboard-help[open]{grid-column:1/-1}
#content .cards .badge{display:inline-block;padding:3px 7px;font-size:11px;line-height:1.5}
#content>[data-ui-block]>section{margin:9px 0!important}
#content>[data-ui-block]>section>h3{margin:0 0 3px;font-size:15px}
#content>[data-ui-block]>section>h4{margin:10px 0 6px}
#content>[data-ui-block]>section>p.muted{margin:4px 0 8px;font-size:12px;line-height:1.5}
#content>[data-ui-block]>section>.panel{padding:14px}
#content>[data-ui-block]>section>.panel>h3:first-child{padding-bottom:8px;margin-bottom:10px}
#content>[data-ui-block]>section>.panel>p.muted{margin:6px 0;font-size:12px}
#page-dashboard{margin-bottom:14px}
#page-dashboard .panel{padding:14px;margin-bottom:12px}
#page-dashboard .panel>h3:first-child{padding-bottom:8px;margin-bottom:10px}
#page-dashboard .dashboard-cards{gap:10px;margin:10px 0 14px}
#page-dashboard button.dashboard-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:start;align-items:center;min-height:72px;padding:9px 10px;gap:4px 6px}
#page-dashboard .dashboard-card>span,#page-dashboard .dashboard-card>small{grid-column:1/-1}
#page-dashboard .dashboard-card em{grid-column:2;grid-row:2;align-self:center;margin:0;white-space:nowrap}
#page-dashboard .dashboard-card strong{font-size:20px;line-height:1.2}
#page-dashboard .dashboard-card>span{font-size:12px}
#page-dashboard .dashboard-card small{font-size:11px;line-height:1.4}
#page-dashboard .dashboard-card em{font-size:11px}
#page-dashboard .dashboard-charts{gap:12px}
#page-dashboard .dashboard-filters{margin-top:10px;gap:10px}
#page-dashboard .dashboard-filters label{margin-bottom:8px}
#page-dashboard button.dashboard-bar{padding:9px 0;gap:10px}

/* Dense metrics, charts and alerts on all dedicated business pages. */
#page-dashboard .panel{padding:10px 12px;margin-bottom:8px}
#page-dashboard .panel>h3:first-child{font-size:15px;padding-bottom:5px;margin-bottom:6px}
#page-dashboard .dashboard-head>.row h3{font-size:15px}
#page-dashboard .dashboard-cards{gap:7px;margin:8px 0}
#page-dashboard .dashboard-metric{min-width:0;background:#fff;border:1px solid #dce6f0;border-top:2px solid var(--company-main,#1769cc);border-radius:7px;align-self:start}
#page-dashboard .dashboard-metric button.dashboard-card{width:100%;border:0!important;box-shadow:none;min-height:58px;padding:7px 9px;gap:3px 5px;border-radius:6px}
#page-dashboard .dashboard-metric .dashboard-card>span{padding-right:3px;font-size:11px;line-height:1.4}
#page-dashboard .dashboard-metric .dashboard-card strong{font-size:18px;line-height:1.25;overflow-wrap:anywhere}
#page-dashboard .dashboard-metric .dashboard-card em{font-size:11px}
#page-dashboard .dashboard-metric-help{font-size:11px;padding:0 9px 4px;color:var(--muted)}
#page-dashboard .dashboard-metric-help>summary{font-size:11px;line-height:1.4;min-height:0;padding:0;width:max-content}
#page-dashboard .dashboard-metric-help p{margin:5px 0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#page-dashboard .dashboard-charts{gap:8px;align-items:start}
#page-dashboard .dashboard-charts .panel{margin:0;min-height:0}
#page-dashboard button.dashboard-bar{padding:5px 0;min-height:28px;gap:8px;font-size:12px}
#page-dashboard .dashboard-bar b{font-size:12px}
#page-dashboard .dashboard-filters{margin-top:7px;gap:8px}
#page-dashboard .dashboard-filters label{font-size:12px;margin-bottom:2px;gap:3px;min-width:180px}
#page-dashboard .dashboard-filters input,#page-dashboard .dashboard-filters select{min-height:30px;padding:5px 8px;font-size:12px}
#page-dashboard .dashboard-alerts{margin:6px 0;padding-top:4px}
#page-dashboard .dashboard-alerts h4{margin:4px 0;font-size:12px}
#page-dashboard .dashboard-alerts p{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:4px 0;padding:5px 8px;font-size:12px;line-height:1.45}
#page-dashboard .dashboard-alerts button{min-height:28px;padding:4px 8px;font-size:11px;margin:0}
#page-dashboard .dashboard-scroll th,#page-dashboard .dashboard-scroll td{padding:7px 8px;font-size:12px;line-height:1.45}
#page-dashboard .dashboard-scroll td small{font-size:10px}
#page-dashboard .dashboard-definitions>summary{padding:3px 0;font-size:11px}
.scope-filter{margin-bottom:8px}
.scope-filter>summary{min-height:34px;padding:7px 13px;font-size:12px}
@media(max-width:800px){
 #content #page-dashboard .dashboard-metric button.dashboard-card{min-height:70px;padding:8px}
 #page-dashboard .dashboard-metric-help>summary{min-height:32px;display:flex;align-items:center}
 #page-dashboard .dashboard-metric-help>summary::before{content:'▸';margin-right:5px}#page-dashboard .dashboard-metric-help[open]>summary::before{content:'▾'}
 #page-dashboard .dashboard-alerts button,#page-dashboard button.dashboard-bar{min-height:44px}
 #page-dashboard .dashboard-filters input,#page-dashboard .dashboard-filters select{min-height:44px;font-size:16px}
 #page-dashboard .dashboard-filters label{min-width:0;flex:1 1 140px}
 .scope-filter>summary{min-height:44px;padding:9px 12px}
}
#content button.process-comparison-row{padding:6px 10px;min-height:30px;font-size:12px;gap:10px}
@media(max-width:800px){
 #content .cards{gap:7px;margin:6px 0 9px}
 #content .cards>.card{padding:8px 9px;gap:3px 4px}
 #content .cards>.card>strong{font-size:19px!important}
 #content .cards>.card>button{min-height:44px;padding:5px 7px;font-size:12px}
 #content .dashboard-help>summary{min-height:32px;display:flex;align-items:center;padding:4px 0}
 #content .dashboard-help>summary::before{content:'▸';margin-right:5px}#content .dashboard-help[open]>summary::before{content:'▾'}
 #content>[data-ui-block]>section{margin:9px 0!important}
 #content #page-dashboard button.dashboard-card{min-height:80px;padding:9px 10px}
 #page-dashboard .dashboard-card strong{font-size:19px}
 #content button.process-comparison-row{min-height:44px}
}
.attendance-hour-reminder{position:fixed;left:18px;bottom:18px;z-index:900;display:flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:520px;padding:12px;background:#fff7de;border:1px solid #e3b84a;border-radius:10px;box-shadow:0 5px 20px #173a5a22}.attendance-hour-reminder small{width:100%}@media(max-width:640px){.attendance-hour-reminder{left:8px;right:8px;bottom:76px;max-width:none}}

/* Quote detail: compact spacing with full-size drawing previews and editable notes. */
#modal.quote-detail{padding:14px 16px;font-size:13px}
#modal.quote-detail>.row{margin:5px 0;gap:8px;align-items:center}
#modal.quote-detail>.row h3{margin:4px 0;font-size:16px}
#modal.quote-detail>p{margin:6px 0}
#modal.quote-detail .panel{padding:10px 12px!important;margin:8px 0!important}
#modal.quote-detail .panel h3{font-size:15px;margin:0 0 7px;padding-bottom:6px}
#modal.quote-detail .notice{padding:8px 10px;margin:7px 0;line-height:1.5}
#modal.quote-detail [data-company-notice] br{display:none}
#modal.quote-detail [data-company-notice] b{margin-right:12px}
#modal.quote-detail .record-summary{padding:8px 10px;margin:7px 0;gap:6px 16px;grid-template-columns:repeat(5,minmax(0,1fr));font-size:12px}
#modal.quote-detail .record-summary small{margin-bottom:1px}
#modal.quote-detail .quote-status-track{padding:6px;gap:6px}
#modal.quote-detail .quote-status-result{margin-top:4px}
#modal.quote-detail .priority-buttons{margin-top:6px!important;gap:5px}
#modal.quote-detail .actions{margin:6px 0;gap:5px}
#modal.quote-detail button{min-height:30px;padding:5px 9px;font-size:12px}
#modal.quote-detail input,#modal.quote-detail select,#modal.quote-detail textarea{padding:6px 8px;min-height:30px;font-size:12px}
#modal.quote-detail label{gap:3px;margin-bottom:6px;font-size:12px}
#modal.quote-detail p{margin:6px 0;line-height:1.5}
#modal.quote-detail .quote-actions textarea{height:44px;min-height:44px;resize:vertical}
#modal.quote-detail .quote-comment-history{margin:6px 0!important}
#modal.quote-detail .quote-comment-history h4{margin:7px 0;font-size:12px}
#modal.quote-detail .history{padding:6px 8px;margin:5px 0}
#modal.quote-detail .parts-bulk>.grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:5px!important}
#modal.quote-detail .parts-bulk>label{margin:2px 0 5px}
#modal.quote-detail .quote-parts td{vertical-align:top;padding:8px 7px}
#modal.quote-detail .quote-parts th{padding:7px;font-size:12px}
#modal.quote-detail .quote-parts td>textarea{height:46px;min-height:46px;resize:vertical}
#modal.quote-detail .quote-parts table{table-layout:fixed;width:100%}
#modal.quote-detail .quote-parts th:nth-child(1){width:19%!important}
#modal.quote-detail .quote-parts th:nth-child(2){width:19%}
#modal.quote-detail .quote-parts th:nth-child(3){width:6%!important}
#modal.quote-detail .quote-parts th:nth-child(4){width:22%}
#modal.quote-detail .quote-parts th:nth-child(5){width:22%}
#modal.quote-detail .quote-parts th:nth-child(6){width:12%!important}
#modal.quote-detail .part-extra{margin-top:4px}
#modal.quote-detail .part-extra>summary{font-size:11px;padding:3px 0}
#modal.quote-detail .part-extra textarea{height:46px;resize:vertical}
#modal.quote-detail input[type=file]{padding:4px;font-size:11px}
@media(max-width:800px){
 #modal.quote-detail{padding:10px}
 #modal.quote-detail .record-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 #modal.quote-detail .parts-bulk>.grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #modal.quote-detail button,#modal.quote-detail input,#modal.quote-detail select{min-height:44px}
 #modal.quote-detail input,#modal.quote-detail select,#modal.quote-detail textarea{font-size:16px}
 #modal.quote-detail .quote-parts table{min-width:1150px!important}
}

/* Quote actions stay near the record identity; documents share one compact bar. */
#modal.quote-detail .quote-top-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:5px 0}
#modal.quote-detail .quote-top-tools>.actions{margin:0;flex:1 1 230px}
#modal.quote-detail .quote-top-tools>.notice{margin:0;padding:6px 8px;flex:2 1 400px}
#modal.quote-detail .quote-top-tools>.panel{margin:0!important;padding:6px 8px!important;flex:0 1 auto}
#modal.quote-detail .quote-top-tools .actions{margin:2px 0;gap:5px}
#modal.quote-detail .quote-top-tools .priority-buttons{margin-top:4px!important}
#modal.quote-detail .quote-top-tools small{font-size:10px;line-height:1.3}
#modal.quote-detail .quote-documents{display:flex;flex-wrap:wrap;align-items:center;gap:5px 16px}
#modal.quote-detail .quote-document-summary{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
#modal.quote-detail .quote-document-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px}
#modal.quote-detail .quote-documents .actions{margin:0}
#modal.quote-detail .quote-documents [data-package-status]{flex-basis:100%;margin:0}
#modal.quote-detail .quote-documents [data-package-status]:empty{display:none}
#modal.quote-detail .quote-commercial>summary{font-weight:600;font-size:14px;padding:2px 0}
#modal.quote-detail .quote-commercial[open]>summary{border-bottom:1px solid var(--line);padding-bottom:6px;margin-bottom:8px}
@media(max-width:800px){#modal.quote-detail .quote-top-tools{align-items:stretch}#modal.quote-detail .quote-top-tools>.notice{flex-basis:100%}#modal.quote-detail .quote-commercial>summary{min-height:44px;padding:10px 0}}

/* Quote files are top-level shortcuts; customer context belongs to the summary. */
#modal.quote-detail .quote-top-tools{display:grid;grid-template-columns:minmax(200px,1fr) minmax(280px,2fr) auto;align-items:center;gap:5px 10px}
#modal.quote-detail .quote-top-tools>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
#modal.quote-detail .quote-top-tools>.quote-documents{grid-column:1/-1;padding:6px 9px;margin:0}
#modal.quote-detail .quote-top-tools>.notice:not(.quote-documents){padding:5px 8px}
#modal.quote-detail .record-summary .quote-summary-context{grid-column:span 4;min-width:0;align-self:center}
#modal.quote-detail .quote-summary-context>.notice{margin:0;padding:2px 0;border:0;background:transparent;box-shadow:none;font-size:12px;line-height:1.4}
#modal.quote-detail .quote-summary-context small{font-size:10px;margin-bottom:0}
@media(max-width:1100px){#modal.quote-detail .quote-top-tools{grid-template-columns:minmax(0,1fr) auto}#modal.quote-detail .quote-top-tools>.notice:not(.quote-documents){grid-column:1/-1;grid-row:2}#modal.quote-detail .quote-top-tools>.panel{grid-column:2;grid-row:1}}
@media(max-width:800px){#modal.quote-detail .quote-top-tools{grid-template-columns:minmax(0,1fr)}#modal.quote-detail .quote-top-tools>.panel{grid-column:1;grid-row:auto}#modal.quote-detail .record-summary .quote-summary-context{grid-column:1/-1}}

/* Readable primary actions, compact audit summaries and a narrower two-column overview. */
#modal.quote-detail .quote-status-track .status-current::before{content:'';display:inline-block;width:12px;height:12px;margin-right:6px;border-radius:50%;background:currentColor;vertical-align:-1px}
#modal.quote-detail .quote-actions>.actions>button{min-height:40px;padding:8px 16px;font-size:14px}
#modal.quote-detail .quote-actions>.actions{gap:7px;flex-wrap:wrap}
#modal.quote-detail .quote-overview{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:10px;align-items:start;margin:8px 0}
#modal.quote-detail .quote-overview>*{min-width:0;max-width:100%}
#modal.quote-detail .quote-overview>.record-summary{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;gap:8px 12px}
#modal.quote-detail .quote-overview>.quote-actions{margin:0!important}
#modal.quote-detail .quote-overview .quote-summary-context{grid-column:1/-1}
.operation-history .history>details>summary{overflow-wrap:anywhere;font-size:13px;padding:4px 0}
.operation-history .operation-expand{color:var(--company-main,#1769cc);font-size:11px;white-space:nowrap;margin-left:6px}
.operation-history .operation-full{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-height:420px;overflow:auto;font:12px/1.6 Calibri,'Microsoft YaHei',sans-serif;padding:8px;background:#fff;border:1px solid var(--line);border-radius:5px;margin:6px 0 0}
@media(max-width:1000px){#modal.quote-detail .quote-overview{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){#modal.quote-detail .quote-overview>.record-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#modal.quote-detail .quote-actions>.actions>button{min-height:44px;font-size:14px}.operation-history .history>details>summary{min-height:36px}}

/* Header scope dropdowns replace the separate full-width filter rows. */
#app>main>.app-header{flex-wrap:wrap}
#app .app-header .header-scope-filters{display:flex;align-items:center;flex-wrap:wrap;gap:6px;flex:1 1 280px;min-width:0}
#app .header-scope-filters>div:empty{display:none}
#app .header-scope-filters .scope-filter{margin:0;border-radius:7px;box-shadow:none}
#app .header-scope-filters .scope-filter>summary{padding:5px 8px;min-height:30px;gap:5px;font-size:11px;max-width:270px}
#app .header-scope-filters .scope-filter>summary>b{font-size:11px;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app .header-scope-filters .scope-filter>summary::after{display:none}
#app .header-scope-filters .scope-filter>.panel{position:absolute;top:calc(100% + 5px);left:0;right:0;max-height:65vh;overflow:auto;padding:12px!important;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px #17355222;z-index:12}
#app .header-scope-filters #companybar .scope-filter>.company-filter{grid-template-columns:minmax(0,1fr) auto}
#app .header-scope-filters #companybar .company-choices{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
/* Each metric group becomes a vertical panel, keeping every existing drilldown. */
#content .workspace-stat-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:10px;align-items:start;margin:8px 0 12px}
#content .workspace-stat-columns>[data-ui-block]{min-width:0;border:1px solid var(--line);border-radius:9px;background:#fff;padding:10px}
#content .workspace-stat-columns>[data-ui-block]>section{margin:0!important;min-width:0}
#content .workspace-stat-columns h3{font-size:14px;margin:0 0 6px;line-height:1.5}
#content .workspace-stat-columns .cards{grid-template-columns:minmax(0,1fr)!important;gap:6px;margin:7px 0}
#content .workspace-stat-columns .cards>.card{min-width:0;padding:7px 9px;margin:0;min-height:58px;box-shadow:none}
#content .workspace-stat-columns .cards>.card>strong{font-size:18px!important;overflow-wrap:anywhere}
#content .workspace-stat-columns .cards>.card>small{font-size:12px}
#content .workspace-stat-columns .panel{padding:8px;margin-top:10px}
#content .workspace-stat-columns .process-comparison-row{grid-template-columns:minmax(70px,1fr) 1fr auto;gap:5px;padding:5px;font-size:11px}
@media(max-width:800px){
 #app .app-header .header-scope-filters{flex-basis:100%;order:3}
 #app .header-scope-filters .scope-filter>summary{min-height:44px;font-size:12px}
 #app .header-scope-filters .scope-filter>summary>b{font-size:12px}
 #app .header-scope-filters #companybar .scope-filter>.company-filter{grid-template-columns:minmax(0,1fr)}
 #content .workspace-stat-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 #content .workspace-stat-columns>[data-ui-block]{padding:8px}
}
@media(max-width:540px){#content .workspace-stat-columns{grid-template-columns:minmax(0,1fr)}}

/* Calibri is the shared UI face; CJK glyphs use the system fallback. */
html,body,button,input,select,textarea,table,pre,code{font-family:Calibri,'Microsoft YaHei',sans-serif!important}
#modal.quote-detail .quote-actions>.actions>.quote-send-action{background:var(--company-main,#172ca6)!important;border-color:var(--company-main,#172ca6)!important;color:#fff!important;box-shadow:0 2px 6px #172ca626;font-weight:700}
#modal.quote-detail .quote-send-action:hover{filter:brightness(1.1)}

/* Put quotation processes beside the four narrower metric columns. */
#content .workspace-stat-columns{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:8px}
#content .workspace-stat-columns>[data-ui-block]{padding:8px}
#content .workspace-stat-columns .cards{gap:5px}
#content .workspace-stat-columns .cards>.card{padding:6px 8px;min-height:52px}
#content .workspace-stat-columns .cards>.card>strong{font-size:17px!important}
#content .workspace-stat-columns .quote-process-column>.panel{margin:0;padding:0;border:0;box-shadow:none}
#content .workspace-stat-columns .quote-process-column .process-comparison-row{width:100%;min-width:0;grid-template-columns:minmax(75px,1.1fr) minmax(35px,1fr) auto}
@media(max-width:800px){#content .workspace-stat-columns{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){#content .workspace-stat-columns{grid-template-columns:minmax(0,1fr)}}
/* BUSINESS CONTEXT RAIL */
.business-context-rail{position:fixed;right:12px;top:10px;bottom:12px;width:246px;display:flex;flex-direction:column;gap:8px;z-index:4;color:#183450;min-height:0;font-size:12px}
body.has-business-context main,body.has-business-context.personal-hide-task-rail main{margin-right:268px!important}
.business-info-panel{background:#fff;border:1px solid #d8e5f2;border-radius:10px;padding:9px 10px;box-shadow:0 3px 12px #15385909;min-height:0;flex:none}
.business-info-panel>summary{font-size:14px;font-weight:700;cursor:pointer;padding:2px 0;list-style-position:inside}
.business-info-panel>summary small{font-size:11px;font-weight:400;color:#627a91}
.business-city-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:7px;max-height:174px;overflow:auto}
.business-city{display:grid;grid-template-columns:1fr auto;gap:2px;padding:5px;border:1px solid #e5edf5;border-radius:5px;background:#f8fbff;min-width:0}
.business-city>span{font-size:12px}.business-city>span small{display:none}.business-city>b{font-size:15px;font-variant-numeric:tabular-nums;color:#1663ae}.business-city>small{grid-column:1/-1;font-size:10px;color:#667b90}
.business-context-note{display:block;font-size:10px;color:#667b90;line-height:1.4;margin-top:6px}
.business-holiday-filter{display:flex;align-items:center;gap:6px;margin:6px 0;font-size:11px}
.business-holiday-filter select{width:100%;min-width:0;height:28px;padding:2px 5px;font-size:11px;border:1px solid #d4e0ed;border-radius:5px;background:#fff;color:#183450}
.business-holiday-list{max-height:145px;overflow:auto;overscroll-behavior:contain}
.business-holiday{padding:6px 0;border-bottom:1px solid #e7eef5}.business-holiday:last-child{border-bottom:0}
.business-holiday>div{display:flex;align-items:baseline;gap:6px;justify-content:space-between}.business-holiday a{color:#1761a9;font-weight:700;text-decoration:none}.business-holiday a:hover{text-decoration:underline}.business-holiday b{white-space:nowrap;font-size:10px;color:#a25a00}
.business-holiday>small{display:block;font-size:10px;color:#667b90;line-height:1.5}.business-holiday>small:last-child{color:#408178}
.business-calendar-sources{font-size:10px;color:#667b90;margin-top:5px;max-height:110px;overflow:auto}.business-calendar-sources summary{cursor:pointer}.business-calendar-sources p{margin:5px 0}.business-calendar-warning{color:#9b5400;font-size:11px}
.business-context-rail>#task-rail{position:static;transform:none;width:100%;max-height:none;flex:1;min-height:90px;margin:0;box-sizing:border-box}
.business-context-rail>#task-rail.collapsed{flex:none;min-height:0;width:100%}
.business-context-rail>#task-rail.collapsed header button{writing-mode:horizontal-tb}
@media(min-width:1101px) and (max-height:780px){.business-city-grid{max-height:128px}.business-holiday-list{max-height:100px}.business-info-panel{padding:6px 9px}.business-context-rail{gap:5px}}
@media(min-width:1101px) and (max-height:580px){.business-city-grid{max-height:77px}.business-holiday-list{max-height:65px}.business-context-note{display:none}.business-calendar-sources{max-height:60px}}
@media(max-width:1100px){.business-context-rail.business-context-inline{position:static;width:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0;z-index:auto}.business-city-grid{max-height:174px}.business-holiday-list{max-height:180px}}
@media(max-width:540px){.business-context-rail.business-context-inline{grid-template-columns:minmax(0,1fr)}.business-city-grid{max-height:128px}.business-holiday-list{max-height:145px}}
.business-holiday-filter{white-space:nowrap}.business-holiday-filter select{flex:1;width:auto}.business-context-rail .business-info-panel{box-sizing:border-box}

/* Consolidate the technical quotation workspace into four compact groups. */
#content .technical-quote-overview{margin:0}
#content .technical-quote-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:start}
#content .technical-quote-group{min-width:0;margin:0;padding:8px;border:1px solid #e0e8f1;border-radius:7px;background:#fbfdff}
#content .technical-quote-group>h3{font-size:13px;color:#49637e;margin:0 0 7px}
#content .technical-quote-group .cards{margin:0;gap:6px}
#content .technical-quote-group .cards>.card{padding:7px 9px;min-height:55px}
#content .technical-quote-group .cards>.card>strong{font-size:18px!important}
#content .technical-quote-group .cards>.card>button{font-size:11px}
#content .technical-quote-process>.panel{border:0;background:transparent;padding:0!important;margin:0!important;box-shadow:none}
#content .technical-quote-process .process-comparison-row{grid-template-columns:minmax(75px,1fr) minmax(25px,1fr) auto}
@media(max-width:1200px){#content .technical-quote-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#content .technical-quote-groups{grid-template-columns:minmax(0,1fr)}}

/* Keep quotation identity, source and save actions available while scrolling. */
#modal.quote-detail .quote-sticky-header{position:sticky;top:-14px;z-index:12;display:block;background:#fafdff;padding:8px 0;border-bottom:1px solid #d8e5f2;box-shadow:0 5px 9px #1834500d}
#modal.quote-detail .quote-sticky-header>.row{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;margin:0}
#modal.quote-detail .quote-sticky-header h3{margin:0;font-size:16px}
#modal.quote-detail .quote-header-status{margin:0;font-size:12px}
#modal.quote-detail .quote-sticky-header [data-company-notice]{margin:0 0 0 auto;padding:3px 7px;font-size:0;line-height:1.4;max-width:450px;border-left-width:2px}
#modal.quote-detail .quote-sticky-header [data-company-notice] b{font-size:11px;margin:0}
#modal.quote-detail .quote-pricing-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 15px;margin-top:6px}
#modal.quote-detail .quote-pricing-toolbar>.actions{margin:0}
#modal.quote-detail .quote-source-compact{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
#modal.quote-detail .quote-source-compact label{display:flex;flex-direction:row;align-items:center;gap:6px;margin:0}
#modal.quote-detail .quote-source-compact label[hidden]{display:none}
#modal.quote-detail .quote-source-compact select{width:auto;min-width:120px;max-width:270px}
#modal.quote-detail .pricing-bulk-heading{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
#modal.quote-detail .pricing-bulk-heading small{color:#667c94;font-size:11px}
@media(max-width:800px){#modal.quote-detail .quote-sticky-header{top:-10px}#modal.quote-detail .quote-sticky-header [data-company-notice]{max-width:100%;margin-left:0}#modal.quote-detail .quote-source-compact select{max-width:220px}#modal.quote-detail .quote-pricing-toolbar{gap:5px}}

#modal.quote-detail #pricingform [data-price-row] td{vertical-align:middle!important}
#modal.quote-detail .quote-top-tools-compact>.quote-documents{flex:0 1 auto!important;padding:5px 9px!important;margin:0!important;min-width:0}
#modal.quote-detail .quote-top-tools-compact .quote-document-summary:empty,#modal.quote-detail .quote-top-tools-compact [data-package-status]:empty{display:none}
#modal.quote-detail .quote-top-tools-compact .quote-document-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

#modal.quote-detail .quote-top-tools.quote-top-tools-compact{display:flex;flex-wrap:wrap;align-items:center}
#modal.quote-detail .quote-top-tools-compact>*{grid-column:auto!important;grid-row:auto!important;flex:0 1 auto!important}
#modal.quote-detail .quote-top-tools-compact>.notice:not(.quote-documents){flex:1 1 300px!important}

/* Company and current Beijing date on every application page and owned dialog. */
#page-company-watermark{position:fixed;inset:22% 16% 20% 24%;z-index:3;pointer-events:none;display:flex;flex-wrap:wrap;align-content:center;align-items:center;justify-content:center;gap:18px;opacity:.055;color:#183450}
#page-company-watermark>div{display:grid;justify-items:center;gap:8px;max-width:30%}
#page-company-watermark img{width:180px;height:150px;max-width:100%;object-fit:contain}
#page-company-watermark span{font-size:22px;font-weight:bold}
#page-company-watermark>b{width:100%;text-align:center;font-size:30px}
.brand-surface::after{content:attr(data-watermark-date);position:absolute;left:10%;right:10%;top:72%;text-align:center;color:#203b55;opacity:.14;font-size:24px;font-weight:bold;pointer-events:none;z-index:1}
@media(max-width:600px){#page-company-watermark{inset:22% 6% 22% 6%;gap:10px}#page-company-watermark img{width:90px;height:80px}#page-company-watermark>b,.brand-surface::after{font-size:18px}}

/* Watermarks belong above opaque cards, without intercepting their controls. */
.brand-surface::before{z-index:8;opacity:.065;pointer-events:none}
.brand-surface::after{z-index:9;pointer-events:none}
.brand-surface .brand-surface::before,.brand-surface .brand-surface::after{display:none}

/* Keep redaction navigation and final confirmation together above the drawing. */
#modal .privacy-sticky-toolbar{position:sticky;top:-28px;z-index:20;background:#fafdff;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 0;margin:10px 0;border-bottom:1px solid #d8e5f2;box-shadow:0 4px 8px #1834500d}
#modal .privacy-sticky-toolbar label{display:flex;align-items:center;gap:6px;margin:0;white-space:nowrap}
#modal .privacy-sticky-toolbar input[type=checkbox]{width:auto;min-height:0;margin:0}
#modal .privacy-sticky-toolbar #privacy-confirm-all{margin-left:auto}
#modal .privacy-sticky-toolbar button:disabled{cursor:default;opacity:.55}
@media(max-width:800px){#modal .privacy-sticky-toolbar{gap:6px}#modal .privacy-sticky-toolbar button{min-height:40px}#modal .privacy-sticky-toolbar #privacy-confirm-all{margin-left:0}}

/* Keep record identity in the shortcut row; part tools sit directly over the table. */
#modal.quote-detail .quote-sticky-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px}
#modal.quote-detail .quote-sticky-header>.quote-top-tools{grid-column:1;grid-row:1;margin:0}
#modal.quote-detail .quote-sticky-header>.row{grid-column:2;grid-row:1;justify-content:flex-end}
#modal.quote-detail .quote-sticky-header>.quote-pricing-toolbar{grid-column:1/-1}
#modal.quote-detail .quote-record-identity{display:flex;align-items:center;gap:6px 10px;flex:1 1 310px!important;flex-wrap:wrap}
#modal.quote-detail .quote-record-identity h3,#modal.quote-detail .quote-record-identity p{margin:0}
#modal.quote-detail .quote-revisions{padding:0;margin:0;border:0;background:transparent}
#modal.quote-detail .quote-revisions .actions{margin:0}
#modal.quote-detail .parts-table-tools{margin:5px 0 7px}
@media(max-width:800px){#modal.quote-detail .quote-sticky-header{grid-template-columns:minmax(0,1fr)}#modal.quote-detail .quote-sticky-header>.row{grid-column:1;grid-row:1}#modal.quote-detail .quote-sticky-header>.quote-top-tools{grid-column:1;grid-row:2}#modal.quote-detail .quote-record-identity{flex-basis:100%!important}}

#modal.quote-detail .quote-record-identity .quote-save-parts,#modal.quote-detail .quote-record-identity .quote-submit-action{min-height:34px;padding:6px 10px;font-weight:bold}
#modal.quote-detail .quote-parts p:has(>[data-parts-error]:only-child:empty){display:none}
@media(max-width:800px){#modal.quote-detail .quote-record-identity .quote-save-parts,#modal.quote-detail .quote-record-identity .quote-submit-action{min-height:44px}}

#modal.quote-detail .quote-return-feedback{position:relative;max-width:320px;color:#284661;font-size:12px}
#modal.quote-detail .quote-return-feedback>summary{cursor:pointer;font-weight:bold;overflow-wrap:anywhere}
#modal.quote-detail .quote-return-content{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:min(520px,75vw);max-height:50vh;overflow:auto;background:white;border:1px solid #c9dceb;border-radius:8px;padding:12px;box-shadow:0 8px 24px #18345026;white-space:pre-wrap}
#modal.quote-detail .quote-return-content>div{padding:7px 0;border-top:1px solid #e3ebf2}
#modal.quote-detail .quote-return-content p{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:800px){#modal.quote-detail .quote-return-content{position:static;width:100%;max-height:40vh;margin-top:6px}#modal.quote-detail .quote-return-feedback{max-width:100%}}

#modal.quote-detail .quote-record-identity .quote-privacy-action{min-height:34px;padding:6px 10px;font-weight:bold}
@media(max-width:800px){#modal.quote-detail .quote-record-identity .quote-privacy-action{min-height:44px}}

/* Compact quotation review and outsourcing controls. */
#modal.workflow-detail{padding:12px 14px;font-size:13px}
#modal.workflow-detail .workflow-sticky-header{position:sticky;top:-12px;z-index:12;display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;background:#fafdff;padding:8px 0;margin:0 0 10px;border-bottom:1px solid #d8e5f2;box-shadow:0 4px 8px #1834500d}
#modal.workflow-detail .workflow-sticky-header>.row{width:100%;gap:8px;flex-wrap:wrap;justify-content:flex-start}
#modal.workflow-detail .workflow-sticky-header h3{font-size:15px;margin:0}
#modal.workflow-detail .workflow-sticky-header p{margin:0}
#modal.workflow-detail .workflow-sticky-header [data-company-notice]{margin:0 0 0 auto;padding:3px 6px;font-size:11px;line-height:1.4}
#modal.workflow-detail .workflow-sticky-header .actions{margin:0;gap:6px}
#modal.workflow-detail button{min-height:32px;padding:6px 10px;font-size:12px}
#modal.workflow-detail label{margin:0 0 6px;gap:4px;font-size:12px}
#modal.workflow-detail input,#modal.workflow-detail select,#modal.workflow-detail textarea{padding:7px 8px;font-size:12px;min-height:32px}
#modal.workflow-detail>p{margin:7px 0;line-height:1.5}
#modal.workflow-detail .workflow-bulk-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 22px;background:#f0f7fc;border:1px solid #dce9f3;border-radius:8px;padding:9px 12px;margin:10px 0}
#modal.workflow-detail .workflow-bulk-row>.actions{display:flex;align-items:center;gap:8px;margin:0!important}
#modal.workflow-detail .workflow-bulk-row label{margin:0}
#modal.workflow-detail .workflow-bulk-row select{width:130px}
#modal.workflow-detail [data-external]>td{vertical-align:top;padding:10px 8px;font-size:12px}
#modal.workflow-detail th{padding:9px 8px;font-size:12px}
#modal.workflow-detail [data-ext=external_dfm]{height:60px;min-height:60px;resize:vertical}
#modal.workflow-detail .workflow-row-extra{margin-top:7px;font-size:11px}
#modal.workflow-detail .workflow-row-extra>summary{cursor:pointer;color:#286ba4}
#modal.workflow-detail .workflow-row-extra textarea{height:75px}
#modal.workflow-detail [data-ext=suggested_percent],#modal.workflow-detail [data-ext=final_percent]{max-width:180px}
#modal.workflow-detail #workflow-note{height:65px;min-height:65px}
#modal.workflow-detail .workflow-bulk-row:empty{display:none}
@media(max-width:800px){#modal.workflow-detail button{min-height:40px}#modal.workflow-detail .workflow-sticky-header [data-company-notice]{margin-left:0}#modal.workflow-detail .workflow-bulk-row{align-items:stretch;gap:8px}}

#modal .workflow-drawing-heading{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:14px 0 8px}
#modal .workflow-drawing-heading h3{margin:0}
#modal .workflow-drawing-package{display:inline-block;padding:7px 10px;border:1px solid #cbdcf0;border-radius:7px;background:#fff;color:#1264ba;text-decoration:none;font-size:12px}
#modal .workflow-drawing-package:hover{background:#edf5ff}

/* Purchasing summary groups and supplier lookup filters. */
#content .procurement-summary{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:start;margin:10px 0 14px}
#content .procurement-summary>[data-ui-block]{background:#fff;border:1px solid #dce6f0;border-radius:9px;padding:10px;min-width:0}
#content .procurement-summary h3{font-size:14px;margin:0 0 6px}
#content .procurement-summary section{margin:0!important}
#content .procurement-summary .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px;margin:6px 0 0}
#content .procurement-summary [data-ui-block=complaints] .cards{grid-template-columns:minmax(0,1fr)!important}
#content .procurement-summary>.cards{display:block;margin:0;padding:0;border:0}
#content .procurement-summary .card{padding:9px 10px;min-height:65px;margin:0;box-shadow:none}
#content .procurement-summary .card strong{font-size:19px!important;margin-top:4px}
#content .supplier-filter-grid{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr)) minmax(190px,1.5fr);gap:10px;margin:14px 0 5px}
#content .supplier-filter-grid label{font-size:12px;margin:0;gap:5px}
#content .supplier-filter-grid input,#content .supplier-filter-grid select{padding:7px 8px;min-height:34px}
#content .supplier-filter-footer{display:flex;justify-content:space-between;align-items:center;margin:7px 0 10px}
#content .record-supplier{max-width:180px;overflow-wrap:anywhere}
@media(max-width:1000px){#content .procurement-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#content .supplier-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){#content .procurement-summary{grid-template-columns:minmax(0,1fr)}#content .supplier-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Shared purchasing inputs and compact payment plan. */
#modal .workflow-supplier-bulk{flex:1 1 240px;min-width:220px;max-width:380px}
#modal .workflow-bulk-row .workflow-supplier-bulk select{width:100%}
#modal .workflow-supplier-bulk details{font-size:11px;margin-top:4px}
#modal .workflow-supplier-bulk details[open]{padding:7px;background:#fff;border-radius:6px}
#modal #money-panel{padding:12px 16px;margin:10px 0!important}
#modal .money-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
#modal .money-panel-heading h3{margin:0;border:0;padding:0}
#modal .supplier-payment-block{border-top:1px solid #e0e9f2;margin-top:10px;padding-top:10px}
#modal .supplier-payment-block h4{font-size:14px;margin:0 0 6px}
#modal .supplier-payment-block .payment-summary{margin:4px 0 10px}
#modal .supplier-payment-block .payment-plan-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#modal .payment-plan-fields label{font-size:12px;margin:0}
#modal .payment-plan-fields input,#modal .payment-plan-fields select{min-height:34px;padding:7px 9px}
#modal .supplier-payment-block>.muted{font-size:11px;margin:8px 0}
#modal .supplier-payment-block>.actions{margin:8px 0 0}
@media(max-width:700px){#modal .supplier-payment-block .payment-plan-fields{grid-template-columns:1fr}#modal .workflow-supplier-bulk{max-width:none;min-width:0;flex-basis:100%}}

#modal .workflow-bulk-row>.workflow-cost-tool{margin-left:auto;align-self:center;white-space:nowrap}

#modal.workflow-detail .workflow-bulk-row>.workflow-review-tools{display:flex;align-items:center;gap:7px;margin:0;flex-wrap:wrap}
#modal.workflow-detail .workflow-bulk-row>.workflow-cost-tool{margin-left:0}

/* Larger, distinct global header actions. */
#app .app-header .header-actions{gap:8px}
#app .app-header .header-actions>button{min-height:42px;padding:9px 14px;font-size:14px;font-weight:700;border-radius:8px;color:#164c91;background:#edf5ff;border:1px solid #9cbfed;box-shadow:0 2px 4px #1d4c7a12;transition:background .15s,box-shadow .15s}
#app .app-header .header-actions>button:hover{background:#dcecff;box-shadow:0 3px 7px #1d4c7a25}
#app .app-header .header-actions>button:focus-visible{outline:3px solid #3895eb;outline-offset:3px}
#app .app-header #quick-quote{background:#175ac8;border-color:#175ac8;color:#fff}
#app .app-header #quick-my-orders{background:#087e86;border-color:#087e86;color:#fff}
#app .app-header #manual-intake-entry{background:#4358b9;border-color:#4358b9;color:#fff}
#app .app-header button[onclick="openAttendance()"]{background:#fff2d6;border-color:#dca648;color:#874c06}
#app .app-header button[onclick="logout()"]{background:#fff0ef;border-color:#e9a29d;color:#b12b23}
#app .app-header #quick-quote:hover{background:#104ba9}
#app .app-header #quick-my-orders:hover{background:#066970}
#app .app-header #manual-intake-entry:hover{background:#35479e}
#app .app-header button[onclick="openAttendance()"]:hover{background:#ffe7b0}
#app .app-header button[onclick="logout()"]:hover{background:#ffdad6}
@media(max-width:800px){#app .app-header .header-actions>button{min-height:44px;padding:9px 12px}#app .app-header .header-actions{gap:7px}}
