:root{--bg:#f3f5f8;--panel:#fff;--ink:#243247;--muted:#7b8494;--line:#e2e7ee;--brand:#2878ec;--brand-soft:#eef5ff;--z-resize:8;--z-frozen-td:3;--z-sum:4;--z-sticky-th:6;--z-sticky-th-frozen:7;--z-dropdown:50;--z-tip:2000;font-family:"Microsoft YaHei","Segoe UI",sans-serif;letter-spacing:0}
*{box-sizing:border-box}body{margin:0;font-size:13px;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button,input,select,textarea{border-radius:4px}button:focus-visible,a:focus-visible{outline:2px solid #2878ec;outline-offset:2px}input,select,textarea{border:1px solid #d7dee7;padding:7px 9px;background:#fff;color:var(--ink);min-width:0}input:focus,textarea:focus,select:focus{outline:2px solid #d9e9ff;border-color:var(--brand)}a{color:var(--brand)}h1,h2,h3,p{margin:0}h1{font-size:20px}h2{font-size:15px}h3{font-size:14px}.grow{flex:1}.muted{color:var(--muted)}.small{font-size:12px}.lucide{width:17px;height:17px;stroke-width:1.8;flex-shrink:0;vertical-align:middle}.icon-button{display:inline-flex;width:32px;height:32px;padding:0;align-items:center;justify-content:center;background:transparent;border:1px solid transparent;color:#6f7c8e;position:relative}.icon-button:hover{background:#eef3fa;color:var(--brand)}
#app-shell{display:grid;grid-template-columns:200px minmax(0,1fr);height:100vh;height:100dvh}#side{background:#202c43;color:#c2cbda;display:flex;flex-direction:column;min-height:0;z-index:70}.app-brand{height:78px;display:flex;align-items:center;gap:10px;padding:15px 18px;border-bottom:1px solid #344158;font-size:17px;font-weight:700;color:white}.app-brand small{display:block;font-size:10px;font-weight:400;color:#93a5c1;margin-top:5px}.app-mark{display:grid;place-items:center;background:#3181fa;width:34px;height:34px;border-radius:6px}.app-mark svg{width:22px;height:22px}#navigation{padding:14px 9px;overflow-y:auto;flex:1;scrollbar-width:thin}.nav-group{margin-bottom:5px}.nav-parent,.nav-child{display:flex;align-items:center;text-align:left;border:0;gap:10px;color:inherit;background:transparent;width:100%;min-height:40px;padding:10px 12px}.nav-parent{font-size:13px;border-radius:4px}.nav-parent .chevron{margin-left:auto;width:13px}.nav-child{min-height:33px;font-size:12px;padding:8px 12px 8px 39px;position:relative}.nav-parent:hover,.nav-child:hover{background:#2b3a54;color:white}.nav-child.active,.nav-parent.active{color:#fff;background:#2a70de}.nav-child.active:before{content:'';position:absolute;left:25px;width:4px;height:4px;border-radius:50%;background:#fff}.nav-sub{margin:4px 0 9px}.nav-group.closed .nav-sub{display:none}.side-tail{padding:16px;font-size:11px;color:#8fa0ba;border-top:1px solid #344158;display:flex;align-items:center;gap:6px}.side-tail span:last-child{margin-left:auto}.online-dot{display:inline-block;width:6px;height:6px;background:#26b78a;border-radius:50%;margin-right:3px}#main{display:flex;flex-direction:column;min-height:0;overflow:hidden}#app-header{height:56px;flex-shrink:0;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:0 22px}.header-name{font-size:14px;font-weight:600}.preview-label{color:#8b6825;font-size:11px;border:1px solid #f0dfb7;padding:2px 7px;border-radius:3px;background:#fffaf0}.account{display:flex;align-items:center;gap:8px}.account select{border:0;max-width:180px;font-size:12px}.avatar{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#eaf2ff;color:#3675d3;font-size:12px}.page-tabs{height:39px;flex-shrink:0;display:flex;gap:18px;align-items:center;padding:0 22px;background:white;border-bottom:1px solid var(--line);color:#8791a1;font-size:12px}.page-tabs button{border:0;background:transparent;font-size:12px;color:#79879a;display:flex;align-items:center;gap:6px}.page-tabs svg{width:14px}.page-tabs #current-tab{color:var(--brand);height:39px;display:flex;align-items:center;border-bottom:2px solid var(--brand);padding:0 10px}#clock-date{font-size:11px}#content{padding:21px 24px 16px;overflow:auto;flex:1;min-height:0}.page-head{display:flex;gap:16px;align-items:center;margin-bottom:17px}.page-head p{font-size:12px;color:#8c97a6;margin-top:5px}.page-head h1{font-size:19px;font-weight:600}.actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.page-head>.actions{margin-left:auto}.action{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 11px;background:#fff;border:1px solid #dbe1e9;color:#526079;white-space:nowrap;min-height:33px;font-size:12px;border-radius:4px}.action:hover{background:#f1f6fe;border-color:#a9c8f7;color:#2878ec}.action.primary{background:#2878ec;border-color:#2878ec;color:#fff}.action.danger{color:#d95555}.action svg{width:15px;height:15px}.link{padding:0 5px;border:0;color:#2978e6;background:transparent;font-size:12px}.tag{display:inline-flex;align-items:center;padding:2px 7px;line-height:19px;font-size:11px;border-radius:3px;background:#edf0f4;color:#7b8595;white-space:nowrap}.tag.green{color:#19966b;background:#eaf8f2}.tag.red{color:#d94e4e;background:#fff0f0}.tag.amber{color:#b88820;background:#fff7df}.tag.blue{color:#397fda;background:#edf5ff}.toolbar-band{padding:10px 12px;background:#fff;border:1px solid var(--line);display:flex;gap:8px;align-items:center;flex-wrap:wrap}.toolbar-band .summary{margin-left:auto;font-size:12px;color:#7b8494}.kpi-strip{background:white;display:grid;grid-template-columns:repeat(5,1fr);border:1px solid var(--line);margin-bottom:18px}.metric{border:0;border-right:1px solid #edf0f4;padding:18px 21px;text-align:left;background:transparent;min-width:0}.metric:last-child{border-right:0}.metric span{display:block;font-size:12px;color:#7e899b}.metric strong{display:block;font-size:28px;line-height:1.5;font-weight:600;color:#253c5c;font-variant-numeric:tabular-nums}.metric strong.red{color:#e16164}.metric strong.green{color:#26a483}.metric small{font-size:11px;color:#a0a9b7}.metric:hover{background:#fafcff}.dashboard-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px}.band{background:#fff;border-top:1px solid var(--line);margin-bottom:18px}.band-head{display:flex;align-items:center;gap:8px;min-height:46px;padding:0 17px;border-bottom:1px solid #eef1f5}.band-head h2{font-size:14px;font-weight:600}.band-head h2:before{content:'';display:inline-block;width:3px;height:13px;margin-right:8px;background:var(--brand);vertical-align:-1px}.band-head .link{margin-left:auto}.quick-launch{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:20px 12px 22px}.quick{display:flex;align-items:center;flex-direction:column;gap:9px;background:transparent;border:0;font-size:12px;color:#51647e;text-align:center;min-width:0}.quick>span{display:grid;place-items:center;width:39px;height:39px;border-radius:8px;background:#edf4ff;color:#4a8def}.quick:nth-child(2)>span{background:#e9f8f7;color:#23aaa0}.quick:nth-child(3)>span{background:#fff2e6;color:#e59a41}.quick:nth-child(4)>span{background:#f2efff;color:#9180d0}.quick:nth-child(5)>span{background:#fcedf4;color:#cb7ba6}.quick:nth-child(6)>span{background:#edf8ee;color:#6aaf7b}.quick svg{width:22px;height:22px}.quick:hover{color:var(--brand)}.flat-table{border-collapse:collapse;width:100%;font-size:12px}.flat-table th{background:#f8fafc;color:#8390a2;font-weight:400;text-align:left;padding:11px 14px;border-bottom:1px solid #eef1f4;white-space:nowrap}.flat-table td{padding:11px 14px;border-bottom:1px solid #f0f3f7;vertical-align:middle}.flat-table tr:hover td{background:#fafcff}.flat-table td button{white-space:nowrap}.table-overflow{overflow-x:auto}.side-section{background:white;border-top:2px solid #e5ebf4;margin-bottom:18px;padding:17px}.side-section h2{font-size:14px;margin-bottom:15px}.risk-item{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px dashed #e8edf5;font-size:12px;background:transparent;border-left:0;border-right:0;border-top:0;width:100%;text-align:left;color:#62718a}.risk-item strong{font-size:17px;min-width:26px;color:#de7b51}.risk-item svg{margin-left:auto;width:13px}.memo-line{display:flex;align-items:flex-start;gap:8px;margin-top:13px;line-height:1.7;font-size:12px;color:#5c6a7f}.memo-line small{display:block;color:#9ba5b4}.progress{height:5px;background:#edf2f7;border-radius:3px;overflow:hidden}.progress>span{display:block;height:100%;background:#3c9cce}.bars{display:flex;align-items:flex-end;gap:18px;height:150px;padding:16px 20px 24px;border-bottom:1px solid var(--line)}.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:5px}.bar-col button{background:#6aa9f4;border:0;width:65%;min-height:5px;border-radius:2px 2px 0 0}.bar-col span{font-size:11px;color:#8e99a9}.bar-col b{font-size:12px;color:#687891;font-weight:400}.tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin-bottom:18px;overflow:auto}.tabs button{border:0;border-bottom:2px solid transparent;background:none;padding:12px 0;color:#8591a3;white-space:nowrap}.tabs button.active{color:var(--brand);border-color:var(--brand)}#status-bar{flex-shrink:0;min-height:26px;display:flex;align-items:center;gap:16px;padding:0 23px;font-size:10px;background:#fff;border-top:1px solid var(--line);color:#98a2b2}
.query-band,.analysis-controls{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;background:white;padding:15px;margin-bottom:15px;border-bottom:1px solid var(--line)}
.query-band label,.analysis-controls label,.toolbar-band>label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#718198;min-width:130px;max-width:210px;flex:1}
.query-band input,.query-band select,.analysis-controls input,.analysis-controls select{width:100%;min-width:0}
.analysis-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.analysis-controls label{max-width:none;min-width:0}
.rate-summary{display:flex;gap:20px;align-items:center;flex-wrap:wrap;padding:18px 20px;background:white;border-bottom:1px solid var(--line);margin-bottom:15px;color:#65768e}.rate-summary strong{font-size:26px;color:#229878;font-variant-numeric:tabular-nums}
.analysis-output{background:#fff;border-bottom:1px solid var(--line);padding:18px;margin-top:15px}.analysis-output h2{font-size:14px}#analysis-chart{height:380px;width:100%;min-width:0}#chart-warning{color:#ab7730;line-height:1.8;overflow-wrap:anywhere}
#zip-progress{color:#2878ec;margin-top:12px}#chart-summary .flat-table{background:white}#chart-summary .flat-table th{position:sticky;top:0}
@media(max-width:1000px){.analysis-controls{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.analysis-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}.query-band{padding:12px}.query-band label{min-width:120px;max-width:none}#analysis-chart{height:320px}.rate-summary{gap:10px;padding:13px}}
.app-brand{padding:12px 14px;gap:13px;min-height:78px;height:auto}.company-logo{width:48px;height:48px;flex:0 0 48px;object-fit:contain;background:transparent}.brand-name{min-width:0;flex:1;font-size:17px;line-height:1.45;text-align:left}.brand-name>span{display:block;white-space:nowrap}.nav-group.closed .nav-parent .chevron{transform:rotate(-90deg)}.app-brand small{font-size:10px;margin-top:2px}.risk-ack{display:flex;align-items:flex-start;gap:8px;font-size:12px;padding:12px 0;line-height:1.7}.risk-ack input{flex-shrink:0;margin-top:3px}#schedule-form input[type=date]{width:145px}#schedule-form .flat-table td{white-space:nowrap}
.dt-toolbar .grid-row-scope{display:inline-flex;align-items:center;flex-direction:row;gap:6px;flex:0 0 auto;white-space:nowrap;font-size:12px;color:#69819c;margin:0}
.dt-toolbar .grid-row-scope select{width:100px;min-width:100px;height:30px;padding:4px 24px 4px 8px;font-size:12px;border:1px solid var(--line);border-radius:3px;background-color:#fff;color:var(--ink)}
.dt .dt-topsb{display:none!important}
.dt .dt-scroll{overflow-x:hidden;overflow-y:auto}
.action-menu{position:relative;display:inline-block}
.action-menu>summary{list-style:none;cursor:pointer}
.action-menu>summary::-webkit-details-marker{display:none}
.action-menu-pop{position:absolute;right:0;top:calc(100% + 4px);z-index:var(--z-dropdown);display:flex;flex-direction:column;gap:4px;min-width:150px;padding:6px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 24px rgba(20,40,70,.14);border-radius:4px}
.action-menu-pop .action{width:100%;text-align:left;white-space:nowrap}
.dt .dt-botsb{flex:0 0 15px;height:15px}
.dt .dt-sum{position:sticky;bottom:0;z-index:8}
.dt .dt-sum .dt-sum-td{background:#fff2d5!important;border-top:1px solid #e4cf99;font-weight:600;height:36px;text-align:right}
.dt .dt-sum .dt-sum-label{text-align:left}
/* Keep the existing grid's column model, fixed rows, and virtualization together. */
.dt{border-radius:0;margin:0;border-color:#dce3ee;height:auto!important}.dt-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border-bottom:1px solid var(--line);background:#fff;flex-wrap:wrap}.dt-toolbar-l,.dt-toolbar-r{display:flex;gap:7px;align-items:center;position:relative;flex-wrap:wrap}.dt-toolbar button,.dt-foot button,.dt-foot select{font-size:11px;border-radius:3px}.dt-toolbar .dt-search{min-width:200px;font-size:12px;padding:6px 9px}.dt-scroll{max-height:calc(100dvh - 365px)!important;min-height:180px;height:auto!important}.dt-th{color:#5e7290;background:#eef4fd}.dt-th-in{padding:8px;height:36px}.dt-td{height:35px;padding:5px 9px;border-color:#e7edf5;font-size:12px}.dt-tbl tbody tr:nth-child(even) td{background:#fcfdff}.dt-clip{max-width:none}.dt-filter-btn{font-size:15px}.dt-th .dt-menu-btn{opacity:0;font-size:11px}.dt-th:hover .dt-menu-btn{opacity:1}.dt-th.dt-filtered{background:#deecff}.dt-search{width:240px}.dt-botsb{height:15px}.dt-foot{background:#fafbfd}.dt-topsb{height:9px}.dt-f-opt{color:var(--ink)}.dt-filter-pop,.dt-colmenu{white-space:normal;max-width:320px}.dt-f-row input{max-width:130px}.dt-colpop{max-width:340px}.dt-f-acts{display:flex;gap:5px;justify-content:flex-end}.dt-ftoggle,.dt-quick-btn{border:1px solid var(--line);background:#fff;color:#69819c;padding:5px 9px;font-size:12px}.dt-chips:empty{display:none}.dt-sel{background:#edf4fd;z-index:8}.dt-norow{padding:60px}.grid-link{border:0;background:none;color:#307de2;font-size:12px;padding:0}.num{text-align:right;font-variant-numeric:tabular-nums}
dialog#modal{border:0;box-shadow:0 20px 80px #17294240;border-radius:7px;width:min(1000px,94vw);max-height:90vh;padding:0;color:var(--ink);background:#fff}dialog#modal::backdrop{background:#16253c66;backdrop-filter:blur(1px)}#modal>header{position:sticky;top:0;z-index:80;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 21px;background:#fff;border-bottom:1px solid var(--line)}#modal-title{font-size:16px}#modal-body{padding:18px 22px;overflow-wrap:anywhere}#modal-body h3{margin:18px 0 12px}#modal-body .tabs{margin-top:-6px}#modal-body .flat-table{font-size:12px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px;margin-bottom:18px}.form-grid label{display:flex;flex-direction:column;gap:7px;color:#738095;font-size:12px}.form-grid input,.form-grid select,.form-grid textarea{width:100%;color:#344962}.form-grid .full{grid-column:1/-1}.form-actions{display:flex;gap:8px;justify-content:flex-end;border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.note{padding:11px 13px;background:#f4f8ff;color:#69809f;line-height:1.8;font-size:12px;margin-bottom:16px;border-left:3px solid #76a8f0}.note.warning{background:#fffbf1;color:#a58b45;border-left-color:#e7c264}.key-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:15px 0;margin-bottom:12px}.key-values span{display:block;font-size:11px;color:#99a3b3;margin-bottom:6px}.key-values strong{font-size:13px;font-weight:500;overflow-wrap:anywhere}.flow-line{display:flex;align-items:center;gap:10px;overflow:auto;padding:10px 0 20px}.flow-line span{white-space:nowrap;color:#96a1b2;font-size:12px}.flow-line span.done{color:#2e93bb}.flow-line span.current{color:#2878ec;font-weight:600}.history-item{padding:12px 0;border-bottom:1px dashed var(--line);font-size:12px;line-height:1.8}.history-item small{color:#96a3b4}.file-preview{max-width:100%;max-height:55vh;object-fit:contain}.file-frame{width:100%;height:55vh;border:1px solid var(--line)}.empty-state{padding:60px 20px;text-align:center;color:#91a0b6;line-height:2}.empty-state svg{display:block;width:36px;height:36px;margin:0 auto 16px;color:#a8bcdb}.settings-layout{display:grid;grid-template-columns:220px minmax(0,720px);gap:25px}.settings-side{border-right:1px solid var(--line);padding:12px;line-height:2;color:#7e8da4}.settings-body{background:#fff;padding:22px}.perm-table td:not(:first-child),.perm-table th:not(:first-child){text-align:center}.perm-table input{width:15px;height:15px;accent-color:#2878ec}.import-map{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.import-map label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#7a899d}.import-map select{width:100%}.mapping-step{display:flex;gap:10px;align-items:center;font-size:12px;color:#8c9ab0;margin-bottom:18px}.mapping-step .current{color:#2878ec;font-weight:600}.upload-zone{padding:30px 15px;background:#fafcff;border:1px dashed #bdd0ea;text-align:center;line-height:2}.upload-zone svg{display:block;margin:auto;width:30px;height:30px;color:#88aade}.upload-zone input{max-width:100%;border:0;background:none;font-size:12px;margin-top:14px}.check-table{max-height:310px;overflow:auto}.check-table th{position:sticky;top:0}.notice-preview{white-space:pre-wrap;background:#f7f9fc;padding:20px;line-height:1.9}.reserved{display:inline-block;font-size:11px;color:#969fab;background:#edf0f5;padding:3px 7px;margin-left:10px}.split-panel{display:grid;grid-template-columns:1fr 1fr;gap:18px}.split-panel>section{background:#fff;padding:20px;border-top:1px solid var(--line)}.data-chart{padding:20px;background:#fff;border-top:1px solid var(--line)}.data-chart canvas{max-width:100%}#toast{position:fixed;left:50%;bottom:40px;transform:translateX(-50%);z-index:3000;background:#263c55;color:#fff;border-radius:5px;padding:12px 20px;max-width:80vw;font-size:13px;box-shadow:0 8px 26px #293f5428;display:none;white-space:pre-line}#toast.show{display:block}#bell-count{position:absolute;right:-3px;top:1px;font-size:9px;background:#eb6d6d;border-radius:7px;color:#fff;padding:0 3px}pre{white-space:pre-wrap;font-size:11px;background:#f6f8fb;padding:12px;max-height:240px;overflow:auto}.mobile-nav #side{display:none}.mobile-nav#app-shell{grid-template-columns:1fr}.line-count{color:#869ab6;font-size:12px}.photo-thumb{width:60px;height:45px;object-fit:contain;border:1px solid var(--line)}
.quick-launch{row-gap:24px}.band-head>.link{display:inline-flex;align-items:center;gap:5px}.band-head>.link svg{width:14px;height:14px}.quick-settings h3{margin:12px 0;font-size:14px}.quick-selected{max-height:260px;overflow-y:auto}.quick-setting-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding:7px 0}.quick-setting-row>span{display:flex;align-items:center;gap:8px;font-size:13px}.quick-setting-row>span svg{width:18px;height:18px;flex-shrink:0}.quick-setting-row>div{display:flex;gap:5px;flex-shrink:0}.quick-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;max-height:240px;overflow-y:auto;padding:5px 0}.quick-options label{display:flex;align-items:center;gap:7px;font-size:12px}.quick-options input{flex-shrink:0}
@media(min-width:1700px){#content{padding:24px 30px}.dashboard-layout{grid-template-columns:minmax(0,1fr) 310px}.quick-launch{padding:26px 16px}.metric{padding:22px 26px}}
@media(max-width:1180px){.dashboard-layout{grid-template-columns:minmax(0,1fr) 235px}.quick-launch{grid-template-columns:repeat(3,1fr);gap:18px}.metric{padding:15px 12px}.kpi-strip{grid-template-columns:repeat(5,1fr)}#content{padding:18px 16px}.page-head{flex-wrap:wrap}.page-head>.actions{margin-left:0}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.header-name{font-size:12px}.page-head h1{font-size:18px}}
@media(max-width:760px){#app-shell{grid-template-columns:1fr}#side{display:none}.mobile-nav#app-shell #side{display:flex;position:fixed;inset:56px auto 0 0;width:205px;box-shadow:8px 0 25px #1b2a4422}#app-header{padding:0 10px;gap:6px}.header-name{display:none}.preview-label{font-size:10px}.account select{max-width:145px}.page-tabs{padding:0 12px;gap:6px}#clock-date{display:none}#content{padding:15px 10px}.dashboard-layout{display:block}.dashboard-layout>aside{display:grid;grid-template-columns:1fr}.kpi-strip{grid-template-columns:repeat(3,1fr)}.metric{padding:12px;border-bottom:1px solid var(--line)}.metric strong{font-size:23px}.metric small{display:none}.page-head{gap:10px}.page-head>.actions{width:100%}.actions{gap:5px}.action{font-size:11px;padding:6px 8px}.toolbar-band .summary{margin-left:0;width:100%}.dt-toolbar-l{width:100%}.dt-toolbar .dt-search{min-width:160px;flex:1}.dt-toolbar-r{margin-left:auto}.dt-scroll{max-height:calc(100dvh - 415px)!important}.dt-foot{gap:3px;padding:7px 5px}.dt-pager{gap:2px}.dt-pager button{padding:4px 5px}.dt-count{font-size:10px}.dt-pgsize{padding:4px;width:58px}.form-grid,.key-values,.import-map{grid-template-columns:1fr 1fr}.split-panel,.settings-layout{display:block}.settings-side{display:none}#status-bar{padding:0 10px;gap:9px;font-size:9px}#status-bar>span:nth-child(4){display:none}dialog#modal{max-width:97vw;width:97vw;max-height:94vh}#modal-body{padding:15px 12px}.flat-table td,.flat-table th{padding:9px;white-space:nowrap}.flow-line{gap:8px}}

/* The analysis view has its own responsive grid so the KPI rail and chart
   panels never create a hidden horizontal scroll on narrow work areas. */
@media(max-width:900px){
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  #content:has(.sample-analysis-kpis)>.sample-analysis-grid{grid-template-columns:1fr;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-grid .sample-analysis-panel{grid-column:1;}
}
@media(max-width:760px){
  #content:has(.sample-analysis-kpis){min-width:0;overflow-x:hidden;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 6px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card{min-width:0;padding:10px 8px 10px 58px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card svg{left:8px;width:34px;height:34px;padding:8px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-title{font-size:12px;white-space:nowrap;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card strong{font-size:23px;overflow-wrap:anywhere;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-toolbar,
  #content:has(.sample-analysis-kpis)>.sample-analysis-monthbar{padding:9px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-toolbar label{min-width:0;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-panel .flat-table{display:block;overflow-x:auto;}
}

/* Role-aware workbench: one quiet surface with clickable metrics, followed by the existing dashboard modules. */
.workbench-surface{background:#fff;border:1px solid #e5ebf3;border-radius:7px;margin:0 0 14px;overflow:hidden}
.workbench-surface-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px 10px}
.workbench-surface-head h2{font-size:15px;color:#263d5d;font-weight:600;margin:0}
.workbench-surface-head p{margin-top:4px;color:#8b98a9;font-size:11px}
.workbench-asof{color:#97a4b5;font-size:10px;white-space:nowrap}
.workbench-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:4px 10px 14px}
.workbench-metric{display:flex;align-items:center;gap:10px;min-width:0;padding:13px 11px;border:0;border-radius:5px;background:transparent;text-align:left;color:#344a66;cursor:pointer}
.workbench-metric:hover{background:#f8fbff}
.workbench-metric-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:#eef5ff;color:#4e8fdc}
.workbench-metric-icon svg{width:17px;height:17px;stroke-width:1.7}
.workbench-metric-copy{display:flex;flex-direction:column;min-width:0;gap:2px}
.workbench-metric-label{font-size:12px;color:#64738a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workbench-metric strong{font-size:22px;line-height:1.15;font-weight:600;font-variant-numeric:tabular-nums;color:#337fca}
.workbench-metric small{font-size:10px;line-height:1.35;color:#9ba7b6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workbench-metric.orange strong{color:#dc9140}.workbench-metric.orange .workbench-metric-icon{background:#fff5e8;color:#e19a48}
.workbench-metric.green strong{color:#2a9d79}.workbench-metric.green .workbench-metric-icon{background:#edf9f2;color:#46a981}
.workbench-metric.red strong{color:#d85a62}.workbench-metric.red .workbench-metric-icon{background:#fff0f1;color:#d85a62}
.workbench-metric.muted strong{color:#8e9baa}.workbench-metric.muted .workbench-metric-icon{background:#f2f4f7;color:#8996a5}
.workbench-layout{margin-top:0}
.workbench-layout .band,.workbench-layout .side-section{margin-bottom:14px}
.workbench-layout .band-head{min-height:42px}
.workbench-layout .flat-table th,.workbench-layout .flat-table td{padding-top:9px;padding-bottom:9px}
.workbench-progress{min-width:88px;color:#61748d}.workbench-progress span{display:block;height:4px;margin-top:4px;background:#edf2f7;border-radius:4px;overflow:hidden}.workbench-progress i{display:block;height:100%;background:#62b5da;border-radius:4px}
.workbench-data-note{display:flex;align-items:center;gap:7px;margin:0 0 12px;padding:9px 12px;border:1px solid #e9edf3;border-radius:5px;background:#fbfcfe;color:#7d8b9d;font-size:11px}.workbench-data-note svg{width:15px;height:15px;color:#8ca3bd;flex:0 0 auto}
.workbench-side-note{margin:12px 0 0}.workbench-reminder-count{color:#b88939;font-size:11px;margin:-7px 0 8px}
.risk-item .risk-number{color:#d98754}.risk-item strong:not(.risk-number){color:#8997a7}
@media(max-width:1180px){.workbench-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.workbench-metric{padding-left:9px;padding-right:9px}}
@media(max-width:760px){.workbench-surface-head{align-items:flex-start;padding:12px}.workbench-asof{white-space:normal;text-align:right}.workbench-metrics{grid-template-columns:repeat(2,minmax(0,1fr));padding:2px 6px 8px}.workbench-metric{gap:8px;padding:11px 7px}.workbench-metric-icon{flex-basis:30px;width:30px;height:30px}.workbench-metric-icon svg{width:15px;height:15px}.workbench-metric strong{font-size:20px}.workbench-metric small{white-space:normal}.workbench-layout .flat-table{display:block;overflow-x:auto}}
.sample-capture{margin-bottom:18px}.file-drop-zone{display:grid;gap:3px;margin-top:8px;padding:9px 12px;border:1px dashed #b8cce6;background:#f8fbff;color:#71839a;font-size:11px;cursor:copy;transition:border-color .15s,background .15s}.file-drop-zone strong{color:#375573;font-size:12px}.file-drop-zone.is-dragover,.sample-paste-zone.is-dragover,.sample-remark-paste.is-dragover,.sample-arrival-photo-paste.is-dragover{border-color:#2878ec;background:#eef5ff;color:#2878ec}.sample-paste-zone{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border:1px dashed #b8cce6;background:#f8fbff;color:#71839a;cursor:text}.sample-paste-zone>div{display:grid;grid-template-columns:auto 1fr;column-gap:10px;align-items:center}.sample-paste-zone svg{grid-row:span 2;width:24px;height:24px;color:#5d96df}.sample-paste-zone strong{color:#375573;font-size:13px}.sample-paste-zone span{font-size:11px;margin-top:3px}.sample-paste-zone .action{flex:none}.sample-screenshot-preview{display:flex;align-items:center;gap:12px;margin-top:10px}.sample-screenshot-preview .file-preview{max-width:260px;max-height:130px;border:1px solid var(--line);background:#fff}.sample-recognition-status{margin-top:8px}
.sample-auto-number{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;margin-bottom:12px;background:#f5f8fc;border:1px solid var(--line);color:#7b8ba0;font-size:12px}.sample-auto-number strong{color:#2f537a;font-size:13px;font-weight:600}.sample-paste-label{display:flex;flex-direction:column;gap:7px;color:#738095;font-size:12px;margin-bottom:10px}.sample-paste-input{min-height:86px}.sample-capture-actions{display:flex;justify-content:flex-end;margin-top:10px}
.sample-paste-label textarea{width:100%;min-height:86px;resize:vertical;color:#344962}
.sample-remark-paste{margin-top:10px;padding-top:10px;border-top:1px solid var(--line);display:grid;gap:6px}.sample-remark-paste>span{color:#738095;font-size:12px}.sample-remark-paste small{color:#91a0b6;font-size:11px}.sample-remark-pending,.sample-remark-thumbs{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start}.sample-remark-pending-item,.sample-remark-thumb{display:inline-flex;flex-direction:column;align-items:center;gap:5px;padding:5px;border:1px solid var(--line);background:#fff;color:#64758d;font-size:11px;max-width:128px}.sample-remark-pending-item img,.sample-remark-thumb img{width:112px;height:80px;object-fit:cover;background:#f7f9fc}.sample-remark-pending-item .link{font-size:11px}.sample-remark-thumb{cursor:zoom-in}.sample-remark-thumb span{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-remark-saved{margin:10px 0 14px}.sample-remark-saved h3{margin:0 0 8px!important}
.sample-arrival-photo-paste{display:grid;gap:6px;margin-top:10px;padding:10px;border:1px dashed #b8cce6;background:#f8fbff;color:#71839a;cursor:text}.sample-arrival-photo-paste strong{color:#375573;font-size:12px}.sample-arrival-photo-paste>span{font-size:11px}.sample-arrival-photo-pending{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start}.sample-arrival-photo-item{display:inline-flex;flex-direction:column;align-items:center;gap:5px;padding:5px;border:1px solid var(--line);background:#fff;color:#64758d;font-size:11px;max-width:128px}.sample-arrival-photo-item img{width:112px;height:80px;object-fit:cover;background:#f7f9fc}.sample-arrival-photo-item .link{font-size:11px}

/* Compact analytical bars keep long supplier names from overlapping. */
.bars{gap:12px;height:180px;padding-bottom:28px;overflow:hidden}
.row-actions{display:inline-flex;gap:3px;align-items:center}.row-actions button{border:1px solid #d8e0eb;background:#fff;color:#60728b;border-radius:2px;padding:2px 5px;font-size:11px;line-height:16px}.row-actions button:hover{color:#2477d8;border-color:#9bbde8;background:#f5f9ff}
#grid-host .dt-toolbar{padding:5px 8px;gap:5px}
#grid-host .dt-th-in{height:32px;padding:5px 7px}
#grid-host .dt-td{height:31px;padding:1px 7px;font-size:12px}
#grid-host .dt-foot{padding:5px 8px}
.bar-col{min-width:0}
.bar-col span{display:block;width:78px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
@media(max-width:1180px){.split-panel>section{min-width:0;overflow:hidden}.bars{gap:6px;padding-left:8px;padding-right:8px}.bar-col span{width:clamp(34px,8vw,78px)}}

/* Compact detail pages without reducing the existing text size. */
#content{padding:14px 18px 12px}
.page-head{margin-bottom:10px}
.page-head p{margin-top:3px}
.action{min-height:31px;padding:5px 10px}
.toolbar-band{padding:7px 10px}
.query-band,.analysis-controls{gap:8px;padding:10px;margin-bottom:10px}
.query-band label,.analysis-controls label,.toolbar-band>label{gap:4px}
#grid-host .dt-toolbar{padding:4px 8px}
#grid-host .dt-foot{padding:4px 8px}
.dt .dt-botsb{flex-basis:11px;height:11px}
.dt-botsb{height:11px}
.dt .dt-sum .dt-sum-td{height:32px}
.dt-norow{padding:40px}
.flat-table th{padding:8px 12px}
.flat-table td{padding:8px 12px}
@media(max-width:1180px){#content{padding:12px 14px 10px}}
@media(max-width:760px){#content{padding:12px 10px 9px}.dt-scroll{max-height:calc(100dvh - 385px)!important}.dt-foot{padding:5px 5px}}

/* Desktop navigation rail with hover/focus flyout; mobile keeps the existing drawer. */
@media(min-width:761px){
  #app-shell{grid-template-columns:72px minmax(0,1fr)}
  #side{position:relative;overflow:visible}
  .app-brand{height:64px;min-height:64px;padding:9px;justify-content:center}
  .company-logo{width:44px;height:44px;flex-basis:44px}
  .brand-name{display:none}
  #navigation{padding:10px 7px;overflow:visible}
  .nav-group{position:relative;margin-bottom:4px}
  .nav-parent{justify-content:center;min-height:40px;padding:9px 8px;font-size:0;border-radius:5px}
  .nav-parent .nav-label{display:none}
  .nav-parent>.lucide:first-child{width:19px;height:19px}
  .nav-parent .chevron{display:none}
  .nav-parent>.lucide-chevron-down{display:none}
  .nav-parent{position:relative}
  .nav-parent.active{background:transparent;box-shadow:none}
  .nav-parent.active::before{content:'';position:absolute;left:50%;top:50%;width:32px;height:32px;transform:translate(-50%,-50%);border-radius:6px;background:#2a70de;pointer-events:none}
  .nav-parent.active>.lucide:first-child{position:relative;z-index:1;color:#fff}
  .nav-sub{display:none;position:absolute;left:100%;top:0;width:238px;max-height:calc(100dvh - 20px);overflow:auto;margin:0;padding:8px;background:#202c43;border:1px solid #344158;border-radius:0 6px 6px 0;box-shadow:10px 12px 28px #17233d44;z-index:120}
  .nav-group:hover>.nav-sub,.nav-group:focus-within>.nav-sub,.nav-group:not(.closed)>.nav-sub{display:block}
  .nav-sub-title{padding:5px 10px 8px;color:#9fb3d0;font-size:11px;border-bottom:1px solid #344158}
  .nav-sub-list{padding-top:4px}
  .nav-child{min-height:31px;padding:7px 10px;font-size:12px;border-radius:4px;white-space:nowrap}
  .nav-child.active{background:#2a70de;color:#fff}
  .nav-child.active:before{left:4px}
  .side-tail{padding:10px 8px;justify-content:center;font-size:0;gap:0}
  .side-status-label{display:none}
  .side-tail span:last-child{display:none}
  .dt-scroll{max-height:calc(100dvh - 330px)!important}
}

/* Shared compact blocks for detail pages that do not use the main grid toolbar. */
.band{margin-bottom:12px}
.band-head{min-height:38px;padding:0 12px}
.rate-summary{gap:12px;padding:10px 14px;margin-bottom:10px}
.rate-summary strong{font-size:22px}
.tabs{margin-bottom:10px}
.tabs button{padding:8px 0}
.analysis-output{padding:12px;margin-top:10px}
.data-chart{padding:12px}
.split-panel{gap:12px}
.split-panel>section{padding:14px}
.note{padding:8px 10px;line-height:1.6;margin-bottom:10px}
@media(max-width:760px){.dt-scroll{max-height:calc(100dvh - 370px)!important}.nav-sub{max-height:none}}
#navigation.navigation-selected .nav-sub{display:none!important}

/* Sample analysis keeps cumulative KPIs separate from month-based activity. */
.sample-analysis-toolbar,.sample-analysis-monthbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);padding:10px 12px;margin-bottom:10px}
.sample-analysis-toolbar label,.sample-analysis-monthbar label{display:flex;align-items:center;gap:6px;color:#718198;font-size:12px}
.sample-analysis-toolbar select,.sample-analysis-monthbar input{min-width:132px;height:30px;padding:4px 8px;border:1px solid var(--line);border-radius:3px;background:#fff;color:var(--ink);font-size:12px}
.sample-analysis-filter-title{font-weight:600;color:#2a4565;margin-right:auto;white-space:nowrap}
.sample-analysis-monthbar strong{color:#263f60;font-size:14px;margin-right:5px}.sample-analysis-monthbar span{color:#8a98aa;font-size:11px}
.sample-analysis-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:10px}
.sample-kpi-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:102px;padding:15px 18px;border:1px solid var(--line);border-radius:4px;background:#fff;text-align:left;cursor:pointer;box-shadow:0 1px 2px #19365b08}
.sample-kpi-card:hover{border-color:#9bbde8;background:#fbfdff}.sample-kpi-card svg{position:absolute;right:16px;top:16px;width:18px;height:18px;color:currentColor;opacity:.85}
.sample-kpi-title{color:#4d5e76;font-size:12px}.sample-kpi-card strong{margin-top:8px;color:#233b5d;font-size:29px;line-height:1.1;font-weight:650;font-variant-numeric:tabular-nums}.sample-kpi-card.navy svg,.sample-kpi-card.navy strong{color:#285b99}.sample-kpi-card.orange svg,.sample-kpi-card.orange strong{color:#e19a36}.sample-kpi-card.blue svg,.sample-kpi-card.blue strong{color:#4388e6}.sample-kpi-card.red svg,.sample-kpi-card.red strong{color:#de6570}.sample-kpi-card.green svg,.sample-kpi-card.green strong{color:#269c78}.sample-kpi-card.muted svg,.sample-kpi-card.muted strong{color:#8996a8}
.sample-analysis-note{padding:8px 11px;margin-bottom:10px;background:#f5f8fc;border-left:3px solid #9ebce3;color:#73849a;font-size:11px;line-height:1.7}
.sample-analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sample-analysis-panel{min-width:0;background:#fff;border:1px solid var(--line);overflow:hidden}.sample-analysis-panel>header{display:flex;align-items:baseline;gap:10px;padding:10px 13px;border-bottom:1px solid #eef1f5}.sample-analysis-panel>header h2{margin:0;color:#253e60;font-size:14px}.sample-analysis-panel>header small{color:#929eae;font-size:10px}.sample-analysis-chart{height:220px;width:100%;min-width:0}.sample-analysis-chart-short{height:210px}.sample-analysis-panel .flat-table{font-size:11px}.sample-analysis-panel .flat-table th,.sample-analysis-panel .flat-table td{padding:7px 9px}.sample-analysis-empty{display:grid;place-items:center;min-height:100px;color:#95a2b3;font-size:12px}.sample-analysis-monthly,.sample-analysis-risk{grid-column:1/-1}.sample-analysis-risk .flat-table td{white-space:nowrap}.sample-analysis-risk .flat-table td:last-child{white-space:normal;min-width:220px}
@media(max-width:1100px){.sample-analysis-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.sample-analysis-toolbar label{flex:1;min-width:145px}.sample-analysis-filter-title{width:100%;margin-right:0}}
@media(max-width:760px){.sample-analysis-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sample-kpi-card{min-height:88px;padding:12px}.sample-kpi-card strong{font-size:24px}.sample-analysis-grid{grid-template-columns:1fr}.sample-analysis-panel{grid-column:1}.sample-analysis-panel>header{display:block}.sample-analysis-panel>header small{display:block;margin-top:4px}.sample-analysis-toolbar,.sample-analysis-monthbar{align-items:stretch}.sample-analysis-toolbar label,.sample-analysis-monthbar label{width:100%;justify-content:space-between}.sample-analysis-toolbar select,.sample-analysis-monthbar input{flex:1}.sample-analysis-monthbar span{width:100%}.sample-analysis-chart{height:205px}.sample-analysis-chart-short{height:200px}}

/* Analysis layout follows the reference: one quiet KPI surface, then filters and charts. */
#content:has(.sample-analysis-kpis){display:flex;flex-direction:column;gap:0}
#content:has(.sample-analysis-kpis)>.page-head{order:1}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis{order:2}
#content:has(.sample-analysis-kpis)>.sample-analysis-monthbar{order:3}
#content:has(.sample-analysis-kpis)>.sample-analysis-toolbar{order:4}
#content:has(.sample-analysis-kpis)>.sample-analysis-note{order:5}
#content:has(.sample-analysis-kpis)>.sample-analysis-grid{order:6}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:0;background:#fff;border:1px solid #e6ebf3;border-radius:8px;padding:18px 22px;margin:0 0 12px}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card{min-height:86px;padding:12px 14px 12px 74px;border:0;border-radius:0;background:transparent;box-shadow:none}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card:hover{background:#fbfcff;border:0}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card svg{left:16px;right:auto;top:50%;transform:translateY(-50%);width:38px;height:38px;padding:9px;border-radius:50%;background:#f1f6ff;opacity:1}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card.orange svg{background:#fff5e9}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card.green svg{background:#edf9f1}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card.red svg{background:#fff0f2}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card.muted svg{background:#f2f4f8}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-title{font-size:13px;color:#46556b}
#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card strong{margin-top:5px;font-size:27px}
#content:has(.sample-analysis-kpis)>.sample-analysis-toolbar,#content:has(.sample-analysis-kpis)>.sample-analysis-monthbar{border:0;border-radius:7px;background:#fff}
#content:has(.sample-analysis-kpis)>.sample-analysis-toolbar{margin-bottom:10px}
#content:has(.sample-analysis-kpis)>.sample-analysis-grid{gap:12px}
#content:has(.sample-analysis-kpis) .sample-analysis-panel{border:0;border-radius:7px;box-shadow:0 1px 5px #26466a0d}
@media(max-width:760px){#content:has(.sample-analysis-kpis)>.sample-analysis-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 8px}#content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card{padding-left:62px}.sample-kpi-card svg{left:8px!important}}

/* Workspace page tabs keep several business pages open for cross-checking. */
.page-tabs{gap:12px;align-items:stretch}
.workspace-tabs{display:flex;align-items:stretch;min-width:0;overflow-x:auto;scrollbar-width:thin}
.workspace-tab{display:inline-flex;align-items:center;gap:7px;border:0;border-right:1px solid #edf0f4;background:transparent;color:#79879a;font-size:12px;padding:0 12px;white-space:nowrap;cursor:pointer}
.workspace-tab:hover{background:#f6f9fd;color:var(--brand)}
.workspace-tab.active{color:var(--brand);background:#f7faff;box-shadow:inset 0 -2px 0 var(--brand)}
.workspace-tab svg{width:14px;height:14px}
.workspace-tab-close{display:grid;place-items:center;width:17px;height:17px;padding:0;margin-left:1px;border:0;border-radius:3px;background:transparent;color:#a3adba;cursor:pointer}
.workspace-tab-close:hover{background:#e8eef7;color:#45617e}
.workspace-tab-close svg{width:13px;height:13px}
#clock-date{font-size:11px;white-space:nowrap}
@media(max-width:760px){.page-tabs{padding:0 12px;gap:6px}.workspace-tab{padding:0 9px}}

/* Final responsive overrides for the analysis page. */
@media(max-width:900px){
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  #content:has(.sample-analysis-kpis)>.sample-analysis-grid{grid-template-columns:1fr;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-grid .sample-analysis-panel{grid-column:1;}
}
@media(max-width:760px){
  #content:has(.sample-analysis-kpis){min-width:0;overflow-x:hidden;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 6px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card{min-width:0;padding:10px 8px 10px 58px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card svg{left:8px;width:34px;height:34px;padding:8px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-title{font-size:12px;white-space:nowrap;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-kpis .sample-kpi-card strong{font-size:23px;overflow-wrap:anywhere;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-toolbar,
  #content:has(.sample-analysis-kpis)>.sample-analysis-monthbar{padding:9px;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-toolbar label{min-width:0;}
  #content:has(.sample-analysis-kpis)>.sample-analysis-panel .flat-table{display:block;overflow-x:auto;}
}

/* Detail grids: keep data rows compact while preserving the existing column, frozen and scroll models. */
#grid-host .dt-tbl tbody tr:not(.dt-vsp){height:30px}
#grid-host .dt-tbl tbody tr:not(.dt-vsp) .dt-td{height:30px;max-height:30px;padding:0 7px;line-height:29px;vertical-align:middle;overflow:hidden}
#grid-host .dt-tbl tbody tr:not(.dt-vsp) .dt-td > *{max-width:100%;vertical-align:middle}
#grid-host .dt-tbl .dt-td input[type="checkbox"],#grid-host .dt-th.dt-sel input[type="checkbox"]{width:15px;height:15px;margin:0;vertical-align:middle}
#grid-host .dt-th.dt-sel,#grid-host .dt-td.dt-sel{width:38px!important;min-width:38px!important;max-width:38px!important;text-align:center;padding-left:0;padding-right:0}
#grid-host .dt-selection-tools{display:inline-flex;align-items:center;gap:6px;min-height:26px;white-space:nowrap;color:#69819c;font-size:12px}
#grid-host .dt-selection-tools button{border:1px solid var(--line);background:#fff;color:#516884;border-radius:3px;padding:4px 7px;font-size:11px;cursor:pointer}
#grid-host .dt-selection-tools button:hover{background:var(--brand-soft);color:var(--brand)}
#grid-host .dt-selection-count{font-weight:600;color:var(--brand)}
#grid-host .dt-tbl .dt-td button{max-height:26px;line-height:20px;padding:1px 5px;vertical-align:middle}
#grid-host .dt-tbl .dt-clip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#grid-host .dt-th-in{min-height:30px;height:auto;padding:4px 7px;line-height:16px}
#grid-host .dt-th-t{white-space:normal;overflow:hidden;text-overflow:ellipsis}

/* Source pages keep the view selector and selection count beside the title. */
.page-head-title{min-width:0;display:flex;flex-direction:column;gap:3px}
.page-head-titleline{display:flex;align-items:center;gap:10px;min-width:0}
.source-inline-filter{display:inline-flex;align-items:center;gap:6px;min-width:0;color:#718198;font-size:12px;white-space:nowrap}
.source-inline-filter select{height:30px;min-width:108px;padding:4px 24px 4px 8px;font-size:12px}
.source-inline-filter #source-selected{margin-left:2px}
.usage-help{display:inline-flex;align-items:center;position:relative;min-width:0}
.usage-help-toggle{border:0;background:transparent;color:#5f7da5;padding:3px 5px;font-size:12px;white-space:nowrap}
.usage-help-toggle:hover{color:var(--brand);background:#f1f6fe;border-radius:4px}
.usage-help-body{position:absolute;top:calc(100% + 7px);left:0;z-index:30;width:min(520px,calc(100vw - 40px));padding:10px 12px;background:#f4f8ff;color:#69809f;border-left:3px solid #76a8f0;box-shadow:0 5px 16px rgba(31,55,90,.12);font-size:12px;line-height:1.7;white-space:normal}
.usage-help-body[hidden]{display:none}
/* Explicit component display rules must not override authorization hiding. */
[data-action][hidden],[data-page][hidden],[data-metric][hidden]{display:none!important}
.static-help-extra{margin-top:8px;padding-top:8px;border-top:1px solid #dce8f8}
@media(max-width:760px){.page-head-titleline{align-items:flex-start;flex-wrap:wrap}.source-inline-filter{width:100%;padding-left:0}.source-inline-filter select{flex:0 0 auto}.source-inline-filter #source-selected{margin-left:4px}}

/* Right-side detail panel for editable detail rows. */
.detail-drawer-mask{position:fixed;inset:0;background:rgba(15,23,42,.22);display:none;z-index:1100}
.detail-drawer-mask.open{display:block}
.detail-drawer{position:absolute;top:0;right:0;width:min(620px,94vw);height:100%;background:#fff;box-shadow:-8px 0 28px rgba(15,23,42,.18);display:flex;flex-direction:column}
.detail-drawer>header{display:flex;align-items:center;gap:12px;padding:13px 18px;border-bottom:1px solid var(--line);background:#fff}
.detail-drawer-title{font-size:16px;font-weight:600;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.detail-drawer-body{padding:18px;overflow:auto;flex:1;min-height:0}
.detail-drawer-footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--line);background:#fff}
.detail-form .form-grid{margin-bottom:12px}
.detail-field input[readonly]{background:#f7f9fc;color:#52657e}
.detail-readonly{border-top:1px solid var(--line);padding-top:10px;margin-top:4px}
.detail-readonly h3{margin:0 0 8px;font-size:13px}
.password-input-wrap{position:relative;display:block;width:100%}.password-input-wrap>input{width:100%;padding-right:58px}.password-toggle{position:absolute;top:50%;right:7px;transform:translateY(-50%);padding:4px 6px;border:0;background:transparent;color:#2878ec;font-size:12px;line-height:1.4}.password-toggle:hover{color:#155fc4;text-decoration:underline}.password-toggle:focus-visible{outline:2px solid #2878ec;outline-offset:1px}
@media(max-width:760px){.detail-drawer{width:100%;max-width:none}.detail-drawer-body{padding:14px 12px}.detail-drawer-footer{padding:10px 12px}}

/* Unified detail-grid headers: one compact line, stable filter slots, no layout shift. */
#grid-host .dt-th{position:sticky;top:0;white-space:nowrap;overflow:visible}
#grid-host .dt-th-in{position:relative;display:flex;align-items:center;gap:0;min-width:0;min-height:30px;height:30px!important;padding:4px 7px;white-space:nowrap;overflow:visible}
#grid-host .dt-th-in.dt-align-left{justify-content:flex-start}
#grid-host .dt-th-in.dt-align-center{justify-content:center}
#grid-host .dt-th-in.dt-align-right{justify-content:flex-end}
#grid-host .dt-th-content{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:calc(100% - 8px);width:max-content;overflow:hidden;vertical-align:middle}
#grid-host .dt-th-t{display:block;min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px}
#grid-host .dt-filter-btn,#grid-host .dt-menu-btn{flex:0 0 20px;width:20px;height:22px;min-width:20px;margin-left:0;padding:0;display:inline-flex;align-items:center;justify-content:center;line-height:1;border:0;background:transparent;color:#7b8798;opacity:0;pointer-events:none;transition:opacity .12s ease,background-color .12s ease,color .12s ease}
#grid-host .dt-filter-btn{cursor:pointer}
#grid-host .dt-filter-icon{display:block;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
#grid-host .dt-menu-btn{font-size:11px;cursor:pointer}
#grid-host .dt-th:hover .dt-filter-btn,#grid-host .dt-th:focus-within .dt-filter-btn,#grid-host .dt-th.dt-filtered .dt-filter-btn,#grid-host .dt-th.dt-filter-open .dt-filter-btn,#grid-host .dt-th:hover .dt-menu-btn,#grid-host .dt-th:focus-within .dt-menu-btn{opacity:1}
#grid-host .dt-th:hover .dt-filter-btn,#grid-host .dt-th:focus-within .dt-filter-btn,#grid-host .dt-th.dt-filtered .dt-filter-btn,#grid-host .dt-th.dt-filter-open .dt-filter-btn{pointer-events:auto}
#grid-host .dt-filter-btn:hover,#grid-host .dt-filter-btn:focus-visible,#grid-host .dt-menu-btn:hover,#grid-host .dt-menu-btn:focus-visible{background:#dce9fb;color:#1f66c1}
#grid-host .dt-th.dt-filtered .dt-filter-btn{color:#1f66c1}
#grid-host .dt-th .dt-resize{position:absolute;z-index:3;top:0;right:0;bottom:0;display:block;flex:0 0 8px;width:8px;cursor:col-resize;touch-action:none}
#grid-host .dt-th .dt-resize:hover{background:rgba(37,99,235,.12)}
#grid-host.dt-resizing,#grid-host.dt-resizing *{cursor:col-resize!important;user-select:none!important}
#grid-host .dt-filter-pop,#grid-host .dt-colmenu{z-index:var(--z-dropdown);white-space:normal}
@media (hover:none){#grid-host .dt-th .dt-filter-btn{opacity:1;pointer-events:auto}}

/* 统一列设置面板：视口级居中弹窗，列头齿轮已移除。 */
#grid-host .dt-cols-toggle{font-weight:600;min-width:48px}
#grid-host .dt-col-backdrop{display:none;position:fixed;inset:0;background:rgba(15,31,55,.28);z-index:9998}
#grid-host .dt-col-backdrop.open{display:block}
#grid-host .dt-colpop{display:none;position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-width:calc(100vw - 32px);height:min(720px,85vh);max-height:85vh;min-width:0;padding:0;background:#fff;border:1px solid #cfd9e8;border-radius:4px;box-shadow:0 18px 50px rgba(15,31,55,.25);z-index:9999;flex-direction:column;overflow:hidden}
#grid-host .dt-colpop.open{display:flex}
#grid-host .dt-colpop-h{display:flex;align-items:center;justify-content:space-between;flex:0 0 42px;padding:0 14px;border-bottom:1px solid var(--line);font-size:14px;font-weight:600;color:var(--ink);background:#fff}
#grid-host .dt-colpop-close{width:28px;height:28px;padding:0;border:0;background:transparent;color:#74859a;border-radius:3px;font-size:20px;line-height:1;cursor:pointer}
#grid-host .dt-colpop-close:hover{background:#edf4fd;color:var(--brand)}
#grid-host .dt-colpop-actions{display:flex;align-items:center;gap:6px;flex:0 0 42px;padding:0 14px;border-bottom:1px solid var(--line);background:#fbfcfe}
#grid-host .dt-colpop-actions button,#grid-host .dt-colpop-f button{border:1px solid var(--line);background:#fff;color:var(--ink);padding:5px 10px;border-radius:3px;font-size:11px;cursor:pointer}
#grid-host .dt-colpop-actions button:hover,#grid-host .dt-colpop-f button:hover{background:var(--brand-soft);color:var(--brand)}
#grid-host .dt-colpop-head,#grid-host .dt-col-opt{display:grid;grid-template-columns:38px 220px 96px 62px 62px 92px 52px;align-items:center;gap:6px}
#grid-host .dt-colpop-head{flex:0 0 32px;padding:0 14px;background:#eef4fd;border-bottom:1px solid #dbe5f2;color:#5e7290;font-size:11px;font-weight:600}
#grid-host .dt-colpop-head span:nth-child(1),#grid-host .dt-colpop-head span:nth-child(n+4){text-align:center}
#grid-host .dt-colpop-list{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:3px 10px}
#grid-host .dt-col-opt{min-height:32px;padding:2px 4px;border:1px solid transparent;border-radius:3px;font-size:11px}
#grid-host .dt-col-opt:hover{background:#f7faff;border-color:#e1eaf7}
#grid-host .dt-col-opt.dt-dl{border-top:2px solid var(--brand)}
#grid-host .dt-col-opt.dt-dr{border-bottom:2px solid var(--brand)}
#grid-host .dt-col-seq{text-align:center;color:#7a8ba0;font-variant-numeric:tabular-nums}
#grid-host .dt-col-opt-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#grid-host .dt-col-opt select{width:92px;min-width:0;height:26px;padding:2px 5px;font-size:11px}
#grid-host .dt-col-switch{display:flex;align-items:center;justify-content:center;white-space:nowrap;color:#64748b;font-size:10px}
#grid-host .dt-col-switch input{margin:0;width:16px;height:16px;accent-color:var(--brand)}
#grid-host .dt-col-opt>button{width:25px;height:25px;padding:0;border:1px solid var(--line);background:#fff;color:#64748b;border-radius:3px;cursor:pointer}
#grid-host .dt-col-opt>button:hover{color:var(--brand);background:var(--brand-soft)}
#grid-host .dt-col-opt>button:disabled{opacity:.35;cursor:not-allowed}
#grid-host .dt-col-lock{display:inline-block;font-size:10px;color:#9aa6b6;margin-left:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#grid-host .dt-colpop-f{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex:0 0 50px;padding:0 14px;border-top:1px solid var(--line);background:#fff}
#grid-host .dt-colpop-f .primary{background:var(--brand);border-color:var(--brand);color:#fff}
.sample-drawing-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:3px;background:transparent;color:#60728b;vertical-align:middle}.sample-drawing-icon:hover:not(:disabled){background:#eef4fd;color:#2477d8}.sample-drawing-icon:focus-visible{outline:2px solid #2878ec;outline-offset:1px}.sample-drawing-icon:disabled{opacity:.35;cursor:not-allowed}.sample-drawing-icon svg{width:17px;height:17px}
#grid-host .dt-menu-btn{display:none!important}
#grid-host .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}
@media(max-width:760px){#grid-host .dt-colpop{width:calc(100vw - 20px);height:min(86vh,680px)}#grid-host .dt-colpop-head,#grid-host .dt-col-opt{grid-template-columns:30px minmax(100px,1fr) 76px 38px 38px 54px 48px;gap:3px}#grid-host .dt-colpop-head{padding:0 8px;font-size:10px}#grid-host .dt-colpop-actions{padding:0 8px}#grid-host .dt-colpop-list{padding:3px 5px}#grid-host .dt-colpop-f{padding:0 8px}}
