.document-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; padding:22px 26px; margin-bottom:18px; border-top:3px solid #1a9992; }
.document-overview>div { display:grid; gap:6px; }
.document-overview strong { font-size:24px; color:#174c55; }
.document-storage-note { grid-column:1/-1; margin:0; font-size:13px; color:#63757b; }
.document-upload-panel { margin-bottom:18px; padding:18px 24px; }
.document-upload-panel>summary { font-weight:700; cursor:pointer; }
.document-drop-zone { margin-top:18px; border:1px dashed #84bebc; border-radius:12px; background:#f5faf9; min-height:118px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:16px; text-align:center; }
.document-drop-zone.is-dragging { background:#e0f5f0; border-color:#158d83; }
.document-drop-zone span { color:#61777d; font-size:13px; }
.document-drop-zone input { max-width:100%; font-size:13px; padding:5px; border:0; background:transparent; }
.document-upload-fields { display:grid; grid-template-columns:1fr 2fr auto; gap:14px; align-items:end; margin-top:16px; }
.document-upload-fields label,.document-filters label { display:grid; gap:7px; font-size:13px; color:#425b63; font-weight:600; }
#document-upload-progress { width:100%; accent-color:#15978a; height:12px; margin-top:15px; }
.document-browser { padding:22px 24px; }
.document-filters { display:flex; gap:16px; align-items:end; flex-wrap:wrap; margin-bottom:18px; }
.document-search { flex:1; min-width:200px; }
.document-filters select { min-width:160px; }
.document-tabs { display:flex; gap:6px; }
.document-tabs button.active { background:#e0f0ed; border-color:#268f83; color:#176b63; }
.document-list { display:grid; gap:10px; }
.document-row { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:16px; align-items:center; border:1px solid #e1eaeb; border-radius:11px; padding:16px; background:#fff; }
.document-type { width:46px; height:48px; border-radius:9px; background:#e7f3f1; color:#2b7772; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; overflow:hidden; }
.document-info { min-width:0; }
.document-name { font-weight:700; font-size:15px; overflow-wrap:anywhere; color:#173e47; }
.document-meta { display:flex; flex-wrap:wrap; gap:8px; font-size:12px; color:#6c8188; margin-top:6px; }
.document-category-badge { color:#26786d; background:#eef8f4; padding:1px 7px; border-radius:5px; }
.document-notes { font-size:13px; margin-top:8px; color:#566d73; overflow-wrap:anywhere; white-space:pre-wrap; }
.document-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.document-actions button { padding:7px 10px; font-size:12px; min-height:32px; }
.document-empty { text-align:center; padding:48px 20px; color:#71848a; border:1px dashed #d4e4e2; border-radius:12px; }
.document-pagination { display:flex; justify-content:center; align-items:center; gap:20px; margin-top:22px; font-size:13px; }
.document-dialog { width:min(1100px,94vw); max-height:90dvh; border:1px solid #c5dcd9; border-radius:16px; padding:0; background:#fff; color:#193e46; box-shadow:0 30px 90px #102f4f44; }
.document-dialog::backdrop { background:#112b3c99; backdrop-filter:blur(3px); }
.document-dialog-header { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid #dce8e6; position:sticky; top:0; background:#f7fbfa; z-index:1; }
.document-dialog-header h2 { font-size:18px; margin:0; overflow-wrap:anywhere; }
.document-dialog-header button { padding:7px 12px; }
.document-preview-body { padding:22px; max-height:70dvh; overflow:auto; min-height:160px; }
.document-preview-body img { display:block; max-width:100%; max-height:64dvh; margin:auto; object-fit:contain; }
.document-preview-body iframe { display:block; width:100%; height:63dvh; border:0; background:#eef2f3; }
.document-preview-body video { display:block; max-width:100%; max-height:64dvh; margin:auto; }
.document-preview-body audio { display:block; width:100%; margin:30px auto; }
.document-preview-body pre { white-space:pre-wrap; overflow-wrap:anywhere; font-family:ui-monospace,monospace; font-size:13px; line-height:1.7; padding:16px; background:#f6f9f9; border-radius:9px; margin:0; }
.document-sheet { margin:0 0 24px; }
.document-sheet h3 { font-size:15px; }
.document-sheet-scroll { overflow:auto; }
.document-sheet table { border-collapse:collapse; font-size:12px; width:max-content; min-width:100%; }
.document-sheet td { border:1px solid #d9e4e6; padding:7px 9px; max-width:280px; overflow-wrap:anywhere; white-space:pre-wrap; }
.document-preview-note { color:#667d83; font-size:13px; padding:12px 0; }
.document-edit-form { padding:22px; display:grid; gap:15px; }
.document-edit-form label { display:grid; gap:7px; font-size:13px; font-weight:600; }
.document-edit-form textarea { min-height:110px; }
@media(max-width:700px) {
  .document-overview { padding:18px; gap:15px; grid-template-columns:1fr 1fr; }
  .document-overview strong { font-size:19px; }
  .document-upload-panel,.document-browser { padding:16px; }
  .document-upload-fields { grid-template-columns:1fr; }
  .document-row { grid-template-columns:38px minmax(0,1fr); gap:11px; padding:13px; }
  .document-type { width:36px; height:40px; }
  .document-actions { grid-column:1/-1; justify-content:flex-start; padding-left:47px; }
  .document-filters { gap:12px; }
  .document-filters label { width:100%; }
  .document-dialog-header { padding:15px; }
  .document-preview-body { padding:12px; }
}
.document-lock-panel { max-width:620px; margin:40px auto; padding:35px; text-align:center; border-top:3px solid #238e86; }
.document-lock-mark { font-size:36px; margin-bottom:16px; }
.document-lock-panel h2 { font-size:23px; }
.document-lock-panel form { display:grid; gap:16px; max-width:360px; margin:25px auto; text-align:left; }
.document-lock-panel label { display:grid; gap:8px; font-size:13px; font-weight:600; }
.document-pdf-controls { display:flex; align-items:center; justify-content:center; gap:18px; margin-bottom:18px; }
.document-pdf-canvas { display:block; max-width:100%; margin:0 auto; box-shadow:0 4px 18px #19374720; }
#documents-view .ghost,.document-dialog .ghost { color:#315f69 !important; background:#f5fafb !important; border:1px solid #cadde0 !important; }
#documents-view .ghost:hover,.document-dialog .ghost:hover { background:#e6f3f0 !important; color:#185c57 !important; }
body:has(#documents-view.active-view):has(#document-lock-panel:not(.hidden)) #payx-ai-assistant { visibility:hidden; pointer-events:none; }
