/* Kanban — soft pastel board theme. Frontend only, no framework. */
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0; background: #e8e8ec; color: #26263a; }
.hidden { display: none !important; }
.muted { color: #8a8a9c; font-size: 0.9em; }
.error { color: #c00; }
.mono { font-family: monospace; word-break: break-all; }
.row { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }
button { cursor: pointer; border: 1px solid #e6e3f0; background: #fff; border-radius: 10px; padding: 7px 13px; font-size: 0.9em; color: #26263a; }
button:hover { background: #f1efff; }
.btn-dark { background: #131313; color: #fff; border-color: #131313; }
.btn-dark:hover { background: #2a2a2a; }
.btn-primary { background: #131313; color: #fff; border-color: #131313; width: 100%; padding: 10px; font-size: 1em; }
.btn-primary:hover { background: #2a2a2a; }
input, select, textarea { border: 1px solid #e6e3f0; border-radius: 10px; padding: 8px 10px; background: #fff; color: #26263a; font-size: 0.9em; }
label { display: block; margin: 10px 0; }
label input, label textarea, label select { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }

/* ---- login ---- */
.center { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #eceaff 0%, #fff1f2 55%, #eef7f0 100%); }
.card { background: #fff; border-radius: 20px; padding: 28px; box-shadow: 0 12px 32px rgba(40, 30, 90, 0.10); }
.login-card { width: 360px; max-width: 92vw; }
.login-sub { text-align: center; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15em; }
.brand-center { justify-content: center; margin-bottom: 6px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: #6d5df6; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }

/* ---- app shell ---- */
.shell { max-width: 1440px; margin: 18px auto; background: #fff; border-radius: 22px; display: flex; min-height: calc(100vh - 36px); box-shadow: 0 16px 40px rgba(40, 30, 90, 0.10); overflow: hidden; }
.sidebar { width: 232px; flex: none; background: linear-gradient(180deg, #f1efff 0%, #fdfaff 60%, #ffffff 100%); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 0.7em; letter-spacing: 0.12em; color: #9a97ad; font-weight: 700; padding: 0 12px; }
.nav-item { display: block; text-align: left; border: none; background: transparent; padding: 9px 12px; border-radius: 10px; font-size: 0.92em; color: #3d3d55; text-decoration: none; }
.nav-item:hover { background: rgba(255, 255, 255, 0.7); }
.nav-item.active { background: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(40, 30, 90, 0.08); }
.user-card { margin-top: auto; background: #fff; border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; box-shadow: 0 2px 10px rgba(40, 30, 90, 0.07); }
.user-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.user-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #ddd6fe; color: #4c3fb5; display: inline-flex; align-items: center; justify-content: center; font-weight: 750; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 0.75em; }
.avatars { display: flex; }
.avatars .avatar { margin-left: -7px; border: 2px solid #fff; }
.avatars .avatar:first-child { margin-left: 0; }

/* ---- main column ---- */
.main { flex: 1; min-width: 0; padding: 18px 22px 8px; }
.topbar { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.greeting { font-size: 0.95em; }
.search { flex: 1; max-width: 520px; min-width: 200px; background: #f4f4f7; border-radius: 999px; padding: 8px 14px; display: flex; gap: 8px; align-items: center; }
.search input { border: none; background: transparent; padding: 0; flex: 1; outline: none; font-size: 0.92em; }
.board-members { display: flex; margin-left: auto; }
.board-members .avatar { margin-left: -7px; border: 2px solid #fff; }
.board-members .avatar:first-child { margin-left: 0; }
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.board-head h2 { margin: 0; font-size: 1.35em; }
.board-subtitle { margin: 4px 0 0; }
#boards-bar, #board-tools { background: #faf9fc; border: 1px solid #efedf4; border-radius: 14px; padding: 10px 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }

/* ---- columns & cards ---- */
.lists { display: flex; gap: 14px; padding: 2px 0 12px; overflow-x: auto; align-items: flex-start; }
.list { background: #faf9fb; border: 1px solid #efedf4; border-radius: 18px; min-width: 280px; max-width: 300px; padding: 12px; flex: none; }
.list-head { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.caret { color: #9a97ad; font-size: 0.8em; }
.list-title { font-weight: 700; flex: 1; background: transparent; border: none; padding: 4px 2px; min-width: 0; }
.count { font-size: 0.75em; background: #efedf6; color: #6b6880; border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.list-add { border-radius: 50%; width: 26px; height: 26px; padding: 0; line-height: 1; }
.list-archive { border: none; background: transparent; color: #9a97ad; padding: 2px 6px; }
.cards { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.card-item { border-radius: 14px; padding: 12px 14px; cursor: pointer; border: none; box-shadow: 0 1px 3px rgba(30, 20, 70, 0.07); }
.card-item:hover { box-shadow: 0 6px 16px rgba(30, 20, 70, 0.12); transform: translateY(-1px); }
.pastel-0 { background: #e3ecfd; }
.pastel-1 { background: #ece7fb; }
.pastel-2 { background: #fdeede; }
.pastel-3 { background: #dcf7e8; }
.pastel-4 { background: #fce8f1; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.card-tags:empty { display: none; }
.label { background: #fff; color: var(--lc, #555); border: 1px solid #e6e3f0; border-radius: 999px; padding: 2px 9px; font-size: 0.72em; font-weight: 650; }
.label[style*="--lc"] { background: color-mix(in srgb, var(--lc) 14%, white); border-color: color-mix(in srgb, var(--lc) 38%, white); color: var(--lc); }
.card-title { font-weight: 680; font-size: 0.93em; line-height: 1.35; }
.card-note { color: #6b6880; font-size: 0.8em; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.due-chip { font-size: 0.75em; background: rgba(255, 255, 255, 0.75); color: #6b6880; border-radius: 999px; padding: 3px 9px; }
.due-soon .due-chip { background: #fef3c7; color: #92400e; }
.due-overdue .due-chip { background: #fee2e2; color: #991b1b; }
.new-card-title { flex: 1; min-width: 0; }

/* ---- activity & modals ---- */
#activity-panel { margin: 16px 0 24px; background: #faf9fb; border: 1px solid #efedf4; border-radius: 16px; padding: 14px 18px; }
#activity-panel h2 { font-size: 1.05em; margin: 0 0 8px; }
#activity-panel ul, #comment-list, #key-list, #reminder-list { list-style: none; padding: 0; margin: 0; }
#activity-panel li, #comment-list li, #key-list li, #reminder-list li { padding: 6px 0; border-bottom: 1px solid #efedf4; font-size: 0.9em; }
#activity-panel li:last-child, #comment-list li:last-child, #key-list li:last-child, #reminder-list li:last-child { border-bottom: none; }
.modal { position: fixed; inset: 0; background: rgba(20, 16, 50, 0.45); display: flex; justify-content: center; align-items: flex-start; padding-top: 8vh; z-index: 10; }
.modal-body { background: #fff; border-radius: 18px; padding: 22px; width: 520px; max-width: 92vw; max-height: 84vh; overflow-y: auto; position: relative; box-shadow: 0 20px 48px rgba(20, 16, 50, 0.25); }
.modal-body h2 { margin-top: 0; }
.modal-close { position: absolute; top: 12px; right: 14px; border: none; background: #f4f4f7; border-radius: 50%; width: 28px; height: 28px; padding: 0; }
#card-labels, #card-members { margin: 10px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#card-labels label, #card-members label { display: inline-flex; align-items: center; margin: 0; gap: 4px; }
#card-labels label input, #card-members label input { width: auto; margin: 0; }

@media (max-width: 900px) {
  .shell { flex-direction: column; margin: 0; border-radius: 0; }
  .sidebar { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar .nav { flex-direction: row; flex-wrap: wrap; }
  .user-card { margin-top: 0; margin-left: auto; }
  .board-members { margin-left: 0; }
  .main { padding: 14px; }
}
