/* Final documents hotfix. Loaded after bundled page styles. */
.documents-page{max-width:1600px;overflow-x:clip}
.documents-layout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,320px)!important;gap:22px!important;align-items:start!important}
.documents-main,.documents-side,.document-upload-card,.document-filter-panel,.document-list-card{min-width:0}
.documents-side{position:static!important;width:auto!important;max-width:none!important;align-self:start!important}
.document-filter-panel{grid-template-columns:minmax(220px,1.35fr) repeat(3,minmax(150px,.8fr)) auto!important}
.document-table{width:100%;min-width:0;overflow:visible}
.document-table-head,.document-row{grid-template-columns:minmax(220px,1.45fr) minmax(104px,.72fr) minmax(92px,.58fr) minmax(108px,.64fr) minmax(90px,.48fr) minmax(64px,.36fr) minmax(86px,.48fr) 112px!important;gap:10px!important}
.document-table-head>*,
.document-row>*{min-width:0}
.document-name-cell{min-width:0}
.document-name-cell div{min-width:0}
.document-name-cell b,
.document-name-cell small{display:block;overflow:hidden;text-overflow:ellipsis}
.document-row-actions{justify-content:flex-end;min-width:112px}
.document-row-actions button{flex:0 0 34px}
.document-list-card{overflow:hidden}
.document-full-preview{align-items:stretch!important;justify-items:stretch!important;place-items:stretch!important;min-height:68vh;padding:0}
.document-preview-shell{width:100%;min-height:68vh;display:grid;grid-template-rows:minmax(0,1fr) auto;background:#f8fbfd}
.document-preview-frame{width:100%;min-height:68vh;height:72vh;border:0;background:#fff}
.document-preview-image{width:100%;max-width:100%;height:68vh;object-fit:contain;background:#fff}
.document-preview-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;padding:12px 14px;border-top:1px solid var(--line);background:rgba(255,255,255,.92)}
.document-preview-empty{width:min(520px,calc(100% - 36px));align-self:center;justify-self:center;display:grid;gap:10px;text-align:center;padding:22px;border:1px dashed rgba(113,128,154,.34);border-radius:18px;background:rgba(255,255,255,.78);color:var(--text)}
.document-preview-empty p{margin:0;color:var(--muted);line-height:1.45}
.document-preview-empty div{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.document-center-field{display:grid;gap:8px;align-self:start}
.document-center-field>b{font-size:11px;color:var(--text)}
.document-center-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.document-center-checks .check-row{min-height:42px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.58)}
dialog.document-upload-dialog{width:min(920px,calc(100vw - 32px));max-height:min(88vh,860px);overflow:hidden}
dialog.document-upload-dialog .document-upload-form{max-height:min(88vh,860px)}
.document-edit-form{padding:0!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;background:var(--panel)}
.document-edit-form .document-upload-modal-body{overflow:auto}
.document-edit-form textarea{min-height:92px}
[data-theme="dark"] .document-center-checks .check-row{background:rgba(28,42,60,.58)}
[data-theme="dark"] .document-preview-shell,[data-theme="dark"] .document-preview-image{background:#0f1b2a}
[data-theme="dark"] .document-preview-actions{background:rgba(18,30,45,.92)}
[data-theme="dark"] .document-preview-empty{background:rgba(28,42,60,.72)}
@media (max-width:1240px){.documents-layout{grid-template-columns:1fr!important}.documents-side{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:980px){.documents-side{grid-template-columns:1fr!important}.document-filter-panel{grid-template-columns:repeat(2,minmax(0,1fr))!important}.document-filter-panel label:first-child,.document-filter-panel button{grid-column:1/-1}}
@media (max-width:720px){.document-filter-panel{grid-template-columns:1fr!important}.document-center-checks{grid-template-columns:1fr}.document-preview-shell,.document-preview-frame,.document-preview-image{min-height:60vh;height:60vh}.document-preview-actions{justify-content:stretch}.document-preview-actions button{flex:1 1 150px}}
