/* iTrackSuite PWA / mobile polish. Linked LAST in <head> on every page. Scoped and additive; desktop is unchanged
   (all env() insets are 0 outside notched/standalone contexts and the mobile blocks sit behind media queries). */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-tap-highlight-color:rgba(79,124,255,.12)}
body{min-height:100vh;min-height:100dvh}
a,button,input,select,textarea,summary,label,[role=button],[onclick]{touch-action:manipulation}
button,.btn,.btn-small,.btn-sm,.btn-lg,[role=button]{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

/* Safe areas (notch / home indicator / landscape cutouts) */
body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
/* sticky/top bars: the transparent border is painted by the bar's own background, so it extends under the status bar/notch */
.top-bar,.bar,body>header{border-top:env(safe-area-inset-top,0px) solid transparent}
.sidebar{left:env(safe-area-inset-left);padding-top:calc(20px + env(safe-area-inset-top));padding-bottom:calc(20px + env(safe-area-inset-bottom));height:100vh;height:100dvh}
.suite-theme-btn.floating{top:calc(14px + env(safe-area-inset-top));right:calc(14px + env(safe-area-inset-right))}
#hermesFab{bottom:calc(24px + env(safe-area-inset-bottom))!important;right:calc(24px + env(safe-area-inset-right))!important}
/* #hermesPanel safe-area/sheet layout lives in justin-ai-widget.js (full-screen sheet on small screens) */
/* inner scrollers must not scroll the page behind them */
.modal-content,.modal-body,.notif-list,.sidebar,.suite-menu,.sidebar-overlay{overscroll-behavior:contain}

@media (max-width:768px){
  .sidebar{left:0;padding-left:calc(12px + env(safe-area-inset-left))}
  .suite-menu{top:calc(64px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right))}
}

/* iOS zooms the page when a focused field is < 16px */
@media (max-width:768px),(pointer:coarse){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=button]):not([type=submit]):not([type=reset]),
  select,textarea{font-size:16px!important}
}

/* Tap targets */
@media (max-width:768px){
  .btn,.btn-small,.btn-sm,button.nav-item,a.nav-item,.nav-item,.suite-switch-btn,.suite-item,.out,.tab,.ch-subtabs button,.notif-readall,.sbtn{min-height:44px}
  table .btn-small,table .btn-sm{min-height:40px}
  .suite-theme-btn,.notif-bell,.mobile-menu-btn{min-width:44px;min-height:44px}
  .top-bar-actions .btn{min-height:44px;font-size:13px}
  .modal-footer .btn,.modal .btn{min-height:46px}
  /* primary time-tracking actions (dashboard): big and prominent on phones */
  .timer-controls{gap:12px}
  .timer-controls .btn-lg,.timer-controls .btn,.btn-clock,[data-action="clock-in"],[data-action="clock-out"]{min-height:60px;font-size:18px;font-weight:700;border-radius:14px;flex:1 1 100%;width:100%}
  .task-header .btn-small.btn-success{min-height:48px;font-size:14px;font-weight:700;padding-left:16px;padding-right:16px}
}
