/* Reset e Estilos Globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #2c3e50;
}

/* Header */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
  background-color: white;
  padding: 15px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.title-quadro {
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2c3e50;
}

.title-quadro i {
  color: #4a6baf;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 15px;
  background: linear-gradient(135deg, #4a6baf 0%, #3a5688 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
  background: linear-gradient(135deg, #3a5688 0%, #2c436b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-btn i {
  font-size: 16px;
}

/* Quadro Kanban */
.kanban-container {
  max-width: 1400px;
  width: 100%;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
}

.kanban-column {
  background-color: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.kanban-column:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Cabeçalhos das colunas */
.title-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #4a6baf 0%, #3a5688 100%);
  color: white;
  min-height: 50px;
  height: 50px;
  box-sizing: border-box;
}

.column-title {
  font-size: 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Cores específicas para cada coluna */
#pending .title-container {
  background: linear-gradient(135deg, #ff6b6b 0%, #f03e3e 100%);
}

#in-progress .title-container {
  background: linear-gradient(135deg, #ffd43b 0%, #fcc419 100%);
  color: #2c3e50;
}

#completed .title-container {
  background: linear-gradient(135deg, #51cf66 0%, #2f9e44 100%);
}

/* Lista de tarefas */
.task-list {
  list-style: none;
  min-height: 400px;
  max-height: 600px;
  padding: 10px;
  margin: 0;
  border-radius: 8px;
  background-color: #f8f9fa;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

/* Scrollbar transparente para WebKit */
.task-list::-webkit-scrollbar {
  width: 8px;
}

.task-list::-webkit-scrollbar-track {
  background: transparent;
}

.task-list::-webkit-scrollbar-thumb {
  background: transparent;
}

.task-list:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.task-list:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Estilo dos cartões de tarefa */
.task-list li {
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 12px 0;
  padding: 15px;
  border-radius: 8px;
  border-left: 5px solid #4a6baf;
  color: #606676;
  cursor: move;
  transition: all 0.3s ease;
}

.task-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Bordas coloridas baseadas na coluna */
#pending .task-list li {
  border-left-color: #ff6b6b;
}

#in-progress .task-list li {
  border-left-color: #ffd43b;
}

#completed .task-list li {
  border-left-color: #51cf66;
}

/* Conteúdo da tarefa */
.task-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  flex-wrap: wrap;
  gap: 8px;
}

.task-title-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.task-text {
  font-weight: 600;
  font-size: 16px;
  color: #2c3e50;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

/* Prioridades */
.task-priority {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.task-priority.low {
  background-color: #d3f9d8;
  color: #2b8a3e;
}

.task-priority.medium {
  background-color: #fff3bf;
  color: #e67700;
}

.task-priority.high {
  background-color: #ffc9c9;
  color: #c92a2a;
}

.task-priority.urgent {
  background-color: #ff8787;
  color: white;
}

/* Responsável */
.task-responsible {
  font-size: 13px;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-responsible i {
  font-size: 12px;
  color: #4a6baf;
}

/* Tags na tarefa */
.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.task-tag {
  background-color: #e9ecef;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  color: #495057;
  white-space: nowrap;
}

.task-observation {
  font-size: 14px;
  color: #606676;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-top: 5px;
  line-height: 1.4;
}

.task-date {
  font-size: 12px;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.task-date i {
  font-size: 14px;
  color: #4a6baf;
}

/* Anexos na tarefa */
.task-attachments {
  font-size: 12px;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.task-attachments i {
  font-size: 12px;
  color: #4a6baf;
}

/* Ícones de ação */
.task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.task-actions i {
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  padding: 6px;
  border-radius: 4px;
}

.task-actions i:hover {
  transform: scale(1.1);
}

.task-actions .view {
  color: #4a6baf;
  background-color: #e9ecef;
}

.task-actions .view:hover {
  color: #3a5688;
  background-color: #dee2e6;
}

.task-actions .edit {
  color: #4a6baf;
  background-color: #e9ecef;
}

.task-actions .edit:hover {
  color: #3a5688;
  background-color: #dee2e6;
}

.task-actions .delete {
  color: #f03e3e;
  background-color: #ffebee;
}

.task-actions .delete:hover {
  color: #dc3545;
  background-color: #f8d7da;
}

.add-icon {
  font-size: 18px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: rgba(255, 255, 255, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-icon:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.3);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 500px;
  max-width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

/* Scrollbar transparente para modal */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: transparent;
}

.modal-content:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.modal-content:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #343a40;
}

.title-modal {
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.5rem;
}

/* Formulário */
#task-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

input[type="text"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: #4a6baf;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 107, 175, 0.2);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Tags */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 32px;
  align-items: center;
}

.tag {
  background-color: #e9ecef;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tag-remove {
  color: #6c757d;
  cursor: pointer;
  font-size: 10px;
}

.no-tags {
  color: #6c757d;
  font-style: italic;
  font-size: 13px;
}

.tags-input-container {
  display: flex;
  gap: 10px;
}

#task-tags-input {
  flex: 1;
}

.small-btn {
  padding: 8px 12px;
  background-color: #4a6baf;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.small-btn:hover {
  background-color: #3a5688;
}

/* Anexos */
.attachments-container {
  border: 1px dashed #ced4da;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  min-height: 50px;
}

.attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 5px;
}

.attachment-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.attachment-icon {
  color: #4a6baf;
}

.attachment-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.attachment-remove {
  color: #f03e3e;
  cursor: pointer;
  font-size: 14px;
}

.no-attachments {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  margin: 10px 0;
}

.file-upload-container {
  display: flex;
  justify-content: center;
}

.file-upload-btn {
  padding: 8px 16px;
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.file-upload-btn:hover {
  background-color: #e9ecef;
}

/* Botões do formulário */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.secondary-btn {
  padding: 10px 20px;
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #ced4da;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  background-color: #e9ecef;
}

#save-task-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #4a6baf 0%, #3a5688 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#save-task-btn:hover {
  background: linear-gradient(135deg, #3a5688 0%, #2c436b 100%);
}

/* Efeito de arrastar */
.dragging {
  opacity: 0.8;
  transform: scale(0.98);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  border: 2px dashed #4a6baf !important;
}

/* Modal de detalhes */
.task-detail-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-group {
  margin-bottom: 15px;
}

.detail-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 5px;
  display: block;
}

.detail-value {
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.detail-priority {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.detail-tag {
  background-color: #e9ecef;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* Responsividade */
@media (max-width: 992px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
  
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .action-buttons {
    justify-content: flex-start;
  }
  
  .task-actions {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .action-buttons {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .title-quadro {
    font-size: 1.8rem;
  }
  
  .modal-content {
    padding: 15px;
  }
}

/* Estilo para impressão */
@media print {
  .task-list {
    max-height: none !important;
    overflow: visible !important;
  }
  
  .kanban-board {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  body {
    background: none !important;
    padding: 0 !important;
  }
  
  .action-buttons {
    display: none !important;
  }
  
  .add-icon {
    display: none !important;
  }
  
  .task-actions {
    display: none !important;
  }
}