* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #1e293b;
  color: #1f2937;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---- Top bar ---- */
.topbar {
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.topbar .logo { font-weight: 700; font-size: 17px; letter-spacing: 0.3px; }
.topbar nav { display: flex; gap: 16px; margin-left: 12px; }
.topbar nav a { color: #cbd5e1; font-size: 14px; padding: 4px 8px; border-radius: 4px; }
.topbar nav a:hover, .topbar nav a.active { background: #334155; color: #fff; }
.topbar .spacer { flex: 1; }
.topbar .user { font-size: 13px; color: #cbd5e1; }
.topbar .user b { color: #fff; }
.topbar button.linkbtn {
  background: transparent; border: none; color: #cbd5e1; cursor: pointer; font-size: 13px;
  padding: 4px 8px; border-radius: 4px;
}
.topbar button.linkbtn:hover { background: #334155; color: #fff; }

/* Notification bell */
.bell { position: relative; cursor: pointer; padding: 6px 10px; border-radius: 4px; }
.bell:hover { background: #334155; }
.bell .badge {
  position: absolute; top: -2px; right: -2px;
  background: #ef4444; color: white; font-size: 11px; font-weight: 700;
  padding: 1px 5px; border-radius: 10px; min-width: 18px; text-align: center;
}
.notif-panel {
  position: absolute; right: 16px; top: 50px;
  background: white; color: #1f2937;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  width: 380px; max-height: 500px; overflow-y: auto;
  display: none; z-index: 200;
}
.notif-panel.active { display: block; }
.notif-panel .nph {
  padding: 12px 16px; border-bottom: 1px solid #e5e7eb;
  font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
.notif-panel .nph button {
  background: none; border: none; color: #3b82f6; cursor: pointer; font-size: 12px;
}
.notif-panel .item {
  padding: 12px 16px; border-bottom: 1px solid #f3f4f6; cursor: pointer; font-size: 14px;
}
.notif-panel .item:hover { background: #f9fafb; }
.notif-panel .item.unread { background: #eff6ff; }
.notif-panel .item:last-child { border-bottom: none; }
.notif-panel .item .meta { font-size: 12px; color: #6b7280; margin-top: 4px; }
.notif-panel .empty { padding: 40px 20px; text-align: center; color: #9ca3af; }

/* ---- Page container ---- */
.page { padding: 24px; }
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; color: #fff; flex-wrap: wrap; gap: 10px;
}
.page-header h2 { font-size: 22px; }

/* ---- Cards / boards ---- */
.card {
  background: white; border-radius: 8px; padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 16px;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.board-card {
  background: white; border-radius: 8px; padding: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column; gap: 8px; min-height: 130px;
}
.board-card:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.2); }
.board-card.archived { opacity: 0.6; }
.board-card .name { font-weight: 600; font-size: 17px; color: #111827; }
.board-card .desc { color: #6b7280; font-size: 13px; flex: 1; }
.board-card .footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #6b7280; }
.board-card .badge {
  background: #e0e7ff; color: #3730a3; padding: 2px 8px; border-radius: 10px; font-size: 11px;
}

/* ---- Buttons / forms ---- */
.btn {
  display: inline-block; padding: 8px 14px; border: none; border-radius: 6px;
  cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.15s;
  text-decoration: none;
}
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warn { background: #f59e0b; color: white; }
.btn-warn:hover { background: #d97706; }
.btn-secondary { background: #6b7280; color: white; }
.btn-secondary:hover { background: #4b5563; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-ghost { background: rgba(255,255,255,0.1); color: white; }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 14px; color: #374151; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #d1d5db;
  border-radius: 6px; font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center; z-index: 300;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white; color: #1f2937;
  border-radius: 8px; padding: 24px;
  width: 90%; max-width: 560px; max-height: 90vh; overflow-y: auto;
}
.modal-lg { max-width: 760px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-header h3 { font-size: 18px; }
.modal-header .close { background: none; border: none; font-size: 24px; cursor: pointer; color: #9ca3af; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---- Kanban board ---- */
.kanban {
  display: flex; gap: 14px; padding-bottom: 12px;
  overflow-x: auto; align-items: flex-start;
  min-height: calc(100vh - 200px);
}
.column {
  background: rgba(255,255,255,0.08);
  border-radius: 8px; padding: 10px; min-width: 280px; max-width: 280px;
  flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
}
.column.drag-over { background: rgba(255,255,255,0.18); }
.column .col-header {
  display: flex; justify-content: space-between; align-items: center;
  color: #fff; padding: 4px 6px; cursor: grab;
}
.column .col-header .name { font-weight: 600; font-size: 14px; }
.column .col-header .count { color: #cbd5e1; font-size: 12px; }
.column .col-header .col-menu { background: transparent; border: none; color: #cbd5e1; cursor: pointer; padding: 4px; border-radius: 4px; }
.column .col-header .col-menu:hover { background: rgba(255,255,255,0.1); }
.cards-area {
  display: flex; flex-direction: column; gap: 8px; min-height: 30px;
}
.kanban-card {
  background: white; border-radius: 6px; padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  cursor: pointer; transition: box-shadow 0.15s;
  font-size: 14px;
}
.kanban-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card .labels { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.kanban-card .label-chip {
  height: 6px; width: 36px; border-radius: 3px;
}
.kanban-card .title { color: #111827; font-weight: 500; }
.kanban-card .meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 12px; color: #6b7280;
}
/* Base avatar style - used in modal pickers, board members, comments */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #6366f1; color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}

.kanban-card .assignees {
  display: flex; gap: 2px; margin-left: auto;
}
.kanban-card .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: #6366f1; color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  border: 2px solid white; margin-left: -6px;
}
.kanban-card .avatar:first-child { margin-left: 0; }
.kanban-card .due {
  display: inline-flex; align-items: center; gap: 3px;
  background: #f3f4f6; padding: 2px 6px; border-radius: 4px;
  font-size: 11px; color: #374151;
}
.kanban-card .due.overdue { background: #fee2e2; color: #991b1b; }
.kanban-card .due.soon { background: #fef3c7; color: #92400e; }
.kanban-card .priority {
  display: inline-block; width: 4px; align-self: stretch;
  border-radius: 2px; margin-right: 8px;
}
.kanban-card .body { display: flex; align-items: flex-start; }
.kanban-card .priority-low { background: #94a3b8; }
.kanban-card .priority-normal { background: transparent; }
.kanban-card .priority-high { background: #f59e0b; }
.kanban-card .priority-urgent { background: #ef4444; }

.add-card-btn {
  background: transparent; border: none; color: #cbd5e1;
  padding: 8px; text-align: left; cursor: pointer; border-radius: 4px;
  font-size: 13px;
}
.add-card-btn:hover { background: rgba(255,255,255,0.1); color: white; }

.add-list-btn {
  background: rgba(255,255,255,0.08); border: none; color: #cbd5e1;
  padding: 14px 20px; border-radius: 8px; cursor: pointer;
  min-width: 240px; height: fit-content; font-size: 14px;
}
.add-list-btn:hover { background: rgba(255,255,255,0.15); color: white; }

/* Label colors */
.label-bug { background: #ef4444; color: white; }
.label-feature { background: #3b82f6; color: white; }
.label-task { background: #10b981; color: white; }
.label-improvement { background: #8b5cf6; color: white; }
.label-research { background: #ec4899; color: white; }
.label-blocker { background: #dc2626; color: white; }

.label-text {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 500;
}

/* ---- Card detail modal ---- */
.card-detail .sec-title { font-weight: 600; color: #374151; font-size: 13px; text-transform: uppercase; margin-bottom: 6px; margin-top: 14px; }
.card-detail .sec-title:first-child { margin-top: 0; }
.card-detail .description { color: #374151; font-size: 14px; white-space: pre-wrap; line-height: 1.5; }
.card-detail .comment {
  padding: 10px 12px; background: #f9fafb; border-radius: 6px; margin-bottom: 8px;
}
.card-detail .comment-author { font-weight: 600; font-size: 13px; color: #111827; }
.card-detail .comment-time { font-size: 11px; color: #9ca3af; margin-left: 8px; }
.card-detail .comment-body { font-size: 14px; color: #374151; margin-top: 4px; white-space: pre-wrap; }

/* Activity log */
.activity-item { padding: 6px 0; font-size: 13px; color: #4b5563; border-bottom: 1px dashed #e5e7eb; }
.activity-item:last-child { border-bottom: none; }
.activity-item .actor { font-weight: 600; color: #111827; }
.activity-item .time { font-size: 11px; color: #9ca3af; }

/* ---- Toast ---- */
.toast {
  position: fixed; top: 20px; right: 20px; padding: 12px 20px;
  background: #1f2937; color: white; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 2000;
  transform: translateX(400px); transition: transform 0.3s;
}
.toast.show { transform: translateX(0); }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }

/* ---- Login ---- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}
.login-box {
  background: white; padding: 36px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3); width: 100%; max-width: 400px;
}
.login-box h1 { text-align: center; margin-bottom: 8px; color: #111827; }
.login-box .subtitle { text-align: center; color: #6b7280; margin-bottom: 24px; font-size: 14px; }

/* ---- Misc ---- */
.empty {
  text-align: center; padding: 60px 20px; color: #9ca3af;
}
.empty h3 { font-size: 18px; margin-bottom: 8px; color: #6b7280; }
.muted { color: #6b7280; font-size: 13px; }
.dark-muted { color: #94a3b8; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: #e5e7eb; color: #374151;
  padding: 3px 10px; border-radius: 12px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip button {
  background: none; border: none; color: inherit; cursor: pointer; padding: 0; line-height: 1;
}

/* ============ Star button ============ */
.star-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 4px 6px;
  border-radius: 4px;
  color: #94a3b8;
  line-height: 1;
  transition: transform 0.15s, color 0.15s;
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.on { color: #fbbf24; }

/* Star inside topbar / board header */
.board-card .star-btn { font-size: 18px; padding: 2px 4px; flex-shrink: 0; }
.page-header .star-btn { color: #fff; }
.page-header .star-btn.on { color: #fbbf24; }

/* ============ Inline edit zones ============ */
.add-card-zone, .add-list-zone { width: 100%; }

.inline-edit {
  background: white;
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.inline-edit textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  padding: 4px;
  min-height: 50px;
}
.add-list-inline {
  background: rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 8px;
  min-width: 240px;
  max-width: 280px;
}
.add-list-inline input {
  width: 100%;
  border: none;
  outline: none;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
}
.inline-edit-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.btn-ghost-sm {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1;
}
.btn-ghost-sm:hover { background: #f3f4f6; color: #111827; }
.add-list-inline .btn-ghost-sm { color: #e5e7eb; }
.add-list-inline .btn-ghost-sm:hover { background: rgba(255,255,255,0.1); color: white; }

/* My Cards row - clickable */
.mycards-row {
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
.mycards-row:hover {
  background: #f9fafb;
}
.mycards-row:last-child {
  border-bottom: none;
}

/* =====================================================================
   Card detail v2 - Trello/ClickUp-style layout
   ===================================================================== */

/* Modal expanded for v2 layout */
.modal-card-v2 {
  max-width: 900px;
  width: 95%;
  padding: 0;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

/* Header bar of the card modal */
.cv2-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 8px 18px;
  border-bottom: 1px solid #f3f4f6;
}
.cv2-header .status-select {
  flex-shrink: 0;
}
.cv2-header .breadcrumb {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}
.cv2-header .breadcrumb a {
  color: #3b82f6;
  cursor: pointer;
}
.cv2-header .breadcrumb a:hover { text-decoration: underline; }
.cv2-header h2 {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  padding: 4px 0;
}
.cv2-header h2 input {
  font: inherit;
  border: 1px solid transparent;
  outline: none;
  width: 100%;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
}
.cv2-header h2 input:hover { background: #f9fafb; }
.cv2-header h2 input:focus { background: white; border-color: #3b82f6; }
.cv2-header .actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.cv2-header .actions button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  color: #6b7280;
  font-size: 16px;
  line-height: 1;
}
.cv2-header .actions button:hover { background: #f3f4f6; color: #111827; }

/* Action bar (Labels / Dates / Checklist / Members / Priority) */
.cv2-actionbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 18px 12px 18px;
  border-bottom: 1px solid #f3f4f6;
}
.cv2-actionbar button {
  background: #f3f4f6;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cv2-actionbar button:hover { background: #e5e7eb; }

/* Body: 2 column layout */
.cv2-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.cv2-main {
  padding: 16px 18px;
  overflow-y: auto;
  border-right: 1px solid #f3f4f6;
}
.cv2-sidebar {
  padding: 16px 18px;
  overflow-y: auto;
  background: #fafafa;
}

/* Sections inside main column */
.cv2-section {
  margin-bottom: 22px;
}
.cv2-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cv2-section-head h3 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.cv2-section-head .head-action {
  background: transparent;
  border: none;
  font-size: 12px;
  color: #3b82f6;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.cv2-section-head .head-action:hover { background: #eff6ff; }

.cv2-description textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  background: white;
}
.cv2-description textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

/* Subtasks */
.cv2-progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0 12px 0;
}
.cv2-progress-bar > div {
  height: 100%;
  background: #10b981;
  transition: width 0.3s;
}
.subtask-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.1s;
}
.subtask-row:hover { background: #f9fafb; }
.subtask-row .sub-check {
  cursor: pointer;
  flex-shrink: 0;
}
.subtask-row .sub-title {
  flex: 1;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.subtask-row .sub-title:hover { background: #f3f4f6; }
.subtask-row .sub-title.done { text-decoration: line-through; color: #9ca3af; }
.subtask-row .sub-title input {
  width: 100%;
  font: inherit;
  padding: 2px 4px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  outline: none;
}
.subtask-row .sub-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #374151;
  border: none;
  cursor: pointer;
}
.subtask-row .sub-assignee {
  flex-shrink: 0;
}
.subtask-row .sub-due {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}
.subtask-row .sub-due.overdue { color: #dc2626; font-weight: 600; }
.subtask-row .sub-actions {
  opacity: 0;
  transition: opacity 0.1s;
}
.subtask-row:hover .sub-actions { opacity: 1; }
.subtask-row .sub-actions button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  color: #6b7280;
  border-radius: 4px;
  font-size: 13px;
}
.subtask-row .sub-actions button:hover { background: #f3f4f6; color: #111827; }

.subtask-add-row {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  background: #f9fafb;
  display: flex;
  gap: 6px;
}
.subtask-add-row input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Attachments */
.attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.attach-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  position: relative;
}
.attach-card .thumb {
  width: 100%;
  height: 80px;
  background: #f3f4f6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
  cursor: pointer;
}
.attach-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.attach-card .name {
  font-weight: 500;
  color: #111827;
  word-break: break-all;
  font-size: 12px;
  line-height: 1.3;
}
.attach-card .meta {
  font-size: 10px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
}
.attach-card .att-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.1s;
}
.attach-card:hover .att-actions { opacity: 1; }
.attach-card .att-actions button {
  background: white;
  border: 1px solid #e5e7eb;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #374151;
  line-height: 1;
}
.attach-card .att-actions button:hover { background: #f3f4f6; }
.attach-card .att-actions button.del:hover { background: #fee2e2; color: #dc2626; }

.attach-drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  padding: 18px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin-top: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.attach-drop-zone:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
.attach-drop-zone.drag-over { border-color: #3b82f6; background: #dbeafe; }

/* Lightbox for image preview */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center; z-index: 500;
  cursor: zoom-out;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 92%; max-height: 92%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  background: rgba(255,255,255,0.15);
  border: none; color: white;
  width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer;
  font-size: 18px;
}

/* Right sidebar: Comments and Activity (unified timeline) */
.cv2-sidebar h3 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cv2-comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  background: white;
  resize: vertical;
  min-height: 56px;
}
.cv2-comment-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
}
.cv2-comment-form .form-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}

.cv2-timeline {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cv2-tl-item {
  display: flex;
  gap: 8px;
  font-size: 13px;
}
.cv2-tl-item .avatar { width: 28px; height: 28px; font-size: 11px; flex-shrink: 0; }
.cv2-tl-comment .body {
  flex: 1;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
}
.cv2-tl-comment .body .head { display: flex; gap: 6px; align-items: baseline; margin-bottom: 4px; }
.cv2-tl-comment .body .author { font-weight: 600; font-size: 13px; color: #111827; }
.cv2-tl-comment .body .when { font-size: 11px; color: #9ca3af; }
.cv2-tl-comment .body .text { font-size: 14px; color: #374151; white-space: pre-wrap; line-height: 1.4; }
.cv2-tl-activity {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  padding-left: 4px;
}
.cv2-tl-activity .body { flex: 1; }
.cv2-tl-activity .body b { color: #374151; font-weight: 600; }
.cv2-tl-activity .when { color: #9ca3af; }

/* Status pills used in subtask status dropdown */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 500;
  background: #e5e7eb; color: #374151;
  border: none; cursor: pointer;
}
.status-pill.status-done { background: #d1fae5; color: #065f46; }
.status-pill.status-progress { background: #dbeafe; color: #1e40af; }
.status-pill.status-blocked { background: #fee2e2; color: #991b1b; }
.status-pill.status-todo { background: #f3f4f6; color: #374151; }

/* Kanban card subtask progress */
.kc-progress {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #6b7280;
}
.kc-progress-bar {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}
.kc-progress-bar > div {
  height: 100%;
  background: #10b981;
  transition: width 0.3s;
}
.kc-attach-icon {
  display: inline-flex; gap: 3px; align-items: center;
  color: #6b7280; font-size: 11px;
}

/* Popovers (Labels / Dates / Priority / Members from action bar) */
.popover {
  position: absolute;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 14px;
  z-index: 400;
  min-width: 240px;
  display: none;
}
.popover.active { display: block; }
.popover h4 {
  font-size: 13px; font-weight: 600; color: #374151;
  text-transform: uppercase; letter-spacing: 0.3px;
  margin-bottom: 10px;
}
.popover label {
  display: flex; align-items: center; gap: 8px;
  padding: 6px; cursor: pointer; border-radius: 4px;
}
.popover label:hover { background: #f9fafb; }
.popover input[type="search"], .popover input[type="text"], .popover input[type="date"] {
  width: 100%; padding: 6px 10px; border: 1px solid #d1d5db;
  border-radius: 4px; font-size: 14px;
  margin-bottom: 8px;
}

/* When a subtask is the "currently open" card, show a small badge in breadcrumb */
.breadcrumb-back {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f3f4f6; padding: 2px 8px; border-radius: 12px;
  font-size: 11px; color: #6b7280;
  cursor: pointer;
}
.breadcrumb-back:hover { background: #e5e7eb; color: #111827; }
