/* =========================================================
   GreenEco — Enterprise Documents / Correspondence Workforce UI parity
   Scope: /enterprise-documents screens and their managed dialogs only.
   Visual/layout patch only; no API, permissions, routes, events, or data flow.
   Version: 3.3.16.44.2.494
   ========================================================= */

:root{
  --ge-doc-wf-blue:#08658f;
  --ge-doc-wf-teal:#20b3bd;
  --ge-doc-wf-cyan:#bde9ec;
  --ge-doc-wf-line:#a8b2bb;
  --ge-doc-wf-soft:#eef2f4;
  --ge-doc-wf-danger:#df1f27;
  --ge-doc-wf-text:#17212b;
}

/* ---------- Main unit screens: registry / incoming / outgoing / archive ---------- */
.enterprise-documents-page{
  width:min(1180px,100%)!important;
  min-width:0!important;
  margin:0 auto!important;
  padding-bottom:20px!important;
}

/* Workforce-style title card */
.enterprise-documents-page > .page-title{
  min-height:42px!important;
  height:auto!important;
  margin:0 0 7px!important;
  padding:5px 54px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#fff!important;
  border:1px solid #777!important;
  border-radius:0!important;
  box-shadow:none!important;
}

.enterprise-documents-page > .page-title .page-title-icon{
  right:8px!important;
  width:24px!important;
  height:24px!important;
  background:var(--ge-doc-wf-teal)!important;
  color:#fff!important;
}

.enterprise-documents-page > .page-title h1{
  margin:0!important;
  font-size:22px!important;
  line-height:1.25!important;
  color:var(--ge-doc-wf-text)!important;
  font-weight:800!important;
}

.enterprise-documents-page > .page-title p{
  margin:2px 0 0!important;
  font-size:11px!important;
  line-height:1.25!important;
  color:#647382!important;
}

/* Workforce-style command toolbar; keep every existing button and handler. */
.enterprise-documents-page .enterprise-documents-toolbar{
  display:grid!important;
  grid-template-columns:auto minmax(12px,1fr) auto!important;
  align-items:center!important;
  gap:7px!important;
  min-height:48px!important;
  width:100%!important;
  margin:0 0 7px!important;
  padding:6px 7px!important;
  background:#f1f1f1!important;
  border:1px solid #c9c9c9!important;
  border-radius:0!important;
  box-shadow:none!important;
}

.enterprise-documents-page .enterprise-documents-toolbar .toolbar-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
}

