/* Task Board — Kanban-style board */

/* Page layout */
.tasks-page {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 3rem;
}

.tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2rem 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}

.tasks-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.tasks-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--text);
}

.btn-new-task {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #0d0d0a;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-new-task:hover { background: #d4ad2a; }

/* Kanban board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 400px;
}

.kanban-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
}

.kanban-column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-column-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  flex: 1;
}

.kanban-column-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--surface-2);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.kanban-empty {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 1.5rem;
  border: 1px dashed rgba(238, 232, 220, 0.08);
  border-radius: 5px;
}

/* Task card */
.task-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: default;
}

.task-card:hover {
  border-color: rgba(201, 162, 39, 0.25);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.task-card-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Priority dot */
.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.priority-dot.priority-low    { background: #6aad60; }
.priority-dot.priority-medium { background: #c9a227; }
.priority-dot.priority-high   { background: #e08a3c; }
.priority-dot.priority-critical { background: #d44a4a; }

/* Status badge */
.status-cycle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.status-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: capitalize;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  transition: opacity 0.15s;
}

.status-badge:hover { opacity: 0.7; }

.status-badge.status-todo        { background: rgba(201, 162, 39, 0.15); color: var(--accent); }
.status-badge.status-in_progress { background: rgba(122, 181, 224, 0.15); color: #7ab5e0; }
.status-badge.status-waiting     { background: rgba(156, 144, 128, 0.15); color: #9c9080; }
.status-badge.status-done        { background: rgba(106, 173, 96, 0.15); color: #6aad60; text-decoration: line-through; }

/* Card actions (edit/delete) */
.task-card-actions {
  display: flex;
  gap: 0.2rem;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s;
}

.task-card:hover .task-card-actions { opacity: 1; }

.task-action-btn {
  width: 24px;
  height: 24px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.task-action-btn:hover { background: var(--rule); color: var(--text); }

.delete-task-btn:hover { background: rgba(212, 74, 74, 0.2); color: #d44a4a; border-color: rgba(212, 74, 74, 0.3); }

/* Task text */
.task-card-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.task-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-card-due {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.task-card-due--today { color: #e08a3c; }
.task-card-due--tomorrow { color: #c9a227; }
.task-card-due--overdue { color: #d44a4a; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.75rem;
  width: 480px;
  max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.modal-box--sm { width: 380px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 3px;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Form */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.required { color: var(--accent); }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: rgba(201, 162, 39, 0.35); }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-tertiary); }

.form-group textarea { resize: vertical; }

.form-group select { cursor: pointer; }

.form-row { display: flex; gap: 1rem; }
.form-group--half { flex: 1; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.btn-cancel {
  background: none;
  border: 1px solid var(--rule);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 0.55rem 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-cancel:hover { border-color: rgba(238, 232, 220, 0.2); color: var(--text); }

.btn-save {
  background: var(--accent);
  border: none;
  color: #0d0d0a;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 0.55rem 1.25rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-save:hover { background: #d4ad2a; }

.btn-delete {
  background: #d44a4a;
  border: none;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 0.55rem 1.25rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-delete:hover { background: #c23838; }

/* Responsive */
@media (max-width: 900px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .kanban-board { grid-template-columns: 1fr; padding: 1rem; }
  .tasks-header { padding: 1.5rem 1rem 1rem; }
  .modal-box { padding: 1.25rem; }
  .form-row { flex-direction: column; gap: 0; }
}