/* =========================================================
   📱 RESPONSIVIDADE GLOBAL — CAPLEADS
   Mobile • Tablet • Notebook • Desktop
========================================================= */

/* =========================
   🔹 RESET / BASE
========================= */
* {
  box-sizing: border-box;
}

body {
  font-size: 14px;
}

/* Containers */
.container,
.container-fluid {
  width: 100%;
  padding: 10px;
}

/* =========================
   🔹 HEADER (APP)
========================= */
.header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.header .title {
  font-size: 18px;
}

.header .user-info {
  width: 100%;
  justify-content: space-between;
}

/* =========================
   🔹 FILTROS
========================= */
.filter-form {
  width: 100%;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-item {
  width: 100%;
  min-width: unset;
}

.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-actions button {
  width: 100%;
}

/* =========================
   🔹 BOTÕES
========================= */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-buttons button,
.action-buttons a {
  width: 100%;
}

/* =========================
   🔹 TABELAS
========================= */
.leads-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leads-table {
  min-width: 900px;
  font-size: 12px;
}

/* =========================
   🔹 PAGINAÇÃO
========================= */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* =========================
   🔹 MODAIS
========================= */
#modal-confirmacao {
  width: 95%;
  padding: 15px;
}

/* =========================================================
   📲 MOBILE (até 768px)
========================================================= */
@media (max-width: 768px) {

  body {
    font-size: 13px;
  }

  h1, h2, h3 {
    font-size: 18px;
  }

  .header .title {
    font-size: 16px;
  }

  .leads-table {
    font-size: 11px;
  }
}

/* =========================================================
   💻 NOTEBOOK (769px até 1200px)
========================================================= */
@media (min-width: 769px) and (max-width: 1200px) {

  .filter-group {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .filter-item {
    flex: 1 1 45%;
  }

  .action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .action-buttons button {
    width: auto;
  }
}

/* =========================================================
   🖥 DESKTOP GRANDE
========================================================= */
@media (min-width: 1600px) {

  body {
    font-size: 15px;
  }

  .container {
    max-width: 1500px;
    margin: auto;
  }
}

/* =========================================================
   ☰ MENU SITE — DESKTOP
========================================================= */
.site-header {
  background: #1e40af;
}

.site-container {
  max-width: 1200px;
  margin: auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
}

.site-nav .btn-menu {
  background: #ffffff;
  color: #1e40af;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
}

/* =========================================================
   📱 MENU MOBILE — ÚNICO, FUNCIONAL, SEM CONFLITO
========================================================= */
@media (max-width: 768px) {

  /* botão ☰ */
  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  /* menu fechado */
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;

    background: #1e40af;
    flex-direction: column;
    padding: 12px 0;

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition: opacity .25s ease, transform .25s ease;
    z-index: 1000;
  }

  /* menu aberto (JS adiciona .open) */
  .site-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a {
    padding: 14px 24px;
    color: #ffffff;
    font-size: 16px;
  }

  .site-nav a:hover {
    background: rgba(255,255,255,.12);
  }
}


/* ===============================
   AÇÕES DO LEAD (EMAIL / WHATS / TEL)
================================ */

.lead-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;

  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;

  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.lead-actions .btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===============================
   TOOLTIP DE AÇÕES DO LEAD
================================ */

.action-tooltip {
  position: relative;
  display: inline-flex;
}

/* Caixa do tooltip */
.action-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -42px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;

  background: #111827;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}

/* Setinha */
.action-tooltip::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #111827;

  opacity: 0;
  transition: opacity .2s ease;
}

/* Hover / foco */
.action-tooltip:hover::after,
.action-tooltip:hover::before,
.action-tooltip:focus-within::after,
.action-tooltip:focus-within::before {
  opacity: 1;
}

/* Variações */
.btn.email {
  background: #2563eb;
  color: #fff;
}

.btn.whatsapp {
  background: #16a34a;
  color: #fff;
}

.btn.phone {
  background: #ffffff;
  color: #2563eb;
  border: 2px solid #2563eb;
}

.btn.agenda {
  background: #4f46e5;
  color: #fff;
}

.btn.disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Mobile fino */
@media (max-width: 480px) {
  .lead-actions .btn {
    font-size: 13px;
    padding: 7px 10px;
  }
  .lead-actions {
  margin-top: 12px;      /* sobe em relação aos dados */
  margin-bottom: 24px;   /* separa de Classificação */
}
}

/* ===============================
   HEADER DO LEAD — RESPONSIVO
================================ */

.lead-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* BLOCO PRINCIPAL */
.lead-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* TÍTULO */
.lead-title {
  font-size: 24px;
  font-weight: 800;
  color: #1e40af;
  line-height: 1.2;
}

/* NOME FANTASIA */
.lead-fantasia {
  font-size: 14px;
  color: #6b7280;
}

/* CNPJ */
.lead-cnpj {
  font-size: 14px;
  color: #374151;
}

/* 🔥 TIPO + CAPITAL */
.lead-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  margin-bottom: 6px;
}

/* BADGE MATRIZ / FILIAL */
.badge-tipo {
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .4px;
}

/* CAPITAL SOCIAL */
.capital-social {
  font-size: 14px;
  color: #111827;
}

/* META */
.lead-meta {
  font-size: 14px;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* CNAE */
.lead-cnae {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

/* ===============================
   🖥 DESKTOP
================================ */
@media (min-width: 1024px) {

  .lead-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .lead-main {
    max-width: 65%;
  }

  .lead-title {
    font-size: 28px;
  }

  .lead-highlight {
    gap: 16px;
  }

  .lead-meta {
    flex-direction: row;
    gap: 24px;
  }
}
