:root {
  --vortex-mobile-nav-height: 68px;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-cache-refresh {
  display: none;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-width: 0;
  }

  #app-main {
    padding-bottom: var(--vortex-mobile-nav-height);
  }

  #app-main > header {
    height: 64px;
    padding-left: 16px;
    padding-right: 16px;
  }

  #app-main > header h1 {
    font-size: 1rem;
  }

  #page-content {
    min-width: 0;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.22);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-width: 0;
    border: 0;
    border-radius: 12px;
    padding: 8px 4px;
    background: transparent;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
  }

  .mobile-bottom-nav i {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
  }

  .mobile-bottom-nav a.active {
    background: rgba(99, 102, 241, 0.28);
    color: #fff;
  }

  .mobile-cache-refresh {
    position: fixed;
    right: 14px;
    bottom: calc(var(--vortex-mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 61;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  }

  .mobile-only {
    display: inline-flex;
  }

  .dashboard-cliente > section,
  .bg-white.border.border-slate-200.rounded-lg {
    border-radius: 12px;
  }

  #view-kanban {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #kanban-board {
    min-height: auto;
    align-items: stretch;
    scroll-snap-type: x mandatory;
  }

  #kanban-board .kanban-column {
    min-width: min(86vw, 360px);
    width: min(86vw, 360px);
    max-height: calc(100vh - 220px);
    scroll-snap-align: start;
  }

  .lead-card {
    border-radius: 14px;
    cursor: default;
  }

  .lead-card[draggable="true"] {
    -webkit-user-drag: none;
  }

  .mobile-lead-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: 10px;
  }

  .mobile-lead-actions a,
  .mobile-lead-actions button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 15px;
  }

  .mobile-lead-actions a.is-disabled {
    pointer-events: none;
    opacity: 0.45;
  }

  #view-lista table {
    min-width: 820px;
  }

  #view-lista {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #modalNovoLead,
  #modalConverterLead,
  #modalMoverLeadMobile {
    align-items: stretch;
    padding: 0;
  }

  #modalNovoLead > div,
  #modalConverterLead > div,
  #modalMoverLeadMobile > div {
    width: 100%;
    max-width: none;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
  }

  #modalNovoLead .p-8 {
    padding: 18px;
  }

  #lead-whatsapp-section textarea,
  #lead-atividades-section textarea {
    min-height: 88px;
  }

  .login-container {
    max-width: 100%;
    border-radius: 20px;
  }
}
