/* One file per line, with controls expanded only when needed. */
.file-list .file-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto 16px;gap:12px;padding:8px 12px;min-height:42px}
.file-list .file-icon,.received-name .file-icon{width:28px;height:28px;border-radius:5px;font-size:9px}
.file-list .file-info{display:block;min-width:0}
.file-list .file-info strong{display:block;font-size:13px}
.file-list .file-info>span{display:none}
.file-list .file-meta{display:flex;flex-direction:row;gap:18px;font-size:12px}
.file-list .file-meta>span:first-child{min-width:70px;text-align:right}
.history-file{padding:8px 12px}
.history-file-row{grid-template-columns:22px minmax(120px,1fr) minmax(300px,48%);gap:10px;margin-right:58px;min-height:30px}
.history-file-name{display:flex;align-items:center;gap:8px;min-width:0;padding:0}
.history-file h2{min-width:0;flex:1;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-file-size{flex-shrink:0;margin:0;white-space:nowrap}
.history-file-name .badge{margin:0;white-space:nowrap}
.history-file-facts.facts{grid-column:auto;grid-template-columns:60px 70px minmax(0,1fr);gap:10px}
.history-file-facts dt{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.history-file-facts dd{margin:0;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-file-facts small{display:none}
.history-file-details>summary{top:12px;right:12px;min-height:24px;font-size:12px}
.history-file-facts dd:has(.badge){color:var(--muted)}
.received-table{table-layout:fixed;min-width:650px}
.received-table th,.received-table td{padding:8px 12px;height:42px;box-sizing:border-box}
.received-table th:nth-child(3){width:100px}.received-table th:nth-child(4){width:210px}.received-table th:last-child{width:90px}
.received-name{min-width:0;gap:8px}.received-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.received-date{white-space:nowrap;font-size:12px}
.collection-file-row{display:flex;align-items:center;gap:12px;padding:8px 12px;min-height:42px;border-bottom:1px solid var(--line)}
.collection-file-row>.checkbox{margin:0;flex-shrink:0}.collection-file-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;font-size:13px}
.collection-file-size{color:var(--muted);font-size:12px;white-space:nowrap}.collection-file-key{flex:0 1 150px;min-width:80px}.collection-file-key input{height:30px;padding:4px 8px}
@media(max-width:800px){.history-list{overflow-x:auto}.history-file{min-width:690px}.file-list .file-meta>span:last-child{display:none}.file-list .file-row{gap:8px;padding:8px}.received-table td:last-child,.received-table th:last-child{display:table-cell}.received-date{white-space:nowrap}.received-name .file-icon{display:grid}.collection-file-row{gap:8px}}

.history-list-heading{display:grid;grid-template-columns:22px minmax(120px,1fr) minmax(300px,48%);gap:10px;padding:8px 70px 8px 12px;border-bottom:1px solid var(--line);color:var(--muted);font-size:11px}
.history-list-heading>div{display:grid;grid-template-columns:60px 70px minmax(0,1fr);gap:10px}
@media(max-width:800px){.history-list-heading{min-width:690px;box-sizing:border-box}}
.history-file .history-select{min-height:28px;padding:0;border:0;background:none;margin:0}
.history-file-row,.history-list-heading{grid-template-columns:22px minmax(120px,1fr) minmax(400px,48%)}
.history-file-facts.facts,.history-list-heading>div{grid-template-columns:100px 130px minmax(0,1fr)}
.history-list-heading>div>span{white-space:nowrap}

.collection-manager-list{list-style:none;margin:16px 0;padding:0;border-top:1px solid var(--line)}
.collection-manager-row{display:grid;grid-template-columns:minmax(0,1fr) 260px 220px;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.collection-manager-name{min-width:0;overflow-wrap:anywhere}.collection-manager-name>a{display:block;font-weight:600;margin-bottom:4px}
.collection-manager-facts{display:flex;gap:20px;margin:0;font-size:12px}.collection-manager-facts dt{color:var(--muted)}.collection-manager-facts dd{margin:2px 0 0}
.collection-manager-row form{margin:0;justify-self:end}.collection-manager-row button{white-space:nowrap}
@media(max-width:700px){.collection-manager-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}.collection-manager-name{grid-column:1/-1}.collection-manager-facts{flex-wrap:wrap;gap:8px 16px}.collection-manager-row button{white-space:normal}}

.collection-metadata{margin-bottom:20px}

.history-search{flex:1 0 100%;display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:center}
@media(max-width:800px){
 .history-list{overflow:hidden}.history-list-heading{display:none}.history-file{min-width:0;padding:12px}
 .history-file-row{margin:0;grid-template-columns:24px minmax(0,1fr);gap:8px}
 .history-file-name{display:flex;flex-wrap:wrap;padding:0;gap:4px 8px}.history-file-name h2{flex:1 0 100%;white-space:normal;overflow-wrap:anywhere}
 .history-file-facts.facts{grid-column:2;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.history-file-facts>div:last-child{grid-column:1/-1}
 .history-file-facts dt{position:static;width:auto;height:auto;overflow:visible;clip-path:none;font-size:11px}.history-file-facts dd{white-space:normal;overflow-wrap:anywhere}.history-file-facts small{display:inline}
 .history-file>.history-file-details{margin:8px 0 0 32px}.history-file-details>summary{position:static;min-height:36px;display:list-item;line-height:36px}
 .history-search{grid-template-columns:1fr;gap:4px}.history-filters select{max-width:100%}
}

.selection-summary{color:var(--muted);font-size:13px}.selection-summary:empty{display:none}
.collection-file-row:has(input[data-share-select]:checked),.received-table tr:has(input[data-share-select]:checked),.history-file:has(input[data-share-select]:checked){background:color-mix(in srgb,var(--primary) 10%,transparent)}
.received-mobile-label{display:none}
@media(max-width:700px){
 .received-table-wrap{overflow:visible}.received-table{min-width:0;width:100%;display:block}.received-table tbody{display:block}
 .received-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .received-table tr{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:6px 8px;padding:12px;border-bottom:1px solid var(--line)}
 .received-table td{display:block!important;width:auto!important;height:auto;padding:0;border:0;min-width:0}.received-table td:first-child{grid-column:1;grid-row:1/4;align-self:start}
 .received-table td:nth-child(2){grid-column:2/-1}.received-table td:nth-child(3){grid-column:2}.received-table td:last-child{grid-column:3;grid-row:2;align-self:center}
 .received-table td.received-date{grid-column:2/-1;white-space:normal}.received-mobile-label{display:inline}.received-name strong{white-space:normal;overflow-wrap:anywhere}.received-name .file-icon{flex-shrink:0}
 .inbox-selection .selection-summary{flex:1 0 100%}
 .collection-file-row{flex-wrap:wrap}.collection-file-name{white-space:normal;overflow-wrap:anywhere;flex-basis:calc(100% - 48px)}.collection-file-key{flex:1 1 160px}
}

.collection-library { list-style: none; padding: 0; display: grid; gap: 1rem; }
.collection-library h2 { margin-top: 0; overflow-wrap: anywhere; }
.collection-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.collection-selectable { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.collection-selectable:has(input[type=checkbox]:checked) { background: color-mix(in srgb,var(--primary) 10%,transparent); }
@media (max-width: 700px) {
 .collection-selectable { grid-template-columns: auto minmax(0, 1fr); }
 .collection-selectable .collection-manager-name { grid-column: 2; }
 .collection-selectable .collection-manager-facts, .collection-selectable > button { grid-column: 2; }
}

.inbox-collection-review h2{margin:24px 0 12px}
.inbox-collection-review .collection-manager-row{grid-template-columns:minmax(0,1fr) auto}
.inbox-collection-review .collection-manager-name{grid-column:auto}
