/* Modern blue shell, scoped away from report documents and layout editors. */
body.vs-modern-shell{--vs-body:#f3f7fc;--vs-sidebar:#f8fbff;--vs-border:#dce6f2;--vs-panel:#f5f8fc;--vs-panel-header:#edf3fa;--vs-primary:#087aff;--vs-text:#142c4f;background:#f3f7fc!important}
body.vs-modern-shell .erp-topbar{min-height:58px!important;padding:8px 20px!important;gap:24px;background:#173e68!important;border:0!important;color:white;justify-content:flex-start}
body.vs-modern-shell .erp-topbar-left{gap:18px;min-width:196px}
body.vs-modern-shell .erp-logo-image,body.vs-modern-shell .erp-logo-text{display:none!important}
.shell-brand{font-size:23px;font-weight:750;letter-spacing:-.8px;color:white}.shell-brand b{color:#39a7ff}
body.vs-modern-shell .erp-topbar .icon-btn{color:#e5f0ff!important;background:transparent!important;border:0!important;width:34px;height:34px}
body.vs-modern-shell .erp-topbar-actions{flex:0 0 auto;margin-left:auto;gap:14px}
body.vs-modern-shell .erp-topbar .user-chip{color:white!important;max-width:220px}.vs-modern-shell .user-chip i{color:#8dc8ff;font-size:22px}
.shell-search{display:flex;align-items:center;gap:10px;max-width:420px;flex:1;min-width:120px;background:#ffffff12;border:1px solid #ffffff16;border-radius:6px;padding:7px 10px;color:#c6dafa}
.shell-search input{width:100%;min-width:0;background:transparent;border:0;outline:0;color:white;font:inherit;font-size:12px}.shell-search input::placeholder{color:#d1dff0}.shell-search:focus-within{outline:2px solid #85c4ff;outline-offset:2px}.shell-search kbd{white-space:nowrap;color:#c5d7ec;background:transparent;font-size:10px}
body.vs-modern-shell .erp-sidebar{width:228px;min-width:228px;background:#f8fbff!important;border-right:1px solid #dce6f2!important}
body.vs-modern-shell #moduleMenu{padding:14px 10px!important}body.vs-modern-shell #moduleMenu .nav-group{margin-bottom:7px!important}
body.vs-modern-shell #moduleMenu .nav-group-title{gap:9px;min-height:36px!important;border:0!important;background:transparent!important;color:#17375f!important;font-size:12px!important;font-weight:700}
body.vs-modern-shell #moduleMenu .nav-group-title .bi-chevron-down{order:3;margin-left:auto;font-size:10px}
body.vs-modern-shell #moduleMenu .nav-group-items{padding:2px 0 2px 22px!important}
body.vs-modern-shell #moduleMenu .nav-item{min-height:32px!important;border:0!important;border-radius:5px!important;color:#385271;font-size:12px!important;background:transparent!important}
body.vs-modern-shell #moduleMenu .nav-item:hover{background:#eaf3ff!important;color:#0767d5!important}body.vs-modern-shell #moduleMenu .nav-item.active{background:#dceeff!important;color:#006ae8!important;font-weight:650}
.shell-filter-hidden{display:none!important}.shell-searching .nav-group-items{display:block!important}.shell-search-empty{padding:12px;color:#64748b;font-size:12px}
body.vs-modern-shell .sidebar-footer{border-top:1px solid #e2eaf4;background:transparent;padding:10px}.shell-collapse{display:flex;align-items:center;gap:12px;border:0;background:none;color:#456184;font-size:12px;padding:8px;width:100%;text-align:left}
body.vs-modern-shell .erp-tabs-card{background:white!important;border-bottom:1px solid #e1eaf5!important}
body.vs-modern-shell .erp-tabs-bar{background:#edf3fa!important;padding:0 20px!important;gap:4px}
body.vs-modern-shell .tab-btn{background:transparent!important;border-color:transparent!important;color:#526b87!important;border-radius:5px 5px 0 0!important;margin-top:7px!important;font-weight:500}
body.vs-modern-shell .tab-btn.active{background:white!important;border-color:#dce6f2!important;color:#006be5!important}
.shell-module-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 24px 14px;flex-wrap:wrap}.shell-module-title{display:flex;align-items:center;gap:12px}.shell-module-title>i{font-size:25px;color:#087aff}.shell-module-title h1{font-size:21px;font-weight:700;letter-spacing:-.4px;color:#132e54;margin:0}
.shell-module-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.shell-module-actions .action-group{gap:7px}.shell-module-actions .btn{border-radius:5px!important;min-height:33px;font-size:12px;display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border:1px solid #d5e0ee;background:white;color:#294764}.shell-module-actions #btnNew{background:#087aff;border-color:#087aff;color:white}.shell-module-actions #btnSave{background:#159347;border-color:#159347;color:white}.shell-module-actions #btnDelete{background:#ef4444;border-color:#ef4444;color:white!important}.shell-module-actions #btnJsonEditor{font-size:11px;color:#526b87}.shell-module-actions [hidden],body:not(.administration-workspace) .shell-module-actions [data-model-hidden]{display:none!important}
body.vs-modern-shell .erp-subtabs-bar{padding:0 24px!important;background:white!important;border:0!important;gap:3px}body.vs-modern-shell .subtab-btn{border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:transparent!important;color:#536984!important;padding:10px 12px!important;font-size:12px!important}body.vs-modern-shell .subtab-btn.active{color:#087aff!important;border-bottom-color:#087aff!important;background:#f5faff!important}
body.vs-modern-shell .erp-content{padding:18px 24px!important;background:#f5f8fc!important}.vs-modern-shell .grid-toolbar-card{background:white!important;border:1px solid #e1eaf5!important;border-radius:6px!important;box-shadow:none!important}.vs-modern-shell .grid-shell{border:1px solid #dce6f2!important;border-radius:6px!important;overflow:hidden}.vs-modern-shell .tabulator .tabulator-header{background:#f3f7fc!important;border-bottom:1px solid #dce6f2!important}.vs-modern-shell .tabulator .tabulator-header .tabulator-col{background:transparent!important;border-right:0!important}.vs-modern-shell .tabulator-row{border-bottom:1px solid #edf2f8!important}.vs-modern-shell .tabulator-row.tabulator-row-even{background:#f8fbff!important}.vs-modern-shell .tabulator-row.tabulator-selected{background:#e0f0ff!important}
.vs-modern-shell button:focus-visible,.vs-modern-shell a:focus-visible{outline:2px solid #087aff;outline-offset:2px}
@media(min-width:992px){body.vs-modern-shell.sidebar-compact .erp-sidebar{width:60px;min-width:60px}body.vs-modern-shell.sidebar-compact #moduleMenu{padding:12px 7px!important}body.vs-modern-shell.sidebar-compact .nav-group-title{justify-content:center;padding:8px!important}body.vs-modern-shell.sidebar-compact .nav-group-title span,body.vs-modern-shell.sidebar-compact .nav-group-title .bi-chevron-down,body.vs-modern-shell.sidebar-compact .nav-group-items,body.vs-modern-shell.sidebar-compact .shell-collapse span{display:none!important}body.vs-modern-shell.sidebar-compact .nav-group-title i{font-size:19px}body.vs-modern-shell.sidebar-compact .shell-collapse i{transform:rotate(180deg)}body.vs-modern-shell.sidebar-compact .admin-menu-entry{font-size:0;justify-content:center;padding:12px}body.vs-modern-shell.sidebar-compact .admin-menu-entry i{font-size:18px}.shell-module-actions .d-none.d-xl-inline{display:inline!important}}
@media(max-width:991px){body.vs-modern-shell .erp-topbar{padding:8px 12px!important;gap:12px}body.vs-modern-shell .erp-topbar-left{min-width:0;gap:8px}.shell-search kbd{display:none}.shell-module-header{padding:14px 16px}.shell-module-title h1{font-size:19px}body.vs-modern-shell .erp-content{padding:12px!important}body.vs-modern-shell .erp-subtabs-bar{padding:0 12px!important}.shell-module-actions{gap:6px}.shell-module-actions #btnJsonEditor span{display:none}}
@media(max-width:575px){.shell-brand{font-size:19px}.shell-search{max-width:none;padding:7px}.shell-search input{font-size:11px}.vs-modern-shell .erp-topbar .user-chip{display:none!important}body.vs-modern-shell .erp-topbar-actions{gap:0}.shell-module-title h1{font-size:18px}.shell-module-actions .btn{padding:6px 9px}.shell-module-actions .action-group{gap:5px}}

/* Override legacy theme rules on shell controls only. */
body.vscloud-app.vs-modern-shell{font-family:"Segoe UI",Arial,sans-serif!important}
body.vscloud-app.vs-modern-shell .erp-topbar-left{flex:0 0 auto!important}
body.vscloud-app.vs-modern-shell .erp-sidebar{width:228px!important;min-width:228px!important;flex:0 0 228px!important}
body.vscloud-app.vs-modern-shell .shell-search input{background:transparent!important;border:0!important;box-shadow:none!important;color:white!important;font-family:inherit!important;padding:0!important;min-height:24px!important}
body.vscloud-app.vs-modern-shell .erp-topbar .user-chip{background:transparent!important;border:0!important;color:white!important}
body.vscloud-app.vs-modern-shell .shell-module-actions #btnNew{background:#087aff!important;border-color:#087aff!important;color:white!important}
body.vscloud-app.vs-modern-shell .shell-module-actions #btnSave{background:#159347!important;border-color:#159347!important;color:white!important}
body.vscloud-app.vs-modern-shell .shell-module-actions #btnDelete{background:#ef4444!important;border-color:#ef4444!important;color:white!important}
body.vscloud-app.vs-modern-shell .shell-module-actions #btnCancel{background:white!important;color:#294764!important}
body.vscloud-app.vs-modern-shell .shell-module-actions .btn span{font-family:inherit!important}
@media(min-width:992px){body.vscloud-app.vs-modern-shell.sidebar-compact .erp-sidebar{width:60px!important;min-width:60px!important;flex-basis:60px!important}}
body.vscloud-app.vs-modern-shell #moduleMenu .shell-filter-hidden{display:none!important}body.vscloud-app.vs-modern-shell #moduleMenu.shell-searching .nav-group:not(.shell-filter-hidden) .nav-group-items{display:block!important}
body.vscloud-app.vs-modern-shell .erp-topbar{flex-wrap:nowrap!important}body.vscloud-app.vs-modern-shell .erp-topbar-left{width:auto!important}body.vscloud-app.vs-modern-shell .erp-topbar-actions{width:auto!important;flex:0 0 auto!important}body.vscloud-app.vs-modern-shell .erp-sidebar *,body.vscloud-app.vs-modern-shell .shell-search input,body.vscloud-app.vs-modern-shell .shell-module-header button,body.vscloud-app.vs-modern-shell .tab-btn,body.vscloud-app.vs-modern-shell .subtab-btn{font-family:Segoe UI,Arial,sans-serif!important}

.shell-notifications{position:relative;flex:0 0 auto}.shell-notification-panel{position:absolute;right:0;top:44px;width:300px;max-width:calc(100vw - 24px);padding:18px;background:white;color:#203a5d;border:1px solid #dce6f2;border-radius:8px;box-shadow:0 8px 28px #15335420;z-index:100}.shell-notification-panel[hidden]{display:none!important}.shell-notification-panel h2{font:600 15px "Segoe UI",sans-serif;margin:0 0 12px}.shell-notification-panel p{font:13px/1.5 "Segoe UI",sans-serif;margin:0;color:#64748b}
body.vs-modern-shell{--vs-grid-head:#f3f7fc;--vs-grid-alt:#f8fbff;--vs-grid-selected:#e0f0ff;--vs-row-height:32px}
body.vscloud-app.vs-modern-shell .grid-shell,body.vscloud-app.vs-modern-shell .tabulator{background:white!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-header,body.vscloud-app.vs-modern-shell .tabulator .tabulator-col{background:#f3f7fc!important;color:#173456!important;border-color:#e4edf7!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-col-title{font-size:12px!important;font-weight:600!important;padding:5px 8px!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-row{background:#fff!important;color:#243d5e!important;min-height:32px!important;border-bottom:1px solid #e9f0f8!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-row:nth-child(even){background:#f8fbff!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-row:hover{background:#edf6ff!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-row.tabulator-selected{background:#dceeff!important;box-shadow:none!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-cell{font:12px/20px "Segoe UI",sans-serif!important;padding:5px 8px!important;min-height:32px!important;border-right:1px solid #eef3fa!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-cell.tabulator-editing{padding:0!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-footer{background:white!important;border-top:1px solid #e1eaf5!important;padding:9px!important;color:#314d70!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-page{border:1px solid #deE8f5!important;border-radius:4px!important;background:white!important;color:#315174!important;min-width:28px}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-page.active{background:#087aff!important;color:white!important;border-color:#087aff!important}
body.vscloud-app.vs-modern-shell .grid-shell .table,body.vscloud-app.vs-modern-shell .embedded-detail-table{--bs-table-bg:white;--bs-table-color:#243d5e;--bs-table-hover-bg:#edf6ff;--bs-table-striped-bg:#f8fbff;background:white!important;color:#243d5e!important;border-color:#e4edf7!important;font:12px/20px "Segoe UI",sans-serif!important}
body.vscloud-app.vs-modern-shell .grid-shell .table th,body.vscloud-app.vs-modern-shell .embedded-detail-table th{background:#f3f7fc!important;color:#173456!important;font-weight:600!important;padding:6px 8px!important;border-color:#e4edf7!important}
body.vscloud-app.vs-modern-shell .grid-shell .table td,body.vscloud-app.vs-modern-shell .embedded-detail-table td{background:white!important;color:#243d5e!important;padding:5px 8px!important;border-color:#e9f0f8!important;box-shadow:none!important}
body.vscloud-app.vs-modern-shell .grid-shell .table tr:nth-child(even) td,body.vscloud-app.vs-modern-shell .embedded-detail-table tr:nth-child(even) td{background:#f8fbff!important}
body.vscloud-app.vs-modern-shell .embedded-detail-table tr.selected td,body.vscloud-app.vs-modern-shell .embedded-detail-table tr.table-active td{background:#dceeff!important}

body.vscloud-app.vs-modern-shell .erp-topbar .shell-primary-actions{display:flex!important;gap:6px!important;flex:0 0 auto!important}
body.vscloud-app.vs-modern-shell .erp-topbar .shell-primary-actions .btn{border-radius:4px!important;min-height:32px!important;padding:6px 10px!important;font:12px "Segoe UI",sans-serif!important;gap:6px!important}
body.vscloud-app.vs-modern-shell .erp-topbar #btnNew{background:#087aff!important;color:white!important;border-color:#1987ff!important}
body.vscloud-app.vs-modern-shell .erp-topbar #btnSave{background:#159347!important;color:white!important;border-color:#22a254!important}
body.vscloud-app.vs-modern-shell .erp-topbar #btnDelete{background:#ef4444!important;color:white!important;border-color:#fa5757!important}
body.vscloud-app.vs-modern-shell .erp-topbar #btnCancel{background:white!important;color:#27466b!important;border-color:#dbe6f4!important}
@media(min-width:1200px){body.vs-modern-shell .shell-primary-actions .d-none.d-xl-inline{display:inline!important}}
@media(max-width:767px){body.vscloud-app.vs-modern-shell .erp-topbar{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:8px!important}body.vscloud-app.vs-modern-shell .erp-topbar-actions{grid-column:1/-1;justify-content:flex-end!important}body.vscloud-app.vs-modern-shell .shell-search{max-width:none!important}.shell-notification-panel{right:0}}

/* Compact data-entry forms. Preserve configured column widths and native pickers. */
body.vscloud-app.vs-modern-shell #contentArea{--vs-control-height:28px;--vs-form-gap:4px;--vs-font-size:12px}
body.vscloud-app.vs-modern-shell #contentArea :is(.form-panel,.workspace-master-form-panel){padding:8px 10px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-row{row-gap:4px!important;column-gap:10px!important;margin-bottom:4px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field{margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important;min-height:0!important}
body.vscloud-app.vs-modern-shell #contentArea :is(.vs-form-field,.workspace-filter-field,.lotes-ficha-field-row) .form-label{font:600 11px/14px "Segoe UI",Arial,sans-serif!important;letter-spacing:0!important;margin-bottom:2px!important}
body.vscloud-app.vs-modern-shell #contentArea :is(.vs-form-field,.workspace-filter-field,.lotes-ficha-field-row) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not(.vs-date-native),select,.readonly-display){box-sizing:border-box;height:28px!important;min-height:28px!important;font:12px/18px "Segoe UI",Arial,sans-serif!important;padding:4px 7px!important;border-radius:4px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field textarea{font:12px/18px "Segoe UI",Arial,sans-serif!important;min-height:46px!important;padding:5px 7px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field :is(.vs-date-wrapper,.vs-cep-wrapper)>input:not(.vs-date-native){padding-right:30px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field :is(.vs-date-button,.vs-cep-button){width:26px!important;min-height:0!important;padding:0!important;border-radius:0 3px 3px 0!important;font-size:12px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field .lookup-pair{gap:5px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field .field-check-control{height:28px!important;min-height:28px!important;padding:0!important;margin:0!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field input:is([type=checkbox],[type=radio]){width:15px!important;height:15px!important;min-height:15px!important;padding:0!important}
body.vscloud-app.vs-modern-shell .shell-module-header{padding:12px 20px 8px}.vs-modern-shell .shell-module-title h1{font-size:18px}
@media(pointer:coarse){body.vscloud-app.vs-modern-shell #contentArea .vs-form-field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not(.vs-date-native),select){min-height:36px!important;height:36px!important}body.vscloud-app.vs-modern-shell #contentArea .vs-form-field :is(.vs-date-button,.vs-cep-button){width:32px!important}body.vscloud-app.vs-modern-shell #contentArea .vs-form-field :is(.vs-date-wrapper,.vs-cep-wrapper)>input:not(.vs-date-native){padding-right:36px!important}}
body.vscloud-app.vs-modern-shell #contentArea .vs-date-native{width:1px!important;height:1px!important;min-height:1px!important;min-width:0!important;padding:0!important;border:0!important}

/* Search grids keep one record per row; filters match compact form controls. */
body.vscloud-app.vs-modern-shell .tabulator .tabulator-header .tabulator-header-filter{padding:3px 0!important;margin-top:2px!important}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-header .tabulator-header-filter :is(input,select){height:26px!important;min-height:26px!important;padding:3px 6px!important;font:12px/18px "Segoe UI",sans-serif!important;border:1px solid #dce6f2!important;border-radius:3px!important;background:white!important;box-sizing:border-box}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-col-title{text-transform:none!important}

/* Lookup children must never exceed the allocated form column. */
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field .lookup-pair{grid-template-columns:minmax(48px,72px) minmax(0,1fr)!important;width:100%;min-width:0!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field .lookup-pair>*{min-width:0!important;width:100%!important;max-width:100%!important}
body.vscloud-app.vs-modern-shell #contentArea .field-check-control-only{justify-content:flex-start!important;border:0!important;background:transparent!important;box-shadow:none!important}

/* Administration is already identified by its workspace tab. */
body.vscloud-app.vs-modern-shell.administration-workspace .shell-module-title{display:none!important}
body.vscloud-app.vs-modern-shell.administration-workspace .shell-module-header{justify-content:flex-end}
body.vscloud-app.vs-modern-shell.administration-workspace .shell-module-header:not(:has(.shell-module-actions> :not([hidden]))){display:none!important}

body.vscloud-app.vs-modern-shell .shell-module-title[hidden]{display:none!important}
body.vscloud-app.vs-modern-shell .shell-module-header:has(>.shell-module-title[hidden]){justify-content:flex-end}

/* Module names remain in navigation tabs; keep only form tools in this strip. */
body.vscloud-app.vs-modern-shell .shell-module-title{display:none!important}
body.vscloud-app.vs-modern-shell .shell-module-header{justify-content:flex-end;padding:4px 20px!important}
/* Use side labels where the field has room, without squeezing short inputs. */
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field{container-name:vs-field;container-type:inline-size}
@container vs-field (min-width:260px){
 body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.form-label{float:left;width:96px;margin:0 8px 0 0!important;min-height:28px;display:flex;align-items:center;overflow-wrap:normal}
 body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.form-label+ :is(input,select,textarea,div){width:calc(100% - 104px)!important;margin-left:104px;min-width:0!important}
 body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.form-label+.lookup-pair{width:calc(100% - 104px)!important}
 body.vscloud-app.vs-modern-shell #contentArea .vs-form-field .field-check-block{display:flex!important;align-items:center;gap:8px;min-height:28px}
 body.vscloud-app.vs-modern-shell #contentArea .vs-form-field .field-check-block>.form-label{width:96px;flex:0 0 96px;margin:0!important}
}

/* Shared compact grid toolbar and integrated pagination. */
body.vscloud-app.vs-modern-shell .grid-toolbar-card{padding:8px!important;margin-bottom:8px!important}
body.vscloud-app.vs-modern-shell .grid-search-wrap{display:flex;align-items:center;gap:6px;width:100%;max-width:540px}
body.vscloud-app.vs-modern-shell .grid-search-wrap .input-group{flex:1;min-width:0}
body.vscloud-app.vs-modern-shell .grid-search-wrap :is(input,button,.input-group-text){height:30px!important;min-height:30px!important;font:12px/18px "Segoe UI",sans-serif!important;padding:5px 8px!important}
body.vscloud-app.vs-modern-shell .grid-search-wrap button{white-space:nowrap}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-footer .tabulator-footer-contents{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:0!important}
body.vscloud-app.vs-modern-shell .vs-grid-summary{margin-right:auto;font:12px/18px "Segoe UI",sans-serif;color:#385271;white-space:nowrap}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-paginator{flex:0 1 auto;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px;font:12px/18px "Segoe UI",sans-serif}
body.vscloud-app.vs-modern-shell .tabulator :is(.tabulator-page,.tabulator-page-size){height:28px!important;min-height:28px!important;margin:0!important;padding:3px 7px!important;font:12px/18px "Segoe UI",sans-serif!important;border:1px solid #dce6f2;border-radius:4px}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-pages{display:inline-flex;gap:3px;margin:0 3px}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-page:disabled{opacity:.4}
body.vscloud-app.vs-modern-shell .tabulator .tabulator-cell:focus-visible{outline:2px solid #087aff;outline-offset:-2px}

/* Stable alignment for shared forms and intermediate viewport widths. */
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.form-label{overflow-wrap:anywhere}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field textarea{width:100%;max-width:100%;resize:vertical}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field :is(.lookup-pair,.vs-date-wrapper,.vs-cep-wrapper){min-width:0;max-width:100%;box-sizing:border-box}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field .lookup-description-input{overflow:hidden;text-overflow:ellipsis}
body.vscloud-app.vs-modern-shell .erp-topbar .shell-search{min-width:0}
body.vscloud-app.vs-modern-shell .erp-topbar .shell-primary-actions{flex-shrink:0}
@media(min-width:768px) and (max-width:1199px){
 body.vscloud-app.vs-modern-shell .erp-topbar{gap:12px!important;padding:8px 12px!important}
 body.vscloud-app.vs-modern-shell .erp-topbar-left{min-width:0!important;gap:8px!important}
 body.vscloud-app.vs-modern-shell .erp-topbar-actions{gap:8px!important}
 body.vscloud-app.vs-modern-shell .erp-topbar .user-chip{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.vscloud-app.vs-modern-shell .shell-search kbd{display:none}
}
@media(max-width:575px){body.vscloud-app.vs-modern-shell .shell-notification-panel{position:fixed;top:108px;right:12px;width:300px;max-width:calc(100vw - 24px)}}

.shell-notifications>button{position:relative}.shell-notification-count{position:absolute;right:-3px;top:-3px;min-width:16px;height:16px;padding:0 3px;border-radius:9px;background:#ef4444;color:white;font:600 10px/16px "Segoe UI",sans-serif}.shell-notification-count[hidden]{display:none}.shell-notification-list{list-style:none;margin:0;padding:0;max-height:280px;overflow:auto}.shell-notification-list li{padding:9px 0;border-top:1px solid #e1eaf5;display:grid;gap:4px}.shell-notification-list strong{font:500 12px/18px "Segoe UI",sans-serif;color:#245a39}.shell-notification-list .is-error strong{color:#943333}.shell-notification-list time{font-size:11px;color:#64748b}

.shell-notification-tools{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.shell-notification-panel button:not(.icon-btn){border:1px solid #dce6f2;border-radius:4px;background:#f5f8fc;color:#245079;font:12px/18px "Segoe UI",sans-serif;padding:4px 7px;cursor:pointer}.shell-notification-list .is-unread{border-left:3px solid #087aff;padding-left:8px}.shell-notification-list .is-read strong{color:#64748b}.shell-notification-panel button:disabled{opacity:.55;cursor:default}.shell-notification-list li>button{justify-self:start}

/* Preserve the space reserved by forms with a product image. */
@media(min-width:992px){body.vscloud-app.vs-modern-shell #contentArea .form-panel.has-side-image{padding-right:min(37%,420px)!important;min-height:292px}}
@media(max-width:991px){body.vscloud-app.vs-modern-shell #contentArea .form-panel.has-side-image [data-vs-field="IMAGEM"]{position:static!important;width:100%!important;grid-column:1/-1!important}}

/* Dynamic forms: consistent side labels, independent of legacy coordinates. */
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field{display:grid!important;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:8px;container-type:normal}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.form-label{float:none!important;width:auto!important;min-height:0!important;margin:0!important;line-height:14px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.form-label+ :is(input,select,textarea,div){width:100%!important;min-width:0!important;margin-left:0!important}

body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.field-check-block{grid-column:1/-1;display:grid!important;grid-template-columns:112px minmax(0,1fr);gap:8px;align-items:center}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.field-check-block>.form-label{margin:0!important;min-height:0!important;width:auto!important;line-height:14px!important}
body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.form-label,body.vscloud-app.vs-modern-shell #contentArea .vs-form-field>.field-check-block>.form-label{overflow-wrap:normal;word-break:normal}

/* The dynamic grid owns field width; old per-name limits must not squeeze controls. */
body.vscloud-app.vs-modern-shell #contentArea .vs-form-row>.vs-form-field{max-width:none!important;justify-self:stretch}

/* Parameters for selection commands remain above the shared grid. */
.grid-parameter-page .grid-toolbar-card[hidden]{display:none!important}
.grid-parameter-page .workspace-filter-panel{align-items:end}
.grid-parameter-page .workspace-filter-field{min-width:0}

.grid-parameter-page .grid-selection-actions{grid-column:1/-1;display:flex;gap:12px;margin-bottom:4px}
.grid-parameter-page .workspace-filter-actions{grid-column:span 3!important;justify-content:flex-start!important;align-self:end}
@media(max-width:700px){.grid-parameter-page .workspace-filter-field,.grid-parameter-page .workspace-filter-actions{grid-column:1/-1!important}}
