/* ── GP Icon System ──────────────────────────────────────────────── */
.gp-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gp-icon--sm  { width: 1rem;   height: 1rem; }
.gp-icon--md  { width: 1.25rem; height: 1.25rem; }
.gp-icon--lg  { width: 1.5rem;  height: 1.5rem; }
.gp-icon--xl  { width: 2rem;    height: 2rem; }
.gp-icon--2xl { width: 2.5rem;  height: 2.5rem; }

/* ── Mobile layout fixes ──────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Nav bottom bar */
  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--color-surface, #fff);
    border-top: 1px solid var(--color-border, #e5e7eb);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.6rem;
    color: var(--color-text-muted, #6b7280);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 6px 0;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item.is-active {
    color: var(--color-primary, #3b82f6);
  }
  .bottom-nav-item .gp-icon { font-size: 1.4rem; }

  /* Main content padding for bottom nav */
  .app-main, main, #app-root > .main-content {
    padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
  }

  /* Hero banner stacks on mobile */
  .hero-banner {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    padding: 24px 16px !important;
  }
  .hero-visual { display: none !important; }
  .hero-cta-group {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .hero-cta-group .hero-cta-btn,
  .hero-cta-group .hero-cta-link {
    width: 100% !important;
    text-align: center !important;
  }
  .hero-title { font-size: 1.75rem !important; }
  .hero-subtitle { font-size: 0.95rem !important; }

  /* Loads cards stack nicely */
  .loads-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .loads-card {
    border-radius: 12px !important;
  }
  .loads-card-route {
    flex-direction: column !important;
    gap: 4px !important;
  }

  /* Header on mobile */
  .site-header .header-nav { display: none !important; }
  .site-header {
    padding: 0 12px !important;
    height: 52px !important;
  }
  .header-right-actions .header-icon-btn { width: 36px; height: 36px; }

  /* Billing cards stack */
  .billing-plans-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Chat panel full width */
  .chat-panel {
    width: 100% !important;
    border-radius: 0 !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet: 2-column loads grid */
  .loads-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hero: narrower visual column */
  .hero-banner {
    grid-template-columns: 1fr 300px !important;
  }

  /* Billing: 2-column */
  .billing-plans-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Header nav: compact */
  .header-nav { gap: 12px !important; }
}

/* ── Touch-friendly tap targets ──────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  button, a, [role="button"] {
    min-height: 44px;
  }
  .loads-card-action {
    min-height: 44px !important;
    padding: 10px 14px !important;
  }
  .auth-shell-btn {
    min-height: 48px !important;
  }
}
