/* Adaptación compartida. Conserva todos los registros y controles existentes. */
html,body{min-width:0;max-width:100%}
main,section,form,fieldset,.panel,.card,.gridform,.summary-grid,.titlebar,.search{min-width:0}
input,select,textarea{box-sizing:border-box;max-width:100%;min-width:0}
input[type=checkbox],input[type=radio]{width:auto!important;max-width:none;flex:0 0 auto;vertical-align:middle}
.search input,.search select,.search button{min-width:0!important;max-width:100%;box-sizing:border-box}
.gridform{grid-template-columns:repeat(2,minmax(0,1fr))}
.gridform>*,.summary-grid>*{min-width:0}
.titlebar,.search,.filters,.actions,.primary-actions,.hg-actions{flex-wrap:wrap}
pre,.copybox{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
img,video,canvas{max-width:100%}
/* Las seis pantallas ya ajustadas conservan su diseño específico. */
body:not(.hg-admin-listas) table.hg-mobile-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed}
body:not(.hg-admin-listas) table.hg-mobile-table th,body:not(.hg-admin-listas) table.hg-mobile-table td{min-width:0!important;max-width:none!important;white-space:normal!important;overflow-wrap:anywhere;vertical-align:top;line-height:1.45}
body:not(.hg-admin-listas) .hg-mobile-table-host{width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important}
@media(min-width:901px){
 .layout{grid-template-columns:230px minmax(0,1fr)}
 body:not(.hg-admin-listas) table.hg-desktop-cards{display:block!important;border-collapse:separate}
 body:not(.hg-admin-listas) table.hg-desktop-cards>thead,body:not(.hg-admin-listas) table.hg-desktop-cards .hg-mobile-header{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important}
 body:not(.hg-admin-listas) table.hg-desktop-cards>tbody,body:not(.hg-admin-listas) table.hg-desktop-cards>tfoot{display:block!important}
 body:not(.hg-admin-listas) table.hg-desktop-cards tr:not(.hg-mobile-header){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:0 18px;border:1px solid #d5e2ef;border-radius:11px;margin:0 0 14px;padding:12px 14px;background:#fff;min-width:0}
 body:not(.hg-admin-listas) table.hg-desktop-cards td,body:not(.hg-admin-listas) table.hg-desktop-cards tbody th{display:block!important;width:auto!important;padding:9px 0!important;border:0;border-bottom:1px solid #edf2f6}
 body:not(.hg-admin-listas) table.hg-desktop-cards td::before,body:not(.hg-admin-listas) table.hg-desktop-cards tbody th::before{content:attr(data-hg-label);display:block;font-size:12px;font-weight:700;color:#526e85;margin-bottom:5px}
 body:not(.hg-admin-listas) table.hg-desktop-cards .hg-cell-wide{grid-column:1/-1}
 body:not(.hg-admin-listas) table.hg-desktop-cards .hg-cell-wide::before{display:none}
 body:not(.hg-admin-listas) table.hg-desktop-cards .hg-cell-value{display:block;min-width:0;max-width:100%;overflow-wrap:anywhere}
 body:not(.hg-admin-listas) table.hg-desktop-cards colgroup{display:none}
 .hg-mobile-scroll-hint{display:none!important}
}
@media(max-width:900px){
 main,section,article,form,fieldset,.panel,.card,.layout{max-width:100%;min-width:0;box-sizing:border-box}
 h1,h2,h3,p,label,summary,a,small,button{overflow-wrap:anywhere}
 button,.button{max-width:100%;white-space:normal;min-height:44px}
 .gridform{grid-template-columns:minmax(0,1fr)}
}
