:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --paper: #ffffff;
  --canvas: #f5f5f4;
  --accent: #5b21b6;
  --accent-soft: #f3e8ff;
  --danger: #9f1239;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.45 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 16px 24px;
  background: #3b0764;
  color: white;
}

header p { margin: 4px 0 0; color: #e9d5ff; font-size: 13px; }
header h1 { margin: 0; font-size: 20px; font-weight: 650; }

main {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 16px;
  padding: 16px;
  align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.toolbar, .row, .assignees { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { margin-bottom: 10px; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button, .chip {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

button:disabled { opacity: 0.5; cursor: default; }

.chip.active, button.active {
  background: var(--accent-soft);
  border-color: #c4b5fd;
  color: #4c1d95;
}

input[type="search"], input[type="text"], input[type="date"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
}

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

.projects, .tasks { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 220px); overflow: auto; }

.item {
  text-align: left;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

.item.active { outline: 2px solid #c4b5fd; }

.item strong { display: block; }
.item span, .meta { color: var(--muted); font-size: 13px; }

label { display: block; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }

.assignees label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  border-radius: 999px;
  padding: 4px 10px;
}

.error {
  background: #fff1f2;
  color: var(--danger);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.note {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 8px;
}

.empty { color: var(--muted); padding: 12px 0; }

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  .projects, .tasks { max-height: none; }
}
