* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f7f5;
  color: #37352f;
  min-height: 100vh;
}

header {
  padding: 24px 40px 16px;
  border-bottom: 1px solid #e9e9e7;
  background: #fff;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header p {
  color: #787774;
  font-size: 14px;
  margin-top: 4px;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 24px 24px;
  min-height: calc(100vh - 90px);
  align-items: start;
}

.column {
  background: #f0f0ee;
  border-radius: 8px;
  padding: 12px;
  min-height: 200px;
}

.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #787774;
}

.column-header .count {
  background: #e3e2e0;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 500;
}

.column-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.column[data-stage="idea"] .dot { background: #9b8afb; }
.column[data-stage="planning"] .dot { background: #f59e0b; }
.column[data-stage="building"] .dot { background: #3b82f6; }
.column[data-stage="done"] .dot { background: #22c55e; }

.card {
  background: #fff;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: box-shadow 0.15s;
  border: 1px solid transparent;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card.dragging {
  opacity: 0.5;
  border: 1px dashed #c0bfbc;
}

.column.drag-over {
  background: #e8e8e5;
}

.card-category {
  font-size: 11px;
  color: #9b9a97;
  margin-bottom: 4px;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-priority {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.card-priority.urgent { background: #ef4444; }
.card-priority.high { background: #f97316; }
.card-priority.medium { background: #3b82f6; }
.card-priority.low { background: #9ca3af; }

.card-next-action {
  font-size: 12px;
  color: #585754;
  margin-top: 6px;
  padding: 4px 6px;
  background: #f7f7f5;
  border-radius: 4px;
}

.card-next-action::before {
  content: "Next: ";
  font-weight: 600;
  color: #787774;
}

.card-progress {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #9b9a97;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: #e9e9e7;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  transition: width 0.3s;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-meta {
  display: flex;
  gap: 12px;
  margin: 8px 0 20px;
  font-size: 13px;
  color: #787774;
}

.modal-meta .badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 12px;
}

.badge.stage-idea { background: #ede9fe; color: #7c3aed; }
.badge.stage-planning { background: #fef3c7; color: #d97706; }
.badge.stage-building { background: #dbeafe; color: #2563eb; }
.badge.stage-done { background: #dcfce7; color: #16a34a; }

.badge.priority-urgent { background: #fee2e2; color: #dc2626; }
.badge.priority-high { background: #ffedd5; color: #ea580c; }
.badge.priority-medium { background: #dbeafe; color: #2563eb; }
.badge.priority-low { background: #f3f4f6; color: #6b7280; }

.modal-description {
  font-size: 14px;
  color: #585754;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #787774;
  margin-bottom: 10px;
}

.task-list {
  list-style: none;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #f0f0ee;
}

.task-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #22c55e;
  cursor: pointer;
}

.task-item.completed span {
  text-decoration: line-through;
  color: #9b9a97;
}

.note-item {
  padding: 8px 12px;
  background: #f7f7f5;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #585754;
}

.note-item .note-date {
  font-size: 11px;
  color: #9b9a97;
  margin-top: 4px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #787774;
  padding: 4px 8px;
  border-radius: 4px;
}

.modal-close:hover {
  background: #f0f0ee;
}

@media (max-width: 900px) {
  .board {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .board {
    grid-template-columns: 1fr;
  }
  header {
    padding: 16px 20px 12px;
  }
}
