/* =================================================================== */
/* CSS CORRIGIDO E UNIFICADO PARA O KANBAN                             */
/* Cole este conteúdo no seu arquivo CSS.                              */
/* =================================================================== */

/* * 1. CONTÊINER PRINCIPAL (WRAPPER)
 * Controla o tamanho geral do quadro e a rolagem horizontal.
*/
.kanban-wrapper {
    width: 100%;
    max-height: 75vh; /* Altura máxima do quadro (75% da tela) */
    display: flex; /* Necessário para o container interno preencher a altura */

    /* Regra chave para rolagem horizontal */
    overflow-x: auto;

    padding-bottom: 1rem; /* Espaço para a barra de rolagem não cobrir o conteúdo */
}

/* * 2. CONTAINER INTERNO (GERADO PELO jKanban)
 * Garante que as colunas fiquem lado a lado.
*/
/* Usamos .kanban-wrapper para garantir que o estilo se aplique ao elemento certo */
.kanban-wrapper .kanban-container {
    display: flex;
    flex-grow: 1; /* Faz o container crescer para preencher o wrapper */
    gap: 1.5rem; /* Espaçamento entre as colunas */
}

/* * 3. COLUNAS INDIVIDUAIS (BOARDS)
 * Mantivemos seu estilo, ajustando para o layout flex.
*/
.kanban-board {
    min-width: 320px;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1) !important;

    /* Layout flex para organizar header e a área dos cards */
    display: flex !important;
    flex-direction: column !important;
    height: 100%; /* Ocupa toda a altura do wrapper */
}

/* * 4. ÁREA DOS CARDS (KANBAN-DRAG)
 * Controla a rolagem vertical das tarefas dentro de cada coluna.
*/
.kanban-drag {
    padding: 1rem !important;
    border-radius: 0 0 12px 12px !important;
    flex-grow: 1; /* Faz esta área crescer e ocupar o espaço restante na coluna */

    /* Regra chave para rolagem vertical dentro da coluna */
    overflow-y: auto;
}

/* * 5. ESTILOS VISUAIS (Mantidos do seu original)
 * Headers, itens, hover, etc.
*/

.kanban-board-header {
    background: white !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 0.95rem !important;
    flex-shrink: 0; /* Impede que o header encolha */
}

.kanban-item {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 0.875rem !important;
    margin-bottom: 0.75rem !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    cursor: move !important;
    transition: all 0.2s ease !important;
    color: #374151 !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

.kanban-item:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06) !important;
    transform: translateY(-1px) !important;
    border-color: #d1d5db !important;
}

.kanban-item.gu-mirror {
    transform: rotate(2deg) !important;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05) !important;
    border-color: #3b82f6 !important;
    background: #eff6ff !important;
}

.kanban-board.gu-over {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    border-style: dashed !important;
}

/* Conteúdo das tarefas (task-content, etc.) */
.task-content { display: flex; flex-direction: column; gap: 0.5rem; }
.task-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.task-title { font-weight: 500; color: #374151; line-height: 1.4; flex: 1; }
.task-date { font-size: 0.75rem; color: #6b7280; display: flex; align-items: center; gap: 0.25rem; }
.delete-btn { background: none; border: none; color: #9ca3af; cursor: pointer; padding: 4px; border-radius: 4px; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; }
.delete-btn:hover { color: #ef4444; background-color: #fee2e2; }
.delete-btn:active { transform: scale(0.95); }
.task-footer { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #f3f4f6; }
.task-dates { display: flex; flex-direction: column; gap: 0.25rem; }
.task-created-date, .task-due-date { font-size: 0.7rem; color: #6b7280; display: flex; align-items: center; gap: 0.25rem; }
.task-created-date { font-weight: 500; }
.task-priority { font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 0.25rem; }

/* * 6. ESTILOS DE BARRA DE ROLAGEM
 * Aplicados ao wrapper (rolagem horizontal) e à área de drag (rolagem vertical)
*/
.kanban-wrapper::-webkit-scrollbar,
.kanban-drag::-webkit-scrollbar {
    width: 8px;  /* Largura para scroll vertical */
    height: 8px; /* Altura para scroll horizontal */
}

.kanban-wrapper::-webkit-scrollbar-track,
.kanban-drag::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.kanban-wrapper::-webkit-scrollbar-thumb,
.kanban-drag::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.kanban-wrapper::-webkit-scrollbar-thumb:hover,
.kanban-drag::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* * REMOVIDO: A seção @media que empilhava as colunas foi removida 
 * pois a rolagem horizontal é uma solução melhor e mais consistente.
*/