/* =================================================================== */
/*                     ESTILOS COMPLETOS DO KANBAN                     */
/* =================================================================== */
/*          Arquivo: kanban.css (Versão Final Refatorada)              */
/* =================================================================== */


/* =================================================================== */
/*            1. LAYOUT PRINCIPAL DA APLICAÇÃO KANBAN                  */
/* =================================================================== */

.kanban-app-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px); /* AJUSTE O VALOR '70px' para a altura da sua navbar */
    background-color: #343a40;
    overflow: hidden;
}

.kanban-header {
    flex-shrink: 0;
    padding: 0.5rem 0 0.4rem 0;
    background-color: #f1f3f5;
}

.kanban-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.kanban-board {
    width: 100%;
    display: flex;
    gap: 24px;
    padding: 24px;
    flex-grow: 1;
    overflow-x: auto;
}


/* =================================================================== */
/*                 2. ESTILOS DAS COLUNAS DO KANBAN                    */
/* =================================================================== */

.kanban-column {
    background-color: #FFF;
    border-radius: 25px;
    padding: 6px 0 0 0;
    width: 300px;
    min-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    max-height: 100%;
    transition: box-shadow 0.3s ease;
}

.kanban-column:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}


/* --- Cabeçalho da Coluna --- */

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 5px;
    margin: 0 4px 0px; /* Adicionado espaçamento interno */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.column-handle {
    cursor: grab;
    color: #adb5bd;
    font-size: 1.2rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}
.column-handle:active {
    cursor: grabbing;
}

.kanban-column-title {
    margin: 0;
    font-size: 1.05em;
    font-weight: 600;
    flex-grow: 1;
    color: #000;
}

.column-actions {
    display: flex;
    gap: 0;
    padding-right: 5px;
}


/* --- Conteúdo da Coluna (Lista e Rodapé) --- */

.item-list {
    list-style: none;
    padding: 8px 4px 8px 0;
    margin: 0 8px 0 8px;
    flex-grow: 1;
    overflow-y: auto;
    counter-reset: item-counter; /* Contador para numeração dos itens */
}

.kanban-column-footer {
    padding-top: 15px;
    margin-top: auto;
}

.btn-add-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: transparent;
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 10px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    transition: background-color 0.2s, color 0.2s;
    text-align: left;
    width: 100%;
}

.btn-add-item:hover {
    background-color: #e9ecef;
    color: #212529;
}

.btn-add-item::after {
    content: counter(item-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    font-size: 0.7em;
    font-weight: 600;
    color: #6c757d;
    background-color: #dee2e6;
    border-radius: 6px;
}


/* =================================================================== */
/*                   3. ESTILOS DOS ITENS (TAREFAS)                    */
/* =================================================================== */

.kanban-item {
    position: relative;
    padding: 14px 60px 14px 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    cursor: grab;
    font-size: 0.90em;
    word-wrap: break-word;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s;
    border-left-width: 2px;
    border-left-style: solid;
    border-left-color: #dee2e6;
    background-color: #f1f3f5;
    color: #495057;
    line-height: 1.3;
}

.kanban-item::before {
    content: counter(item-counter);
    counter-increment: item-counter;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    opacity: 0.8;
}

.kanban-item .item-content {
    font-weight: 500;
}

.kanban-item:hover:not(.sortable-drag) {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.08);
}

.kanban-item:last-child {
    margin-bottom: 0;
}


/* --- Ações do Item --- */

