/* Mobile performance and fixed bottom navigation patch */
@media (max-width: 720px) {
  html,
  body {
    scroll-behavior: auto !important;
  }

  body {
    padding-bottom: 98px !important;
    background-attachment: scroll !important;
  }

  body::before,
  body::after,
  .hero::before,
  .login-visual::before,
  .details::before,
  .orb,
  .orb-a,
  .orb-b {
    animation: none !important;
    filter: none !important;
  }

  .bottom-nav {
    display: grid !important;
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    z-index: 9999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateZ(0) !important;
    contain: layout paint !important;
    will-change: transform !important;
    border-radius: 24px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28) !important;
  }

  .bottom-nav button {
    min-height: 54px !important;
  }

  .bottom-nav .main {
    transform: translateY(-8px) !important;
    box-shadow: 0 10px 26px rgba(5,150,105,.30) !important;
  }

  .hero,
  .cards-section,
  .details,
  .login-card,
  .login-visual,
  .modal-panel,
  .stats article,
  .report-card,
  .detail-grid article,
  .beneficiary-summary,
  .tests-summary,
  .beneficiary-cards article,
  .test-cards article,
  .official-report summary,
  .report-actions-panel,
  .template-panel,
  .confirm-card {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255,255,255,.08) !important;
  }

  .hero,
  .cards-section,
  .details,
  .stats article,
  .report-card {
    content-visibility: auto;
    contain-intrinsic-size: 260px;
  }

  .stats article,
  .report-card,
  .detail-grid article {
    transition: border-color .16s ease, background .16s ease !important;
  }

  .report-card:hover,
  .report-card.active,
  .action-float:hover,
  .hero-actions .btn.ghost:hover,
  .template-chip:hover {
    transform: none !important;
  }

  .details {
    animation: detailsDropLite .18s ease-out both !important;
  }

  .card-badge.warn {
    animation: redPulseLite 1.6s ease-in-out infinite !important;
  }

  .theme-switch-shell {
    transform: scale(.86) translateZ(0) !important;
    transform-origin: top left !important;
    filter: none !important;
  }

  .kpi-card::after,
  .kpi-wide::after,
  .report-card::before {
    display: none !important;
  }
}

@keyframes detailsDropLite {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes redPulseLite {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.35); }
  50% { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}
