.documents-panel { padding:0; overflow:hidden; border:1px solid #dfe7df; border-radius:18px; background:#fff; }
.documents-page-heading { display:flex; justify-content:space-between; align-items:start; gap:24px; padding:28px 32px 24px; }
.documents-page-heading h2 { margin:7px 0 12px; font-size:25px; }
.documents-page-heading p { margin:0 0 10px; color:#687e70; line-height:1.9; }
.documents-page-heading small { color:#829085; font-size:11px; line-height:1.8; }
.documents-heading-actions { flex:none; padding-top:15px; }
.documents-heading-actions button { min-height:44px; padding:10px 22px; background:#306e4e; color:#fff; border:1px solid #306e4e; border-radius:9px; font:inherit; font-size:14px; }
.documents-tabs { display:flex; gap:7px; padding:0 26px; border-bottom:1px solid #e0e7df; overflow-x:auto; }
.documents-tabs button { flex:none; margin:0; border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; padding:15px 18px; font:inherit; font-size:14px; color:#718373; white-space:nowrap; }
.documents-tabs button[aria-selected="true"] { color:#2d654b; border-bottom-color:#418464; }
.documents-body { padding:26px 32px 32px; }
.documents-filters { display:grid; grid-template-columns:2fr 1fr 1fr; gap:16px 20px; margin-bottom:26px; padding:18px 20px; background:#f6f9f3; border:1px solid #e5eadf; border-radius:12px; }
.documents-filters.is-compact { grid-template-columns:2fr 1fr; }
.documents-filters label { display:grid; gap:8px; min-width:0; color:#60785f; font-size:12px; }
.documents-filters input,.documents-filters select { width:100%; min-width:0; min-height:44px; padding:9px 12px; margin:0; border:1px solid #d4dfce; border-radius:8px; background:#fff; color:#315538; font:inherit; font-size:14px; }
.documents-record-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:start; }
.documents-record-card { min-width:0; padding:23px; margin:0; border:1px solid #dfe7d9; border-radius:12px; background:#fff; color:#3e6146; font-size:14px; line-height:1.9; overflow-wrap:anywhere; }
.documents-record-card[data-selected-record="true"] { border-color:#87b29b; box-shadow:0 0 0 2px #e2eee5; }
.documents-record-card > header { display:flex; justify-content:space-between; align-items:start; gap:15px; margin-bottom:20px; }
.documents-card-type { display:block; margin-bottom:6px; color:#85917c; font-size:11px; }
.documents-record-card h3 { margin:0; color:#315b3c; font-size:17px; font-weight:550; line-height:1.9; }
.documents-record-card a { color:#3d7153; text-decoration:none; }
.documents-record-card a:hover { text-decoration:underline; text-underline-offset:4px; }
.documents-badge { display:inline-flex; flex:none; align-items:center; justify-content:center; padding:4px 10px; border:1px solid #d8e6d2; border-radius:999px; background:#f1f7ed; color:#527742; font-size:11px; line-height:1.7; }
.documents-badge.is-muted { border-color:#e0e5dc; background:#f7f9f4; color:#7d8775; }
.documents-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px 20px; margin:0 0 19px; }
.documents-facts > div { min-width:0; }
.documents-facts dt { color:#84917b; font-size:11px; }
.documents-facts dd { margin:3px 0 0; color:#4a6946; font-size:13px; }
.documents-note { margin:14px 0; color:#5e7659; white-space:pre-line; line-height:2; }
.documents-meta { margin:12px 0; color:#819077; font-size:12px; line-height:1.9; }
.documents-tags { display:flex; flex-wrap:wrap; gap:7px; margin:16px 0; }
.documents-tags > span { padding:3px 9px; border-radius:6px; background:#f4f6f0; color:#748369; font-size:11px; }
.documents-relations { display:grid; gap:9px; margin:19px 0; padding-top:17px; border-top:1px solid #edf0e9; }
.documents-relations > span { color:#829075; font-size:11px; }
.documents-relations > div { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:12px; }
.documents-card-actions { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-top:22px; }
.documents-card-actions:empty { display:none; }
.documents-card-actions button,.documents-storage button { min-height:39px; margin:0; padding:8px 13px; border:1px solid #d1deca; border-radius:8px; background:#fff; color:#527448; font:inherit; font-size:12px; line-height:1.7; }
.documents-card-actions .documents-quiet-button { border-color:transparent; color:#819077; }
.documents-card-actions > a { padding:8px 3px; font-size:12px; }
.documents-details { margin-top:20px; padding-top:14px; border-top:1px solid #e8ede3; font-size:12px; color:#7a8c70; }
.documents-details summary { cursor:pointer; color:#718764; }
.documents-details ul { display:grid; gap:9px; padding:0; margin:14px 0 0; list-style:none; }
.documents-details li { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px 16px; }
.documents-details time { color:#8b9783; font-size:11px; }
.documents-record-code { display:block; margin-top:13px; color:#9aa391; font-size:10px; }
.documents-checksum { display:block; direction:ltr; text-align:left; overflow-wrap:anywhere; padding:10px; background:#f6f8f2; border-radius:6px; font-size:10px; }
.documents-file-summary { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:15px; border:1px solid #e3eadb; border-radius:9px; background:#f8faf4; }
.documents-file-summary strong { min-width:0; font-weight:500; font-size:13px; }
.documents-file-summary span { flex:none; color:#809176; font-size:12px; }
.documents-storage { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px; padding:20px 23px; margin-bottom:24px; border:1px solid #e0e8d9; border-radius:11px; background:#fafcf7; }
.documents-storage > div { display:grid; gap:9px; }
.documents-storage span { color:#819176; font-size:12px; }
.documents-storage strong { color:#315e41; font-size:20px; font-weight:550; }
.documents-storage small { color:#819176; font-size:12px; font-weight:400; }
.documents-section-note { margin:0 0 23px; color:#76896e; font-size:13px; line-height:2; }
.documents-empty { display:grid; justify-items:center; gap:10px; padding:48px 22px; border:1px dashed #dce5d5; border-radius:12px; background:#fafcf7; text-align:center; }
.documents-empty strong { color:#6c8360; font-size:16px; font-weight:500; }
.documents-empty p { max-width:500px; margin:0; color:#8a9780; font-size:13px; line-height:2; }
dialog.documents-dialog { width:min(850px,calc(100vw - 32px)); padding:0; border:1px solid #dce5d7; border-radius:18px; color:#34583b; background:#fff; overflow:hidden; }
.documents-dialog form { display:flex; flex-direction:column; max-height:calc(100dvh - 34px); margin:0; gap:0; }
.documents-dialog header { flex:none; padding:25px 30px 23px; border-bottom:1px solid #e1e8db; background:#fafcf7; }
.documents-dialog h2 { margin:0 0 10px; font-size:23px; }
.documents-dialog header p { margin:0; font-size:14px; line-height:1.9; color:#73876a; }
.documents-dialog header small { display:block; margin-top:10px; color:#829085; font-size:11px; line-height:1.8; }
.documents-form-body { min-height:0; overflow-y:auto; overflow-x:hidden; padding:26px 30px; }
.documents-dialog .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:23px 25px; align-items:start; }
.documents-dialog .form-full { grid-column:1/-1; }
.documents-dialog label { display:grid; gap:9px; align-self:start; font-size:14px; color:#4f704c; min-width:0; }
.documents-dialog input,.documents-dialog select,.documents-dialog textarea { width:100%; min-width:0; min-height:46px; margin:0; padding:11px 13px; border:1px solid #cbdcc3; border-radius:9px; background:#fbfdf9; color:#315538; font:inherit; font-size:15px; line-height:1.7; }
.documents-dialog textarea { min-height:92px; resize:vertical; }
.documents-dialog label small { font-size:11px; line-height:1.8; color:#819276; }
.documents-dialog input[type="file"] { padding:13px; background:#fff; font-size:13px; }
.documents-dialog .documents-upload { padding:20px; border:1px dashed #bfcfb5; border-radius:10px; background:#f8fbf4; }
.documents-dialog .dialog-actions { flex:none; display:flex; justify-content:flex-start; flex-direction:row-reverse; gap:12px; padding:20px 30px; margin:0; border-top:1px solid #e0e8d9; background:#fff; }
.documents-dialog .dialog-actions button { flex:0 1 180px; min-height:46px; margin:0; border-radius:9px; font:inherit; font-size:14px; padding:10px 18px; line-height:1.75; }
.documents-dialog .dialog-actions button[type="submit"] { background:#306e4e; color:#fff; border:1px solid #306e4e; }
.documents-dialog .dialog-actions button[type="button"] { background:#fff; color:#527448; border:1px solid #cbdcc3; }
.documents-relations-editor { min-width:0; margin:0; padding:17px 18px; border:1px solid #dce5d4; border-radius:11px; }
.documents-relations-editor legend { padding:0 7px; color:#55764a; font-size:14px; }
.documents-relations-editor legend small { margin-inline-start:6px; color:#95a18b; font-size:11px; }
.documents-relations-editor > p { margin:0 0 14px; color:#819276; font-size:12px; line-height:1.9; }
.documents-existing-relations { display:grid; gap:9px; margin-bottom:16px; }
.documents-relations-editor details { border-top:1px solid #e5ecdd; padding-top:13px; }
.documents-relations-editor summary { cursor:pointer; color:#56784a; font-size:12px; }
.documents-relation-options { display:grid; gap:9px; max-height:240px; overflow:auto; margin-top:15px; padding-inline-end:5px; }
.documents-dialog .documents-relation-choice { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid #e3eadb; border-radius:8px; background:#f9fbf6; cursor:pointer; }
.documents-dialog .documents-relation-choice input { flex:none; width:17px; min-width:17px; height:17px; min-height:17px; margin:0; padding:0; accent-color:#36784f; }
.documents-relation-choice > span { display:grid; gap:3px; min-width:0; }
.documents-relation-choice strong { font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.documents-dialog :is(input,select,textarea,button):focus-visible,.documents-panel :is(input,select,button,a,summary):focus-visible { outline:2px solid #6c9a79; outline-offset:3px; }
@media(max-width:1000px) { .documents-record-list { grid-template-columns:1fr; } .documents-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .documents-search { grid-column:1/-1; } }
@media(max-width:680px) {
  .documents-page-heading { flex-direction:column; padding:22px 18px; gap:16px; }
  .documents-heading-actions { width:100%; padding-top:0; }
  .documents-heading-actions button { width:100%; }
  .documents-tabs { padding:0 13px; gap:0; }
  .documents-tabs button { padding:14px; font-size:13px; }
  .documents-body { padding:21px 18px; }
  .documents-filters,.documents-filters.is-compact { grid-template-columns:1fr; padding:15px; }
  .documents-record-card { padding:19px; }
  .documents-card-actions button { flex:1 1 auto; }
  .documents-dialog header,.documents-form-body { padding:22px 20px; }
  .documents-dialog .form-grid { grid-template-columns:1fr; gap:20px; }
  .documents-dialog .dialog-actions { padding:17px 20px; }
  .documents-dialog .dialog-actions button { flex:1 1 0; }
  .documents-storage { padding:18px; }
  .documents-facts { gap:16px; }
}
@media print { .documents-heading-actions,.documents-tabs,.documents-filters,.documents-card-actions { display:none!important; } .documents-record-card { break-inside:avoid; } }
