/* Rasid v43 — phone / tablet polish (applies on top of the existing responsive rules) */
.rsp-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.rsp-scroll>table{min-width:100%}
@media(max-width:900px){
  /* header: menu button, title and user tools on ONE row */
  header{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;grid-template-columns:none!important}
  header .mobile-menu-toggle{order:0;flex:0 0 44px}
  header .header-identity{order:1;flex:1 1 auto;min-width:0}
  header .user{order:2;flex:0 0 auto;margin-inline-start:auto}
  #content{padding:12px!important;min-width:0}
  main,.shell>main{min-width:0;max-width:100vw}
  /* touch-friendly controls; 16px inputs stop iOS from zooming on focus */
  input,select,textarea{font-size:16px!important;max-width:100%}
  button,.btn,.cd-btn{min-height:40px}
  .cd-btn.cd-sm{min-height:36px;padding:6px 12px}
  .cd-actions,.cd-row,.cd-pager,.cd-cm{flex-wrap:wrap;gap:8px}
  .cd-pager{justify-content:center}
  .cd-toolbar{grid-template-columns:1fr!important}
  .cd-prow{display:grid!important;grid-template-columns:1fr!important;gap:6px}
  .cd-clause{flex-direction:column;gap:6px}
  .cd-clause .cd-cn{align-self:flex-start}
  .cd-card{padding:12px;min-width:0}
  .cd-card h3{font-size:15px}
  /* dialogs fill the screen width and scroll inside */
  .cd-modal,.cd-modal.wide{width:100%!important;max-width:100%;max-height:94dvh;border-radius:14px}
  .cd-modal-f{flex-wrap:wrap}.cd-modal-f .cd-btn{flex:1 1 40%}
  .cd-overlay{padding:8px;align-items:flex-end}
  .cd-frame{height:70dvh}
  /* wide data tables scroll sideways instead of stretching the page */
  .cd-tablewrap,.table-wrap,.table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  table{max-width:100%}
  .cd-table th,.cd-table td{white-space:nowrap}
  .cd-table td small{white-space:normal}
  /* generic grids collapse to one column on phones */
  .grid,.cards,.kpis,.kpi-grid{grid-template-columns:1fr!important}
}
@media(min-width:601px) and (max-width:900px){
  /* tablets: two columns where there is room */
  .grid,.cards,.kpis,.kpi-grid{grid-template-columns:1fr 1fr!important}
  .cd-toolbar{grid-template-columns:1fr 1fr!important}
}
@media(max-width:480px){
  .cd-modal-f .cd-btn{flex:1 1 100%}
  .license-export-actions button,.cd-actions .cd-btn{width:100%}
}
@media(hover:none){a,button{-webkit-tap-highlight-color:rgba(0,105,70,.15)}}
