/* Shared product chrome. Scoped to the app, never to report canvas content. */
:root{--ep-header-height:80px;--ep-panel-data:224px;--ep-panel-visual:280px;--ink:#172d3d;--muted:#647687;--line:#dfe5eb;--bg:#f5f7f9;--accent:#247f97;--accent-2:#247f97;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,Tahoma,sans-serif}
body{font:13px/1.5 var(--font);color:var(--ink);background:var(--bg)}
.ep-icon{width:16px;height:16px;flex-shrink:0;vertical-align:middle}
.ep-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
:is(.ep-page-header,.files-top,.template-editor-top){min-height:80px;padding:12px 28px;gap:20px;display:flex;align-items:center;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0;box-sizing:border-box}
.ep-page-heading{min-width:0;flex:1}.ep-page-heading h1,.ep-page-header h1,#view-title{font-size:22px;line-height:1.25;letter-spacing:-.45px;color:var(--ink);font-weight:650;margin:1px 0 4px;max-width:none}
.ep-page-heading p,.ep-page-header>div>p{font-size:12px;color:var(--muted);line-height:1.4;margin:0}
.ep-page-heading .ep-eyebrow,.ep-eyebrow,.ep-page-header>div>.eyebrow{font-size:9px;line-height:1.4;letter-spacing:1.2px;text-transform:uppercase;font-weight:650;color:var(--accent);margin:0 0 2px}
.ep-page-header>button{margin-inline-start:auto}
button:not(:where(#studio *, .gs-studio-root *)),.btn{font-family:var(--font)}
:is(.ep-page-header,.files-top,.template-editor-top) :is(button,.btn),.files-view .btn{min-height:36px;padding:7px 12px;font-size:12px;font-weight:550;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);box-shadow:none;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px}
:is(.ep-page-header,.files-top,.template-editor-top) .primary,.files-view .btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
:is(.ep-page-header,.files-top,.template-editor-top) button:hover,.files-view .btn:hover{background:#edf4f6;border-color:#bdd1d9}
:is(.ep-page-header,.files-top,.template-editor-top) .primary:hover,.files-view .btn.primary:hover{background:#1d6b80;border-color:#1d6b80;color:white}
:is(button,a,input,select,textarea):not(:where(#studio *, .gs-studio-root *)):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
button:not(:where(#studio *, .gs-studio-root *)):disabled{opacity:.5;cursor:default}
.files-app{display:block;min-height:100dvh;background:var(--bg)}.files-main{background:var(--bg)}
.files-top{position:sticky;top:0;z-index:20;display:flex}.files-search{width:clamp(180px,23vw,320px);border:1px solid var(--line);border-radius:6px;background:#f8fafb;margin:0;height:36px;flex-shrink:1}
.files-actions,.top-actions{display:flex;align-items:center;gap:8px}.files-view{padding:22px 28px 48px}.page{gap:18px}.page-head{padding:0;min-height:0;justify-content:flex-end}.page-head:empty{display:none}.page-head:has(> .page-tools:only-child){min-height:36px}
.page-kicker{color:var(--muted)}.view-switch{border-radius:6px;background:#eff3f5;padding:3px}.view-btn{display:flex;align-items:center;gap:6px;border-radius:4px;font-size:12px;min-height:28px}.view-btn.on{color:var(--accent)}
.file-table{background:white;border:1px solid var(--line);border-radius:8px;border-collapse:separate;border-spacing:0}.file-table th{padding:12px 16px;background:#f8fafb;font-weight:600;font-size:11px;color:var(--muted);text-align:start;white-space:nowrap}.file-table td{padding:14px 16px;text-align:start}.file-table tr{cursor:default}.file-table tr:last-child td{border-bottom:0}.file-table tr:hover{background:#f7fafb}.file-row-actions{opacity:1;gap:6px;white-space:nowrap}.report-title{color:var(--ink);font-weight:600;text-decoration:none}.report-title:hover{color:var(--accent);text-decoration:underline}.file-name .meta{margin-top:4px;font-size:11px;max-width:34vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-glyph,.file-glyph.source,.file-glyph.plugin{width:32px;height:32px;flex-basis:32px;background:#eaf3f6;color:var(--accent)}
.file-card{border-radius:8px;box-shadow:none}.file-card h3{font-size:15px}.file-card .card-actions{margin-top:auto;display:flex;gap:8px}.file-row-actions .btn,.card-actions .btn{min-height:32px}.report-actions-heading{text-align:end!important}.badge{font-family:var(--font);font-weight:550}.chip{font-size:11px;border-radius:5px}.chip.on{background:#eaf3f6;color:var(--accent);border-color:#bdd6df}
.report-more{position:relative;text-align:start}.report-more>summary{list-style:none;display:flex;width:34px;height:34px;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:6px;cursor:pointer;background:white}.report-more>summary::-webkit-details-marker{display:none}.report-more>summary:hover{background:#edf4f6}.report-action-menu{position:absolute;inset-inline-end:0;top:calc(100% + 5px);z-index:25;min-width:180px;padding:6px;border:1px solid var(--line);border-radius:8px;background:white;box-shadow:0 8px 24px #172d3d1a}.report-action-menu button{display:block;width:100%;border:0;background:white;text-align:start;padding:9px 10px;border-radius:4px;font-size:12px}.report-action-menu button:hover{background:#edf4f6}.report-action-menu .danger{color:#a43737}.file-table tbody tr:last-child:not(:first-child) .report-action-menu{top:auto;bottom:calc(100% + 5px)}
.template-top{padding:12px 28px}.template-page-tabs{display:flex;padding:0 28px;gap:28px;background:#fff;border-bottom:1px solid var(--line)}.template-page-tabs button{padding:13px 0;font-size:12px;font-weight:600;color:var(--ink);border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;white-space:nowrap}.template-page-tabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}.template-main{padding:24px 28px}.template-card{border-radius:8px}.template-row-action{min-height:36px}.template-filters :is(input,select){border-radius:6px;min-height:36px;font-size:12px}.template-editor-top{gap:12px}.template-editor-top h2{font-size:16px}.template-controls{width:280px;padding:20px}.template-editor-top>span{margin-inline-start:auto}.template-editor-top .eyebrow{font-size:9px}.login-mark{background:none;width:48px;height:48px;border-radius:0}.login-card{box-shadow:0 16px 60px #183d4a0d}
/* The same 80px header in every report mode, with a single set of actions. */
.workspace-header{position:relative;z-index:15;min-height:80px;padding:10px 20px;display:flex;flex-wrap:nowrap;gap:18px}
.workspace-header .report-name{flex:1;max-width:none;min-width:160px;width:0}.report-name label{font-size:9px;letter-spacing:1.2px;font-weight:600;margin:0;line-height:1.3;color:var(--muted)}.report-name input{padding:1px 0;height:25px;min-width:0;font-size:15px;font-weight:600;color:var(--ink);border:1px solid transparent;border-radius:3px;background:transparent;width:100%}.report-name input:hover{border-color:var(--line)}.report-name input:focus{border-color:var(--accent);background:white}.report-name #save-state{font-size:10px;line-height:1.3;display:block;color:var(--muted)}
.workspace-header .workflow-tabs{display:flex;flex-shrink:0;margin:0;order:0;width:auto;padding:3px;gap:2px;border-radius:6px;background:#eff3f5;border:1px solid #e4eaee}.workspace-header .workflow-tabs button{background:transparent;border:1px solid transparent;min-width:62px;padding:6px 12px;min-height:32px;font-size:12px}.workspace-header .workflow-tabs button.active{background:white;border-color:var(--line);color:var(--accent);box-shadow:0 1px 2px #172d3d09}
.workspace-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}.workspace-actions #save{order:2}.workspace-actions #publish{order:3}.workspace-actions #export{order:4}.workspace-actions #undo,.workspace-actions #redo{border-color:transparent;background:transparent;padding:7px}
#editor-pane,#preview-pane{height:calc(100dvh - var(--ep-header-height));min-height:0}#editor-pane{overflow:hidden}#editor-pane.editor-inactive{top:var(--ep-header-height)}
body:has(>#message:not([hidden])) #editor-pane,body:has(>#message:not([hidden])) #preview-pane{height:calc(100dvh - var(--ep-header-height) - 40px)}
#message{font-size:12px;padding:10px 20px;margin:0;border-bottom:1px solid #dfe5eb;background:#eef6f8;color:#305a6a;min-height:40px;max-height:80px;overflow:auto}
.dm-shell{min-height:calc(100dvh - var(--ep-header-height))}.dm-nav{width:200px;padding:20px 14px;gap:6px}.dm-nav button{font-size:12px;padding:9px 10px}.dm-nav .eyebrow{font-size:9px}.dm-nav-foot a{font-size:11px;text-decoration:none}.dm-work{padding:24px 28px}.dm-toolbar h1{font-size:19px;letter-spacing:-.3px}.dm-toolbar p{font-size:12px;line-height:1.5;max-width:780px}.dm-toolbar-actions{gap:12px}.dm-add-bar{padding:14px;border:1px solid var(--line);background:white;border-radius:7px}.dm-add-bar :is(input,select,button){height:36px;font-size:12px}.dm-add-bar label{font-size:11px}.erd{background:#f0f4f6;border-radius:7px}.erd-node{border-radius:6px}.dm-nav button.active{background:#eaf3f6;border-color:#c7dfe6;color:var(--accent)}
/* Matched column headings, spacing and typography; report canvas stays independent. */
#dataset-panel{width:var(--ep-panel-data);flex:0 0 var(--ep-panel-data);background:#fafbfc;border-inline-end:1px solid var(--line)}#workspace-tools{width:var(--ep-panel-visual);flex:0 0 var(--ep-panel-visual);border-inline-end:1px solid var(--line)}#editor-host{min-width:300px;flex:1}
#dataset-panel .design-panel-heading,.visual-picker-row{height:66px;min-height:66px;padding:12px;margin:0;border-bottom:1px solid var(--line)}.design-panel-heading h2{font-size:14px;line-height:1.3;margin:2px 0 0}.design-panel-heading .eyebrow{font-size:9px;letter-spacing:.8px}.panel-instruction{display:none}#dataset-panel #field-browser{padding:12px}#field-browser>.hint{display:none}.field-search{font-size:11px}.field-search input{min-height:34px;font-size:12px}.field-dataset summary{top:66px!important}.dataset-icon .ep-icon{width:16px;height:16px}.field-pick{font-size:12px}.field-drag{width:26px;font-size:14px!important}
.panel-icon-button,#visual-add{width:32px!important;height:34px;min-height:34px;padding:0!important;display:grid;place-items:center;border:1px solid var(--line);border-radius:5px;background:white!important;color:var(--accent)}#visual-add .ep-icon,.panel-icon-button .ep-icon{width:18px;height:18px}.visual-picker-row{grid-template-columns:minmax(0,1fr) 32px;align-items:center;gap:7px}#visual-picker{height:42px;padding:5px 7px!important;grid-template-columns:24px minmax(0,1fr) 12px;gap:6px;border:0;background:transparent}#visual-picker strong{font-size:13px}#visual-picker small{font-size:9px;letter-spacing:.6px}#visual-picker-icon{width:24px;height:24px;border:0;background:#eff4f6}#visual-picker-icon svg{width:20px;height:20px}
.visual-builder-tabs{height:44px;min-height:44px;background:#fafbfc}.visual-builder-tabs button{font-size:11px!important;padding:10px 6px!important}.visual-builder-tabs button[aria-selected=true]{color:var(--accent);border-color:var(--accent)}.visual-builder-pane{padding:14px}.drop-instruction{font-size:11px;color:var(--muted)}.field-drop-zone{border-radius:5px;min-height:80px;padding:12px;background:#f9fbfc;border-color:#b8cbd3}.field-drop-zone>strong{font-size:12px}.field-drop-values em{font-size:11px}.visual-builder-footer{padding:12px}.visual-builder-footer #add-visual-to-page{height:36px;font-size:12px;font-weight:600;border-radius:6px;background:var(--accent);border-color:var(--accent)}#insert-target{font-size:10px;background:#eef5f7;border-color:var(--accent);line-height:1.5}.page-strip{height:40px;padding:0 12px}.page-strip button{font-size:11px}.page-strip button.active{color:var(--accent);border-color:var(--accent)}
.panel-toggle{display:none}.workspace-actions .ep-icon{width:16px;height:16px}
.review-intro h1{font-size:24px}.ep-page-header+main:has(.review-intro){max-width:1400px;padding:28px}.review-intro .intro{font-size:13px}.review-intro .actions{margin:16px 0 24px;font-size:12px}
.legacy-upgrade{margin:48px auto;padding:32px;max-width:680px;background:white;border:1px solid var(--line);border-radius:10px;align-self:start}.legacy-upgrade h1{font-size:23px}.legacy-upgrade p{font-size:13px;line-height:1.7}.legacy-upgrade .upgrade-actions{display:flex;gap:10px;margin-top:24px}.legacy-upgrade .upgrade-actions :is(a,button){display:inline-flex;align-items:center;padding:10px 14px;border-radius:6px;text-decoration:none}
@media(max-width:1250px){.workspace-header{gap:10px;padding-inline:16px}.workspace-actions :is(#undo,#redo) span{display:none}.workspace-header .report-name{min-width:145px}.files-top{gap:14px}.files-search{width:220px}:root{--ep-panel-data:200px;--ep-panel-visual:250px}}
@media(max-width:1050px){.workspace-header{flex-wrap:wrap}.workspace-header .report-name{min-width:45%;flex:1}.workspace-header .workflow-tabs{margin-inline-start:auto}.workspace-actions{width:100%;justify-content:flex-end}.workspace-actions :is(#undo,#redo) span{display:inline}#editor-host{min-width:280px}.files-top{flex-wrap:wrap}.ep-page-heading{flex:1;min-width:250px}.files-search{order:3;width:100%}.files-top .files-actions{margin-inline-start:auto}.template-top{flex-wrap:wrap}.template-top>div{flex:1}.dm-toolbar{flex-wrap:wrap}.template-card{grid-template-columns:210px minmax(0,1fr) 110px;gap:16px}}
@media(max-width:850px){:root{--ep-panel-data:184px;--ep-panel-visual:236px}#editor-pane #dataset-panel{display:none}#editor-pane.show-datasets #dataset-panel{display:block;position:absolute;inset-inline-start:var(--ep-rail);top:var(--ep-header-height);bottom:40px;z-index:30;width:240px;box-shadow:8px 0 24px #172d3d20}#editor-pane.show-datasets #dataset-panel #field-browser{max-height:calc(100% - 66px);overflow:auto}.panel-toggle{display:inline-flex;align-items:center;gap:6px;min-height:32px;font-size:11px;border:1px solid var(--line);border-radius:5px;background:white}.dm-shell{flex-direction:column}.dm-nav{width:100%;flex-direction:row;flex-wrap:wrap}.dm-nav>.eyebrow,.dm-nav .model-explorer,.dm-nav-foot{display:none}.dm-work{padding:18px}.files-view,.template-main{padding:18px}.template-card{grid-template-columns:1fr auto}.template-thumb{grid-row:2;grid-column:1/-1}.template-page-tabs{padding-inline:18px}.file-table th,.file-table td{padding:12px 10px}.file-table th:nth-child(2),.file-table td:nth-child(2){display:none}.file-name .meta{max-width:28vw}.ep-page-header,.files-top{padding-inline:18px}.preview-columns{grid-template-columns:210px minmax(0,1fr)}}
@media(max-width:620px){.workspace-header .report-name{min-width:100%;width:100%}.workspace-header .workflow-tabs{margin:0}.workspace-actions{width:auto;flex:1;flex-wrap:wrap}.workspace-actions :is(#undo,#redo) span{display:none}.workspace-header .workflow-tabs button{min-width:48px;padding-inline:7px}.workspace-actions button{padding:7px 9px}.file-table th:nth-child(4),.file-table td:nth-child(4){display:none}.file-row-actions{flex-wrap:wrap}.files-search{min-width:100px}.files-actions{flex-wrap:wrap}.template-filters{flex-wrap:wrap}.template-filters select{width:calc(50% - 6px)}.template-filters input{max-width:none;flex-basis:100%}.template-page-tabs{gap:16px}.template-page-tabs button{font-size:11px}.template-editor-top{flex-wrap:wrap}.template-controls{width:220px}.template-card{padding:16px}.template-top>button{margin:0}.ep-page-header h1,#view-title{font-size:20px}.ep-page-heading{min-width:150px}.files-view .grid{grid-template-columns:1fr}.preview-columns{grid-template-columns:170px minmax(0,1fr)}}
/* Editor shell is deliberately separate from native GrapesJS control styles. */
#canvas-toolbar{display:flex;align-items:center;gap:4px;min-height:44px;padding:5px 10px;background:white;border-bottom:1px solid var(--line);flex:0 0 auto;flex-wrap:wrap}
#canvas-toolbar button{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;background:white;padding:5px 7px;min-height:30px;font-size:11px;white-space:nowrap;border-radius:5px;color:var(--ink)}
#canvas-toolbar button:hover,#canvas-toolbar button[aria-pressed=true]{background:#edf5f7;color:#216b80}#canvas-toolbar .ep-icon{width:15px;height:15px}#canvas-zoom{min-width:34px;text-align:center;font-size:10px;font-variant-numeric:tabular-nums;color:var(--muted)}.canvas-toolbar-spacer{flex:1}
#studio .gs-studio-root{font-family:var(--font);font-size:13px}#studio .gs-sidebar-right{flex-shrink:0}#studio .gs-cmp-icon{flex-shrink:0}#studio .gs-editor-gjs{border:0}#studio .gs-sidebar-right button{font-family:inherit}
#studio{height:auto;flex:1;min-height:0}#editor-host{overflow:hidden}.portal-account-panel{margin:0}
@media(max-width:1100px){#canvas-toolbar button{padding:5px}#canvas-toolbar button span{display:none}#canvas-toolbar{gap:2px}#studio .gs-sidebar-right{width:230px!important;min-width:230px!important;max-width:230px!important}}
.catalog-count{margin-inline-end:auto;font-size:12px;color:var(--muted)}#model-message{margin:0;padding:10px 14px;background:#edf5f7;border:1px solid #d4e4ea;border-radius:6px;color:#295c6d}.files-search input{min-width:0;width:100%;background:transparent;border:0;outline:none;font:inherit;color:inherit}

.empty-mark{display:grid;place-items:center;background:#eaf3f6;color:var(--accent)}.empty-mark .ep-icon{width:26px;height:26px}

/* Keep report modes centered independently of the title and action widths. */
.workspace-header{display:grid;grid-template-columns:minmax(160px,1fr) auto minmax(max-content,1fr);align-items:center}
.workspace-header .report-name{grid-column:1;width:100%;min-width:0;max-width:100%;margin:0}
.workspace-header .workflow-tabs{grid-column:2;justify-self:center;margin:0;order:0;gap:2px}
.workspace-header .workflow-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:72px}
.workspace-header .workflow-tabs .ep-icon{width:16px;height:16px}
.workspace-header .workspace-actions{grid-column:3;justify-self:end;width:auto;justify-content:flex-end}
@media(max-width:1200px){.workspace-header .workspace-actions{grid-column:1/-1;grid-row:2}.workspace-header .report-name{min-width:0}.workspace-header .workflow-tabs{margin:0}}
@media(max-width:620px){.workspace-header .report-name{grid-column:1/-1;text-align:center}.workspace-header .workflow-tabs{grid-column:1/-1;grid-row:2}.workspace-header .workspace-actions{grid-column:1/-1;grid-row:3;justify-self:center}.workspace-header .workflow-tabs button{min-width:72px;padding-inline:10px}}

/* One aligned action bar for every data-model section. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.dm-work .dm-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;padding:12px;margin:0 0 16px;background:var(--panel);border:1px solid var(--line);border-radius:7px;min-height:62px}
.dm-context-tools{flex:1;min-width:0}.dm-context-tools>[hidden]{display:none!important}
.dm-toolbar .dm-add-bar{display:flex;align-items:center;flex-wrap:nowrap;gap:8px;padding:0;margin:0;border:0;border-radius:0;background:transparent}
.dm-toolbar .dm-add-bar label{margin:0;min-width:0;width:155px;flex:0 1 155px}.dm-toolbar .dm-add-bar .dm-dataset-choice{flex:1;max-width:340px;width:auto}
.dm-toolbar :is(select,button){min-height:36px;height:36px;margin:0;font-size:12px;white-space:nowrap}.dm-toolbar select{width:100%;min-width:0;padding-block:6px}.dm-toolbar button{padding:7px 11px}
.dm-toolbar-actions{flex:0 0 auto;margin-inline-start:auto}
.dm-work .parameter-list-heading{display:none}.dm-work #link-hint:not([hidden]){margin:0 0 14px}
.dm-work .structure-fields{min-width:0}.dm-work #structure-table{overflow:auto}.dm-work .structure-table-head,.dm-work .structure-row{min-width:820px}
@media(max-width:1200px){.dm-toolbar #arrange-datasets{max-width:130px;white-space:normal;height:auto;min-height:36px;line-height:1.25}.dm-toolbar .dm-add-bar label{flex-basis:120px}}
@media(max-width:1050px){.dm-work .dm-toolbar{flex-wrap:wrap}.dm-context-tools{flex-basis:calc(100% - 130px)}.dm-toolbar .dm-add-bar{flex-wrap:wrap}.dm-toolbar .dm-add-bar label{flex:1 1 125px}.dm-toolbar .dm-add-bar .dm-dataset-choice{flex:2 1 180px}.dm-toolbar #arrange-datasets{max-width:none;white-space:nowrap}.structure-workspace{grid-template-columns:190px minmax(0,1fr)}}
@media(max-width:620px){.dm-work .dm-toolbar{align-items:flex-start}.dm-context-tools{flex-basis:100%}.dm-toolbar .dm-add-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.dm-toolbar .dm-add-bar label,.dm-toolbar .dm-add-bar .dm-dataset-choice{width:100%;max-width:none}.dm-toolbar #arrange-datasets{white-space:normal}.dm-work .structure-workspace{grid-template-columns:minmax(0,1fr)}}

.draft-history-row{display:flex;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}.draft-history-row>div{flex:1;min-width:0}.draft-history-row small{display:block;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}#draft-history-dialog{width:min(650px,calc(100vw - 32px));max-height:80dvh}#draft-history-status{color:#725614}.workspace-actions #open-draft-history{order:5;padding:7px;width:34px;flex-shrink:0}.workspace-actions #open-draft-history span{display:none}

.login-card .login-mark{width:340px;max-width:100%;height:auto;display:block;margin:0 auto 20px}.login-card #login-brand{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

.login-card .login-mark{width:400px;max-width:100%;height:auto}.login-card{width:480px;max-width:calc(100vw - 32px)}

.report-thumbnail{display:block;position:relative;aspect-ratio:3/2;overflow:hidden;background:#eef4f7;border:1px solid var(--line);border-radius:8px;margin-bottom:14px}.report-thumbnail img{display:block;width:100%;height:100%;object-fit:cover;object-position:top}.report-thumbnail span{position:absolute;bottom:6px;right:6px;font-size:10px;background:#fffE;color:#527184;border-radius:4px;padding:3px 6px}.report-thumbnail.unavailable:before{content:"Preview unavailable";display:grid;place-items:center;height:100%;color:#527184;font-size:12px}
