/* ╔══════════════════════════════════════════════════════════╗ */
/* ║ 🌈 Estilo Kanban CRM – CONSART ERP                       ║ */
/* ╚══════════════════════════════════════════════════════════╝ */

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  background: #eef1f5;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
  font-weight: 600;
}

/* ============================= */
/* 🧱 Estrutura do Kanban Board  */
/* ============================= */

.kanban-board {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  flex-wrap: nowrap;
}

.coluna {
  flex: 0 0 300px;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.coluna:hover {
  transform: scale(1.01);
}

.coluna h2 {
  font-size: 16px;
  margin: 0 0 10px;
  text-align: center;
  background: #f1f3f7;
  padding: 10px;
  border-radius: 6px;
  color: #34495e;
  font-weight: 600;
}

.dropzone {
  min-height: 20px;
  flex-grow: 1;
}

/* ============================= */
/* 📋 Cards                     */
/* ============================= */

.kanban-card {
  background: #fcfcfc;              /* 🎨 Cor de fundo do card (um tom quase branco) */
  
  border: 1px solid #ddd;           /* 🧱 Borda cinza clara em volta do card */
  
  border-radius: 8px;               /* 🟦 Arredonda os cantos do card em 8px */
  
  padding: 2px;                    /* 📏 Espaço interno (respiro) entre o conteúdo e a borda do card */
  
  margin-bottom: 12px;              /* 📐 Espaço externo abaixo do card para separar do próximo */
  
  cursor: grab;                     /* ✋ Cursor de "pegar" (mãozinha) indicando que o card pode ser arrastado */
  
  transition: all 0.2s;             /* 🕒 Suaviza qualquer mudança (ex: ao passar o mouse) em 0.2 segundos */
  
  display: flex;                    /* 🧩 Define o layout interno do card como flexbox (para organizar conteúdo em coluna) */
  
  flex-direction: column;          /* 🧱 Organiza os elementos filhos do card verticalmente (em coluna) */
  
  gap: 3px;                         /* 📏 Espaçamento vertical de 6px entre os elementos filhos do card */
  
  position: relative;              /* ⚓ Permite posicionar elementos dentro do card de forma absoluta (ex: botão editar no canto) */
  
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 🌫️ Sombra leve para dar leveza e sensação de profundidade ao card */


 /* 📏 Altura fixa */
  height: 180px;                 /* Altura travada em 180px */
  overflow-y: auto;              /* Se o conteúdo for maior que a altura, ativa rolagem vertical */
}

.kanban-card {
  font-size: 9px;               /* 🔠 Tamanho base do texto dentro do card */
  line-height: 1.4;              /* 📏 Altura da linha para melhor leitura */
  color: #333;                   /* 🎨 Cor do texto padrão */
}

.kanban-card:hover {
  background: #f5f7fa;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 🟢 Botão de editar */
.kanban-card .editar-cliente {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 14px;
  color: #777;
  text-decoration: none;
}
.kanban-card .editar-cliente:hover {
  color: #111;
}

/* ✅ Ícone do WhatsApp */
.kanban-card a img {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-left: 4px;
  opacity: 0.85;
  transition: transform 0.2s, opacity 0.2s;
}

.kanban-card a img:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* ============================= */
/* 📊 Barrinha de progresso     */
/* ============================= */

.progress-container {
  background: #e0e0e0;
  border-radius: 12px;
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 10px;
  background: #4caf50;
  width: 0%;
  transition: width 0.3s ease;
}

/* ============================= */
/* ➕ Botão Novo Card            */
/* ============================= */

#btnNovoCard {
  margin: 10px auto;
  display: block;
  padding: 10px 22px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.3s;
}

#btnNovoCard:hover {
  background-color: #3e8e41;
}

/* ============================= */
/* 🟦 Modal                     */
/* ============================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  width: 90vw;
  max-width: 1300px;
  max-height: 95vh;
  overflow-y: auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  position: relative;
  z-index: 9999;
}

/* 🎯 Campos do modal */
.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

/* 🎯 Botão padrão do modal */
.modal-content button {
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #45a049;
}

/* Botão azul para abrir modal */
.btn-novo-cliente {
  padding: 6px 14px;
  font-size: 14px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-novo-cliente:hover {
  background-color: #2980b9;
}

/* ╔════════════════════════════════════════════════════════════════╗
   ║ 🧾 crmConsart.css – Layout Flexível do Modal Novo Cliente     ║
   ╚════════════════════════════════════════════════════════════════╝ */

/* 🧱 Container geral com 3 colunas lado a lado */
.form-modal-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 📦 Cada bloco (fieldset) */
.form-modal-container .form-bloco {
  flex: 1 1 calc(33.33% - 20px);
  min-width: 300px;
  background: #fff;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
}

/* 🧩 Legenda com ícone */
.form-modal-container legend {
  font-weight: bold;
  color: #333;
  padding: 0 5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  font-size: 1em;
}

/* Linha de campos (2 colunas) */
.form-linha {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

/* Campo individual */
.form-grupo {
  flex: 1 1 calc(50% - 10px);
  display: flex;
  flex-direction: column;
}

.form-grupo input,
.form-grupo select {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.95em;
  width: 100%;
  box-sizing: border-box;
}

/* Label */
.form-grupo label {
  font-weight: 500;
  margin-bottom: 4px;
}

/* ⚙️ Check centralizado */
.form-linha label input[type="checkbox"] {
  margin-right: 5px;
}

/* 🔧 Bloco OUTROS abaixo do do meio, centralizado */
.form-modal-container .form-bloco.outros {
  flex: 1 1 calc(33.33% - 20px); /* mesma largura dos outros blocos */
  min-width: 300px;
  margin-top: 0;
  align-self: flex-start;
}

/* Centraliza checkbox */
.form-bloco.outros .form-linha {
  justify-content: center;
  text-align: center;
}

/* ✅ Botões finais centralizados e encostados ao bloco 'Outros' */
.form-botoes {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;     /* Subiu os botões */
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-botoes button {
  background: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  min-width: 140px;
}

.form-botoes .btn-limpar {
  background: #f44336;
}

/* ╔══════════════════════════════════════════════════════════════════════╗ */
/* ║ 📏 Largura dinâmica por tipo de CRM no Kanban                       ║ */
/* ╚══════════════════════════════════════════════════════════════════════╝ */

/* Reativação: largura padrão */
.kanban-reativacao .coluna {
  flex: 0 0 235px;
}

/* Prospecção: colunas mais largas */
.kanban-prospeccao .coluna {
  flex: 0 0 235px;
}

/* Atendimento: colunas mais estreitas */
.kanban-atendimento .coluna {

  flex: 0 0 370px;
}

/* ✂️ Truncamento de nome do cliente nos cards */
.nome-cliente {
  display: inline-block;
  max-width: 180px;        /* você pode ajustar conforme o layout */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 400px;
  max-width: 95%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hidden {
  display: none;
}