.enterprise-documents-page .enterprise-documents-toolbar .tool-button,
.enterprise-documents-page .enterprise-documents-toolbar > .secondary-button{
  min-width:95px!important;
  min-height:34px!important;
  height:34px!important;
  margin:0!important;
  padding:0 12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  white-space:nowrap!important;
  background:#fff!important;
  border:1px solid #8b8b8b!important;
  border-radius:0!important;
  color:#111c23!important;
  font-size:12px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

.enterprise-documents-page .enterprise-documents-toolbar .tool-button:hover:not(:disabled),
.enterprise-documents-page .enterprise-documents-toolbar > .secondary-button:hover:not(:disabled){
  background:#e8f8f8!important;
}

.enterprise-documents-page .enterprise-documents-toolbar .tool-button.danger{
  background:#fff0f0!important;
}

.enterprise-documents-page .enterprise-documents-toolbar .tool-button:disabled{
  opacity:.45!important;
  cursor:not-allowed!important;
}

/* Filters follow the final Workforce desktop field geometry. */
.enterprise-documents-page .enterprise-documents-filterbar{
  display:grid!important;
  grid-template-columns:
    repeat(7,minmax(118px,1fr))
    minmax(112px,.72fr)!important;
  gap:8px 10px!important;
  align-items:end!important;
  width:100%!important;
  margin:0 0 7px!important;
  padding:8px!important;
  background:#fff!important;
  border:1px solid #c4c4c4!important;
  border-radius:0!important;
  box-shadow:none!important;
}

.enterprise-documents-page .enterprise-documents-filterbar > label{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:4px!important;
  min-width:0!important;
  margin:0!important;
}

.enterprise-documents-page .enterprise-documents-filterbar > label > span{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  color:var(--ge-doc-wf-text)!important;
  text-align:right!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:12px!important;
  line-height:1.25!important;
  font-weight:700!important;
}

.enterprise-documents-page .enterprise-documents-filterbar input,
.enterprise-documents-page .enterprise-documents-filterbar select{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:3px 8px!important;
  border:1px solid #6d7a82!important;
  border-radius:0!important;
  background:var(--ge-doc-wf-cyan)!important;
  color:var(--ge-doc-wf-text)!important;
  text-align:right!important;
  font-family:Tahoma,Arial,sans-serif!important;
  font-size:12px!important;
  box-shadow:none!important;
}

.enterprise-documents-page .enterprise-documents-filterbar input:focus,
.enterprise-documents-page .enterprise-documents-filterbar select:focus{
  background:#d9f6f7!important;
  outline:1px solid #3b8e9c!important;
  outline-offset:0!important;
}

.enterprise-documents-page .enterprise-documents-filterbar input[type="date"]{
  direction:rtl!important;
  text-align:right!important;
}

.enterprise-documents-page .enterprise-documents-filterbar > button{
  width:100%!important;
  min-width:112px!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:0 10px!important;
  align-self:end!important;
  white-space:nowrap!important;
  background:#fff!important;
  border:1px solid #8b8b8b!important;
  border-radius:0!important;
  color:var(--ge-doc-wf-text)!important;
  font-size:12px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

.enterprise-documents-page .enterprise-documents-filterbar > button:hover{
  background:#e8f8f8!important;
}

/* Register shell: match Workforce's flat bordered table surface. */
.enterprise-documents-page .enterprise-documents-register{
  width:100%!important;
  min-width:0!important;
}

.enterprise-documents-page .enterprise-documents-register .table-panel{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  background:#fff!important;
  border:1px solid #777!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

.enterprise-documents-page .enterprise-documents-register .table-controls{
  min-height:44px!important;
  padding:6px 8px!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  background:#f1f1f1!important;
  border:0!important;
  border-bottom:1px solid #c9c9c9!important;
}

.enterprise-documents-page .enterprise-documents-register .table-search{
  flex:1 1 360px!important;
  max-width:540px!important;
  min-width:180px!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
}

.enterprise-documents-page .enterprise-documents-register .table-search input{
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  padding:4px 9px!important;
  border:1px solid #6d7a82!important;
  border-radius:0!important;
  background:var(--ge-doc-wf-cyan)!important;
  color:var(--ge-doc-wf-text)!important;
  font-size:12px!important;
  box-shadow:none!important;
}

.enterprise-documents-page .enterprise-documents-register .table-search input:focus{
  background:#d9f6f7!important;
  outline:1px solid #3b8e9c!important;
  outline-offset:0!important;
}

.enterprise-documents-page .enterprise-documents-register .results-count,
.enterprise-documents-page .enterprise-documents-register .page-size{
  font-size:12px!important;
  color:var(--ge-doc-wf-text)!important;
}

.enterprise-documents-page .enterprise-documents-register .page-size select{
  height:30px!important;
  border:1px solid #8b8b8b!important;
  border-radius:0!important;
  background:#fff!important;
}

.enterprise-documents-page .enterprise-documents-register .table-scroll{
  width:100%!important;
  max-height:58vh!important;
  margin:0!important;
  overflow:auto!important;
  background:#fff!important;
  border:0!important;
  scrollbar-gutter:stable!important;
  overflow-anchor:none!important;
}

.enterprise-documents-page .enterprise-documents-register .data-table{
  width:100%!important;
  min-width:1550px!important;
  border-collapse:collapse!important;
  table-layout:auto!important;
  background:#fff!important;
}

.enterprise-documents-page .enterprise-documents-register .data-table th,
.enterprise-documents-page .enterprise-documents-register .data-table td{
  height:auto!important;
  min-height:30px!important;
  padding:6px 7px!important;
  border:1px solid #999!important;
  vertical-align:middle!important;
  font-size:12px!important;
  line-height:1.35!important;
}

.enterprise-documents-page .enterprise-documents-register .data-table th{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  background:#727272!important;
  color:#fff!important;
  text-align:center!important;
  white-space:nowrap!important;
}

.enterprise-documents-page .enterprise-documents-register .data-table td{
  text-align:center!important;
  background:inherit!important;
}

.enterprise-documents-page .enterprise-documents-register .data-table tbody tr:nth-child(even){
  background:#f5f5f5!important;
}

.enterprise-documents-page .enterprise-documents-register .data-table tbody tr:hover,
.enterprise-documents-page .enterprise-documents-register .data-table tbody tr.selected-row{
  background:#d8f0f8!important;
}

.enterprise-documents-page .enterprise-documents-register .selected-row td{
  background:#d8f0f8!important;
}

.enterprise-documents-page .enterprise-documents-register .selected-row td:first-child{
  border-right:1px solid #999!important;
}

.enterprise-documents-page .enterprise-documents-register .table-footer{
  min-height:42px!important;
  padding:6px 9px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  background:#fff!important;
  border-top:1px solid #c9c9c9!important;
  font-size:12px!important;
}

.enterprise-documents-page .enterprise-documents-register .pagination{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:0!important;
}

.enterprise-documents-page .enterprise-documents-register .pagination button{
  min-width:34px!important;
  height:30px!important;
  margin:0!important;
  padding:4px 8px!important;
  background:#fff!important;
  border:1px solid #8b8b8b!important;
  border-radius:0!important;
  color:var(--ge-doc-wf-text)!important;
  box-shadow:none!important;
}

/* ---------- Managed popups opened from Enterprise Documents ---------- */
body:has(.enterprise-documents-page) .greeneco-managed-modal-backdrop{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  background:rgba(0,0,0,.53)!important;
  padding-inline:10px!important;
  overflow:hidden!important;
  animation:none!important;
  transition:none!important;
}

/* Default dialog equals Workforce 850px shell. */
body:has(.enterprise-documents-page) .greeneco-managed-modal-card{
  width:min(850px,calc(100vw - 24px))!important;
  max-width:850px!important;
  min-height:0!important;
  max-height:100%!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  background:#fff!important;
  border:1px solid #555!important;
  border-radius:5px!important;
  box-shadow:0 18px 50px rgba(0,0,0,.38)!important;
  overflow:hidden!important;
  resize:none!important;
  transform:none!important;
  animation:none!important;
  transition:none!important;
  will-change:auto!important;
}

/* The document editor is intentionally wide; keep all fields while using Workforce geometry. */
body:has(.enterprise-documents-page) .greeneco-managed-modal-card.modal-wide{
  width:min(1040px,calc(100vw - 24px))!important;
  max-width:1040px!important;
}

/* Workforce title row; retain system minimize/close handlers. */
body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header{
  flex:0 0 auto!important;
  min-height:45px!important;
  height:auto!important;
  padding:7px 10px!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  background:#eef4f6!important;
  border-bottom:1px solid #aaa!important;
  color:var(--ge-doc-wf-text)!important;
  box-shadow:none!important;
}

body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header h2{
  flex:1 1 auto!important;
  min-width:0!important;
  margin:0!important;
  text-align:center!important;
  font-size:16px!important;
  line-height:1.3!important;
  font-weight:800!important;
}

body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header .modal-taskbar-minimize,
body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header .modal-size-button,
body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header .icon-button{
  flex:0 0 30px!important;
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border-radius:2px!important;
  box-shadow:none!important;
}

body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header .modal-taskbar-minimize,
body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header .modal-size-button{
  background:#fff!important;
  color:#26333a!important;
  border:1px solid #8b989f!important;
}

body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-header .icon-button.danger-ghost{
  background:var(--ge-doc-wf-danger)!important;
  color:#fff!important;
  border:1px solid #b81b22!important;
}

/* Only the body scrolls; title and bottom actions remain stable. */
body:has(.enterprise-documents-page) .greeneco-managed-modal-card > .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:14px!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  overflow-anchor:none!important;
  scrollbar-gutter:stable!important;
  background:#fff!important;
  box-sizing:border-box!important;
}

/* Main document editor */
body:has(.enterprise-documents-page) .enterprise-document-form{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-context,
body:has(.enterprise-documents-page) .enterprise-document-archive-context{
  display:grid!important;
  grid-template-columns:2fr 1fr 1fr!important;
  gap:1px!important;
  margin:0!important;
  border:1px solid #aaa!important;
  background:#aaa!important;
}

body:has(.enterprise-documents-page) .enterprise-document-context > div,
body:has(.enterprise-documents-page) .enterprise-document-archive-context > div{
  min-height:42px!important;
  padding:5px 7px!important;
  display:grid!important;
  align-content:center!important;
  gap:2px!important;
  background:#fff!important;
}

body:has(.enterprise-documents-page) .enterprise-document-context span,
body:has(.enterprise-documents-page) .enterprise-document-archive-context span{
  color:#68777d!important;
  font-size:11px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-context b,
body:has(.enterprise-documents-page) .enterprise-document-archive-context b{
  color:var(--ge-doc-wf-text)!important;
  font-size:12px!important;
}

/* Flat Workforce sections */
body:has(.enterprise-documents-page) .enterprise-document-fieldset{
  display:grid!important;
  gap:8px!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-section{
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #aac9d7!important;
  background:#fff!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-section > .form-section-title{
  min-height:34px!important;
  margin:0!important;
  padding:7px 12px!important;
  display:flex!important;
  align-items:center!important;
  color:#075f8c!important;
  background:#e9f5fa!important;
  border:0!important;
  border-bottom:1px solid #aac9d7!important;
  font-size:14px!important;
  line-height:1.25!important;
  font-weight:800!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px 10px!important;
  align-items:end!important;
  width:100%!important;
  padding:10px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-grid > label{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:4px!important;
  min-width:0!important;
  margin:0!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-grid > label.full{
  grid-column:1 / -1!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-grid > label > span,
body:has(.enterprise-documents-page) .enterprise-document-archive-form label > span,
body:has(.enterprise-documents-page) .enterprise-document-upload-row label > span{
  width:100%!important;
  min-width:0!important;
  color:var(--ge-doc-wf-text)!important;
  text-align:right!important;
  white-space:normal!important;
  font-size:12px!important;
  line-height:1.25!important;
  font-weight:700!important;
}

/* Workforce cyan working fields */
body:has(.enterprise-documents-page) .enterprise-document-form-grid input:not([type=checkbox]):not([type=radio]),
body:has(.enterprise-documents-page) .enterprise-document-form-grid select,
body:has(.enterprise-documents-page) .enterprise-document-form-grid textarea,
body:has(.enterprise-documents-page) .enterprise-document-archive-form input:not([type=checkbox]):not([type=radio]),
body:has(.enterprise-documents-page) .enterprise-document-archive-form select,
body:has(.enterprise-documents-page) .enterprise-document-archive-form textarea,
body:has(.enterprise-documents-page) .enterprise-document-upload-row input:not([type=file]),
body:has(.enterprise-documents-page) .enterprise-document-upload-row select{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:4px 7px!important;
  border:1px solid #6d7a82!important;
  border-radius:0!important;
  background:var(--ge-doc-wf-cyan)!important;
  color:var(--ge-doc-wf-text)!important;
  font-family:Tahoma,Arial,sans-serif!important;
  font-size:12px!important;
  box-shadow:none!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-grid input:not([type=checkbox]):not([type=radio]),
body:has(.enterprise-documents-page) .enterprise-document-form-grid select,
body:has(.enterprise-documents-page) .enterprise-document-archive-form input,
body:has(.enterprise-documents-page) .enterprise-document-archive-form select,
body:has(.enterprise-documents-page) .enterprise-document-upload-row input:not([type=file]),
body:has(.enterprise-documents-page) .enterprise-document-upload-row select{
  height:34px!important;
  min-height:34px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-grid textarea,
body:has(.enterprise-documents-page) .enterprise-document-archive-form textarea{
  min-height:80px!important;
  height:80px!important;
  max-height:none!important;
  resize:vertical!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-grid input:focus,
body:has(.enterprise-documents-page) .enterprise-document-form-grid select:focus,
body:has(.enterprise-documents-page) .enterprise-document-form-grid textarea:focus,
body:has(.enterprise-documents-page) .enterprise-document-archive-form input:focus,
body:has(.enterprise-documents-page) .enterprise-document-archive-form select:focus,
body:has(.enterprise-documents-page) .enterprise-document-archive-form textarea:focus,
body:has(.enterprise-documents-page) .enterprise-document-upload-row input:focus,
body:has(.enterprise-documents-page) .enterprise-document-upload-row select:focus{
  background:#d9f6f7!important;
  outline:1px solid #3b8e9c!important;
  outline-offset:0!important;
}

/* Read-only detail mode remains visibly read-only, matching Workforce disabled fields. */
body:has(.enterprise-documents-page) .enterprise-document-form fieldset:disabled input,
body:has(.enterprise-documents-page) .enterprise-document-form fieldset:disabled select,
body:has(.enterprise-documents-page) .enterprise-document-form fieldset:disabled textarea{
  opacity:1!important;
  color:#25363d!important;
  background:#f1f1f1!important;
}

/* Attachments and revisions use the Workforce flat panel/table language. */
body:has(.enterprise-documents-page) .enterprise-document-attachments,
body:has(.enterprise-documents-page) .enterprise-document-versions{
  min-height:0!important;
  margin:0!important;
  border:1px solid #777!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

body:has(.enterprise-documents-page) .enterprise-document-attachments > header,
body:has(.enterprise-documents-page) .enterprise-document-versions > header{
  min-height:34px!important;
  padding:6px 9px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  background:#e9f5fa!important;
  border:0!important;
  border-bottom:1px solid #aac9d7!important;
}

body:has(.enterprise-documents-page) .enterprise-document-attachments h3,
body:has(.enterprise-documents-page) .enterprise-document-versions h3{
  margin:0!important;
  color:#075f8c!important;
  font-size:14px!important;
  font-weight:800!important;
}

body:has(.enterprise-documents-page) .enterprise-document-attachment-list > div{
  min-height:42px!important;
  padding:6px 8px!important;
  border-bottom:1px solid #ddd!important;
  background:#fff!important;
}

body:has(.enterprise-documents-page) .enterprise-document-attachment-list > div:nth-child(even){
  background:#f5f5f5!important;
}

body:has(.enterprise-documents-page) .enterprise-document-attachment-list b{
  font-size:12px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-attachment-list small{
  color:#68777d!important;
  font-size:10px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-upload-row{
  display:grid!important;
  grid-template-columns:155px minmax(220px,1fr) minmax(180px,1fr) auto!important;
  gap:8px 10px!important;
  align-items:end!important;
  padding:9px!important;
  background:#f7f7f7!important;
  border-top:1px solid #ccc!important;
}

body:has(.enterprise-documents-page) .enterprise-document-upload-row label{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
}

body:has(.enterprise-documents-page) .enterprise-document-upload-row input[type=file]{
  width:100%!important;
  min-width:0!important;
  min-height:34px!important;
  padding:4px!important;
  border:1px solid #6d7a82!important;
  border-radius:0!important;
  background:#fff!important;
  color:var(--ge-doc-wf-text)!important;
  font-size:12px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-upload-row > button,
body:has(.enterprise-documents-page) .enterprise-document-attachment-list button{
  min-height:34px!important;
  height:34px!important;
  padding:0 12px!important;
  border-radius:0!important;
  font-size:12px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

body:has(.enterprise-documents-page) .enterprise-document-versions .table-scroll{
  max-height:190px!important;
  overflow:auto!important;
  scrollbar-gutter:stable!important;
}

body:has(.enterprise-documents-page) .enterprise-document-versions .data-table{
  width:100%!important;
  min-width:650px!important;
  border-collapse:collapse!important;
}

body:has(.enterprise-documents-page) .enterprise-document-versions .data-table th,
body:has(.enterprise-documents-page) .enterprise-document-versions .data-table td{
  padding:6px 7px!important;
  border:1px solid #999!important;
  font-size:12px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-versions .data-table th{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  background:#727272!important;
  color:#fff!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* The action row visually becomes the Workforce modal footer without moving handlers. */
body:has(.enterprise-documents-page) .enterprise-document-form-actions,
body:has(.enterprise-documents-page) .enterprise-document-archive-form .modal-actions{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:9px!important;
  margin:0 -14px -14px!important;
  padding:12px 14px!important;
  position:sticky!important;
  bottom:-14px!important;
  z-index:5!important;
  background:#fff!important;
  border-top:1px solid #ccc!important;
  box-shadow:none!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-actions > button,
body:has(.enterprise-documents-page) .enterprise-document-archive-form .modal-actions > button{
  min-width:120px!important;
  min-height:34px!important;
  height:34px!important;
  margin:0!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:0!important;
  font-size:12px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-actions .secondary-button,
body:has(.enterprise-documents-page) .enterprise-document-archive-form .modal-actions .secondary-button{
  color:var(--ge-doc-wf-text)!important;
  background:#fff!important;
  border:1px solid #777!important;
}

body:has(.enterprise-documents-page) .enterprise-document-form-actions .primary-button,
body:has(.enterprise-documents-page) .enterprise-document-archive-form .modal-actions .primary-button{
  color:#fff!important;
  background:var(--ge-doc-wf-blue)!important;
  border:1px solid #075272!important;
}

/* Archive popup fields */
body:has(.enterprise-documents-page) .enterprise-document-archive-form{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-archive-form > label{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
}

body:has(.enterprise-documents-page) .enterprise-document-archive-form .form-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px 10px!important;
}

body:has(.enterprise-documents-page) .enterprise-document-archive-form .form-grid > label{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
}

/* Keep enterprise document toast legible above the managed popup. */
.enterprise-documents-toast{
  font-size:12px!important;
}

/* ---------- Responsive parity ---------- */
@media(max-width:1180px){
  .enterprise-documents-page .enterprise-documents-filterbar{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }

  body:has(.enterprise-documents-page) .enterprise-document-form-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  body:has(.enterprise-documents-page) .enterprise-document-upload-row{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body:has(.enterprise-documents-page) .enterprise-document-upload-row > button{
    width:100%!important;
  }
}

@media(max-width:900px){
  .enterprise-documents-page .enterprise-documents-filterbar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body:has(.enterprise-documents-page) .enterprise-document-form-grid,
  body:has(.enterprise-documents-page) .enterprise-document-archive-form .form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:760px){
  .enterprise-documents-page .enterprise-documents-toolbar{
    grid-template-columns:1fr!important;
  }

  .enterprise-documents-page .enterprise-documents-toolbar .toolbar-actions{
    justify-content:flex-start!important;
  }

  .enterprise-documents-page .enterprise-documents-toolbar > .secondary-button{
    justify-self:stretch!important;
    width:100%!important;
  }

  .enterprise-documents-page .enterprise-documents-register .table-controls{
    flex-wrap:wrap!important;
  }

  .enterprise-documents-page .enterprise-documents-register .table-search{
    flex:1 1 100%!important;
    max-width:none!important;
  }

  body:has(.enterprise-documents-page) .enterprise-document-context,
  body:has(.enterprise-documents-page) .enterprise-document-archive-context{
    grid-template-columns:1fr!important;
  }

  body:has(.enterprise-documents-page) .enterprise-document-upload-row{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:620px){
  .enterprise-documents-page .enterprise-documents-filterbar,
  body:has(.enterprise-documents-page) .enterprise-document-form-grid,
  body:has(.enterprise-documents-page) .enterprise-document-archive-form .form-grid{
    grid-template-columns:1fr!important;
  }

  body:has(.enterprise-documents-page) .enterprise-document-form-grid > label.full{
    grid-column:auto!important;
  }
}

/* Do not alter the document print sheet. */
@media print{
  .enterprise-documents-page .enterprise-documents-toolbar,
  .enterprise-documents-page .enterprise-documents-filterbar{
    display:none!important;
  }
}
