/*
 * Tasks Index Page Styles
 */

/* Main Content Area */
.tasks-main-content {
  flex: 1;
  padding: 0 48px 24px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Page Header */
.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.tasks-header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tasks-header-left h1 {
  font-size: var(--font-xl);
  font-weight: 600;
  margin: 0;
}

.project-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.project-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.project-header-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.project-list-panel {
  flex: 1;
}

.project-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tasks-header-right .btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Search and Filters Toolbar */
.tasks-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tasks-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 400px;
}

.tasks-search svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.tasks-search .input {
  flex: 1;
}

.task-main-content:has(.kanban-board) .task-header-top {
  margin-bottom: 0;
}

.task-main-content .task-header-top .task-title-row {
  margin-bottom: 0;
}

.task-header-left {
  display: flex;
  flex-direction: column;
}

.tasks-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.filter-chip-active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.filter-chip-active:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.filter-chip-clearable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filter-chip-x {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.filter-chip-x:hover,
.filter-chip-clear:hover .filter-chip-x {
  opacity: 1;
}

.filter-chip-label {
  all: unset;
  cursor: pointer;
}

.filter-chip-clear {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 0 0 0 2px;
}

.filter-chip-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-clear-all {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.filter-clear-all:hover {
  color: var(--text-primary);
}

.filter-dropdown-menu {
  left: auto;
  right: 0;
  min-width: 160px;
  padding: 4px;
}

.filter-dropdown-menu .dropdown-item {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-primary);
}

.filter-dropdown-menu .dropdown-item-active {
  color: var(--accent-primary);
  font-weight: 500;
}


/* Tasks Table */
/* Tasks Table */
.tasks-table-container {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 8px;
  background-color: transparent;
}

.tasks-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.tasks-table thead {
  position: sticky;
  top: 0;
  background-color: var(--bg-primary);
  z-index: 3;
}

.tasks-table tbody tr {
  border-top: 4px solid transparent;
}

.tasks-table.table th {
  text-align: center;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background-color: var(--bg-primary) !important;
}

.tasks-table td {
  padding: 14px 16px;
  font-size: 14px;
  background-color: var(--bg-primary);
}

.tasks-table td:first-child {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

.tasks-table td:last-child {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.task-row {
  position: relative;
  cursor: pointer;
}

.task-row:hover {
  background-color: var(--bg-tertiary);
}



/* Make entire row clickable via the title link */
.task-row .task-title-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Keep other elements clickable above the row link */
.task-row .task-id-link,
.task-row .assignee-cell,
.task-row .badge {
  position: relative;
  z-index: 2;
}

/* Assignee cell with avatar */
.assignee-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.td-assignee {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.assignee-cell .avatar {
  flex-shrink: 0;
}

/* Column Widths */
.th-id, .td-id { width: 7%; }
.th-title, .td-title { width: auto; }
.th-project, .td-project { width: 15%; text-align: center; }
.th-status, .td-status { width: 14%; text-align: center; white-space: nowrap; }
.th-assignee, .td-assignee { width: 6%; min-width: 50px; text-align: center; }
.th-actions, .td-actions { width: 90px; text-align: right; }

/* Keep ID and Title left-aligned */
.tasks-table.table th.th-id,
.tasks-table.table th.th-title,
.tasks-table td.td-id,
.tasks-table td.td-title { text-align: left; }

/* Activate Button */
.btn-activate {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-activate:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.08);
}

.btn-activate:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Empty state (standalone) */
.task-main-content .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  background-color: transparent;
  border: none;
}

.empty-state-icon {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.empty-state-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.5;
}

.empty-state .btn {
  text-decoration: none;
}

/* Empty state (inline table cell) */
.tasks-empty-cell {
  text-align: center;
  padding: 48px 24px !important;
  color: var(--text-secondary);
  background-color: var(--bg-secondary) !important;
  border-radius: 6px;
}

.clear-filters-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.clear-filters-link:hover {
  text-decoration: underline;
}

.tasks-empty-cell kbd {
  padding: 2px 6px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
}

/* Truncate title if needed */
.td-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Task ID Link */
.task-id-link {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.task-id-link:hover {
  color: var(--accent-primary);
}

.status-blue { color: var(--accent-blue); }
.status-orange { color: var(--accent-warm); }
.status-purple { color: var(--accent-purple); }
.status-green { color: var(--accent-green); }
.status-red { color: var(--accent-red); }

/* Task Title Link */
.task-title-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 400;
}

.task-title-link.task-title-unread {
  font-weight: 600;
}


.table-unread-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  margin-left: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Unread Messages Indicator */
.task-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unread-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 9px;
  flex-shrink: 0;
}

.unread-indicator svg {
  width: 12px;
  height: 12px;
}

.unread-indicator-subtle {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  padding: 2px;
  flex-shrink: 0;
}

.unread-indicator-subtle svg {
  width: 14px;
  height: 14px;
}

/* Assignee Cell */
.assignee-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assignee-cell.unassigned {
  opacity: 0.6;
}

.avatar-empty {
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-color);
}

