/* Gestión HG · lectura vertical en teléfonos y tabletas. No oculta datos. */
.hg-cell-value{display:contents}
@media(max-width:900px){
 html,body{min-width:0!important;width:100%!important;overflow-x:visible!important}
 body{overflow-wrap:anywhere}
 body *,body *::before,body *::after{box-sizing:border-box}
 main,main.content,main.campo,.layout,.panel,.card,section,details,form,fieldset{min-width:0!important;max-width:100%!important}
 main:not(.content),main.campo{width:100%!important;margin-left:auto!important;margin-right:auto!important;padding:16px 12px!important}
 .layout>main.content{width:100%!important;padding:16px 12px!important}
 .panel,.card{padding:14px!important}
 .top{height:auto!important;min-height:64px;gap:8px;flex-wrap:wrap;padding:12px!important;align-items:flex-start}
 .top>div{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .brand{font-size:22px}.brand span{display:block;font-size:14px}
 h1{font-size:clamp(23px,6vw,30px)!important;line-height:1.2;overflow-wrap:anywhere}
 h2,h3,p,small,label,summary,a,td,th,pre{overflow-wrap:anywhere;white-space:normal}
 label,summary{line-height:1.45}
 .gridform,.grid2,.grid,.summary-grid,.details,.checks,.permissions,.hg-formgrid,[style*="grid-template-columns"],#hg-final-form>.gridform,#hg-final-form details.inline-fold>.gridform{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}
 .gridform>*,.grid2>*,.grid>*,.summary-grid>*,.details>*,.hg-formgrid>*{min-width:0!important;max-width:100%!important;grid-column:auto!important}
 .cards,.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 .titlebar,.ot-head,.search,.actions,.primary-actions,.timer-actions,.filters,.ot-tabs,.hg-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;min-width:0!important;max-width:100%!important;white-space:normal!important;overflow:visible!important}
 .ot-tabs{position:static!important;padding:8px 0!important}
 .ot-tabs>a{flex:1 1 135px;text-align:center;min-height:44px;white-space:normal!important}
 .search{align-items:stretch!important}
 .search>*,.filters>*{min-width:0!important;max-width:100%!important}
 body input:not([type=hidden]):not([type=checkbox]):not([type=radio]),body select,body textarea{min-width:0!important;max-width:100%!important;width:100%;font-size:16px!important;box-sizing:border-box}
 body input[type=checkbox],body input[type=radio]{width:20px!important;min-width:20px;max-width:20px!important;height:20px;flex:0 0 20px;vertical-align:middle}
 body input[type=file]{white-space:normal;overflow:hidden}
 button,.button,input[type=submit]{white-space:normal!important;max-width:100%!important;min-height:44px;line-height:1.3}
 .actions>button,.actions>.button,.primary-actions>*{flex:1 1 150px}
 img,video,iframe,canvas,svg{max-width:100%;height:auto}
 pre,.copybox{white-space:pre-wrap!important;overflow-wrap:anywhere!important;max-width:100%;min-width:0}
 /* Cada registro se lee como ficha; los encabezados permanecen accesibles. */
 body table.hg-mobile-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;border-collapse:separate!important;table-layout:auto!important}
 body table.hg-mobile-table>thead,body table.hg-mobile-table .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;white-space:nowrap!important}
 body table.hg-mobile-table>tbody,body table.hg-mobile-table>tfoot{display:block!important;width:100%!important}
 body table.hg-mobile-table tr:not(.hg-mobile-header){display:block!important;width:100%!important;max-width:100%!important;border:1px solid #cbdce9!important;border-radius:10px;margin:12px 0;padding:5px 10px;background:#fff}
 body table.hg-mobile-table td,body table.hg-mobile-table tbody th{display:grid!important;grid-template-columns:minmax(0,0.8fr) minmax(0,1.2fr)!important;align-items:start;gap:8px!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:9px 0!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important;border:0;border-bottom:1px solid #edf2f6}
 body table.hg-mobile-table td::before,body table.hg-mobile-table tbody th::before{content:attr(data-hg-label);font-weight:700;color:#486580;font-size:13px;line-height:1.45}
 body table.hg-mobile-table .hg-cell-value{display:block;min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important;white-space:normal!important;line-height:1.5}
 body table.hg-mobile-table .hg-cell-wide{grid-template-columns:minmax(0,1fr)!important}
 body table.hg-mobile-table .hg-cell-wide::before{display:none}
 body table.hg-mobile-table colgroup{display:none}
 body .hg-mobile-table-host{width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important}
 .hg-mobile-scroll-hint{display:none!important}
 .hg-cell-value a{display:inline-block;max-width:100%;padding:5px 0;white-space:normal!important}
 .hg-cell-value input,.hg-cell-value select,.hg-cell-value textarea,.hg-cell-value form{max-width:100%!important;min-width:0!important}
}
@media(max-width:359px){
 body table.hg-mobile-table td,body table.hg-mobile-table tbody th{grid-template-columns:minmax(0,1fr)!important;gap:3px!important}
 .cards,.kpis{grid-template-columns:minmax(0,1fr)!important}
}
