/* Estilos Gerais */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #007bff; /* Azul similar ao da imagem */
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.2em;
    font-weight: bold;
}

.header-buttons button {
    background-color: #e9ecef; /* Cinza claro para botões */
    color: #333;
    border: none;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.header-buttons button:hover {
    background-color: #ced4da;
}

/* Quadro Kanban */
.kanban-board {
    display: flex;
    justify-content: space-around; /* Espaçar colunas */
    padding: 20px;
    flex-grow: 1;
    gap: 15px; /* Espaço entre colunas */
}

.kanban-column {
    background-color: #e9ecef; /* Cinza claro para colunas */
    border-radius: 5px;
    padding: 15px;
    width: 18%; /* Ajustar largura conforme necessário */
    min-width: 200px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.column-header h2 {
    margin: 0;
    font-size: 1em;
    color: #333;
}

.add-card-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1.2em;
    line-height: 22px; /* Centralizar o '+' */
    text-align: center;
    cursor: pointer;
}

.add-card-btn:hover {
    background-color: #0056b3;
}

.column-summary {
    font-size: 0.8em;
    color: #dc3545; /* Vermelho para o sumário, como na imagem */
    margin-bottom: 15px;
    font-weight: bold;
}

.column-summary span {
    margin-right: 10px;
}

.cards-container {
    background-color: #e9ecef; /* Mesmo fundo da coluna */
    min-height: 100px; /* Altura mínima para área de drop */
    flex-grow: 1;
    border-radius: 3px;
    padding-top: 5px;
}

/* Estilos dos Cartões (Post-its) */
.card {
    background-color: #fff3cd; /* Amarelo padrão */
    border: 1px solid #ffeeba;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: grab;
    font-size: 0.9em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card.urgent {
    background-color: #f8d7da; /* Vermelho para urgente */
    border-color: #f5c6cb;
}

.card p {
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.card strong {
    font-weight: bold;
}

.card .card-label {
    font-weight: bold;
    display: inline-block;
    min-width: 60px; /* Alinhar os valores */
}

/* Estilo para arrastar */
.dragging {
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none; /* Escondido por padrão */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    position: relative;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
}

/* Estilos do Formulário no Modal */
#add-card-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}

#add-card-form input[type="text"],
#add-card-form input[type="number"],
#add-card-form input[type="date"] {
    width: calc(100% - 22px); /* Ajustar largura */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#add-card-form .contrato-item {
    display: flex;
    gap: 10px;
    align-items: center; /* Alinhar itens do contrato */
    margin-bottom: 5px;
}

#add-card-form .contrato-item label {
    margin: 0;
    width: 70px; /* Largura fixa para label */
}

#add-card-form .contrato-item input {
    flex-grow: 1; /* Inputs ocupam espaço restante */
    margin-bottom: 0;
}

#add-contrato-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    margin-bottom: 15px;
}

#add-contrato-btn:hover {
    background-color: #218838;
}

#add-card-form input[type="radio"],
#add-card-form input[type="checkbox"] {
    margin-right: 5px;
}

#add-card-form label[for="tipo_total"],
#add-card-form label[for="tipo_parcial"],
#add-card-form label[for="urgente"] {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

.modal-buttons {
    text-align: right;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.modal-buttons button[type="submit"] {
    background-color: #007bff;
    color: white;
}

.modal-buttons button[type="submit"]:hover {
    background-color: #0056b3;
}

.modal-buttons button#cancel-add-card {
    background-color: #6c757d;
    color: white;
}

.modal-buttons button#cancel-add-card:hover {
    background-color: #5a6268;
}

/* Responsividade básica */
@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
        align-items: center;
    }
    .kanban-column {
        width: 90%;
        margin-bottom: 15px;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-buttons {
        margin-top: 10px;
    }
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}




/* Estilo para modal maior */
.modal-content.large {
    max-width: 800px; /* Ou outra largura desejada */
}

#pastas-co-list {
    max-height: 400px; /* Altura máxima com scroll */
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 15px;
}

#pastas-co-list .finalized-item {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

#pastas-co-list .finalized-item:last-child {
    border-bottom: none;
}

#pastas-co-list p {
    margin: 2px 0;
    font-size: 0.9em;
}
