/* © 2026 Finfident PTY LTD (ABN 94 679 280 801). All rights reserved. Proprietary and confidential.
   Finfident Hub on iPad and Android tablets (1 Nov 2026).
   The phone app layout stretched edge to edge on a tablet and the home "toolkit" swipe row showed one giant card
   with the next one cut off. On tablet-sized screens (app only) this file:
   - centres the content in a readable column (920px, 1040px in landscape)
   - turns the swipe rows into a proper two-column grid
   - centres the bottom tab bar, the sign-in sheet and the staff bottom sheets
   Phones are not affected (needs at least 700px wide AND 600px tall). */
@media (min-width:700px) and (min-height:600px){
  html.ff-app{--ff-tw:920px}
  html.ff-app #top .bar{max-width:calc(var(--ff-tw) + 32px);margin-left:auto!important;margin-right:auto!important;box-sizing:border-box}
  html.ff-app #heroIn{max-width:var(--ff-tw);margin-left:auto!important;margin-right:auto!important;box-sizing:content-box}
  html.ff-app main#main{max-width:var(--ff-tw)!important;margin-left:auto!important;margin-right:auto!important;box-sizing:content-box;align-content:start}
  /* loan health result: four small figures fit better as two by two in the narrower card */
  html.ff-app #main .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* two-card rows: a real grid instead of the phone swipe row */
  html.ff-app #main .g2{grid-template-columns:repeat(2,minmax(0,1fr))}
  html.ff-app body[data-tab="home"] #main .grid.g2{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;scroll-snap-type:none;margin:0;padding:0}
  html.ff-app body[data-tab="home"] #main .grid.g2>*{flex:none;min-width:0}
  html.ff-app #main .ml-grid{align-items:start}
  html.ff-app #main .g3{grid-template-columns:repeat(3,minmax(0,1fr))}
  html.ff-app #main .grid>*{min-width:0}

  /* bottom tab bar: centred pill instead of full width */
  html.ff-app #tabbar{left:0!important;right:0!important;margin-left:auto!important;margin-right:auto!important;width:min(640px,calc(100% - 24px))!important;box-sizing:border-box}
  html.ff-app #tabbar button{font-size:.72rem!important}

  /* sign-in screen: a centred card */
  html.ff-app .ffsi-sheet{width:min(560px,calc(100% - 48px));margin:0 auto calc(24px + env(safe-area-inset-bottom,0px));border-radius:30px;box-sizing:border-box}

  /* staff app: bottom sheets and full-page panels */
  html.ff-app .sm-sheet-ov .sm-sheet{left:0!important;right:0!important;margin:0 auto;max-width:640px;border-radius:28px 28px 0 0}
  html.ff-app .sm-fab{right:max(20px,calc((100% - var(--ff-tw)) / 2))}
  html.ff-app .sm-page:not(.sm-chatpage) .sm-pb{padding-left:max(16px,calc((100% - 820px) / 2))!important;padding-right:max(16px,calc((100% - 820px) / 2))!important}
  html.ff-app .sm-chatpage .sm-log,html.ff-app .sm-chatpage .sm-pb>:last-child{padding-left:max(14px,calc((100% - 820px) / 2));padding-right:max(14px,calc((100% - 820px) / 2))}
}
@media (min-width:1200px) and (min-height:600px){
  html.ff-app{--ff-tw:1040px}
}