/* Pagination */
.tasks-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  flex-shrink: 0;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-controls .btn {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-page {
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-page.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
  .tasks-toolbar {
    flex-direction: column;
  }

  .tasks-search {
    max-width: none;
  }

  .th-updated, .td-updated {
    display: none;
  }

  .th-id, .td-id {
    width: 10%;
  }

  .th-status, .td-status {
    width: 15%;
  }

  .th-assignee, .td-assignee {
    width: 6%;
  }
}

/* Task Form */
.task-form-wrapper {
  max-width: 640px;
  align-self: center;
  width: 100%;
  margin-top: 8%;
  margin-bottom: auto;
}

.task-form-wrapper .tasks-header {
  margin-bottom: 24px;
}

.task-form-wrapper .tasks-header h1 {
  font-size: var(--font-xl);
  font-weight: 600;
}

.task-form-card {
  padding: 32px;
  border-radius: 12px;
}

.task-form-card .form-group {
  margin-bottom: 24px;
}

.task-form-card .form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.task-form-card .form-group .input {
  width: 100%;
}

.task-form-card textarea.input {
  resize: vertical;
}

.task-form-card .form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.task-form-card .form-row:last-of-type {
  margin-bottom: 0;
}

.task-form-card .form-row .form-group {
  margin-bottom: 0;
}

.form-optional {
  margin-top: 4px;
}

.form-optional summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.form-optional summary::-webkit-details-marker {
  display: none;
}

.form-optional summary::after {
  content: '';
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.15s ease;
}

.form-optional[open] summary::after {
  transform: rotate(180deg);
}

.form-optional summary:hover {
  color: var(--text-secondary);
}

.form-optional-content {
  padding-top: 12px;
}

/* TipTap Editor */
.tiptap-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-primary);
  overflow: hidden;
}

.tiptap-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.tiptap-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.tiptap-toolbar .toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.tiptap-toolbar .toolbar-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.tiptap-toolbar .toolbar-btn.is-active {
  background-color: var(--accent-primary);
  color: white;
}

.tiptap-toolbar .toolbar-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border-color);
  margin: 0 4px;
}

.tiptap-editor {
  padding: 12px;
  min-height: 200px;
  font-size: 14px;
  line-height: 1.6;
}

.task-form-card .tiptap-editor {
  min-height: 80px;
  max-height: 120px;
}

.tiptap-editor:focus {
  outline: none;
}

.tiptap-editor .ProseMirror {
  outline: none;
  min-height: 176px;
}

.tiptap-editor .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--text-secondary);
  pointer-events: none;
  height: 0;
}

.tiptap-editor h1, .tiptap-editor h2, .tiptap-editor h3,
.task-description-body h1, .task-description-body h2, .task-description-body h3 {
  font-weight: 600;
  margin: 1em 0 0.5em;
}

.tiptap-editor h1:first-child, .tiptap-editor h2:first-child, .tiptap-editor h3:first-child,
.task-description-body h1:first-child, .task-description-body h2:first-child, .task-description-body h3:first-child {
  margin-top: 0;
}

.tiptap-editor h2, .task-description-body h2 { font-size: 1.25em; }
.tiptap-editor h3, .task-description-body h3 { font-size: 1.1em; }

