/* ─────────────────────────────────────────
   LOBBER — Mobile CSS (adicionar ao global.css)
   Breakpoints: mobile < 768px, tablet 768–1024px
   ───────────────────────────────────────── */

/* ── HAMBURGER BUTTON ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: transparent; border: none;
  cursor: pointer; padding: 4px;
  border-radius: var(--radius-sm);
  transition: background .15s;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--gray-100); }
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: all .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── SIDEBAR OVERLAY (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 49;
  opacity: 0;
  transition: opacity .25s;
}
.sidebar-overlay.show { opacity: 1; }

@media (max-width: 768px) {

  /* ── LAYOUT ── */
  body { overflow-x: hidden; }

  .main { margin-left: 0 !important; }

  /* ── SIDEBAR MOBILE ── */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 50;
    width: 260px !important;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; }

  /* ── HAMBURGER VISÍVEL ── */
  .hamburger { display: flex; }

  /* ── TOPBAR MOBILE ── */
  .topbar {
    padding: 0 16px !important;
    height: 56px !important;
    gap: 10px !important;
  }
  .topbar-plan { display: none !important; }
  .topbar-title { font-size: 14px !important; }
  .greeting { font-size: 13px !important; }

  /* ── CONTENT ── */
  .content { padding: 16px !important; }

  /* ── KPI GRID ── */
  .kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .kpi-val { font-size: 24px !important; }
  .kpi-label { font-size: 12px !important; }
  .kpi-card { padding: 14px !important; }

  /* ── MAIN GRID ── */
  .main-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
  }

  /* ── BOTTOM GRID ── */
  .bottom-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* ── OPORTUNIDADES ── */
  .oport-row {
    padding: 12px 14px !important;
    flex-wrap: wrap;
    gap: 8px !important;
  }
  .oport-thumb { width: 36px !important; height: 36px !important; }
  .oport-metrics { gap: 10px !important; }
  .oport-metric-val { font-size: 13px !important; }

  /* ── PRODUCT GRID ── */
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ── FILTERS BAR ── */
  .filters-bar {
    gap: 8px !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .filters-bar::-webkit-scrollbar { display: none; }
  .filters-right { display: none !important; }
  .filters-label { display: none !important; }

  /* ── RESULTS HEADER ── */
  .results-header { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* ── DETAIL PANEL ── */
  .detail-panel {
    width: 100% !important;
    top: auto !important;
    bottom: 0 !important;
    height: 90vh !important;
    transform: translateY(100%) !important;
    border-radius: 16px 16px 0 0 !important;
    border-left: none !important;
    border-top: 1px solid var(--gray-200) !important;
  }
  .detail-panel.open { transform: translateY(0) !important; }

  /* ── TRIAL BANNER ── */
  .trial-banner {
    flex-wrap: wrap;
    gap: 10px !important;
    padding: 14px !important;
  }
  .trial-days { order: -1; }
  .trial-cta { width: 100%; justify-content: center; }
  .trial-banner-grid { display: none; }

  /* ── ALERTAS ── */
  .alerts-layout {
    grid-template-columns: 1fr !important;
  }
  .alert-card-inner { padding: 14px !important; }
  .alert-card-actions { padding: 8px 14px 12px !important; flex-wrap: wrap; }

  /* ── TABS ── */
  .tabs { overflow-x: auto; flex-wrap: nowrap !important; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; padding: 6px 10px !important; font-size: 12px !important; }
  .inner-tabs { overflow-x: auto; }
  .inner-tabs::-webkit-scrollbar { display: none; }
  .inner-tab { white-space: nowrap; padding: 8px 14px !important; font-size: 13px !important; }

  /* ── PERFIL ── */
  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .form-grid { grid-template-columns: 1fr !important; }
  .field-row { grid-template-columns: 1fr !important; }

  /* ── PLANOS ── */
  .plans-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .plan-card { margin-top: 16px; }
  .plans-title { font-size: 26px !important; }

  /* ── PLAN USAGE ── */
  .plan-upgrade { flex-direction: column; gap: 10px; }
  .plan-upgrade-btn { width: 100%; text-align: center; }

  /* ── NOTIFICAÇÕES ── */
  .notif-layout { gap: 12px !important; }

  /* ── AUTH PAGE ── */
  .left-panel { display: none !important; }
  .right-panel { padding: 32px 20px !important; }

  /* ── LANDING PAGE ── */
  nav { padding: 0 16px !important; height: 56px !important; }
  .nav-links { display: none !important; }
  .hero { padding: 80px 20px 60px !important; }
  .hero h1 { font-size: 36px !important; }
  .hero p { font-size: 15px !important; }
  .hero-stats { gap: 24px !important; flex-wrap: wrap; margin-top: 40px !important; }
  .hero-stat-val { font-size: 28px !important; }
  .preview-section { padding: 0 16px 60px !important; }
  .preview-cards { grid-template-columns: 1fr !important; }
  .preview-bottom { grid-template-columns: 1fr !important; }
  .section { padding: 60px 20px !important; }
  .steps { grid-template-columns: 1fr !important; gap: 16px !important; }
  .features-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .metrics-inner { grid-template-columns: 1fr 1fr !important; }
  .plans-grid { grid-template-columns: 1fr !important; }
  .testimonials-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .section-title { font-size: 28px !important; }
  .faq-list { max-width: 100% !important; }
  div[style*="grid-template-columns:1fr 1fr;gap:80px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .cta-section { padding: 60px 20px !important; }
  footer {
    flex-direction: column !important;
    text-align: center !important;
    padding: 32px 20px !important;
    gap: 16px !important;
  }

  /* ── CARD HEADERS ── */
  .card-header { padding: 14px 16px !important; }
  .card-body { padding: 14px 16px !important; }
  .card-title { font-size: 14px !important; }

  /* ── SUPPLIER ROWS ── */
  .supplier-row { flex-direction: column; gap: 8px; }
  .supplier-right { text-align: left !important; }

  /* ── SIMULADOR ── */
  .sim-wrap { padding: 14px !important; }

  /* ── DETAIL METRICS ── */
  .detail-metrics { grid-template-columns: repeat(3, 1fr) !important; }
  .detail-mkt-list { gap: 8px !important; }

  /* ── PLAN CARD ── */
  .plan-card { padding: 20px !important; }

  /* ── SEARCH WRAP ── */
  .search-wrap { max-width: 100% !important; }
  .search-kbd { display: none !important; }
}

/* ── TABLET ── */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --sidebar: 200px; }

  .kpi-grid { grid-template-columns: 1fr 1fr !important; }
  .main-grid { grid-template-columns: 1fr !important; }
  .bottom-grid { grid-template-columns: 1fr 1fr !important; }
  .plans-grid { grid-template-columns: 1fr !important; }
  .profile-layout { grid-template-columns: 1fr !important; }
  .content { padding: 20px !important; }
  .steps { grid-template-columns: 1fr 1fr !important; }
  .hero h1 { font-size: 52px !important; }
}
