/* Shared maintainers: principal administration and every company use one layout. */
#tablas, #tablas .panel, #tablas .master-layout, #tablas .master-panel {min-width:0;max-width:100%;box-sizing:border-box}
#tablas .tablewrap{max-width:100%;max-height:none;overflow:visible}
#tablas .master-panel table{width:100%;min-width:0!important;table-layout:fixed;font-size:14px}
#tablas .master-panel th,#tablas .master-panel td{min-width:0!important;max-width:none;white-space:normal!important;overflow-wrap:anywhere;vertical-align:top;padding:12px}
#tablas .master-panel th{position:static}
#tablas .action-row{min-width:0!important;display:flex;flex-wrap:wrap!important;gap:6px}
#tablas .action-row button{white-space:normal!important;max-width:100%}
#tablas .master-header{gap:12px}
#tablas .form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
#tablas input,#tablas select,#tablas textarea{min-width:0;max-width:100%;box-sizing:border-box}
#master-panel-proveedores td small{display:block;color:#526475;line-height:1.5;margin-top:5px}
#master-panel-proveedores th:first-child{width:34%}
#master-panel-proveedores th:nth-child(2){width:24%}
#master-panel-proveedores th:nth-child(3){width:26%}
#master-panel-proveedores th:nth-child(4){width:16%}
#master-panel-proveedores .supplier-status{display:inline-block;margin-top:8px;border:1px solid #cbdde0;border-radius:20px;padding:2px 8px;font-size:12px}
#tablas table.master-records,#tablas table.master-records tbody{display:block;width:100%}
#tablas table.master-records thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#tablas table.master-records tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 18px;margin:0 0 14px;padding:8px 14px;border:1px solid #d7e2e8;border-radius:12px;background:#fff}
#tablas table.master-records tbody td{display:block;width:auto!important;border:0;padding:9px 0}
#tablas table.master-records tbody td[data-label]::before{content:attr(data-label);display:block;font-size:12px;font-weight:700;color:#526475;margin-bottom:5px}
#tablas table.master-records td:last-child,#tablas table.master-records td[colspan]{grid-column:1/-1}
@media(max-width:1100px){
 #tablas table.master-records tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 #tablas .master-panel table,#tablas .master-panel tbody{display:block;width:100%}
 #tablas .master-panel thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #tablas .master-panel tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px;margin:0 0 14px;padding:8px 14px;border:1px solid #d7e2e8;border-radius:12px;background:#fff}
 #tablas .master-panel tbody td{display:block;width:auto!important;border:0;min-width:0!important;padding:9px 0}
 #tablas .master-panel tbody td[data-label]::before{content:attr(data-label);display:block;font-size:12px;font-weight:700;color:#526475;margin-bottom:5px}
 #tablas .master-panel td[colspan]{grid-column:1/-1}
 #tablas .master-panel td:last-child{grid-column:1/-1;border-top:1px solid #edf1f5}
 #tablas .master-header>div:first-child{flex-basis:100%}
}
@media(max-width:600px){
 #tablas table.master-records tbody tr{grid-template-columns:minmax(0,1fr)}
 #tablas .master-panel tbody tr{grid-template-columns:minmax(0,1fr)}
 #tablas .master-panel td+td{border-top:1px solid #edf1f5}
 #tablas .master-form{padding:12px}
 #tablas .master-panel .form-actions{display:flex;flex-wrap:wrap;gap:8px}
 #tablas .master-panel .form-actions button{flex:1 1 120px}
 #tablas .master-panel button{min-height:40px}
}
