/* OSMLY 3T — mobile table readability patch, layered after 3S */
@media (max-width:760px) {
 html,body{width:100%;max-width:100%;overflow-x:clip}
 .shell,.main,.content,.panel,.panel-body,.tablewrap{min-width:0!important;max-width:100%!important}
 .panel{overflow:visible!important}
 .panel h2,.panel h3{overflow-wrap:anywhere}
 .tablewrap{overflow-x:auto!important;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 /* Tables with readable labels become vertically stacked record cards. */
 table.osmly-card-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;border:0!important}
 table.osmly-card-table thead{display:none!important}
 table.osmly-card-table tbody{display:grid!important;gap:12px!important;width:100%!important}
 table.osmly-card-table tr{display:block!important;width:100%!important;min-width:0!important;padding:12px!important;border:1px solid #e5e7f0!important;border-radius:14px!important;background:var(--surface,#fff)!important;box-shadow:0 3px 10px #2020430b!important}
 table.osmly-card-table td{display:grid!important;grid-template-columns:minmax(80px,35%) minmax(0,1fr)!important;gap:10px!important;align-items:start!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:9px 0!important;border:0!important;border-bottom:1px solid #eef0f5!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;text-align:left!important;vertical-align:top!important}
 table.osmly-card-table td:last-child{border-bottom:0!important}
 table.osmly-card-table td::before{content:attr(data-osmly-label);display:block;font-size:10px;line-height:1.45;text-transform:uppercase;letter-spacing:.06em;font-weight:800;color:#67738b;overflow-wrap:anywhere}
 table.osmly-card-table td > *{min-width:0;max-width:100%}
 table.osmly-card-table td button,table.osmly-card-table td select,table.osmly-card-table td input{max-width:100%!important;min-width:0!important;white-space:normal!important}
 table.osmly-card-table td .btn,table.osmly-card-table td button{margin:3px 3px 3px 0;min-height:40px}
 table.osmly-card-table td a{overflow-wrap:anywhere}
 table.osmly-card-table td form{display:flex;flex-wrap:wrap;gap:6px;max-width:100%}
 table.osmly-card-table td select{width:auto;flex:1 1 110px}
 /* Complex tables retain horizontal scroll, never clip their controls. */
 .osmly-scroll-table{position:relative;max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;scrollbar-width:thin;padding-bottom:9px}
 .osmly-scroll-table table{min-width:620px!important}
 .osmly-scroll-hint{font-size:11px;color:#64748b;text-align:right;margin:2px 0 8px;font-weight:650}
 .fields,.form-grid,.grid{min-width:0;max-width:100%}
 .field,.fields > *,form,.heading,.top-actions{min-width:0;max-width:100%}
 .osmly-mobile-nav{min-height:68px}
 body:has(.osmly-mobile-nav){padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))!important}
 .content{padding-bottom:18px!important}
}
@media(max-width:390px){table.osmly-card-table td{grid-template-columns:minmax(72px,32%) minmax(0,1fr)!important;gap:7px!important}table.osmly-card-table tr{padding:10px!important}}