.tiptap-editor ul, .tiptap-editor ol,
.task-description-body ul, .task-description-body ol {
  padding-left: 1.5em;
  margin: 0.5em 0;
}

.tiptap-editor code, .task-description-body code {
  background-color: var(--bg-tertiary);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
  color: var(--accent-secondary);
}

[data-theme="dark"] .tiptap-editor code,
[data-theme="dark"] .task-description-body code {
  background-color: #3e3e4a;
  color: #8f9bef;
}

.tiptap-editor pre, .task-description-body pre {
  background-color: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.5em 0;
}

[data-theme="dark"] .tiptap-editor pre,
[data-theme="dark"] .task-description-body pre {
  background-color: #3e3e4a;
}

.tiptap-editor pre code, .task-description-body pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.tiptap-editor blockquote, .task-description-body blockquote {
  display: flex;
  align-items: center;
  border-left: 3px solid var(--accent-primary);
  padding-left: 1em;
  margin: 0.5em 0;
  color: var(--text-secondary);
}

.task-description-body .ProseMirror {
  font-size: 14px;
  line-height: 1.6;
  outline: none;
}

.task-description-body .ProseMirror p {
  margin: 0.5em 0;
}

.task-description-body .ProseMirror p:first-child {
  margin-top: 0;
}

.task-form-wrapper .form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .task-layout-wrapper {
    flex-direction: column;
  }

  .task-sidebar-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
  }

  .tasks-main-content {
    padding: 20px;
  }

  .tasks-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .th-assignee, .td-assignee {
    display: none;
  }

  .th-id, .td-id {
    width: 15%;
  }

  .th-status, .td-status {
    width: 25%;
  }

  .tasks-pagination {
    flex-direction: column;
    gap: 16px;
  }
}

/* Pagination */
.tasks-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
  flex-shrink: 0;
}

.tasks-pagination .pagination-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.tasks-pagination .pagination-btn:hover:not(.disabled) {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.tasks-pagination .pagination-btn.disabled {
  opacity: 0.4;
  cursor: default;
}

.tasks-pagination .pagination-pages {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tasks-pagination .pagination-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.tasks-pagination .pagination-page:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.tasks-pagination .pagination-page.active {
  color: #fff;
  background-color: var(--bg-tertiary);
  font-weight: 600;
}

.tasks-pagination .pagination-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  font-size: 12px;
  color: var(--text-secondary);
}

/*
 * Card-Styled Task Rows
 */

.task-main-content:has(.task-card-grid),
.task-main-content:has(.my-tasks-list),
.task-main-content:has(.kanban-board),
.task-main-content:has(.tasks-table-container) {
  overflow-y: auto;
}

.task-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding-bottom: 24px;
}

/*
 * Kanban Board
 */

.kanban-board {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding-bottom: 24px;
  min-height: 0;
}

/*
 * Collapsible Kanban Columns (Backlog + Done)
 */

.kanban-collapsible-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kanban-collapsible-toggle {
  all: unset;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  white-space: nowrap;
}

.kanban-collapsible-toggle-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.kanban-collapsible-body {
  min-height: 0;
  overflow-y: auto;
}

/* Hide the nested column header since the toggle replaces it */
.kanban-collapsible-body .kanban-column-header {
  display: none;
}

/* Collapsed state */
.kanban-collapsible-column.collapsed {
  width: 40px;
}

