.case-files-dialog {height:min(662px,calc(100dvh - 64px))}
.case-files-dialog .dialog-header {border-bottom:1px solid var(--line)}
.case-files-layout {display:grid;grid-template-columns:192px minmax(0,1fr);min-height:0;flex:1}
.case-files-categories {padding:20px 17px;background:#f8f8f8;border-right:1px solid var(--line);overflow:auto}
.case-files-categories button {display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px 16px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.case-files-categories button:hover {background:#ededed}
.case-files-categories button[aria-pressed=true] {background:#e4e4e4;font-weight:600}
.case-files-content {display:flex;flex-direction:column;min-width:0;min-height:0}
.case-files-toolbar {display:flex;align-items:center;gap:12px;padding:20px 22px;flex:none}
.case-files-actions {gap:12px;flex:none}
.case-files-actions .btn {min-height:40px;padding-inline:21px}
.case-files-toolbar .search {flex:1;min-width:0}
.case-files-toolbar .search-select {width:144px;flex:none}
.case-files-table-wrap {flex:1;min-height:0;overflow:auto;padding:0 22px}
.case-files-table {table-layout:fixed;width:100%;border-collapse:collapse}
.case-files-table th {position:sticky;top:0;z-index:1;background:white;color:var(--muted);font-weight:400}
.case-files-table th,.case-files-table td {padding:10px 8px;border-bottom:1px solid var(--line);text-align:left}
.case-files-table th:first-child {width:auto}
.case-files-table th:nth-child(2) {width:106px}
.case-files-table th:nth-child(3) {width:148px}
.case-files-table th:last-child {width:48px}
.case-files-table tbody tr:hover {background:#f8f8f8}
.case-files-name {display:flex;align-items:center;gap:12px;min-width:0}
.case-files-name .file-tile {width:28px;height:28px;flex:none}
.case-files-name>div {min-width:0}
.case-files-name strong {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500}
.case-files-name small {display:block;color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.case-files-table .tag {display:inline-block;max-width:100%;white-space:normal;line-height:16px}
.case-files-date {font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.case-files-empty {padding:94px 12px 32px;text-align:center;color:var(--muted);font-size:16px}
.case-files-empty[hidden],.case-files-empty button[hidden] {display:none}
.case-files-empty button {margin-top:12px}
.case-files-empty>.icon {width:32px;height:32px}
.case-file-text {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}
.case-file-reference {overflow-wrap:anywhere;margin-top:20px}
@media(max-width:940px){
 .case-files-toolbar {flex-wrap:wrap}
 .case-files-actions {width:100%;justify-content:flex-end}
}
@media(max-width:700px){
 .case-files-dialog {width:calc(100vw - 24px);height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);margin:16px auto}
 .case-files-layout {display:flex;flex-direction:column}
 .case-files-categories {display:flex;gap:4px;flex:none;padding:10px 12px;border-right:0;border-bottom:1px solid var(--line)}
 .case-files-categories button {width:auto;white-space:nowrap;gap:8px;padding:8px 10px}
 .case-files-content {flex:1}
 .case-files-toolbar {gap:8px;padding:16px 12px}
 .case-files-toolbar .search-select {width:124px}
 .case-files-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto}
 .case-files-toolbar .search{grid-column:1/-1}
 .case-files-actions {width:auto;gap:8px}
 .case-files-actions .btn {padding-inline:16px}
 .case-files-table-wrap {padding:0 8px}
 .case-files-table th:nth-child(3),.case-files-table td:nth-child(3) {display:none}
 .case-files-table th:nth-child(2) {width:86px}
 .case-files-table th:last-child {width:40px}
 .case-files-table td {padding:10px 4px}
 .case-files-name strong{white-space:normal;overflow-wrap:anywhere}
 .case-files-name {gap:6px}
 .case-files-name .file-tile {display:none}
 .case-files-empty {padding-top:48px}
}
