* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f4f6f8;
  padding: 16px;
}

article {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 6px solid transparent;
}

/* Priority colors */
.low { border-left-color: #3b82f6; }     /* blue */
.medium { border-left-color: #f59e0b; }  /* amber */
.high { border-left-color: #ef4444; }    /* red */

/* States */
.done h2 { text-decoration: line-through; color: #888; }
.in-progress { background: #fff7ed; }
.overdue { color: #b00020; font-weight: bold; }

.priority-dot {
  font-size: 1.2rem;
}

.low-dot { color: #3b82f6; }
.medium-dot { color: #f59e0b; }
.high-dot { color: #ef4444; }

/* Layout */
.row {
  align-items: center;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.tag {
  background: #eef2ff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Buttons */
button {
  border: none;
  background: #f1f3f5;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #2563eb;
}

/* Expand */
.collapsed {
  max-height: 0;
  overflow: hidden;
}

/* Edit Form Styling */
form:not([hidden]) {
  margin-top: 12px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

form label {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

input, textarea, select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Responsive */
@media (min-width: 768px) {
  .row {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  article { padding: 16px; }
}
