#documents .main{min-width:0}
#documents [hidden]{display:none!important}
.documents-library-tabs{display:flex;gap:4px;flex-wrap:wrap;padding:4px;background:#e7eff8;border-radius:12px;width:fit-content;margin-bottom:24px}
.documents-library-tabs button{min-height:44px;padding:10px 18px;background:transparent;border:0;border-radius:9px;color:#405b78;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.documents-library-tabs button[aria-selected="true"]{background:#246ac0;color:#fff;box-shadow:0 2px 5px #10223914}
.documents-library-tabs button:focus-visible{outline:3px solid #246ac0;outline-offset:3px}
#documents .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.mt-intro{max-width:780px;color:var(--muted,#52677e);line-height:1.65;margin:0 0 24px}
.mt-toolbar{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:16px;padding:20px;background:#fff;border:1px solid var(--border,#d4e0ea);border-radius:16px}
.mt-toolbar label{display:grid;gap:8px;font-size:13px;font-weight:600;color:var(--navy,#102239)}
.mt-toolbar input,.mt-toolbar select{width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--border,#d4e0ea);border-radius:8px;background:#fff;color:var(--navy,#102239);font:inherit}
.mt-toolbar :focus-visible,.mt-actions button:focus-visible{outline:3px solid #246ac0;outline-offset:3px}
.mt-library-meta{display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap;color:var(--muted,#52677e);font-size:13px;margin-top:12px}
.mt-library-meta p{margin:4px 0}
.mt-status{min-height:24px;color:#174d84;margin:8px 0 16px;font-size:14px}
.mt-error{color:#a12121}
.mt-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:18px}
.mt-card{display:flex;flex-direction:column;min-width:0;padding:24px;border:1px solid var(--border,#d4e0ea);border-radius:16px;background:#fff;box-shadow:0 3px 14px #10223905}
.mt-category{font-size:12px;font-weight:600;color:#246ac0;margin-bottom:12px}
.mt-card h2{font-size:20px;line-height:1.3;margin:0 0 10px;color:var(--navy,#102239);overflow-wrap:anywhere}
.mt-card>p{font-size:14px;line-height:1.6;margin:0 0 20px;color:var(--muted,#52677e)}
.mt-meta{margin-top:auto;font-size:12px;color:var(--muted,#52677e);padding-bottom:16px}
.mt-actions{display:block}
.document-actions{display:block;max-width:100%;width:220px;text-align:left;white-space:normal}
.document-actions>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;width:fit-content;max-width:100%;min-height:44px;padding:10px 16px;border:1px solid #c7d9ed;border-radius:10px;background:#e7f0fa;color:#174d84;font-family:inherit;font-weight:600;font-size:14px;line-height:1.4;cursor:pointer;box-sizing:border-box}
.document-actions>summary::-webkit-details-marker{display:none}
.document-actions>summary:hover,.document-actions[open]>summary{background:#dceafa;border-color:#246ac0}
.document-actions[open]>summary span{transform:rotate(180deg)}
.document-actions-panel{margin-top:6px;padding:6px;border:1px solid #d4e0ea;border-radius:12px;background:#fff;box-shadow:0 5px 18px #10223912;max-width:100%;box-sizing:border-box}
.document-actions:not([open])>.document-actions-panel{display:none}
.document-actions .document-actions-panel button{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;margin:0;padding:10px 12px;border-radius:7px;border:0;background:transparent!important;color:#174d84!important;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.4;box-shadow:none}
.document-actions .document-actions-panel button:hover{background:#edf4fc!important}
.document-actions .document-actions-panel button[data-action="delete-doc"]{color:#a12121!important;border-top:1px solid #e6edf4;border-radius:0 0 7px 7px}
.document-actions :focus-visible{outline:3px solid #246ac0;outline-offset:2px}
#docDetailModal .document-actions{width:100%}
.docs-table .col-actions{vertical-align:top}
#documents .mt-actions .btn-primary{background:#246ac0;border-color:#246ac0;color:#fff}
#documents .mt-actions .btn-primary:hover{background:#1c559b;border-color:#1c559b}
.mt-empty{padding:24px;background:white;border-radius:12px;grid-column:1/-1}
@media(max-width:600px){.mt-toolbar{grid-template-columns:1fr;padding:16px}.mt-card{padding:20px}.mt-library-meta{gap:4px}}
.mt-preview{margin:auto;inset:0;padding:0;border:1px solid #d4e0ea;border-radius:16px;width:calc(100vw - 48px);max-width:1200px;height:calc(100dvh - 48px);max-height:none;color:#102239;background:#eef3f8;overflow:hidden;box-sizing:border-box}
.mt-preview[open]{display:flex;flex-direction:column}.mt-preview::backdrop{background:#102239aa}
.mt-preview-header{display:flex;align-items:center;gap:20px;padding:16px 20px;background:#102239;color:#fff;border-bottom:3px solid #45b6de;flex-shrink:0}
.mt-preview-header>div{flex:1;min-width:0}.mt-preview-header h2{margin:0;font-size:18px;line-height:1.35;overflow-wrap:anywhere;color:#fff}.mt-preview-header p{margin:4px 0 0;font-size:12px;color:#d0e3f7}
.mt-preview button{font:inherit;cursor:pointer;min-height:44px;border-radius:10px;padding:10px 16px;font-size:14px;font-weight:600}
.mt-preview-close{background:#eef6ff;border:1px solid #79bcea;color:#174d84;white-space:nowrap}.mt-preview-zoom{background:#1d426b;border:1px solid #547ba5;color:#fff;white-space:nowrap}
.mt-preview button:focus-visible{outline:3px solid #45b6de;outline-offset:3px}
.mt-preview-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 24px 32px}
.mt-preview-status{font-size:13px;color:#52677e;margin:0 auto 16px;max-width:980px}.mt-preview-pages{max-width:980px;margin:auto}
.mt-preview figure{margin:0 0 24px}.mt-preview figcaption{font-size:12px;color:#52677e;margin:0 0 8px}
.mt-preview img{display:block;width:100%;height:auto;background:#fff;box-shadow:0 2px 12px #10223916}
.mt-preview-enlarged .mt-preview-pages{width:1500px;max-width:none;margin:0}
.mt-preview-retry{background:#246ac0;border:0;color:white;margin-bottom:16px}
@media(max-width:600px){.mt-preview{width:100vw;height:100dvh;max-width:none;margin:0;border:0;border-radius:0}.mt-preview-header{padding:12px;gap:10px;flex-wrap:wrap}.mt-preview-header>div{flex-basis:calc(100% - 110px)}.mt-preview-header h2{font-size:16px}.mt-preview-zoom{margin-left:auto}.mt-preview-body{padding:12px 12px 28px}}
