/* onemind — minimal Slice 0 styling (vanilla CSS, served by Flask). */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0f172a;
  --muted: #5f6368;
  --border: #e2e5ea;
  --accent: #3b6fe0;
  --accent-hover: #2f5bc0;
  --error: #ea4335;
  --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #f4f6fb;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card, .home-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.home-card { max-width: 480px; }

.brand {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.subtitle { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }
.muted { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 0.9rem;
}
.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 111, 224, 0.15);
}

.error-message {
  background: #fef2f2;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
  text-align: center;
}
.btn-primary { width: 100%; background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: #eef1f7; color: var(--ink); }
.btn-secondary:hover { background: #e2e6ef; }
.btn-danger { background: #fdecea; color: var(--error); }
.btn-danger:hover { background: #fbdad5; }
.btn-sm { width: auto; padding: 8px 14px; font-size: 0.85rem; }

/* ============================================================
   Slice 1 — Kanban board
   ============================================================ */

/* The board page is a full-width app view, not a centered card. */
body.board-body {
  display: block;
  align-items: initial;
  justify-content: initial;
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.brand-sm { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.topbar-actions { display: flex; gap: 10px; }

.board-wrap { padding: 20px 24px; }

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

.column {
  background: #eef1f6;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 120px;
}
.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  font-weight: 700;
  font-size: 0.9rem;
}
.col-count {
  background: #dde3ec;
  color: var(--muted);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 0.78rem;
}
.cards { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.card:hover { border-color: #cdd5e2; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
.card:active { cursor: grabbing; }
.card.priority-high { border-left-color: #e5484d; }
.card.priority-medium { border-left-color: #f5a623; }
.card.priority-low { border-left-color: #8a94a6; }
.card.is-done .card-title { text-decoration: line-through; color: var(--muted); }
.card-ghost { opacity: 0.4; }

.card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; word-break: break-word; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.badge-high { background: #fdecec; color: #c0272d; }
.badge-medium { background: #fdf3e2; color: #9a6400; }
.badge-low { background: #eef1f6; color: #5f6b7d; }
.chip {
  font-size: 0.72rem;
  color: var(--muted);
  background: #f1f4f9;
  border-radius: 6px;
  padding: 2px 6px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 50;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { font-size: 1.25rem; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--muted);
}
.modal-close:hover { color: var(--ink); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
}
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 111, 224, 0.15);
}
.hint { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.modal-actions .spacer { flex: 1; }

/* ---------- Checklist ---------- */
.checklist-section { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 16px; }
.checklist-section h3 { font-size: 1rem; margin-bottom: 10px; }
.checklist-add { display: flex; gap: 8px; margin-bottom: 10px; }
.checklist-add input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}
.checklist-items { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.checklist-item:hover { background: #f6f8fb; border-color: var(--border); }
.checklist-item.done .checklist-label { text-decoration: line-through; color: var(--muted); }
.checklist-label { flex: 1; font-size: 0.92rem; word-break: break-word; }
.drag-handle { cursor: grab; color: #b3bccb; font-size: 0.8rem; user-select: none; letter-spacing: -3px; }
.item-actions { display: flex; gap: 8px; opacity: 0; transition: opacity 0.1s; }
.checklist-item:hover .item-actions { opacity: 1; }
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--accent); font-size: 0.8rem; font-weight: 600; padding: 0;
}
.link-btn.danger { color: var(--error); }
.link-btn:hover { text-decoration: underline; }
.checklist-empty { font-size: 0.88rem; padding: 6px 8px; }

@media (max-width: 900px) {
  .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .board { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
}
