/* ============================================================
   Atlantic Commercial Admin — mobile arrangement layer (loads after v3).
   Tightens the stacked-card tables into compact 2-up grids,
   keeps stats/touch targets roomy, kills sideways drift.
   ============================================================ */

/* Global (all widths): safety nets */
.wiz-photo img:not([src]),.wiz-photo img[src=""]{display:none}
.fn-table td{min-width:0}
.fn-table td .fn-badge,.fn-table td .fn-approve,.fn-table td .fn-btn-danger{white-space:nowrap}

@media(max-width:900px){
  /* topbar: slimmer, steadier */
  .fn-topbar{padding:8px 10px}
  .fn-hero{padding:16px}
  .fn-hero h1,.fn-hero h2{font-size:1.15rem;line-height:1.25}
  .fn-table-card{padding:12px;border-radius:16px}
  /* long refs / hashes must wrap, never push the page sideways */
  .fn-table td,.fn-idchip,.fn-hash,.mono{overflow-wrap:anywhere;word-break:break-word;min-width:0}
}

@media(max-width:560px){
  /* stats stay 2-up on phones — 1 column wastes the viewport */
  .fn-stats,.fn-objs{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .fn-stat{padding:13px 12px;min-width:0}
  .fn-stat .v{font-size:1.3rem;overflow-wrap:anywhere}
  .fn-stat .t{font-size:.62rem}

  /* stacked table cards → compact 2-column grid */
  .fn-table tr{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;padding:12px 12px 10px}
  .fn-table td{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:3px;text-align:left;padding:6px 2px;font-size:.8rem;border:none;min-width:0}
  .fn-table td::before{margin:0}
  .fn-table td:first-child{grid-column:1/-1;padding-bottom:8px;margin-bottom:4px;border-bottom:1px dashed var(--fn-border-soft)}
  .fn-table td:last-child{grid-column:1/-1;display:flex;flex-direction:row;gap:8px;padding-top:8px}
  .fn-table td:last-child::before{display:none}
  .fn-table td:last-child>*{flex:1;text-align:center}
  .fn-table td:empty{display:none}

  /* hero + section heads compress */
  .fn-hero-top{gap:8px}
  .fn-table-card h3,.fn-card h3{font-size:.95rem}
  .fn-idchip{font-size:.66rem;padding:6px 10px;max-width:100%;overflow-wrap:anywhere}

  /* review + detail rows stay single column, tighter */
  .wiz-review .rr{padding:10px 12px}
  .fn-detail{padding:12px}

  /* bottom bar: safe-area + even slots */
  .fn-mobilebar{padding-bottom:calc(6px + env(safe-area-inset-bottom,0px))}
  .fn-mobilebar a{min-width:0;flex:1}
}

@media(max-width:380px){
  .fn-stats,.fn-objs{grid-template-columns:1fr}
  .fn-stat .v{font-size:1.2rem}
  .fn-table tr{padding:10px}
  .fn-topbar{gap:6px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
