:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#172b41;background:#f3f6fa;font-synthesis:none;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{background:white;color:#294361;border:1px solid #d6e0eb;border-radius:7px;padding:9px 14px;cursor:pointer;white-space:nowrap}button:hover{background:#f0f6fe;border-color:#93b5dd}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:#225db8;border-color:#225db8;color:white}.primary:hover{background:#164eaa;color:white}.danger{color:#b53737}.muted,.footnote{color:#687b91}.footnote{font-size:12px;line-height:1.8}.eyebrow{font-size:12px;letter-spacing:.12em;color:#547293;margin:0 0 8px}h1{font-size:26px;margin:0;letter-spacing:-.03em}h2{font-size:17px;margin:0}label{display:flex;flex-direction:column;gap:7px;color:#415670;font-size:13px}input,select,textarea{min-width:0;background:#fff;border:1px solid #ccd8e6;border-radius:6px;padding:9px 10px;color:#172b41}textarea{resize:vertical;min-height:72px}input:focus,select:focus,textarea:focus{outline:2px solid #c0d7f6;outline-offset:1px}.login-view{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 18% 15%,#ddeafd,transparent 65%),#f5f8fc}.login-card{width:min(440px,90vw);background:white;padding:40px;border:1px solid #e0e8f1;border-radius:14px;box-shadow:0 20px 80px #163a6714}.login-card form{display:grid;gap:20px;margin-top:32px}.brand-mark{display:grid;place-items:center;width:50px;height:50px;background:#225db8;color:white;font-size:25px;font-weight:bold;border-radius:10px;margin-bottom:24px}.brand-mark.small{width:36px;height:36px;font-size:20px;margin:0}.brand{display:flex;gap:12px;align-items:center;padding:30px 24px}.brand small{display:block;color:#8c9cb3;margin-top:5px;font-size:11px}aside{width:228px;position:fixed;inset:0 auto 0 0;background:#10273e;color:#eff5fc;display:flex;flex-direction:column}nav{display:flex;flex-direction:column;padding:14px;gap:7px}nav button{text-align:left;background:transparent;border:0;color:#bdcee1;padding:13px 17px;border-radius:7px}nav button.active{background:#254767;color:white}nav button:hover{background:#203d59}.side-bottom{margin-top:auto;padding:22px;color:#8197ae;font-size:12px;line-height:1.8}.environment{color:#c4d5e9;border-top:1px solid #304458;padding-top:20px}main{margin-left:228px;padding:30px 34px;max-width:1800px}header{display:flex;align-items:center;justify-content:space-between;margin:4px 0 25px}.identity{display:flex;align-items:center;gap:15px;color:#536b83}.context-bar{display:flex;align-items:center;gap:18px;margin-bottom:22px}.context-bar label{flex-direction:row;align-items:center}.badge{background:#e6effb;color:#315e92;border:1px solid #d3e2f4;padding:5px 9px;border-radius:5px;font-size:11px}.panel{background:white;border:1px solid #dfe7f0;border-radius:10px;padding:22px;margin-bottom:20px;box-shadow:0 2px 5px #243b5303}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.section-heading .muted{font-size:12px}.filter-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr auto auto;gap:12px;align-items:end}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:18px}.toolbar label{flex-direction:row;align-items:center}.toolbar input[type=number]{width:70px}.table-scroll{overflow:auto;border:1px solid #e3eaf3;border-radius:7px;max-height:570px}table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px;white-space:nowrap}th{background:#f4f7fb;color:#425873;text-align:left;font-weight:600}th,td{padding:12px 14px;border-bottom:1px solid #e6edf5;border-right:1px solid #edf2f7}tbody tr:last-child td{border-bottom:0}tbody tr:hover td{background:#f9fbfd}th:last-child,td:last-child{border-right:0}td input{width:100%;min-width:95px}td input[type=checkbox]{min-width:0;width:auto}.empty{text-align:center;padding:65px;color:#7a8fa5}.pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:18px}.status{border-radius:4px;padding:4px 8px;font-size:12px;background:#edf3fc;color:#346494}.status.approved,.status.succeeded{background:#e7f4ed;color:#217549}.status.failed,.status.rejected,.status.conflict{background:#fcecec;color:#a13b3b}.status.pending,.status.running{background:#fff4dc;color:#91620a}.approval-card{padding:18px;border:1px solid #e1e9f2;border-radius:8px;margin-bottom:14px}.approval-card summary{cursor:pointer;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.approval-card pre{white-space:pre-wrap;word-break:break-word;background:#f6f8fc;padding:14px;border-radius:6px;max-height:260px;overflow:auto;font-family:inherit;font-size:12px;line-height:1.8}.approval-actions{display:flex;gap:8px;margin-top:12px}.metric-row{display:flex;gap:16px;margin-bottom:18px}.metric{padding:16px 22px;min-width:170px;border:1px solid #dce7f4;background:#f7faff;border-radius:8px}.metric strong{display:block;font-size:24px;margin-top:8px;color:#235889}.chart-svg{width:100%;min-height:320px;max-height:520px}.chart-legend{display:flex;gap:25px;padding:8px;color:#52718e}.import-box{background:#f6f9fd;padding:18px;border:1px dashed #c3d4e9;border-radius:8px;margin:18px 0}.import-box label{margin-bottom:15px}.errors{color:#a73535;background:#fff5f5;padding:14px;max-height:220px;overflow:auto}dialog{border:1px solid #d5e0ef;border-radius:12px;padding:25px;width:min(580px,94vw);max-height:90vh;color:#20394f}dialog::backdrop{background:#0f25366b}.record-fields{display:grid;gap:14px;margin-bottom:18px}.dialog-actions{display:flex;justify-content:flex-end;margin-top:22px}#notice{position:fixed;top:18px;left:50%;transform:translateX(-50%);max-width:80vw;padding:14px 22px;background:#173750;color:white;border-radius:8px;box-shadow:0 8px 35px #1234;z-index:100;display:none}#notice.error{background:#a33336}footer{text-align:center;font-size:11px;color:#8b9aae;padding:12px}a{color:#225db8}button:focus-visible,a:focus-visible{outline:3px solid #77a9ea;outline-offset:2px}[hidden]{display:none!important}@media(max-width:1000px){aside{width:180px}.brand{padding:24px 15px}main{margin-left:180px;padding:22px}.filter-grid{grid-template-columns:1fr 1fr}.context-bar{flex-wrap:wrap}.identity{font-size:12px}}@media(max-width:680px){aside{position:static;width:100%}.brand{padding:15px}nav{flex-direction:row;overflow:auto;padding:7px}nav button{padding:10px}.side-bottom{display:none}main{margin:0;padding:15px}header{gap:12px}.identity{flex-direction:column;gap:5px}.section-heading{flex-wrap:wrap}h1{font-size:22px}.panel{padding:16px}}
/* Two-level shell, independently recreated from the supplied reference layout. */
.shell-page{background:#f5f6f8;color:#263a4a}.shell-topbar{position:fixed;inset:0 0 auto;height:56px;z-index:30;display:flex;gap:8px;margin:0;padding:0 18px;background:#071c2d;color:#eff5fa;box-shadow:0 1px 4px #0002}.shell-brand{display:flex;gap:10px;align-items:center;min-width:196px;color:#fff;text-decoration:none;font-size:17px}.database-icon{font-size:28px;font-weight:400}.shell-topbar nav{display:flex;flex-direction:row;padding:0;gap:3px;align-items:stretch;height:100%;overflow:auto}.shell-topbar nav button{border-radius:0;padding:0 16px;color:#c9d8e5}.shell-topbar nav button.active{background:#294152;color:white;box-shadow:inset 0 -3px #55abf6}.shell-topbar .config-add{flex:none;background:transparent;color:#ffa777;border:1px dashed #dd8359;padding:6px 10px}.shell-tools{margin-left:auto;display:flex;align-items:center;gap:6px;flex:none}.shell-tools>button{background:transparent;border:0;color:#bdcad6;padding:10px 11px;border-radius:4px}.shell-tools>button.active{color:white;background:#dd845e}.shell-tools>button:hover{background:#294354;color:white}#notification-count{display:inline-block;font-size:11px;background:#31526b;border-radius:10px;min-width:18px;text-align:center;padding:1px 4px}.shell-tools details{position:relative}.shell-tools summary{cursor:pointer;padding:10px;list-style:none}.personal-popover{position:absolute;right:0;top:40px;background:white;color:#243b51;border:1px solid #dae3eb;box-shadow:0 8px 30px #0002;border-radius:7px;padding:14px;min-width:175px;display:grid;gap:8px}.personal-popover p{margin:0 0 5px;color:#7a8c9f;font-size:12px;max-width:260px;white-space:normal}.shell-sidebar{inset:56px auto 0 0;width:212px;background:white;color:#283e54;border-right:1px solid #e4e8ed;z-index:20;transition:width .15s}.sidebar-title{display:flex;align-items:center;justify-content:space-between;padding:14px 10px 8px 16px;font-size:12px;color:#8795a5}.sidebar-title button{padding:2px 10px;font-size:23px;border:1px solid #e7ebf1;border-radius:6px;color:#8c99a5}#secondary-navigation{padding:8px;gap:5px;overflow-y:auto}#secondary-navigation button{display:flex;align-items:center;gap:10px;padding:11px 13px;color:#3b4e61;font-size:13px}#secondary-navigation button.active{background:#e7f4ff;color:#1988ec}#secondary-navigation button:hover{background:#f0f6fc}.shell-sidebar .config-add{align-self:flex-start;margin:8px 17px;padding:7px 10px}.config-add{border:1px dashed #eca981;background:#fff9f5;color:#cf7044;border-radius:4px}.sidebar-footnote{margin-top:auto;padding:20px;color:#91a0af;font-size:11px;line-height:1.8}.shell-main{margin:56px 0 0 212px;padding:22px;max-width:none;min-height:calc(100vh - 56px);transition:margin-left .15s}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.page-heading h1{font-size:21px}.page-heading .eyebrow{font-size:11px;letter-spacing:0;margin-bottom:5px}.page-heading button{font-size:12px;padding:7px 11px}.config-banner{background:#fff5e9;border:1px solid #f4d2a9;color:#8e622c;padding:10px 13px;margin-bottom:16px;display:flex;gap:10px;align-items:center;border-radius:5px}.config-banner span{margin-right:auto;line-height:1.6}.config-banner button{padding:7px 10px;font-size:12px}.business-block{background:white;border:1px solid #e7ebef;border-radius:6px;margin-bottom:18px;box-shadow:0 1px 3px #18344905;overflow:hidden}.block-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid #f0f2f5}.block-heading h2{font-size:16px}.block-tools{display:flex;gap:5px}.block-tools button{font-size:11px;padding:5px 9px}.business-host{display:block;min-width:0}.create-block{padding:9px 16px;margin-bottom:12px}.empty-page{padding:75px 25px;background:white;border:1px dashed #dce4ed;text-align:center;color:#7a8c9e;border-radius:6px}.empty-page>div{font-size:38px;color:#bccada;margin-bottom:15px}.empty-page p{font-size:13px}.sidebar-collapsed .shell-sidebar{width:56px}.sidebar-collapsed .shell-main{margin-left:56px}.sidebar-collapsed .sidebar-title{padding:12px 8px}.sidebar-collapsed #primary-label,.sidebar-collapsed .secondary-label,.sidebar-collapsed .sidebar-footnote,.sidebar-collapsed #add-secondary{display:none}.sidebar-collapsed #secondary-navigation{padding:6px}.sidebar-collapsed #secondary-navigation button{padding:11px 13px}.settings-form{display:grid;gap:16px}.settings-form fieldset{border:1px solid #e2e7ed;border-radius:6px;padding:15px;display:grid;grid-template-columns:1fr 1fr;gap:12px;max-height:300px;overflow:auto}.settings-form legend{font-size:13px;color:#52697e;padding:0 5px}.check-label{display:flex;flex-direction:row;align-items:center;gap:8px;line-height:1.5}.check-label input{flex:none}.settings-tabs{display:flex;gap:10px;margin-bottom:20px}#shell-dialog{width:min(900px,94vw);max-height:90vh;padding:24px}#shell-dialog-title{font-size:18px}#shell-dialog h3{font-size:15px;margin:22px 0 12px}.notification-item{border-bottom:1px solid #e8edf3;padding:8px 0 16px}.notification-item h3{margin:12px 0 5px!important}.notification-item p{color:#64778b;line-height:1.7}.notification-item small{color:#91a0ae}.notification-item button{margin-top:10px;padding:6px 10px;font-size:12px}#shell-notice{position:fixed;top:65px;left:50%;transform:translateX(-50%);z-index:1000;background:#19415a;color:white;padding:13px 20px;border-radius:7px;max-width:min(700px,90vw);box-shadow:0 8px 30px #0002;line-height:1.7}#shell-notice.error{background:#a53737}
/* These styles are also loaded inside each block's isolated shadow DOM. */
.business-module{font-family:"Microsoft YaHei",system-ui,sans-serif;color:#263c50;font-size:13px}.business-module aside,.business-module main>header,.business-module footer,.business-module #login-view{display:none!important}.business-module main{margin:0;padding:16px;max-width:none}.business-module .context-bar{margin-bottom:13px;gap:12px;font-size:12px}.business-module .context-bar select{padding:6px 8px}.business-module .badge{font-size:10px}.business-module .panel{padding:14px 0;border:0;box-shadow:none;border-radius:0;margin-bottom:5px}.business-module #filters{padding:12px;background:#fafbfd;border:1px solid #edf0f5;border-radius:5px;margin-bottom:15px}.business-module .section-heading h2{font-size:14px}.business-module .section-heading{margin-bottom:12px}.business-module .filter-grid{grid-template-columns:repeat(4,minmax(90px,1fr)) auto auto;gap:10px}.business-module input,.business-module select,.business-module button{padding:7px 9px;font-size:12px}.business-module .table-scroll{max-height:500px;border-radius:4px}.business-module th,.business-module td{padding:10px 12px}.business-module th{background:#f8fafb}.business-module #notice{top:75px}.business-module .toolbar{gap:8px;margin-bottom:13px}.business-module .toolbar label{font-size:12px}.business-module .table-scroll input{min-width:110px}.business-module .table-scroll input[type=checkbox]{min-width:0}.business-module .record-fields{grid-template-columns:1fr}.business-module .record-fields label{font-size:13px}
@media(max-width:1100px){.shell-topbar{padding:0 10px}.shell-brand{min-width:165px;font-size:15px}.shell-tools>button{padding:9px 6px;font-size:12px}.shell-topbar nav button{padding:0 11px}.business-module .filter-grid{grid-template-columns:1fr 1fr}.business-module .context-bar{flex-wrap:wrap}.config-banner{flex-wrap:wrap}}
@media(max-width:720px){.shell-topbar{height:96px;flex-wrap:wrap;gap:0;padding:7px 10px;align-content:space-between}.shell-brand{min-width:0;font-size:14px}.database-icon{font-size:21px}.shell-tools{gap:0}.shell-tools>button{font-size:11px;padding:6px}.shell-tools summary{font-size:12px;padding:6px}.shell-topbar #primary-navigation{order:5;height:35px;width:calc(100% - 125px);flex:none}.shell-topbar #add-primary{order:6;font-size:11px;margin-left:auto}.shell-sidebar{top:96px;width:150px;position:fixed}.shell-main{margin:96px 0 0 150px;padding:10px}.sidebar-collapsed .shell-main{margin-left:48px}.sidebar-collapsed .shell-sidebar{width:48px}#secondary-navigation{flex-direction:column}#secondary-navigation button{padding:10px 8px;font-size:12px}.page-heading{align-items:flex-start;flex-direction:column;margin-bottom:12px}.page-heading h1{font-size:18px}.block-heading{padding:12px;flex-wrap:wrap}.business-module main{padding:10px}.business-module .filter-grid{grid-template-columns:1fr 1fr}.business-module .filter-grid button{padding:7px 6px}.business-module .section-heading{align-items:flex-start}.settings-form fieldset{grid-template-columns:1fr}.personal-popover{top:32px}.shell-sidebar .config-add{margin:8px;font-size:11px}.shell-tools #open-settings{font-size:0}.shell-tools #open-settings::after{content:'设置';font-size:11px}}
/* Report configuration and rendering additions. */
.layout-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.formula-guide{padding:12px;border:1px solid #e0e7ef;border-radius:6px;font-size:12px;line-height:1.8}.formula-guide summary{cursor:pointer;font-weight:600}.config-panes #filter-field-config{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}.config-panes [data-query-field]{display:grid;gap:10px;min-width:0;border:1px solid #e0e7ef;border-radius:6px;padding:12px}.query-option{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:12px;border-bottom:1px solid #edf0f4;padding-bottom:10px}.query-option button{grid-column:1/-1;justify-self:start}.report-scroll table{border-collapse:separate;border-spacing:0;width:max-content;max-width:none}.report-scroll[data-report-position=center] table{margin-inline:auto}.report-scroll[data-report-position=right] table{margin-left:auto}.pie-charts{display:flex;flex-wrap:wrap;gap:16px}.pie-series{flex:1 1 260px;max-width:420px}.chart-scroll{overflow:auto;max-height:650px}.chart-scroll .chart-svg{height:auto;max-height:none;min-width:700px}.business-module .report-scroll td,.business-module .report-scroll th{overflow-wrap:anywhere}@media(max-width:720px){.layout-grid,.config-panes #filter-field-config{grid-template-columns:1fr}.query-option{grid-template-columns:1fr}}
/* October requirements: configuration panels, touch layout, pasted grid feedback. */
.configuration-editor{display:grid;grid-template-columns:156px minmax(0,1fr);gap:22px}.config-tabs{display:flex;flex-direction:column;padding:0;gap:4px}.config-tabs button{color:#607285;border-left:3px solid transparent;border-radius:0;background:white;padding:12px;text-align:left;white-space:normal}.config-tabs button.active{background:#f0f7ff;color:#1677db;border-left-color:#1677db}.config-tabs button:hover{color:#1677db;background:#f6f9fd}.config-panes section{display:grid;gap:18px;min-width:0}.config-panes .table-scroll{max-height:420px}.config-panes table input:not([type=checkbox]){min-width:90px;width:120px}.config-panes #filter-field-config{display:flex;flex-wrap:wrap;gap:12px}.config-editor-actions{grid-column:1/-1;display:flex;justify-content:flex-end;border-top:1px solid #edf0f4;padding-top:15px}.default-filter{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;margin-top:10px}.field-permissions{display:block!important;max-height:400px!important}.field-permissions details{padding:12px 0;border-bottom:1px solid #edf1f5}.field-permissions summary{cursor:pointer;font-weight:600;margin-bottom:10px}.settings-category-tabs{border-bottom:1px solid #e1e8ef;padding-bottom:10px;flex-wrap:wrap}.security-summary{line-height:1.8}.wecom-login{display:block;text-align:center;border:1px solid #2b9467;border-radius:6px;padding:10px;margin-top:16px;color:#24794f;text-decoration:none}.business-module .original-value{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;color:#8796a5;font-size:11px;margin-top:4px}.business-module .record-fields.horizontal{grid-template-columns:1fr 1fr}.business-module .report-description{white-space:pre-wrap;color:#5d7085;line-height:1.8}.business-module #entry-import{margin-top:20px;border-top:1px solid #e3eaf2;padding-top:16px}.business-module #entry-import summary{cursor:pointer;color:#246ac0;font-weight:600}.business-module #update-drafts:not(:empty),.business-module #drafts:not(:empty){border:1px solid #dae6f3;background:#fbfdff;padding:14px;border-radius:6px;margin:14px 0}.business-module td.align-left,.business-module th.align-left{text-align:left}.business-module td.align-center,.business-module th.align-center{text-align:center}.business-module td.align-right,.business-module th.align-right{text-align:right}.business-module .table-scroll{overscroll-behavior-x:contain}.shell-main{min-width:0}.business-block,.business-host{max-width:100%}
@media(max-width:720px){.configuration-editor{display:block}.config-tabs{flex-direction:row;overflow:auto;gap:2px;margin-bottom:18px;padding-bottom:5px}.config-tabs button{flex:0 0 auto;border-left:0;border-bottom:3px solid transparent;padding:10px}.config-tabs button.active{border-bottom-color:#1677db}.config-panes section{gap:14px}.config-editor-actions{margin-top:18px}.default-filter{grid-template-columns:1fr 1fr}.default-filter input{min-width:0}.settings-tabs button{font-size:12px;padding:7px 10px}.business-module .record-fields.horizontal{grid-template-columns:1fr}.business-module .toolbar{align-items:stretch}.business-module .toolbar label{flex:1 1 140px}.business-module .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.business-module .section-heading .muted{line-height:1.6}.business-module .table-scroll{width:100%;max-height:420px}.business-module .chart-svg{min-height:210px}.shell-sidebar{box-shadow:2px 0 12px #16375210}.shell-tools #shell-user{max-width:70px;display:inline-block;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.page-heading #page-config-tools{display:flex;gap:6px;flex-wrap:wrap}.config-banner button{flex:1 1 auto}.config-banner span{flex-basis:100%}.block-tools{flex-wrap:wrap}.settings-form fieldset{max-width:100%}#shell-dialog{padding:16px}.shell-brand{font-size:13px}.shell-topbar{gap:2px}.shell-tools summary{padding:5px}.business-module #update-drafts:not(:empty),.business-module #drafts:not(:empty){padding:8px}}
.expression-row{border:1px solid #e0e7ef;border-radius:6px;margin:0 0 18px;padding:16px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.expression-row legend{font-weight:600;color:#4c637b;padding:0 8px}.expression-wide{grid-column:1/-1}.expression-row textarea{font-family:Consolas,"Microsoft YaHei",monospace;min-height:90px}.reference-help{background:#f5f8fc;color:#587087;font-size:12px;line-height:1.8;padding:12px;border-radius:5px;overflow-wrap:anywhere}.business-module .summary-label th{background:#ecf3fc;color:#2d587c;border-top:2px solid #d7e4f5}.business-module .summary-values td{font-weight:600;background:#f8fbff}@media(max-width:720px){.expression-row{grid-template-columns:1fr;padding:12px}.expression-wide{grid-column:1}}
/* October 10: click-to-toggle choices, readable configuration and full-width reports. */
.configuration-editor .choice-fieldset{display:block;min-width:0;margin:0;border:1px solid #dce5f0;border-radius:6px;padding:10px 12px}
.choice-fieldset legend{font-size:12px;color:#52697e;padding:0 5px}
.choice-group{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr));gap:6px 12px;max-height:240px;overflow:auto;padding:4px 0}
.choice-group .check-label{min-width:0;align-items:flex-start;white-space:normal;overflow-wrap:anywhere;border-radius:4px;padding:7px 5px;cursor:pointer}
.choice-group .check-label:hover{background:#f1f6fd}.choice-group input{width:17px;height:17px;margin-top:1px}
.configuration-editor .config-panes #filter-field-config{display:grid!important;grid-template-columns:1fr;gap:16px}
.configuration-editor [data-query-field]{grid-template-columns:minmax(150px,.65fr) minmax(0,1.35fr);align-items:start}
.configuration-editor [data-manual-options]{grid-column:1/-1;border-top:1px solid #e7edf5;padding-top:12px}
.configuration-editor .query-option{grid-template-columns:minmax(120px,.65fr) minmax(0,1.35fr);align-items:start}
.configuration-editor .query-option button{grid-column:1/-1}
.configuration-editor #entry-settings,.configuration-editor #report-settings,.configuration-editor #chart-settings,.configuration-editor #chart-options{display:grid;gap:16px;min-width:0}
.configuration-editor #chart-settings{margin:0;border:1px solid #dce5f0;border-radius:7px;padding:14px}
.table-rule-links{display:flex;flex-wrap:wrap;gap:8px;background:#f6f9fe;padding:12px;border-radius:6px}.table-rule-links p{flex-basis:100%;margin:0 0 4px}.table-rule-links button{white-space:normal}
#managed-fields table{min-width:1250px}#managed-fields td{vertical-align:top}#managed-fields td:nth-child(5){min-width:235px;max-width:300px;white-space:normal}#managed-fields textarea{width:100%;min-height:100px}#managed-fields label{margin-bottom:10px}
#managed-reasons{max-height:none}.settings-form #managed-reasons .footnote{grid-column:1/-1;margin:0}
.report-scroll[data-report-position=stretch] table{width:100%;min-width:100%;table-layout:fixed}.report-scroll[data-report-position=stretch] td,.report-scroll[data-report-position=stretch] th{overflow-wrap:anywhere}
@media(max-width:760px){.configuration-editor{grid-template-columns:1fr}.configuration-editor .config-tabs{flex-direction:row;overflow:auto;padding-bottom:8px}.configuration-editor .config-tabs button{flex:none}.configuration-editor [data-query-field],.configuration-editor .query-option{grid-template-columns:1fr}.configuration-editor .choice-group{grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr))}.configuration-editor .layout-grid{grid-template-columns:1fr}.table-rule-links button{flex:1 1 150px}}
.menu-icon-picker{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important}.menu-icon-picker label{padding:8px;border:1px solid #e3eaf2;border-radius:5px}.menu-icon-picker label:has(input:checked){border-color:#69a6e7;background:#edf6ff}.menu-icon-picker svg,[data-menu-icon]{flex:none}.shell-topbar nav button{display:flex;align-items:center;gap:8px}.header-toggle{padding:3px 7px;font:inherit;font-weight:600;border-color:#d3dfeb;max-width:100%;white-space:normal}.notification-item.is-unread{border-left:3px solid #3485d7;padding-left:12px}.notification-item.is-read{opacity:.75}.chart-legend{flex-wrap:wrap}.chart-value{pointer-events:none}

/* Scheduled forms use the dialog as their only vertical scroll container. */
#shell-dialog:has(#scheduled-panel){overflow-y:auto;max-height:90dvh;max-width:calc(100vw - 24px);overscroll-behavior:contain}
#scheduled-panel{min-width:0;max-width:100%;overflow-wrap:anywhere}
#scheduled-panel .scheduled-form,#scheduled-panel .scheduled-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0}
#scheduled-panel .settings-form fieldset{display:grid;grid-template-columns:minmax(0,1fr);max-height:none;height:auto;min-height:0;min-width:0;min-inline-size:0;max-width:100%;overflow:visible;gap:16px;align-content:start}
#scheduled-panel label,#scheduled-panel legend{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
#scheduled-panel input:not([type=checkbox]),#scheduled-panel select{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
#scheduled-panel .scheduled-mapping{grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;border-bottom:1px solid #e2e7ed;padding:12px 0}
#scheduled-panel .scheduled-mapping button{justify-self:start}
#scheduled-panel .settings-tabs,#scheduled-panel .scheduled-actions,#scheduled-panel .dialog-actions{display:flex;flex-wrap:wrap;gap:10px}
#scheduled-panel button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#scheduled-panel .table-scroll{max-width:100%;max-height:none;overflow-x:auto}
#scheduled-panel .table-scroll td,#scheduled-panel .table-scroll th{white-space:normal;overflow-wrap:anywhere}
#scheduled-panel .scheduled-explanation{padding:12px;background:#f1f6fd;border-radius:6px;line-height:1.6}
#scheduled-panel [hidden]{display:none!important}
@media(max-width:560px){#shell-dialog:has(#scheduled-panel){padding:12px}#scheduled-panel .settings-form fieldset{padding:10px}#scheduled-panel .settings-tabs button,#scheduled-panel .dialog-actions button{flex:1 1 150px}}

/* Date-query controls: coordinated with the query editor implementation. */
.query-date-range{display:flex;flex-wrap:wrap;gap:.5rem;min-width:0}
.query-date-range label{flex:1 1 9rem;min-width:min(9rem,100%);max-width:100%}
.query-date-range input{min-width:0;max-width:100%;width:100%;box-sizing:border-box}

/* Keep the new table-formula reference inside its dialog, not the grid's min-content width. */
#managed-editor{grid-template-columns:minmax(0,1fr);min-width:0}
#managed-editor>*,#managed-formula-guide details,#managed-formula-guide .table-scroll{min-width:0;max-width:100%}
#managed-formula-guide table{width:100%;table-layout:fixed;white-space:normal}
#managed-formula-guide th,#managed-formula-guide td,#managed-formula-guide code{white-space:normal;overflow-wrap:anywhere}

/* Reminder editors keep one vertical scroll container, including narrow screens. */
.settings-category-tabs{flex-wrap:wrap}
#shell-dialog:has(#reminders-panel){overflow-y:auto;max-height:90dvh;max-width:calc(100vw - 24px);overscroll-behavior:contain}
#reminders-panel{min-width:0;max-width:100%;overflow-wrap:anywhere}
#reminders-panel .settings-form,#reminders-panel .settings-form fieldset{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;min-inline-size:0;max-width:100%;max-height:none;overflow:visible}
#reminders-panel label,#reminders-panel legend{white-space:normal;overflow-wrap:anywhere;max-width:100%}
#reminders-panel input:not([type=checkbox]),#reminders-panel select,#reminders-panel textarea{width:100%;min-width:0;max-width:100%}
#reminders-panel .settings-tabs,#reminders-panel .scheduled-actions,#reminders-panel .dialog-actions{display:flex;flex-wrap:wrap;gap:10px}
#reminders-panel button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#reminders-panel .table-scroll{max-width:100%;overflow-x:auto}
#reminders-panel .table-scroll th,#reminders-panel .table-scroll td,#reminders-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit}
#reminders-panel .error{color:#a73535;line-height:1.7}
#reminders-panel .scheduled-explanation{padding:12px;background:#f1f6fd;border-radius:6px;line-height:1.8}
@media(max-width:560px){#shell-dialog:has(#reminders-panel){padding:12px}#reminders-panel .settings-form fieldset{padding:10px}#reminders-panel .settings-tabs button,#reminders-panel .dialog-actions button{flex:1 1 150px}}
#shell-dialog:has(#reminder-workflows-panel){overflow-y:auto;max-height:90dvh;max-width:calc(100vw - 24px);overscroll-behavior:contain}
#reminder-workflows-panel{min-width:0;max-width:100%;overflow-wrap:anywhere}
#reminder-workflows-panel .settings-form,#reminder-workflows-panel .settings-form fieldset{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;min-inline-size:0;max-width:100%;max-height:none;overflow:visible}
#reminder-workflows-panel label,#reminder-workflows-panel legend{white-space:normal;overflow-wrap:anywhere;max-width:100%}
#reminder-workflows-panel input:not([type=checkbox]),#reminder-workflows-panel select,#reminder-workflows-panel textarea{width:100%;min-width:0;max-width:100%}
#reminder-workflows-panel .settings-tabs,#reminder-workflows-panel .scheduled-actions,#reminder-workflows-panel .dialog-actions{display:flex;flex-wrap:wrap;gap:10px}
#reminder-workflows-panel button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#reminder-workflows-panel .table-scroll{max-width:100%;overflow-x:auto}
#reminder-workflows-panel .table-scroll th,#reminder-workflows-panel .table-scroll td,#reminder-workflows-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit}
#reminder-workflows-panel .error{color:#a73535;line-height:1.7}
#reminder-workflows-panel .scheduled-explanation{padding:12px;background:#f1f6fd;border-radius:6px;line-height:1.8}
.workflow-choices{display:flex;flex-wrap:wrap;gap:10px}.workflow-time-row,.workflow-date-range{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.workflow-date-range>div{flex:1 1 180px;min-width:0}
#reminder-workflows-panel [hidden]{display:none!important}
#reminder-workflows-panel .workflow-field-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:10px;min-width:0}
#reminder-workflows-panel .workflow-field-choices .check-label{display:flex;align-items:flex-start;gap:8px;padding:8px;background:#f7f9fc;border:1px solid #dce5f0;border-radius:5px;cursor:pointer}
#reminder-workflows-panel .workflow-field-choices input[type=checkbox]{flex:0 0 auto;margin-top:4px;width:18px;height:18px}
#reminder-workflows-panel .workflow-field-choices small{color:#52637b;font-size:12px}
#reminder-workflows-panel .workflow-field-choices .check-label:focus-within{outline:2px solid #366fca;outline-offset:2px}
#reminder-workflows-panel .workflow-field-summary{padding:10px;background:#eef5ff;border-radius:5px;line-height:1.7;overflow-wrap:anywhere}
.query-range-control{grid-column:span 2;min-width:0;border:1px solid #dce5ef;border-radius:6px;padding:8px 10px;margin:0}.query-range-control legend{padding:0 4px;font-size:12px}.query-date-range.query-date-range--compact{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:8px;flex-wrap:nowrap}.query-date-range--compact label{min-width:0;max-width:100%;margin:0}.query-range-separator{padding-bottom:8px;color:#708395}.query-range-bound-note,.query-range-bounds small{display:block;margin-top:6px;line-height:1.5;color:#60768a}.configuration-editor .query-range-bounds{grid-column:1/-1;min-width:0}.query-range-bounds .query-date-range{grid-column:1/-1}
@media(max-width:480px){.query-range-control{grid-column:1/-1}.query-date-range.query-date-range--compact{grid-template-columns:minmax(0,1fr)}.query-range-separator{display:none}}
.business-module .filter-grid>.query-range-control{grid-column:1/-1;width:min(100%,440px)}
@media(max-width:560px){#shell-dialog:has(#reminder-workflows-panel){padding:12px}#reminder-workflows-panel .settings-form fieldset{padding:10px}#reminder-workflows-panel .settings-tabs button,#reminder-workflows-panel .dialog-actions button{flex:1 1 150px}}

/* Phone entry and reports share these rules in the page and every shadow root. */
#toggle-mobile-navigation,.mobile-navigation-backdrop,#mobile-management-actions{display:none}
#primary-navigation,#block-list,.business-module,.business-module #workspace,.business-module main,.business-module #content,.business-module #report-body{min-width:0}
#block-list,.business-module,.business-module #workspace,.business-module #content,.business-module #report-body{max-width:100%}
.business-module .table-scroll{width:100%;max-width:100%;min-width:0;-webkit-overflow-scrolling:touch}
.table-scroll-hint{display:none}
.table-scroll-region:focus-visible{outline:2px solid #327bc5;outline-offset:2px}

@media(min-width:721px) and (max-width:1100px){
  .business-module .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .business-module .filter-grid>label,.business-module .toolbar>label{min-width:0}
  .business-module .filter-grid input,.business-module .filter-grid select{width:100%;max-width:100%}
  .business-module .toolbar{flex-wrap:wrap}
}
@media(pointer:coarse) and (min-width:721px) and (max-width:1100px){
  button,input:not([type=checkbox]):not([type=radio]),select,textarea{min-height:44px}
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}
  .business-module select{font-size:16px}
  .business-module button{font-size:14px}
  .check-label{min-height:44px}
}

@media(max-width:720px){
  .shell-page{--shell-mobile-top:112px}
  .shell-page #shell-workspace{min-width:0;max-width:100%}
  .shell-page.shell-navigation-open{overflow:hidden;overscroll-behavior:none}
  .shell-topbar{
    height:var(--shell-mobile-top);z-index:60;position:fixed;
    display:flex;flex-wrap:wrap;align-items:center;align-content:flex-start;
    gap:4px 8px;padding:8px 12px;
    padding-top:calc(8px + env(safe-area-inset-top,0px));
  }
  .shell-topbar::before{content:"";order:3;flex:0 0 100%;height:0}
  #toggle-mobile-navigation{
    display:inline-flex;align-items:center;justify-content:center;order:0;flex:0 0 44px;
    min-width:44px;min-height:44px;padding:8px;border-color:#476078;
    background:transparent;color:#fff;font-size:22px;line-height:1;
  }
  .shell-brand{order:1;flex:1 1 0;min-width:0;gap:6px;font-size:14px;line-height:1.3}
  .shell-brand strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .shell-brand .database-icon{flex:none;font-size:23px;line-height:1}
  .shell-tools{order:2;flex:0 0 auto;min-width:0;gap:2px;margin-left:0;height:44px}
  .shell-tools>button,.shell-tools summary{min-height:44px;padding:8px;font-size:13px}
  .shell-tools #open-notifications{display:inline-flex;align-items:center;gap:4px}
  .shell-tools #shell-user{max-width:54px;white-space:nowrap;vertical-align:middle}
  .shell-tools #open-settings::after{content:none}
  .shell-tools summary{max-width:88px;white-space:nowrap}
  .personal-popover{
    position:fixed;top:calc(60px + env(safe-area-inset-top,0px));right:10px;
    width:280px;width:min(280px,calc(100vw - 20px));min-width:0;max-width:calc(100vw - 20px);
    max-height:calc(100vh - 88px);max-height:calc(100dvh - 88px);
    overflow:auto;z-index:80;padding:14px;
  }
  .personal-popover p{max-width:100%;overflow-wrap:anywhere}
  .personal-popover button{width:100%;white-space:normal;min-height:44px}
  #mobile-management-actions{display:grid;gap:8px}
  #mobile-management-actions #open-settings,#mobile-management-actions #toggle-config{width:100%;font-size:14px}
  #mobile-management-actions #toggle-config.active{background:#fff1e8;border-color:#dd845e;color:#91421f}
  .shell-topbar #primary-navigation{
    order:4;flex:1 1 0;width:0;min-width:0;max-width:100%;height:44px;
    padding:0;gap:4px;align-items:stretch;overflow-x:auto;overflow-y:hidden;
    overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  }
  .shell-topbar #primary-navigation button{flex:none;min-height:44px;padding:8px 12px;font-size:14px;white-space:nowrap}
  .shell-topbar #add-primary{
    order:5;flex:0 0 44px;width:44px;min-width:44px;min-height:44px;
    padding:4px;margin:0;overflow:hidden;font-size:0;
  }
  .shell-topbar #add-primary::after{content:"＋";font-size:25px;line-height:1}
  .shell-sidebar,.sidebar-collapsed .shell-sidebar{
    position:fixed;inset:var(--shell-mobile-top) auto 0 0;
    width:304px;width:min(304px,calc(100vw - 48px));max-width:calc(100vw - 48px);
    height:calc(100vh - var(--shell-mobile-top));height:calc(100dvh - var(--shell-mobile-top));
    padding-bottom:env(safe-area-inset-bottom,0px);z-index:50;
    transform:translateX(-110%);visibility:hidden;pointer-events:none;
    box-shadow:5px 0 24px #102c4a24;overflow-y:auto;
  }
  .mobile-navigation-open .shell-sidebar{transform:translateX(0);visibility:visible;pointer-events:auto}
  .sidebar-title,.sidebar-collapsed .sidebar-title{flex:none;padding:12px 12px 8px 16px;gap:8px;font-size:14px}
  .sidebar-title #primary-label{min-width:0;overflow-wrap:anywhere}
  .sidebar-title #collapse-sidebar{flex:none;min-width:44px;min-height:44px;padding:6px;font-size:23px}
  #secondary-navigation{min-height:0;overflow-y:auto;gap:6px;padding:8px 12px}
  #secondary-navigation button{min-height:44px;padding:11px 12px;font-size:15px;white-space:normal;overflow-wrap:anywhere}
  #secondary-navigation .secondary-label{min-width:0}
  .shell-sidebar .config-add{max-width:calc(100% - 24px);min-height:44px;margin:8px 12px;font-size:14px;white-space:normal}
  .shell-sidebar .sidebar-footnote{display:none}
  .mobile-navigation-backdrop{
    display:block;position:fixed;inset:var(--shell-mobile-top) 0 0;margin:0;padding:0;
    width:100%;border:0;border-radius:0;background:#10273e66;z-index:45;
    touch-action:none;cursor:pointer;
  }
  .shell-main,.sidebar-collapsed .shell-main{
    margin:var(--shell-mobile-top) 0 0;padding:14px 10px 20px;
    padding-bottom:calc(20px + env(safe-area-inset-bottom,0px));
    width:100%;min-width:0;min-height:calc(100vh - var(--shell-mobile-top));
    min-height:calc(100dvh - var(--shell-mobile-top));transition:none;
  }
  .page-heading{gap:10px;margin-bottom:14px}
  .page-heading>div{min-width:0;max-width:100%}
  .page-heading h1{font-size:21px;line-height:1.4;overflow-wrap:anywhere;scroll-margin-top:calc(var(--shell-mobile-top) + 16px)}
  .page-heading .eyebrow{line-height:1.6;overflow-wrap:anywhere}
  .page-heading #page-config-tools{gap:8px}
  .page-heading button,.block-tools button{min-height:44px;font-size:14px;white-space:normal}
  .config-banner{gap:8px;padding:12px;min-width:0}
  .config-banner span{min-width:0;overflow-wrap:anywhere}
  .config-banner button{min-height:44px;white-space:normal;font-size:14px}
  .business-block{margin-bottom:14px;border-radius:8px;min-width:0}
  .block-heading{padding:12px;gap:10px;align-items:flex-start}
  .block-heading h2{min-width:0;max-width:100%;font-size:17px;line-height:1.5;overflow-wrap:anywhere}
  .block-tools{gap:6px;max-width:100%}
  #shell-notice{top:calc(var(--shell-mobile-top) + 8px);width:max-content;max-width:calc(100vw - 24px);padding:10px 14px;font-size:14px;overflow-wrap:anywhere}

  button,.wecom-login{min-height:44px;max-width:100%;line-height:1.4;touch-action:manipulation}
  input:not([type=checkbox]):not([type=radio]),select,textarea{
    min-height:44px;max-width:100%;font-size:16px;line-height:1.4;padding:10px 11px;
  }
  input[type=checkbox],input[type=radio]{width:24px;height:24px;min-width:24px;min-height:24px;flex:none;vertical-align:middle}
  label{min-width:0;max-width:100%;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
  .check-label{min-height:44px;gap:10px}
  .footnote{font-size:13px;line-height:1.7;overflow-wrap:anywhere}
  .login-card{width:calc(100% - 24px);max-width:440px;padding:26px 20px}
  .login-card input,.login-card button,.wecom-login{font-size:16px}
  .login-card h1{font-size:25px;line-height:1.4}

  .business-module{font-size:14px;max-width:100%;min-width:0}
  .business-module #notice{top:calc(var(--shell-mobile-top,112px) + 8px);max-width:calc(100vw - 24px);padding:10px 14px;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
  .business-module main{width:100%;min-width:0;max-width:100%;padding:12px}
  .business-module .panel{min-width:0;max-width:100%;padding:12px 0}
  .business-module .context-bar{align-items:flex-start;gap:8px 12px;min-width:0;flex-wrap:wrap}
  .business-module .context-bar label{flex:1 1 100%;min-width:0;flex-direction:column;align-items:stretch;font-size:14px}
  .business-module .context-bar select{width:100%;max-width:100%;padding:10px 11px;font-size:16px;min-height:44px}
  .business-module .context-bar #data-policy{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .business-module .section-heading{min-width:0;align-items:flex-start;flex-direction:column;gap:8px}
  .business-module .section-heading h2{font-size:17px;line-height:1.5}
  .business-module .section-heading .muted{max-width:100%;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
  .business-module #filters{padding:12px;margin-bottom:12px;min-width:0}
  .business-module .filter-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  .business-module .filter-grid>label,.business-module .filter-grid>.query-range-control{width:100%;min-width:0;grid-column:1/-1}
  .business-module .filter-grid input,.business-module .filter-grid select{width:100%;min-width:0;max-width:100%}
  .business-module .filter-grid button{min-height:44px;padding:10px 12px;font-size:16px;white-space:normal}
  .query-date-range,.query-date-range.query-date-range--compact{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .query-date-range label{width:100%;min-width:0;max-width:100%}
  .query-range-separator{display:none}
  .query-range-control{min-inline-size:0;margin:0;padding:10px}
  .business-module input:not([type=checkbox]):not([type=radio]),.business-module select,.business-module textarea{
    font-size:16px;min-height:44px;padding:10px 11px;max-width:100%;
  }
  .business-module button{min-height:44px;padding:10px 12px;font-size:14px;white-space:normal;overflow-wrap:anywhere}
  .business-module .toolbar{gap:10px;align-items:stretch;flex-wrap:wrap;margin-bottom:14px;min-width:0}
  .business-module .toolbar>label{flex:1 1 140px;min-width:0;flex-direction:column;align-items:stretch;gap:6px;font-size:14px}
  .business-module .toolbar>button,.business-module .toolbar>a{flex:1 1 132px;min-width:0}
  .business-module .toolbar>a{display:flex;align-items:center;min-height:44px;white-space:normal;overflow-wrap:anywhere}
  .business-module .toolbar input,.business-module .toolbar select,.business-module .toolbar textarea{width:100%;max-width:100%}
  .business-module .toolbar input[type=number]{width:100%}
  .business-module .table-scroll{width:100%;max-width:100%;max-height:440px;max-height:min(62dvh,480px);border-radius:6px;overscroll-behavior-x:contain}
  .table-scroll-hint{display:block;margin:10px 0 7px;font-size:13px;line-height:1.6;color:#57718d;overflow-wrap:anywhere}
  .business-module th,.business-module td{padding:11px 12px;font-size:14px;line-height:1.5}
  .business-module .table-scroll input:not([type=checkbox]):not([type=radio]),.business-module .table-scroll select,.business-module .table-scroll textarea{min-width:140px;font-size:16px}
  .business-module .table-scroll input[type=checkbox]{width:24px;min-width:24px;height:24px;min-height:24px}
  .business-module .report-scroll table{min-width:var(--report-content-width,100%)!important;max-width:none}
  .business-module .report-scroll[data-report-position=center] table,.business-module .report-scroll[data-report-position=right] table{margin-inline:0}
  .business-module .report-scroll [data-report-frozen-column]{left:auto!important}
  .business-module .report-scroll [data-report-frozen-column]:not([data-report-frozen-row]){position:static!important}
  .business-module .header-toggle{min-height:44px;font-size:14px;line-height:1.4;padding:8px;max-width:100%;white-space:normal}
  .business-module .pagination{flex-wrap:wrap;justify-content:space-between;gap:10px;margin-top:14px;font-size:14px}
  .business-module .pagination button{flex:1 1 90px;min-width:0}
  .business-module .pagination>span{flex:1 1 100%;text-align:center}
  .business-module .record-fields,.business-module .record-fields.horizontal{grid-template-columns:minmax(0,1fr);gap:16px}
  .business-module .record-fields label{font-size:14px;min-width:0}
  .business-module .record-fields input,.business-module .record-fields select,.business-module .record-fields textarea{width:100%;min-width:0;max-width:100%}
  .business-module .report-description{font-size:14px;overflow-wrap:anywhere}
  .business-module .original-value{max-width:180px;white-space:normal;overflow-wrap:anywhere}
  .generated-fields{grid-column:1/-1;min-width:0;max-width:100%}
  .generated-fields dd{margin-inline-start:0;overflow-wrap:anywhere}
  .business-module .empty{padding:36px 16px;white-space:normal;overflow-wrap:anywhere}
  .business-module .metric-row{flex-wrap:wrap;gap:10px}
  .business-module .metric{min-width:0;flex:1 1 130px;padding:14px}
  .business-module .chart-scroll{max-width:100%;max-height:60vh;max-height:60dvh;-webkit-overflow-scrolling:touch}
  .business-module .chart-legend{gap:10px 16px;max-width:100%;overflow-wrap:anywhere}

  dialog,#shell-dialog{
    width:calc(100vw - 16px);max-width:calc(100vw - 16px);min-width:0;
    max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);
    margin:auto;padding:16px;overflow:auto;overscroll-behavior:contain;
    scroll-padding-block:76px 100px;border-radius:12px;
  }
  dialog form,dialog form>*,#shell-dialog-content{min-width:0;max-width:100%}
  dialog h2,#shell-dialog-title{font-size:19px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
  dialog>.section-heading,#record-form>.section-heading{
    position:sticky;top:-16px;z-index:8;background:#fff;
    display:flex;flex-direction:row;align-items:center;gap:12px;
    padding:10px 0 12px;margin-bottom:16px;
  }
  dialog .section-heading>button{min-height:44px;min-width:60px;flex:none;font-size:14px}
  dialog input,dialog select,dialog textarea{scroll-margin-block:76px 100px}
  #record-form>.dialog-actions,#delete-dialog .dialog-actions{
    position:sticky;bottom:-16px;z-index:8;background:#fff;padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px));
    display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 0;
  }
  #record-form>.dialog-actions>button,#delete-dialog .dialog-actions>button{flex:1 1 120px;min-height:44px;font-size:16px}
  #record-form>label{margin-top:16px}
  .settings-form,.settings-form fieldset{min-width:0;max-width:100%}
  .settings-form fieldset,.layout-grid,.default-filter{grid-template-columns:minmax(0,1fr);min-inline-size:0}
  .settings-form input:not([type=checkbox]):not([type=radio]),.settings-form select,.settings-form textarea{width:100%;max-width:100%}
  .settings-tabs{flex-wrap:wrap;gap:8px}
  .settings-tabs button{min-height:44px;font-size:14px;white-space:normal}
  .shell-main>footer{overflow-wrap:anywhere;font-size:12px;line-height:1.7}
  @supports(padding-top:env(safe-area-inset-top)){
    .shell-page{--shell-mobile-top:calc(112px + env(safe-area-inset-top,0px))}
  }
}
@media(prefers-reduced-motion:reduce){.shell-sidebar,.shell-main{transition:none}}
