/* Final scoped layout rules: toolbar grows vertically, workspace owns remaining height. */
#HPOReportStudio .rs-shell,#HPOReportStudio:fullscreen .rs-shell,#HPOReportStudio.rs-fullscreen-fallback .rs-shell,#HPOReportStudio.rs-viewport-fullscreen .rs-shell{grid-template-rows:auto auto minmax(0,1fr)!important}
#HPOReportStudio .rs-header{height:auto!important;min-height:34px!important;padding:6px 10px!important;position:static!important}
#HPOReportStudio .rs-toolbar,#HPOReportStudio:fullscreen .rs-toolbar,#HPOReportStudio.rs-fullscreen-fallback .rs-toolbar,#HPOReportStudio.rs-viewport-fullscreen .rs-toolbar{display:flex!important;flex-direction:column!important;gap:5px!important;height:auto!important;max-height:none!important;min-height:0!important;padding:7px 9px!important;overflow:visible!important}
#HPOReportStudio .rs-commandbar,#HPOReportStudio .rs-tabs,#HPOReportStudio .rs-version-actions,#HPOReportStudio .rs-tools{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;white-space:normal!important;min-width:0!important;height:auto!important;max-height:none!important;gap:5px!important}
#HPOReportStudio .rs-commandbar>*{flex:0 1 auto!important;min-width:0!important}
#HPOReportStudio .rs-status{height:auto!important;min-height:16px!important;white-space:normal!important;line-height:1.3!important}
#HPOReportStudio .rs-tools button,#HPOReportStudio .rs-tabs button,#HPOReportStudio .rs-version-actions button{white-space:normal!important;min-height:28px;height:auto!important}
#HPOReportStudio .rs-tools .rs-sep{display:none}
#HPOReportStudio .rs-tools select{max-width:260px!important}
#HPOReportStudio .rs-preview{display:flex;flex-direction:column;min-height:0!important;height:100%!important;overflow:hidden!important}
.HPO-pdf-viewer{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden;background:#374151}
.HPO-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;flex:none;padding:7px;background:#f1f5f9;color:#1e293b;font:12px Arial}
.HPO-pdf-toolbar button,.HPO-pdf-toolbar select,.HPO-pdf-toolbar a{padding:5px 8px;border:1px solid #cbd5e1;border-radius:4px;background:white;color:#1e3a8a;cursor:pointer;text-decoration:none}
.HPO-pdf-toolbar input{width:54px;padding:4px}
.HPO-pdf-scroll{flex:1;min-height:0;min-width:0;overflow:auto!important;padding:16px 20px 40px;box-sizing:border-box;position:relative;scrollbar-gutter:stable;overscroll-behavior:contain}
.HPO-pdf-page{position:relative;background:#fff;flex:none;box-shadow:0 2px 10px #0007;margin:0 auto 18px;overflow:hidden;box-sizing:content-box}
.HPO-pdf-page>span{position:absolute;left:8px;top:8px;color:#64748b;font:12px Arial}
.HPO-pdf-page canvas{position:absolute;inset:0;display:block;background:white}
#HPOReportStudio .rs-image-element img{pointer-events:none;user-select:none;-webkit-user-drag:none}
#HPOReportStudio .rs-image-element{cursor:move}
#HPOReportStudio .rs-linked-preview-table{border-spacing:0!important;border-collapse:collapse!important;max-width:none!important}
#templateGrid .tpl-live-sheet td.tpl-hidden-cell{background-image:repeating-linear-gradient(135deg,#94a3b822 0 4px,transparent 4px 8px);opacity:.65}
#tplWorksheetTools label{display:flex;align-items:center;gap:4px;font:12px Arial}
#tplWorksheetTools input[type=checkbox]{width:auto;height:auto}
@media(max-width:1000px){#HPOReportStudio .rs-main{grid-template-columns:170px minmax(0,1fr) 210px!important}#HPOReportStudio .rs-tools select{max-width:180px!important}}
@media(max-width:700px){#HPOReportStudio .rs-main{grid-template-columns:120px minmax(0,1fr)!important}#HPOReportStudio .rs-right{position:absolute;right:0;bottom:0;width:210px;max-height:45%;z-index:30}#HPOReportStudio .rs-header small{display:none}}
