.summary-strip:has(.therefore-summary){grid-template-columns:repeat(6,minmax(0,1fr))}
.summary-strip .therefore-summary{border-left:1px solid var(--line);flex-direction:column;justify-content:center;align-items:flex-start;gap:9px}
.summary-strip .therefore-summary .therefore-summary-label{display:flex;flex-direction:column;gap:4px;min-width:0;margin:0;padding:0;font-size:12px;line-height:1.35;color:var(--ink)}
.therefore-summary-label>span:not(.therefore-wordmark){margin:0;padding:0;color:var(--ink);font-size:12px;line-height:1.35}
.therefore-summary .therefore-wordmark{margin:0}
.therefore-summary .summary-number{margin:0}
.therefore-admin{max-width:800px;margin:20px 0}
.therefore-admin>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.therefore-admin h2{font-size:18px;margin:0}
.therefore-admin p{margin:10px 0 14px}
.therefore-back{margin-bottom:12px}
.therefore-page-heading h1{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.therefore-page-heading .therefore-wordmark{margin:0}
.therefore-scope-note{margin:-10px 0 20px}
.therefore-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end;margin-bottom:16px}
.therefore-filters>div{min-width:0}
.therefore-filters label{margin:0 0 6px;font-size:12px}
.therefore-filters input,.therefore-filters select{width:100%;min-width:0;max-width:100%;min-height:44px;font-size:13px;margin:0}
.therefore-query{grid-column:span 2}
.therefore-advanced{grid-column:1/-1;border-top:1px solid var(--line);padding-top:4px;min-width:0}
.therefore-advanced>summary{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;font-size:13px;font-weight:600;color:var(--primary)}
.therefore-advanced>summary::after{content:'';width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-left:auto;margin-right:4px}
.therefore-advanced[open]>summary::after{transform:rotate(225deg)}
.therefore-advanced>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.therefore-advanced-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:8px 0 0}
.therefore-advanced-fields>div{min-width:0}
.therefore-list{padding:0 18px;min-width:0}
.therefore-case{border-bottom:1px solid var(--line);min-width:0}
.therefore-case:last-child{border-bottom:0}
.therefore-case .case-row-wrap{padding:0}
.therefore-case .case-row{border:0}
.therefore-case .case-row-footer{padding-bottom:10px}
.therefore-case .case-workflow-actions{position:static}
.therefore-form-records{border-top:1px solid var(--line);padding:12px 0 18px}
.therefore-form-source{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:10px 20px;padding:8px 0}
.therefore-form-source+.therefore-form-source{border-top:1px solid var(--line);margin-top:8px}
.therefore-person{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere;font-size:13px}
.therefore-person strong{font-weight:600}
.therefore-person>span:not(.field-label){color:var(--muted)}
.therefore-received{font-size:12px;display:grid;gap:3px;align-content:start}
.therefore-form-fields{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 20px;margin:0}
.therefore-form-fields>div{min-width:0;max-width:100%}
.therefore-form-fields dt{font-size:11px;color:var(--muted)}
.therefore-form-fields dd{margin:2px 0 0;font-size:13px;overflow-wrap:anywhere}
.therefore-form-source>.text-button{justify-self:start;grid-column:1/-1;min-height:44px;padding:5px 0;font-size:13px}
@media(max-width:1150px){.summary-strip:has(.therefore-summary){grid-template-columns:repeat(3,minmax(0,1fr))}.summary-strip .therefore-summary{border-top:1px solid var(--line)}}
@media(max-width:850px){.therefore-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.therefore-query{grid-column:1/-1}}
@media(max-width:850px){.therefore-filters>div{grid-column:1/-1}.therefore-advanced-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.summary-strip:has(.therefore-summary){grid-template-columns:repeat(2,minmax(0,1fr))}.summary-strip .therefore-summary:last-child{grid-column:auto;border-left:1px solid var(--line);min-height:80px}.therefore-form-source{grid-template-columns:minmax(0,1fr)}.therefore-received{grid-template-columns:max-content minmax(0,1fr);gap:10px}.therefore-list{padding:0 14px}}
@media(max-width:400px){.therefore-filters{grid-template-columns:minmax(0,1fr)}.therefore-query{grid-column:auto}.therefore-advanced-fields{grid-template-columns:minmax(0,1fr)}}
/* Administración: configuración a la izquierda, usuarios a la derecha. */
.admin-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.admin-primary,.admin-secondary{display:grid;gap:20px;min-width:0}
.admin-layout :is(.settings-panel,.sync-settings,.users-panel,.therefore-admin){margin:0;max-width:none;min-width:0}
.admin-layout .section-heading{margin-bottom:6px}.admin-layout .section-heading h2{margin:0}
.admin-user{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;padding:18px 0;border-top:1px solid var(--line)}
.admin-user:first-child{border-top:0}.admin-user-identity{display:grid;gap:5px;min-width:0}
.admin-user-identity strong{font-size:14px;line-height:1.45}.admin-user-identity>span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.admin-user-status{display:grid;gap:5px;text-align:right;color:var(--muted);font-size:11px;line-height:1.5}
.admin-user>.button{grid-column:1/-1;justify-self:start;min-height:44px}
.therefore-admin>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.therefore-admin h2{font-size:17px;margin:0}.therefore-admin p{margin:12px 0 16px;line-height:1.6}

