@media (max-width: 650px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .content { padding-inline: 16px; }
  .topbar { gap: 12px; }
  .topbar h1 { max-width: 170px; line-height: 1.25; }
  .view { padding-top: 28px; }
  .intro { gap: 14px; }
  .intro-actions { width: 100%; justify-content: space-between; }
  .tour-trigger { min-height: 44px; }
  .panel { padding: 18px; }

  #deliveries .table-panel,
  #reports .panel { overflow: visible; padding: 0; border: 0; background: transparent; }
  #deliveries table,
  #reports .findings { min-width: 0; }
  #deliveries thead,
  #reports .findings thead { display: none; }
  #deliveries tbody,
  #reports .findings tbody { display: grid; gap: 12px; }
  #deliveries tr,
  #reports .findings tr { display: block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
  #deliveries td,
  #reports .findings td { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
  #deliveries td:first-child,
  #reports .findings td:first-child { border-top: 0; }
  #deliveries td::before,
  #reports .findings td::before { color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
  #deliveries td:nth-child(1)::before { content: "Beneficiario"; }
  #deliveries td:nth-child(2)::before { content: "Recurso"; }
  #deliveries td:nth-child(3)::before { content: "Punto"; }
  #deliveries td:nth-child(4)::before { content: "Estado"; }
  #deliveries td:nth-child(5)::before { content: "Acciones"; }
  #reports .findings td:nth-child(1)::before { content: "Hallazgo"; }
  #reports .findings td:nth-child(2)::before { content: "Referencia"; }
  #reports .findings td:nth-child(3)::before { content: "Acción"; }
  #deliveries .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  #deliveries button,
  #reports .findings button { min-height: 42px; }

  .audit-score { padding: 20px; }
  .score-ring { width: 66px; height: 66px; flex: 0 0 auto; }
  .profile-popover { position: fixed; top: 78px; right: 16px; left: 16px; width: auto; }
  .tour-card { max-height: min(320px, calc(100vh - 32px)); overflow: auto; }
}

@media (max-width: 800px) {
  .sidebar { position: sticky; top: 0; z-index: 30; box-shadow: 0 8px 24px #06192724; }
  .sidebar nav { margin-inline: -4px; padding: 2px 4px 4px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .nav-link { min-height: 44px; display: flex; align-items: center; scroll-snap-align: center; }
  .nav-link.active { box-shadow: inset 0 -3px var(--mint); }
  .nav-swipe-hint { display: block; margin-top: 5px; color: #9fc0ca; font-size: .72rem; text-align: right; transition: opacity .25s ease; }
  .nav-swipe-hint.seen { opacity: 0; }
}

@media (min-width: 801px) {
  .nav-swipe-hint { display: none; }
}

.empty-module { min-height: 320px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); border-style: dashed; }
.empty-module span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: #edf4f6; color: var(--green); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.empty-module p { max-width: 430px; margin: 14px 0 0; }

@media (max-width: 390px) {
  #deliveries td,
  #reports .findings td { grid-template-columns: 1fr; gap: 4px; }
  .audit-score { gap: 12px; }
}
