#documents{min-width:0;overflow-anchor:none}
#documents .documents-main-filters{display:grid;grid-template-columns:minmax(0,1fr) 240px auto;align-items:end;gap:14px}
#documents .documents-main-filters>label{min-width:0}
#documents .documents-main-filters input,#documents .documents-main-filters select{width:100%;max-width:none;min-width:0;font-size:14px}
#documents .documents-main-filters>button{font-size:13px;min-height:43px;white-space:nowrap}
#documents .register-shortcut{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:18px 20px}
#documents .register-shortcut small{font-size:13px;line-height:1.4}
#documents .register-shortcut>span{font-size:12px;line-height:1.5}
#documents .documents-summary>.register-shortcut{cursor:default;justify-content:flex-start}
#documents .documents-summary>.register-shortcut:hover{border-color:var(--border);box-shadow:var(--register-card-shadow)}
#documents-count,#documents-version-count{font-size:13px;margin:14px 0}
#documents .table-wrap{max-width:100%}
#documents-content table,#documents-version-content table{table-layout:fixed;width:100%}
#documents-content th,#documents-version-content th{font-size:13px;padding:14px 12px;white-space:normal;overflow-wrap:normal}
#documents-content td,#documents-version-content td{padding:14px 12px;overflow-wrap:anywhere}
#documents-content th.numeric,#documents-content td.numeric{text-align:left}
#documents-content th:nth-child(1){width:29%}
#documents-content th:nth-child(2){width:23%}
#documents-content th:nth-child(3){width:18%}
#documents-content th:nth-child(4){width:14%}
#documents-content th:nth-child(5){width:16%}
#documents-version-content th:nth-child(1){width:25%}
#documents-version-content th:nth-child(2),#documents-version-content th:nth-child(3){width:23%}
#documents-version-content th:nth-child(4){width:15%}
#documents-version-content th:nth-child(5){width:14%}
.documents-file-counts,.documents-source-counts{display:flex;flex-wrap:wrap;gap:5px 7px;min-width:0}
.documents-file-counts .badge{font-size:11px;padding:4px 7px;white-space:normal}
.documents-source-counts{flex-direction:column;font-size:12px;color:var(--text-muted);line-height:1.5}
.documents-source-label{max-width:100%;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top}
#documents .documents-source-label .file-name-label{max-width:100%;vertical-align:top}
.documents-table-actions .link-button,#documents .table-wrap .link-button{max-width:100%;white-space:normal;text-align:left;font-size:12px}
#documents .table-wrap .badge{max-width:100%;white-space:normal}
#documents .table-wrap .documents-source-label{white-space:nowrap}
.documents-row-info{font-size:12px;line-height:1.5;margin-top:8px;font-weight:400;color:var(--text-muted)}
.documents-row-info summary{font-size:11px;cursor:pointer;font-weight:600;color:var(--brand)}
.documents-row-info p{margin:7px 0;overflow-wrap:anywhere}
.documents-pages{gap:12px;flex-wrap:wrap;margin-top:16px}
.documents-pages .element-match-actions{margin:0}
.documents-source-info{margin:20px 0;font-size:13px;color:var(--text-muted)}
.documents-source-info summary{cursor:pointer;font-size:13px;font-weight:600}
.documents-source-info p{font-size:12px;line-height:1.65;max-width:850px;margin:10px 0 0}
/* The two current report sources stay visible above the building's file list. */
#building-workspace #workspace-document-pane .workspace-document-sources{margin:0 0 20px;min-width:0}
#building-workspace #workspace-document-pane .workspace-document-sources-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin:0 0 10px}
#building-workspace #workspace-document-pane .workspace-document-sources-heading>h3{margin:0;font-size:13px;font-weight:500;line-height:1.6}
#building-workspace #workspace-document-pane .workspace-document-sources-heading>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;min-width:0}
#building-workspace #workspace-document-pane .workspace-document-sources-heading button{min-height:32px;padding:6px 9px;font-size:12px;font-weight:500}
#building-workspace #workspace-document-pane .building-source-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
#building-workspace #workspace-document-pane .workspace-source-card{gap:7px;padding:12px 14px;border:1px solid #dce3ed;border-radius:7px;background:#f7f8fa}
#building-workspace #workspace-document-pane .workspace-source-card .building-card-heading{align-items:flex-start;gap:6px 12px;flex-wrap:wrap}
#building-workspace #workspace-document-pane .workspace-source-card h4{font-size:12px;font-weight:500;line-height:1.6}
#building-workspace #workspace-document-pane .workspace-source-statuses{display:flex;align-items:center;flex-wrap:wrap;gap:5px 7px;min-width:0}
#building-workspace #workspace-document-pane .workspace-source-statuses .badge{font-size:10px;font-weight:400;line-height:1.5;white-space:normal}
#building-workspace #workspace-document-pane .building-source-name{min-height:0;margin:0;font-size:13px;line-height:1.6}
#building-workspace #workspace-document-pane .building-source-name .file-name-label{display:block;max-width:100%;overflow:visible;text-overflow:clip;-webkit-line-clamp:unset;line-clamp:unset;white-space:normal;overflow-wrap:anywhere}
#building-workspace #workspace-document-pane .building-source-actions{gap:6px 10px;align-items:center;margin:0}
#building-workspace #workspace-document-pane .building-source-actions :is(button,a){min-height:32px;margin:0;padding:6px 9px;font-size:12px;font-weight:500;max-width:100%;white-space:normal}
#building-workspace #workspace-document-pane .workspace-document-counts{display:flex;flex-wrap:wrap;gap:6px 10px;margin:0 0 14px}
#building-workspace #workspace-document-pane .workspace-document-counts>.metric{display:flex;flex-direction:row;align-items:baseline;gap:7px;min-height:34px;padding:6px 10px;border-radius:6px;box-shadow:none}
#building-workspace #workspace-document-pane .workspace-document-counts>.metric>small{min-height:0;font-size:12px;line-height:1.6}
#building-workspace #workspace-document-pane .workspace-document-counts>.metric>strong{margin:0;font-family:var(--font-sans);font-size:13px;font-weight:500;letter-spacing:0;line-height:1.6}
@media(max-width:650px){
 #building-workspace #workspace-document-pane .building-source-grid{grid-template-columns:minmax(0,1fr)}
 #building-workspace #workspace-document-pane .workspace-document-sources-heading{align-items:flex-start}
 #building-workspace #workspace-document-pane .workspace-source-card{padding:11px 12px}
}
@media(pointer:coarse){#building-workspace #workspace-document-pane :is(.workspace-document-sources-heading button,.building-source-actions button,.building-source-actions a,.workspace-document-counts>.metric){min-height:44px}}
#documents-feedback{border-color:#E5C57F;border-left-color:#B4832B;background:#FFF9EC}
#documents-feedback p{margin:6px 0}
#documents-feedback button{font-size:13px;margin-top:8px}
#register-detail:has(#document-files) .filters{padding:16px;border:1px solid var(--border);border-radius:10px;background:white;gap:12px}
#register-detail:has(#document-files) .filters input,#register-detail:has(#document-files) .filters select{min-height:43px;min-width:0;font-size:13px;max-width:100%}
#document-files table{table-layout:fixed;width:100%}
#document-files th,#document-files td{white-space:normal;overflow-wrap:anywhere}
#document-files th:first-child{width:40%}
#document-files th:nth-child(2){width:18%}
#document-files th:nth-child(3){width:25%}
#document-files th:nth-child(4){width:17%}
#document-files .document-path,#document-files .file-name-label{max-width:100%;overflow-wrap:anywhere;white-space:normal}
#document-files .badge,#document-files .link-button,#document-files .secondary{max-width:100%;white-space:normal}
@media(max-width:1100px){
 #documents .documents-main-filters{grid-template-columns:minmax(0,1fr) 210px auto}
 #documents-content th,#documents-content td,#documents-version-content th,#documents-version-content td{padding:12px 9px}
 #documents-content th:first-child{width:26%}#documents-content th:nth-child(2){width:23%}#documents-content th:nth-child(3){width:18%}#documents-content th:nth-child(4){width:15%}#documents-content th:nth-child(5){width:18%}
}
@media(max-width:760px){
 #documents .documents-main-filters{grid-template-columns:minmax(0,1fr) auto}
 #documents .documents-main-filters>.register-search-label{grid-column:1/-1}
 #documents .register-shortcut{padding:16px}
}
@media(max-width:650px){
 #documents .documents-main-filters{grid-template-columns:minmax(0,1fr)}
 #documents .documents-main-filters>.register-search-label{grid-column:auto}
 #documents .register-shortcut{padding:14px;min-height:146px}
 #documents-content table,#documents-content tbody,#documents-version-content table,#documents-version-content tbody{display:block}
 #documents-content thead,#documents-version-content thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #documents-content tbody tr,#documents-version-content tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px;background:white}
 #documents-content tbody tr+tr,#documents-version-content tbody tr+tr{border-top:1px solid var(--border)}
 #documents-content td,#documents-version-content td{padding:0;border:0;font-size:13px;min-width:0}
 #documents-content td:first-child,#documents-version-content td:first-child{grid-column:1/-1;font-weight:600}
 #documents-content td:nth-child(2),#documents-content td:nth-child(3){grid-column:1/-1}
 #documents-content td:last-child,#documents-version-content td:last-child{text-align:right}
 #documents-version-content td:nth-child(2),#documents-version-content td:nth-child(3){grid-column:1/-1}
 #documents-version-content td:nth-child(2)::before{content:'Excelbron';display:block;font-size:11px;color:var(--text-muted);margin-bottom:4px}
 #documents-version-content td:nth-child(3)::before{content:'PDF-rapport';display:block;font-size:11px;color:var(--text-muted);margin-bottom:4px}
 #documents .table-wrap .link-button{font-size:12px;min-height:40px;padding:9px}
 .documents-source-counts{flex-direction:row;gap:5px 12px}
 #register-detail:has(#document-files) .filters{display:grid;grid-template-columns:1fr;padding:12px}
 #document-files th,#document-files td{font-size:11px;padding:10px 6px}
 #document-files th:nth-child(3),#document-files td:nth-child(3){display:none}
 #document-files th:first-child{width:46%}#document-files th:nth-child(2){width:25%}#document-files th:last-child{width:29%}
}
