/* ════════════════════════════════════════════════════════════════
   NexusCare — responsividade (módulo) · tablets e telemóveis
   Reforça o comportamento mobile dos ecrãs do backoffice clínico.
   ════════════════════════════════════════════════════════════════ */

/* Tablets e abaixo */
@media (max-width: 1024px) {
  .dash-row { grid-template-columns: 1fr !important; }
  .ficha-layout { grid-template-columns: 1fr !important; }
  /* Tabelas largas: scroll horizontal em vez de rebentar o layout */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 560px; }
}

/* Telemóveis */
@media (max-width: 640px) {
  .app-content { padding: 1rem !important; }
  .topbar { flex-wrap: wrap; row-gap: .5rem; }
  .topbar-meta { margin-left: auto; }
  .vitais-box { grid-template-columns: repeat(2, 1fr) !important; }
  .aprend-fonte { grid-template-columns: 1fr auto; }
  .aprend-fonte .af-bar { display: none; }   /* poupa espaço; mantém nome + % */
  .agente-sinais { gap: .3rem; }
  /* Botões de ação no topo das fichas empilham e ocupam a largura */
  .ficha-actions, .ficha-toolbar { flex-direction: column; align-items: stretch; }
}

/* Toque: alvos mínimos confortáveis */
@media (pointer: coarse) {
  .btn, .rag-btn, .estado-tag, .chip-sugestao { min-height: 40px; }
}