.kanban-collapsible-column.collapsed .kanban-collapsible-toggle {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 0;
  border-bottom: none;
  height: 100%;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

[data-theme="dark"] .kanban-collapsible-column.collapsed .kanban-collapsible-toggle {
  background: rgba(255, 255, 255, 0.02);
}

.kanban-collapsible-column.collapsed .kanban-collapsible-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .kanban-collapsible-column.collapsed .kanban-collapsible-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.kanban-collapsible-column.collapsed:first-child .kanban-collapsible-toggle-label {
  writing-mode: vertical-rl;
}

.kanban-collapsible-column.collapsed:last-child .kanban-collapsible-toggle-label {
  writing-mode: vertical-rl;
}

.kanban-collapsible-column.collapsed .kanban-column-status-dot {
  width: 14px;
  height: 2px;
}

.kanban-collapsible-column.collapsed .kanban-collapsible-body {
  display: none;
}

/* Grid layout — done column is always present */

/* Done only (no backlog), both expanded */
.kanban-board {
  grid-template-columns: repeat(3, 1fr) 1fr;
}

/* Done only, done collapsed */
.kanban-board:has(.kanban-collapsible-column.collapsed:last-child) {
  grid-template-columns: repeat(3, 1fr) auto;
}

/* Both present, both expanded */
.kanban-board:has(.kanban-collapsible-column:first-child) {
  grid-template-columns: 1fr repeat(3, 1fr) 1fr;
}

/* Both present, both collapsed */
.kanban-board:has(.kanban-collapsible-column.collapsed:first-child):has(.kanban-collapsible-column.collapsed:last-child) {
  grid-template-columns: auto repeat(3, 1fr) auto;
}

/* Both present, backlog expanded, done collapsed */
.kanban-board:has(.kanban-collapsible-column:first-child:not(.collapsed)):has(.kanban-collapsible-column.collapsed:last-child) {
  grid-template-columns: 1fr repeat(3, 1fr) auto;
}

/* Both present, backlog collapsed, done expanded */
.kanban-board:has(.kanban-collapsible-column.collapsed:first-child):has(.kanban-collapsible-column:last-child:not(.collapsed)) {
  grid-template-columns: auto repeat(3, 1fr) 1fr;
}

.kanban-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
}

.kanban-column-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-column-status-dot {
  width: 2px;
  height: 14px;
  border-radius: 1px;
  flex-shrink: 0;
}

.kanban-column-status-dot-backlog { background: #9ca3af; }
.kanban-column-status-dot-active { background: #3b82f6; }
.kanban-column-status-dot-in-progress { background: #f59e0b; }
.kanban-column-status-dot-in-review { background: #8b5cf6; }
.kanban-column-status-dot-done { background: #22c55e; }

.kanban-column-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.kanban-column-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.kanban-column-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  padding: 8px;
}

[data-theme="dark"] .kanban-column-cards {
  background: rgba(255, 255, 255, 0.02);
}

.kanban-column-cards .task-card {
  width: 100%;
}

.kanban-column-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
}

/*
 * Tasks Tabs
 */

.tasks-tabs {
  display: flex;
  gap: 0;
  margin-top: 12px;
}

.tasks-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tasks-tab:hover {
  color: var(--text-primary);
}

.tasks-tab-active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

.tasks-tab-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: 4px;
}

.tasks-tab-active .tasks-tab-count {
  color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.1);
}

/*
 * Backlog List
 */

.backlog-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  padding: 4px;
  margin-top: 24px;
}

[data-theme="dark"] .backlog-list {
  background: rgba(255, 255, 255, 0.02);
}

.backlog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.backlog-item:hover {
  background-color: var(--bg-tertiary);
}

.backlog-item-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: 'SF Mono', Monaco, monospace;
  flex-shrink: 0;
}

.backlog-item-title {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.backlog-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.task-card {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.task-card-assignee {
  position: absolute;
  top: 10px;
  right: 10px;
}

.task-card-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.task-card-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: 'SF Mono', Monaco, monospace;
}

.task-card-status {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

.task-card-status-backlog {
  background: rgba(107, 114, 128, 0.1);
  color: #9ca3af;
}

.task-card-status-active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.task-card-status-in-progress {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.task-card-status-in-review {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.task-card-status-done {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.task-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card-unread {
  border-color: var(--accent-primary);
}

.task-card-badge {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: var(--accent-primary);
  border-radius: 9px;
}

.task-card-unread-dot {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
}

.task-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.task-card-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-card-meta-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.task-card-dot {
  font-size: 11px;
  color: var(--text-muted);
}

.task-card-project {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.task-card-project svg {
  flex-shrink: 0;
  display: block;
  opacity: 0.7;
}

.task-card-assignee {
  margin-left: auto;
}

.task-card-assignee .avatar {
  flex-shrink: 0;
}

/*
 * My Tasks Page
 */

.my-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 24px;
}

.my-tasks-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.my-tasks-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
}

.my-tasks-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.my-tasks-table-container {
  border-radius: 8px;
  overflow: hidden;
}

.my-tasks-table thead {
  position: relative;
}

