/* Phone layout: the side menu becomes a bar along the bottom, tables show the essentials. */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .shell { flex-direction: column; }
  .main { order: 1; flex: 1; min-height: 0; }
  .sidebar {
    order: 2; width: 100%; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    gap: 0; overflow-x: auto; overflow-y: hidden; border-top: 1px solid #1F2E47;
  }
  .side-brand, .nav-title, .side-status { display: none !important; }
  .nav { flex-direction: row; gap: 0; flex: 1; }
  .nav + .nav { flex: 0 0 auto; }
  .nav-item { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 6px 4px; min-width: 64px; justify-content: center; align-items: center; }
  .sidebar .label { display: block !important; white-space: nowrap; }
  .topbar { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; gap: 8px; }
  .topbar .btn { display: none; }
  .search { flex-basis: 100%; order: 5; }
  .user-chip .who { display: none; }
  .content { padding: 14px 12px 24px; }
  .page-head h1 { font-size: 19px; }
  .actions .btn { height: 40px; }
  table.list { min-width: 0; }
  table.list th:nth-child(2), table.list td:nth-child(2),
  table.list th:nth-child(3), table.list td:nth-child(3) { display: none; }
  table.list td { padding: 11px 10px; }
  .row-more { opacity: 1; }
  .backdrop { padding: 0; align-items: flex-end; }
  .dialog { border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
  .dialog-body { padding: 18px 16px; }
  .uploads { inset-inline: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
