/* NotaCerta Local — ajustes para Safari/PWA no iPhone. */
@supports (-webkit-touch-callout:none) {
  html { -webkit-text-size-adjust:100%; }
  body { -webkit-overflow-scrolling:touch; }
  input,textarea,select { font-size:16px !important; }
  .table-scroll { -webkit-overflow-scrolling:touch; }
  .modal-body { -webkit-overflow-scrolling:touch; }
}
@media (max-width:850px) {
  html,body { min-height:100%; overflow-x:hidden; }
  .shell { min-height:100dvh; }
  .sidebar { height:100dvh; padding-top:max(22px,env(safe-area-inset-top)); padding-bottom:max(20px,env(safe-area-inset-bottom)); overflow-y:auto; }
  .content { padding-bottom:max(65px,env(safe-area-inset-bottom)); }
  .header { min-height:72px; height:auto; padding-top:max(8px,env(safe-area-inset-top)); }
  .head-actions { gap:4px; flex-shrink:0; }
  .head-actions .btn { min-width:42px; min-height:44px; padding:10px; }
  .head-title { font-size:17px; }
  .head-left .eyebrow { font-size:9px; }
  .auth-screen { padding: max(16px,env(safe-area-inset-top)) 12px max(24px,env(safe-area-inset-bottom)); min-height:100dvh; }
  .auth-card { max-width:100%; border-radius:16px; }
  .auth-card input { min-height:48px; }
  .modal-bg { align-items:flex-end; padding:0; padding-top:env(safe-area-inset-top); }
  .modal { width:100%; max-height:94dvh; border-radius:20px 20px 0 0; padding-bottom:env(safe-area-inset-bottom); }
  .modal-header h2 { font-size:17px; }
  .modal-footer { display:flex; flex-wrap:wrap; gap:8px; }
  .modal-footer .btn { min-height:44px; flex:1 1 auto; }
  .nc-inline-actions { display:flex; flex-wrap:wrap; align-items:center; }
  .nc-inline-actions .btn, .row-actions .btn { min-height:44px; }
  .data-table { min-width:680px; }
  .page-intro { gap:10px; }
  .page-intro h2 { font-size:19px; }
  input[type=file] { max-width:100%; }
  .nc-parcel-actions { display:flex; flex-wrap:wrap; gap:6px; }
  .nc-file-preview iframe { height:55dvh; min-height:250px; }
  .nc-file-preview img { max-height:60dvh; max-width:100%; object-fit:contain; }
}
@media (max-width:390px) {
  .head-title { font-size:15px; }
  .header { padding-left:10px; padding-right:10px; }
  .content { padding-left:10px; padding-right:10px; }
  .kpi-grid { gap:7px; }
  .kpi { padding:12px 9px; }
  .kpi-val { font-size:18px; }
  .kpi-label { font-size:10px; }
  .nc-form-grid { grid-template-columns:1fr; }
  .nc-wide { grid-column:auto; }
}
@media (pointer:coarse) {
  a, .btn, .nav button, button { touch-action:manipulation; }
  .btn-small { min-height:40px; }
}