/* Registro de incidencias en el mismo marco de lista y lector. */
.therefore-heading-content{display:flex;align-items:center;gap:12px;min-width:0}
.therefore-heading-content>.icon-button{flex-shrink:0}
.therefore-page-heading h1{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:0}
.therefore-page-heading .therefore-wordmark{width:116px;margin:0}
.therefore-browser{grid-template-columns:minmax(280px,.85fr) minmax(0,1.2fr)}
#content>.therefore-browser{gap:24px}
.therefore-browser>.therefore-list-panel{padding:18px;min-width:0;overflow-x:hidden}
.therefore-browser .therefore-filters{display:block;position:sticky;top:-18px;z-index:3;padding:6px 0 10px;margin:0;background:var(--surface);border:0;border-radius:0;box-shadow:none}
.therefore-filters>input{display:block;width:100%;min-width:0;min-height:44px;font-size:13px}
.therefore-filter-icons{display:flex;align-items:center;gap:4px;position:relative;margin:8px 0 0}
.therefore-filter{position:static;margin:0;padding:0;border:0;min-width:0}
.therefore-filter>summary,.therefore-filter-icons>.icon-button{display:grid;place-items:center;list-style:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;margin:0;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer;box-sizing:border-box}
.therefore-filter>summary::-webkit-details-marker{display:none}
.therefore-filter>summary::marker{content:''}
.therefore-filter>summary svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.therefore-filter>summary:hover,.therefore-filter-icons>.icon-button:hover{background:var(--soft);color:var(--primary)}
.therefore-filter[open]>summary,.therefore-filter[data-active=true]>summary{background:var(--soft);color:var(--primary);border-color:var(--line)}
.therefore-filter>summary:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.therefore-filter-icons>.icon-button:disabled{opacity:.35;cursor:default}
.therefore-filter-panel{position:absolute;top:52px;left:0;width:100%;box-sizing:border-box;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:9px;box-shadow:0 8px 24px #132f501f;max-height:min(400px,60dvh);overflow:auto;z-index:4}
.therefore-filter-panel label{display:block;margin:0 0 6px;font-size:12px}
.therefore-filter-panel :is(input,select){width:100%;min-width:0;min-height:44px;box-sizing:border-box;font-size:13px}
.therefore-filter-panel :is(input,select)+label{margin-top:12px}
.therefore-filters .therefore-scope-note{margin:7px 0 0;font-size:11px;line-height:1.45}
.therefore-list-panel>#therefore-count{font-size:12px;margin:10px 0 2px;color:var(--muted)}
.therefore-browser .therefore-list{padding:0;min-width:0}
.therefore-case{min-width:0;border-bottom:1px solid var(--line)}.therefore-case:last-child{border-bottom:0}
.therefore-list .case-row-wrap{padding-left:12px;padding-right:12px;border-bottom:0}
.therefore-list .case-row{border-bottom:0}
.therefore-list-person{margin:0;padding:0 12px 14px;font-size:12px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
#therefore-pages{position:sticky;bottom:-18px;margin:0 -18px -18px;padding:8px;background:var(--surface);border-top:1px solid var(--line);z-index:2}
#therefore-pages .work-paging{padding:0}.therefore-reader{min-width:0}
.therefore-reader .reader-heading .reader-id{flex:1;min-width:0;overflow-wrap:anywhere}
.therefore-reader>.detail-state{margin-bottom:18px}
.therefore-reader .detail-state .case-workflow-actions{margin-left:auto;position:static}
.therefore-reader .therefore-form-records{border:1px solid var(--line);border-radius:9px;padding:12px;margin:0 0 22px;background:var(--bg)}
.therefore-form-source{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;min-width:0}
.therefore-form-source+.therefore-form-source{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}
.therefore-person{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere;font-size:13px}
.therefore-person strong{font-weight:650}.therefore-person>span:not(.field-label){color:var(--muted);font-size:12px}
.therefore-received{display:grid;align-content:start;gap:3px;font-size:11px;grid-column:2;grid-row:1}
.therefore-form-fields{grid-column:1;grid-row:2;display:flex;flex-wrap:wrap;gap:8px 18px;min-width:0;margin:0}
.therefore-form-fields>div{min-width:0;max-width:100%}.therefore-form-fields dt{font-size:11px;color:var(--muted)}.therefore-form-fields dd{margin:3px 0 0;font-size:13px;overflow-wrap:anywhere}
.therefore-form-source>.icon-button{grid-column:2;grid-row:2;justify-self:end;align-self:end}
.therefore-earlier-forms{border-top:1px solid var(--line);margin-top:12px;padding-top:8px}.therefore-earlier-forms>summary{font-size:12px;min-height:36px;cursor:pointer;padding:8px 0}
.therefore-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;min-height:360px;height:100%;box-sizing:border-box;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--bg);box-shadow:inset -7px -7px 15px #142f482b,inset 7px 7px 16px #ffffffcc;text-align:center}
.therefore-empty>p{max-width:27ch;margin:0;font-size:20px;line-height:1.5;color:var(--ink);font-weight:550}
.therefore-empty>.therefore-wordmark{width:min(290px,85%);margin:0}
.therefore-reader-mobile-back{display:none}
.therefore-list-back{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 12px;font-size:12px}
.therefore-list-back svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}
:root[data-theme=dark] .therefore-empty{box-shadow:inset -7px -7px 15px #0008,inset 7px 7px 16px #ffffff0d}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .therefore-empty{box-shadow:inset -7px -7px 15px #0008,inset 7px 7px 16px #ffffff0d}}
@media(min-width:1001px){.therefore-reader-empty .therefore-empty{min-height:0}}
@media(max-width:1000px){
 .admin-layout{grid-template-columns:minmax(0,1fr);gap:20px}
 #content>.therefore-browser{display:block}
 .therefore-browser[data-mobile-panel=list]>.therefore-reader,.therefore-browser[data-mobile-panel=detail]>.therefore-list-panel{display:none}
 .therefore-browser[data-mobile-panel=detail]>.therefore-reader{display:block;position:static;max-height:none;width:100%}
 .therefore-reader-mobile-back{display:block}.therefore-reader>.therefore-reader-mobile-back{margin-bottom:14px}
 .therefore-browser .therefore-filters{position:relative;top:0}
}
@media(max-width:450px){
 .therefore-page-heading .therefore-wordmark{width:86px}.therefore-page-heading h1{gap:8px;font-size:20px!important}
 .therefore-heading-content{gap:6px}.therefore-heading-content>.icon-button{padding:9px;min-width:40px}
 .admin-user{grid-template-columns:minmax(0,1fr)}.admin-user-status{display:flex;flex-wrap:wrap;gap:6px 14px;text-align:left}
 .therefore-form-source{grid-template-columns:minmax(0,1fr) 44px}.therefore-person{grid-column:1/-1}.therefore-received{grid-column:1;grid-row:auto;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}.therefore-form-fields{grid-column:1;grid-row:auto}.therefore-form-source>.icon-button{grid-column:2;grid-row:auto}
}
@media(forced-colors:active){.therefore-empty,.therefore-filter-panel{box-shadow:none}.therefore-filter[data-active=true]>summary{outline:2px solid Highlight;outline-offset:-2px}}
.therefore-reader .reader-heading{flex-wrap:wrap}.therefore-browser #work-refresh-notice{position:static;flex:0 0 44px;width:44px;min-width:44px;min-height:44px;margin:0;padding:10px;background:var(--soft);color:var(--primary);box-shadow:none}

.therefore-closure p { white-space: pre-wrap; overflow-wrap: anywhere; }
