/*
 * Phone polish for every customer-facing page (dashboard, profile, login, track, invoice, rating,
 * enquiry, POS, shop, franchise…). Linked after each page's own styles; only touches phones.
 * Deliberately general and safe — page-specific mobile layout stays in each page.
 */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
a, button, input, select, textarea, label, summary{ touch-action:manipulation; }
* { -webkit-tap-highlight-color:rgba(194,26,143,.12); }

@media (max-width:760px){
  /* iPhone zooms the whole page into any field under 16px — keep every field at 16px. */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),
  select, textarea{ font-size:16px !important; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]),
  select{ min-height:44px; }
  input[type=file]{ font-size:14px !important; padding:6px 0; max-width:100%; }
  input[type=checkbox], input[type=radio]{ width:20px; height:20px; accent-color:#a3157a; flex-shrink:0; }

  /* Buttons a thumb can hit (44px is Apple's and Google's minimum). */
  button:not(.notif-bell-btn):not(.eye):not(.del):not(.cbn-skip), .btn, input[type=submit]{ min-height:44px; }

  /* "← Back to …" links are often 16px tall — give them a real target. */
  .back-link, a.back, .top-actions a, .toolbar > a[href^="track.php"]{ display:inline-flex !important; align-items:center; min-height:44px; padding:6px 0; font-size:14px !important; }

  /* Long words (product names with sizes, emails, tracking codes) wrap instead of widening the page. */
  h1, h2, h3, p, td, th, li, b, .job-desc{ overflow-wrap:break-word; }

  /* Any table that's wider than the phone scrolls inside its card rather than the whole page. */
  .table-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%; }
  .table-scroll > table{ min-width:520px; }
}