.item-actions {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.kanban-item:hover .item-actions {
    opacity: 1;
}

.item-actions .btn-icon {
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
    padding: 2px 6px;
    font-size: 1.1em;
    background-color: rgba(0,0,0,0.05);
    border-radius: 6px;
}

.item-actions .btn-icon:hover {
    opacity: 1;
    background-color: rgba(0,0,0,0.1);
}

.item-actions .btn-delete-item:hover {
    color: #fff !important;
    background-color: #dc3545 !important;
    opacity: 1;
}


/* =================================================================== */
/*                       4. PALETAS DE CORES                           */
/* =================================================================== */

/* --- Cores para CABEÇALHOS das Colunas --- */
/* --- Cor Padrão (Cinza) --- */
.kanban-column-header.header-standard .kanban-column-title {
    color: #495057; /* Texto cinza escuro */
}

/* --- Cor Azul --- */
.kanban-column-header.header-blue .kanban-column-title {
    color: #0d6efd; /* Texto azul forte */
}

/* --- Cor Verde --- */
.kanban-column-header.header-green .kanban-column-title {
    color: #198754;
}

/* --- Cor Vermelha --- */
.kanban-column-header.header-red .kanban-column-title {
    color: #dc3545;
}

/* --- Cor Amarela --- */
.kanban-column-header.header-yellow .kanban-column-title {
    color: #ffc107;
}

/* --- Cor Roxa --- */
.kanban-column-header.header-purple .kanban-column-title {
    color: #6f42c1;
}
/* --- Cores Sólidas para ITENS --- */
.kanban-item.color-blue { background-color: #e7f1ff; border-left-color: #0d6efd; color: #052c65; }
.kanban-item.color-green { background-color: #e8f3ee; border-left-color: #198754; color: #0a3622; }
.kanban-item.color-red { background-color: #fdedee; border-left-color: #dc3545; color: #58151c; }
.kanban-item.color-yellow { background-color: #fff9e6; border-left-color: #ffc107; color: #664d03; }
.kanban-item.color-purple { background-color: #f0ebf9; border-left-color: #6f42c1; color: #2c1a4d; }


/* =================================================================== */
/*                 5. ESTILOS DE ARRASTAR E SOLTAR                     */
/* =================================================================== */

.column-ghost { opacity: 0.4; background-color: #e9ecef; border: 2px dashed #0d6efd; }
.sortable-ghost { opacity: 0.6; background-color: #d1e7fd; border: 2px dashed #0dcaf0; box-shadow: none; }
.sortable-drag { opacity: 0.95 !important; transform: translateY(-5px) rotate(3deg) scale(1.05); box-shadow: 0 15px 35px rgba(0,0,0,0.25), 0 5px 10px rgba(0,0,0,0.22) !important; cursor: grabbing !important; z-index: 9999; }


/* =================================================================== */
/*                    6. ESTILOS DE BARRA DE ROLAGEM                   */
/* =================================================================== */

.kanban-board::-webkit-scrollbar { height: 30px; background-color: transparent; }
.kanban-board::-webkit-scrollbar-track { background-color: rgba(0,0,0,0.1); border-radius: 10px; }
.kanban-board::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.4); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.kanban-board::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.6); }

.item-list::-webkit-scrollbar { width: 12px; }
.item-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); border-radius: 6px; }
.item-list::-webkit-scrollbar-thumb { background-color: #ced4da; border-radius: 6px; border: 3px solid #f1f3f5; }
.item-list::-webkit-scrollbar-thumb:hover { background-color: #adb5bd; }


/* =================================================================== */
/*                       7. DESIGN RESPONSIVO                          */
/* =================================================================== */

@media (max-width: 768px) {
    .kanban-app-wrapper { height: auto; }
    .kanban-header { flex-direction: column; gap: 1rem; padding: 1rem 1rem 0.3rem; }
    .kanban-board { flex-direction: column; overflow-x: hidden; padding: 15px; gap: 15px; }
    .kanban-column { width: 100%; min-width: 0; }
}


/* =================================================================== */
/*                       8. CLASSES DE UTILIDADE                       */
/* =================================================================== */

.btn-icon { background: none; border: none; padding: 4px 8px; border-radius: 6px; cursor: pointer; line-height: 1; transition: background-color 0.2s, color 0.2s; }
.column-actions .btn-icon:hover { background-color: rgba(0,0,0,0.08); color: #212529; }
.column-actions .btn-delete-column:hover { background-color: #f8d7da; color: #dc3545; }


/* =================================================================== */
/*          9. PERSONALIZAÇÃO PARA BIBLIOTECAS (SWEETALERT)            */
/* =================================================================== */

.arredonda_25 {
    border-radius: 25px !important;
}