@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  :root { --container-pad: 16px; }
  .container { padding: 0 16px; }

  .hero h1 { font-size: 2rem; }
  .hero-desc { font-size: 1rem; }
  .hero { padding: 48px 0 40px; }

  header { --header-h: 64px; }
  .logo-text { font-size: 1rem; }
  header nav { gap: 2px; }
  .nav-link { padding: 8px 12px; font-size: 0.82rem; }

  .search-box { max-width: 100%; }
  .search-input-wrap input { padding: 16px 12px; font-size: 0.95rem; }
  .search-input-wrap button { padding: 12px 20px; font-size: 0.88rem; }
  .search-icon { display: none; }

  .filters .container { flex-direction: column; gap: 12px; }
  .filter-group, .filter-item { width: 100%; }
  .filters select { width: 100%; min-width: auto; }
  .active-filters { margin-right: 0; }

  .card-header { flex-direction: column; align-items: flex-start; }
  .branch-header { flex-direction: column; align-items: flex-start; }

  .form-row { grid-template-columns: 1fr; }
  .form-card form { padding: 20px; }
  .form-card-header { padding: 20px; }
  .upload-zone { margin: 0 16px 16px; padding: 32px 16px; }

  .table-container { background: transparent; border: none; box-shadow: none; }
  table, thead, tbody, th, td, tr { display: block; }
  thead tr { display: none; }

  tbody tr {
    background: var(--bg-elevated);
    border: 1px solid var(--stone);
    border-top: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
  }

  tbody tr:nth-child(even) td, tbody tr:hover td { background: transparent; }

  td {
    border: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  td:last-child { border-bottom: none; }

  .admin-header { flex-direction: column; align-items: stretch; }
  .admin-header-actions { flex-direction: column; }
  .search-input-mini, .search-input-mini input { width: 100%; }

  .tabs {
    border-radius: var(--radius-sm);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab { flex: none; padding: 14px 16px; font-size: 0.82rem; min-height: 48px; }
  .tab::after { width: 40%; }

  .login-card { margin: 32px 8px; padding: 32px 24px; }
}

@media (max-width: 480px) {
  :root { --header-h: 56px; }

  .hero h1 { font-size: 1.5rem; }
  .hero-badge { font-size: 0.72rem; padding: 6px 14px; }

  .search-input-wrap { flex-direction: column; border-radius: var(--radius-lg); }
  .search-input-wrap input { width: 100%; padding: 16px 16px 8px; }
  .search-input-wrap button { width: calc(100% - 12px); margin: 0 6px 6px; border-radius: var(--radius-sm); justify-content: center; }

  .logo-text { font-size: 0.9rem; }
  .logo-icon { font-size: 1.2rem; }
  header nav .nav-link { padding: 6px 8px; font-size: 0.78rem; min-height: 40px; }
  .nav-link.active::after { right: 10%; width: 80%; }

  .results-info { flex-direction: column; gap: 8px; align-items: flex-start; }

  .toast {
    left: 16px;
    right: 16px;
    transform: translateY(120px);
    border-radius: var(--radius-xs);
    max-width: none;
  }

  .toast.show { transform: translateY(0); }

  .btn { padding: 12px 20px; min-height: 44px; font-size: 0.85rem; }

  .card-header { padding: 16px; }
  .card-body { padding: 4px 16px 16px; }
  .branch-item { padding: 14px 0; }

  .empty-state { padding: 48px 20px; }
  .empty-icon { width: 64px; height: 64px; }
  .autocomplete { right: 0; left: 0; border-radius: var(--radius-sm); }

  .analytics-grid { grid-template-columns: 1fr 1fr; }
}
