/* Agenda e Clientes no telemóvel (≤ 760 px). */
.hm-meta, .hm-kicker, .hm-more { display: none; }
@media (max-width: 760px) {
  /* ---- Agenda ---- */
  #agenda.hm-on .audit-agenda-actions button:not([data-agenda-today]), #agenda.hm-on #auditAgendaDate { display: none !important; }
  #agenda.hm-on .audit-agenda-day { overflow: hidden; }
  #agenda.hm-on .audit-agenda-event { position: relative; touch-action: pan-y; }
  #agenda.hm-on .audit-agenda-event.hm-drag { cursor: grabbing; user-select: none; }
  #agenda.hm-on .hm-kicker { display: block; grid-column: 1 / -1; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--product-muted, var(--mist2, #4d5a54)); }
  #agenda.hm-on .audit-agenda-event.hm-next { border-width: 2px !important; }
  #agenda.hm-on .audit-agenda-event.hm-next b { font-size: 18px; letter-spacing: -.01em; }
  #agenda.hm-on .audit-agenda-event.hm-next [data-visit-open], #agenda.hm-on .audit-agenda-event.hm-next [data-visit-outcome] { min-height: 46px; }
  #agenda.hm-on .audit-agenda-event-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  #agenda.hm-on .hm-more { display: block; flex-basis: 100%; }
  #agenda.hm-on .hm-more summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size: 13px; color: var(--product-muted, var(--mist2, #4d5a54)); }
  #agenda.hm-on .hm-more[open] { display: flex; flex-wrap: wrap; gap: 8px; }
  #agenda.hm-on .hm-more[open] summary { flex-basis: 100%; }
  /* O fundo da ação aparece por trás à medida que a visita desliza. */
  #agenda.hm-on .audit-agenda-event[data-dir="right"]::before, #agenda.hm-on .audit-agenda-event[data-dir="left"]::after { content: attr(data-hm-r); position: absolute; top: 0; bottom: 0; width: 100%; display: flex; align-items: center; padding: 0 16px; font-size: 13px; font-weight: 600; }
  #agenda.hm-on .audit-agenda-event[data-dir="right"]::before { right: 100%; background: var(--bg-success, #e3f1e6); color: var(--text-success, #1f6a3a); }
  #agenda.hm-on .audit-agenda-event[data-dir="left"]::after { content: attr(data-hm-l); left: 100%; justify-content: flex-end; background: var(--bg-warning, #f6ead2); color: var(--text-warning, #7a5410); }

  /* ---- Clientes: uma linha por cliente (nome, o que fazer a seguir, e contacto a um toque) ---- */
  #page-clientes.hm-on .crm-kpis { display: none; }
  #page-clientes.hm-on #clientRows tr[data-on-click="openClient"] { position: relative; touch-action: pan-y; padding: 14px 16px; gap: 6px; transform: translateX(var(--hm-dx, 0px)); }
  #page-clientes.hm-on #clientRows tr.hm-drag { cursor: grabbing; user-select: none; }
  #page-clientes.hm-on #clientRows td { padding: 0; border: 0; }
  #page-clientes.hm-on #clientRows td::before { display: none !important; }
  #page-clientes.hm-on #clientRows td:nth-child(n+2):nth-child(-n+6) { display: none !important; }
  #page-clientes.hm-on .hm-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--product-muted, var(--mist2, #4d5a54)); }
  #page-clientes.hm-on #clientRows td:nth-child(7) small { display: none; }
  #page-clientes.hm-on #clientRows td:nth-child(7) .crm-actions { margin-top: 8px; }
  #page-clientes.hm-on #clientRows td:nth-child(7) .crm-actions button { min-width: 48px; min-height: 44px; font-size: 14px; }
  #page-clientes.hm-on #clientRows tr[data-dir="right"]::before, #page-clientes.hm-on #clientRows tr[data-dir="left"]::after { content: attr(data-hm-r); position: absolute; top: 0; bottom: 0; width: 100%; display: flex; align-items: center; padding: 0 16px; font-size: 13px; font-weight: 600; }
  #page-clientes.hm-on #clientRows tr[data-dir="right"]::before { right: 100%; background: var(--bg-success, #e3f1e6); color: var(--text-success, #1f6a3a); }
  #page-clientes.hm-on #clientRows tr[data-dir="left"]::after { content: attr(data-hm-l); left: 100%; justify-content: flex-end; background: var(--bg-warning, #f6ead2); color: var(--text-warning, #7a5410); }
  #page-clientes.hm-on #clientListCard { overflow: hidden; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  #agenda.hm-on .audit-agenda-event, #page-clientes.hm-on #clientRows tr[data-on-click="openClient"] { transition: transform .32s cubic-bezier(.2, .9, .3, 1.15); }
  #agenda.hm-on .audit-agenda-event.hm-drag, #page-clientes.hm-on #clientRows tr.hm-drag { transition: none; }
}
