/* Credit365 Mobile — v2 */
@media (max-width: 768px) {
  *, *::before, *::after { box-sizing: border-box; }
  body { overflow-x: hidden !important; }

  /* ===== LANDING PAGE ===== */
  nav .nav-links, nav ul:not(.tabs) { display: none !important; }
  h1 { font-size: 32px !important; line-height: 1.25 !important; }
  h2 { font-size: 22px !important; }
  section { padding: 40px 20px !important; }
  .hero { padding: 60px 20px 40px !important; }
  .hero .btn, .hero a[href] { display: block !important; width: 100% !important; margin: 8px 0 !important; text-align: center !important; }
  [class*="features-grid"], [class*="grid-3"] { grid-template-columns: 1fr !important; }
  footer { flex-direction: column !important; text-align: center !important; padding: 24px 20px !important; gap: 12px !important; }
  footer div { flex-wrap: wrap !important; justify-content: center !important; }
  input, select, textarea { font-size: 16px !important; }
  button { min-height: 44px !important; }

  /* ===== DASHBOARD ===== */
  /* Tab bar — force single row horizontal scroll */
  nav.tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 0 8px !important;
    gap: 4px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  nav.tabs::-webkit-scrollbar { display: none !important; }
  nav.tabs .tab-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
  }

  /* Dashboard header */
  header { padding: 10px 16px !important; }

  /* Content padding */
  .tab-content, [class*="tab-content"] { padding: 16px !important; }

  /* Credit overview top cards — stack to 1 col */
  .overview-cards, [class*="overview-cards"],
  .credit-overview > div:first-of-type > div { 
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Account overview stats — 2 col grid */
  .account-overview .stats, [class*="account-stats"],
  .stats-grid, [class*="stats-grid"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Generic 3-col grids -> 2-col */
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Negative items rows */
  [class*="item-row"], [class*="negative-item"] {
    flex-direction: column !important;
    gap: 6px !important;
    padding: 10px !important;
  }

  /* Dispute cards */
  [class*="dispute-card"], [class*="letter-card"] {
    padding: 14px !important;
  }
}

/* Very small phones */
@media (max-width: 400px) {
  h1 { font-size: 26px !important; }
  nav.tabs .tab-btn { padding: 8px 10px !important; font-size: 11px !important; }
  .account-overview .stats, .stats-grid, [class*="stats-grid"] {
    grid-template-columns: 1fr !important;
  }
}