/**
 * TaskBuilder - Task List SaaS theme
 * Scoped entirely to #wppm_task_list_container.wppm-tl-shell so it cannot leak
 * into the grid/card view, open task, project task tab, settings or modal screens.
 * Colors a user saved under Settings > Appearance > Task List (header, rows, hover,
 * button) are still applied inline by wppm_tasks_list.php and win over this file.
 */
/* WP admin forces border-box globally; most frontend themes don't (shortcode). */
#wppm_task_list_container.wppm-tl-shell,
#wppm_task_list_container.wppm-tl-shell *,
#wppm_task_list_container.wppm-tl-shell *::before,
#wppm_task_list_container.wppm-tl-shell *::after {
  box-sizing: border-box;
}

#wppm_task_list_container.wppm-tl-shell {
  --wppm-tl-primary: #4f46e5;
  --wppm-tl-primary-dark: #4338ca;
  --wppm-tl-primary-light: #eef2ff;
  --wppm-tl-ink: #111827;
  --wppm-tl-muted: #6b7280;
  --wppm-tl-border: #e5e7eb;
  --wppm-tl-bg: #f8fafc;
  --wppm-tl-surface: #ffffff;
  --wppm-tl-danger: #dc2626;
  --wppm-tl-danger-light: #fee2e2;
  --wppm-tl-success: #16a34a;
  --wppm-tl-radius: 14px;
  --wppm-tl-radius-sm: 10px;
  --wppm-tl-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -12px rgba(16,24,40,.10);
  background: var(--wppm-tl-bg);
  padding: 20px 22px 24px;
  border-radius: var(--wppm-tl-radius);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--wppm-tl-ink);
  text-align: left;
}
#wppm_task_list_container.wppm-tl-shell a {
  text-decoration: none;
}
#wppm_task_list_container.wppm-tl-shell button {
  font-family: inherit;
}
#wppm_task_list_container.wppm-tl-shell .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 1;
}

/* ---------- Header ---------- */
#wppm_task_list_container .wppm-tl-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 4px;
}
#wppm_task_list_container .wppm-tl-header-title.wppm-heading-inline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 !important;
  padding: 0;
}
#wppm_task_list_container .wppm-tl-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
#wppm_task_list_container .wppm-tl-title {
  font: 700 24px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
  color: var(--wppm-tl-ink);
}
#wppm_task_list_container .wppm-tl-header-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--wppm-tl-primary-light);
  color: var(--wppm-tl-primary-dark);
  font-size: 12px;
  font-weight: 700;
}
#wppm_task_list_container .wppm-tl-header-subtitle {
  font-size: 13px;
  color: var(--wppm-tl-muted);
}
#wppm_task_list_container .wppm-tl-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
/* No display rule here on purpose: the buttons carry an inline display (from the
   wppm_tl_add_new_task_btn_style filter) that must be able to hide them. */
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn {
  align-items: center;
  justify-content: center;
  gap: 7px;
  position: static;
  top: auto;
  margin: 0;
  padding: 10px 18px;
  border-radius: 9px;
  border: 1px solid var(--wppm-tl-border);
  background: var(--wppm-tl-surface);
  color: var(--wppm-tl-ink);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn:hover {
  border-color: #d1d5db;
  box-shadow: var(--wppm-tl-shadow);
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn:active {
  transform: translateY(1px);
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--wppm-tl-primary-light);
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn.secondary .dashicons {
  color: var(--wppm-tl-muted);
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn.primary {
  background: var(--wppm-tl-primary);
  border-color: var(--wppm-tl-primary);
  color: #fff;
}
#wppm_task_list_container .wppm-tl-header-actions .wppm_add_new_task_img {
  width: 15px;
  height: 15px;
  padding: 0;
  margin: 0;
}

/* ---------- Toolbar ---------- */
#wppm_task_list_container .wppm-tl-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--wppm-tl-surface);
  border: 1px solid var(--wppm-tl-border);
  border-radius: var(--wppm-tl-radius-sm);
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
#wppm_task_list_container .wppm-tl-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  min-width: 0;
}
#wppm_task_list_container #wppm_task_filter_container {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
}
#wppm_task_list_container .wppm-filter-item {
  margin: 0;
}
#wppm_task_list_container .wppm-filter-item label {
  display: block;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--wppm-tl-muted);
}
#wppm_task_list_container #wppm_task_filter {
  height: 36px;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 28px 0 10px !important;
  border: 1px solid var(--wppm-tl-border) !important;
  border-radius: 8px !important;
  background-color: #fff;
  font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  color: var(--wppm-tl-ink);
  box-shadow: none;
}
#wppm_task_list_container #wppm_task_filter:focus {
  outline: none;
  border-color: var(--wppm-tl-primary) !important;
  box-shadow: 0 0 0 3px var(--wppm-tl-primary-light);
}
/* Project filter (select2) */
#wppm_task_list_container .wppm-tl-project-filter .select2-container .select2-selection--single {
  height: 36px !important;
  border: 1px solid var(--wppm-tl-border);
  border-radius: 8px;
  background: #fff;
}
#wppm_task_list_container .wppm-tl-project-filter .select2-selection__rendered {
  font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  line-height: 34px !important;
  margin-top: 0 !important;
  color: var(--wppm-tl-ink);
}
#wppm_task_list_container .wppm-tl-project-filter .select2-selection__arrow {
  height: 34px !important;
}
#wppm_task_list_container .wppm-tl-project-filter .select2-container--open .select2-selection--single,
#wppm_task_list_container .wppm-tl-project-filter .select2-container--focus .select2-selection--single {
  border-color: var(--wppm-tl-primary);
  box-shadow: 0 0 0 3px var(--wppm-tl-primary-light);
}

/* View toggle (List / Grid) */
#wppm_task_list_container .wppm-tl-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 3px;
  background: var(--wppm-tl-bg);
  border: 1px solid var(--wppm-tl-border);
  border-radius: 9px;
}
#wppm_task_list_container .wppm-tl-view-btn,
#wppm_task_list_container #wppm_grid_view_btn.wppm-tl-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  float: none;
  height: 100%;
  margin: 0;
  padding: 0 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--wppm-tl-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
#wppm_task_list_container .wppm-tl-view-btn:hover {
  color: var(--wppm-tl-ink);
}
#wppm_task_list_container .wppm-tl-view-btn.active {
  background: var(--wppm-tl-surface);
  color: var(--wppm-tl-primary-dark);
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
  cursor: pointer; /* clicking the active view reloads it */
}
#wppm_task_list_container .wppm-tl-view-btn:focus-visible {
  outline: 2px solid var(--wppm-tl-primary);
  outline-offset: 1px;
}

/* Bulk actions */
#wppm_task_list_container .wppm-bulk-actions {
  margin: 0 !important;
}
#wppm_task_list_container #wppm-task-bulk-actions-btn.wppm-button {
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--wppm-tl-primary) !important;
  border-radius: 8px !important;
  background: var(--wppm-tl-primary-light) !important;
  color: var(--wppm-tl-primary-dark) !important;
  font: 600 13px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  cursor: pointer;
}
#wppm_task_list_container #wppm-task-bulk-actions-btn img {
  margin-left: 4px;
  vertical-align: middle;
}
#wppm_task_list_container .wppm-popover-menu {
  border-radius: 10px !important;
  border: 1px solid var(--wppm-tl-border);
  box-shadow: var(--wppm-tl-shadow);
  overflow: hidden;
}
#wppm_task_list_container .wppm-popover-menu-item {
  border-radius: 6px;
}
#wppm_task_list_container .wppm-popover-menu-item:hover {
  background-color: var(--wppm-tl-primary) !important;
}

/* Advanced filters toggle + chips */
#wppm_task_list_container .tb-filters {
  display: flex;
  align-items: flex-end;
}
#wppm_task_list_container #tb-advanced-toggle.tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin: 0 !important;
  padding: 0 12px;
  border: 1px solid var(--wppm-tl-border);
  border-radius: 8px;
  background: var(--wppm-tl-surface);
  color: var(--wppm-tl-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .12s ease, border-color .12s ease;
}
#wppm_task_list_container #tb-advanced-toggle.tb-btn .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--wppm-tl-muted);
}
#wppm_task_list_container #tb-advanced-toggle.tb-btn:hover {
  border-color: #d1d5db;
  background: var(--wppm-tl-bg);
}
#wppm_task_list_container #tb-active-filters .tb-chip {
  margin: 0 0 0 6px;
  border: 1px solid #e0e7ff;
  font-weight: 600;
}

/* Reset link */
#wppm_task_list_container .wppm_display_submit {
  margin: 0;
}
#wppm_task_list_container .wppm-tl-reset-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px !important;
  color: var(--wppm-tl-primary);
  text-decoration: none;
  cursor: pointer;
}
#wppm_task_list_container .wppm-filter-actions .wppm-tl-reset-link {
  margin-bottom: 0 !important;
  font: 600 12.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
/* admin.css forces a text font on every ".wppm-filter-actions span", which breaks the icon glyph. */
#wppm_task_list_container .wppm-filter-actions .wppm-tl-reset-link .dashicons {
  margin: 0 !important;
  font: normal 14px/1 dashicons !important;
  width: 14px;
  height: 14px;
  text-decoration: none;
}
#wppm_task_list_container .wppm-tl-reset-link:hover {
  background: var(--wppm-tl-primary-light);
  color: var(--wppm-tl-primary-dark) !important;
  text-decoration: none !important;
}

/* Search */
#wppm_task_list_container #wppm_task_search.wppm-tl-search {
  position: relative;
  display: flex;
  align-items: center;
  width: auto;
  margin: 0 0 0 auto;
}
#wppm_task_list_container .wppm-tl-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .45;
  pointer-events: none;
}
#wppm_task_list_container .wppm-tl-search-input.form-control {
  width: 260px;
  height: 36px;
  margin: 0 !important;
  padding: 0 12px 0 34px !important;
  border: 1px solid var(--wppm-tl-border) !important;
  border-radius: 9px !important;
  background: #fff;
  font-size: 13px;
  box-shadow: none;
}
#wppm_task_list_container .wppm-tl-search-input.form-control:focus {
  outline: none;
  border-color: var(--wppm-tl-primary) !important;
  box-shadow: 0 0 0 3px var(--wppm-tl-primary-light);
}

/* ---------- Table card ---------- */
#wppm_task_list_container #wppm_task_table_container.wppm-tl-table-wrap {
  margin-top: 16px;
  padding: 0;
  background: var(--wppm-tl-surface);
  border: 1px solid var(--wppm-tl-border);
  border-radius: var(--wppm-tl-radius-sm);
  box-shadow: var(--wppm-tl-shadow);
  overflow: hidden;
  overflow-x: auto;
}
#wppm_task_list_container .wppm-tl-table-wrap .wppm_table {
  margin: 0;
  box-shadow: none;
  border: none;
}
#wppm_task_list_container #wppm_task_table th {
  padding: 10px 12px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  vertical-align: middle;
  border-bottom: 1px solid var(--wppm-tl-border) !important;
}
#wppm_task_list_container #wppm_task_table th span,
#wppm_task_list_container #wppm_task_table th img {
  vertical-align: middle;
}
#wppm_task_list_container #wppm_task_table th .wppm_chevron_img {
  cursor: pointer;
  opacity: .85;
}
#wppm_task_list_container #wppm_task_table td {
  padding: 10px 12px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  vertical-align: middle;
  border-top: none !important;
  border-bottom: 1px solid var(--wppm-tl-border) !important;
}
#wppm_task_list_container #wppm_task_table tbody tr {
  cursor: pointer;
}
#wppm_task_list_container #wppm_task_table tbody tr:last-child td {
  border-bottom: none !important;
}
/* Accent bar on the hovered row; background/text hover colors come from Appearance settings. */
#wppm_task_list_container #wppm_task_table tbody tr td:first-child {
  box-shadow: inset 3px 0 0 transparent;
  transition: box-shadow .12s ease;
}
#wppm_task_list_container #wppm_task_table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--wppm-tl-primary);
}
/* Checkbox column stays icon-width */
#wppm_task_list_container #wppm_task_table th:first-child,
#wppm_task_list_container #wppm_task_table td:first-child {
  width: 40px;
  padding-left: 14px !important;
  padding-right: 4px !important;
}

/* Task name cell */
#wppm_task_list_container .wppm-tl-task-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}
#wppm_task_list_container .wppm-tl-task-name {
  font-weight: 600;
  font-size: 13.5px;
  color: inherit;
}
#wppm_task_list_container .wppm-tl-task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
#wppm_task_list_container .wppm-tl-task-id {
  font-size: 11px;
  color: var(--wppm-tl-muted);
}
#wppm_task_list_container .wppm-tl-task-meta .wppm_subtask_badge {
  margin: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font: 600 10.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Project cell */
#wppm_task_list_container .wppm-tl-project-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}
#wppm_task_list_container .wppm-tl-project-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
#wppm_task_list_container .wppm-tl-project-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Status + priority pills (colors stay user-defined, inline) */
#wppm_task_list_container .wppm_td_task_status,
#wppm_task_list_container .wppm_td_task_priority {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
#wppm_task_list_container .wppm-tl-pill-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
#wppm_task_list_container .wppm_td_task_priority .dashicons {
  font-size: 12px;
  width: 12px;
  height: 12px;
}

/* Dates */
#wppm_task_list_container .wppm-tl-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#wppm_task_list_container .wppm-tl-date.overdue {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--wppm-tl-danger-light);
  color: var(--wppm-tl-danger);
  font-weight: 600;
  font-size: 12px;
}
#wppm_task_list_container .wppm-tl-date .dashicons {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

/* Assignee avatar stack */
#wppm_task_list_container .wppm-tl-avatars {
  display: flex;
  align-items: center;
}
#wppm_task_list_container .wppm-tl-avatars > a {
  display: inline-flex;
  margin-left: -7px;
}
#wppm_task_list_container .wppm-tl-avatars > a:first-child {
  margin-left: 0;
}
#wppm_task_list_container .wppm-tl-avatars .avatar {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--wppm-tl-border);
  transition: transform .1s ease;
}
#wppm_task_list_container .wppm-tl-avatars > a:hover .avatar {
  transform: translateY(-2px);
  position: relative;
  z-index: 2;
}
#wppm_task_list_container .wppm-tl-avatars #wppm_avatar.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #e5e7eb !important;
  color: #374151;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
#wppm_task_list_container .wppm-tl-muted {
  color: var(--wppm-tl-muted);
  font-size: 12.5px;
}

/* Progress */
#wppm_task_list_container .wppm-tl-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
#wppm_task_list_container .wppm-tl-progress-track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #eef0f4;
  overflow: hidden;
}
#wppm_task_list_container .wppm-tl-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--wppm-tl-primary);
}
#wppm_task_list_container .wppm-tl-progress.complete .wppm-tl-progress-bar {
  background: var(--wppm-tl-success);
}
#wppm_task_list_container .wppm-tl-progress-value {
  min-width: 32px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Empty state */
#wppm_task_list_container .wppm-tl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 20px;
  font-size: 14px;
  color: var(--wppm-tl-muted);
  text-align: center;
}
#wppm_task_list_container .wppm-tl-empty[style*="none"] {
  display: none !important;
}
#wppm_task_list_container .wppm-tl-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wppm-tl-primary-light);
  color: var(--wppm-tl-primary);
}
#wppm_task_list_container .wppm-tl-empty-icon .dashicons {
  font-size: 22px;
  width: 22px;
  height: 22px;
}

/* ---------- Pagination ---------- */
#wppm_task_list_container .wppm-tl-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: auto;
  margin: 14px 0 0;
}
#wppm_task_list_container .wppm-tl-pagination-summary {
  color: var(--wppm-tl-muted);
  font-size: 12.5px;
}
#wppm_task_list_container .wppm-tl-pagination-summary strong {
  color: var(--wppm-tl-ink);
  font-weight: 600;
}
#wppm_task_list_container .wppm-tl-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
}
#wppm_task_list_container .wppm-tl-per-page label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--wppm-tl-muted);
}
#wppm_task_list_container #wppm_tl_per_page_select {
  min-height: 30px !important;
  border: 1px solid var(--wppm-tl-border) !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
}
#wppm_task_list_container .wppm_task_pagination {
  float: none;
  align-items: center;
  gap: 6px;
  margin: 0;
}
#wppm_task_list_container .wppm-tl-page-arrow,
#wppm_task_list_container .wppm-tl-page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px !important;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: border-color .12s ease, color .12s ease, background-color .12s ease;
}
#wppm_task_list_container .wppm-tl-page-arrow {
  border: 1px solid var(--wppm-tl-border) !important;
  background: #fff;
  color: var(--wppm-tl-ink) !important;
}
#wppm_task_list_container .wppm-tl-page-arrow:hover {
  border-color: var(--wppm-tl-primary) !important;
  color: var(--wppm-tl-primary) !important;
}
#wppm_task_list_container .wppm-tl-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#wppm_task_list_container .wppm-tl-page-number {
  color: var(--wppm-tl-ink) !important;
}
#wppm_task_list_container .wppm-tl-page-number:hover {
  background: var(--wppm-tl-primary-light);
  color: var(--wppm-tl-primary-dark) !important;
}
#wppm_task_list_container .wppm-tl-page-number.active {
  background: var(--wppm-tl-primary);
  color: #fff !important;
  cursor: default;
}
#wppm_task_list_container .wppm-tl-page-ellipsis {
  color: var(--wppm-tl-muted);
  padding: 0 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  #wppm_task_list_container #wppm_task_search.wppm-tl-search {
    margin-left: 0;
    width: 100%;
  }
  #wppm_task_list_container .wppm-tl-search-input.form-control {
    width: 100%;
  }
}
@media (max-width: 782px) {
  #wppm_task_list_container.wppm-tl-shell {
    padding: 14px 12px 18px;
    border-radius: 0;
  }
  #wppm_task_list_container .wppm-tl-title {
    font-size: 20px;
  }
  #wppm_task_list_container .wppm-tl-header-actions {
    width: 100%;
  }
  #wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn {
    flex: 1 1 auto;
  }
  /* Toolbar becomes a tidy 2-column grid: view toggle, then Filter | Project,
     then Filters | Reset, then full-width search. */
  #wppm_task_list_container .wppm-tl-toolbar {
    align-items: stretch;
    padding: 12px;
  }
  #wppm_task_list_container .wppm-tl-toolbar-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 10px;
    width: 100%;
  }
  #wppm_task_list_container #wppm_task_filter_container {
    display: contents;
  }
  #wppm_task_list_container .wppm-tl-view-toggle,
  #wppm_task_list_container .wppm-bulk-actions {
    grid-column: 1 / -1;
  }
  #wppm_task_list_container .wppm-tl-view-toggle {
    display: flex;
  }
  #wppm_task_list_container .wppm-tl-view-btn,
  #wppm_task_list_container #wppm_grid_view_btn.wppm-tl-view-btn {
    flex: 1 1 0;
    justify-content: center;
  }
  #wppm_task_list_container #wppm-task-bulk-actions-btn.wppm-button {
    width: 100%;
  }
  #wppm_task_list_container #wppm_task_filter,
  #wppm_task_list_container .wppm-tl-project-filter .select2-container {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  #wppm_task_list_container .tb-filters,
  #wppm_task_list_container .tb-filter-bar,
  #wppm_task_list_container #tb-advanced-toggle.tb-btn {
    width: 100%;
  }
  #wppm_task_list_container #tb-advanced-toggle.tb-btn {
    justify-content: center;
  }
  #wppm_task_list_container .wppm_display_submit,
  #wppm_task_list_container .wppm-filter-actions {
    width: 100%;
  }
  /* Advanced filter sheet: let fields span the screen (inline rules pin them to 290px). */
  #wppm_task_list_container #tb-advanced-panel .select2-container,
  #wppm_task_list_container #tb-advanced-panel .select2-selection--multiple,
  #wppm_task_list_container #tb-advanced-panel input[type="date"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  #wppm_task_list_container .wppm-tl-reset-link {
    width: 100%;
    justify-content: center;
    border: 1px dashed #c7d2fe;
  }
  #wppm_task_list_container .wppm-tl-task-cell {
    min-width: 140px;
  }
  #wppm_task_list_container .wppm-tl-project-name {
    max-width: 150px;
  }
  #wppm_task_list_container .wppm-tl-pagination-bar {
    flex-direction: column;
  }
}

/* ===================== Tasks > Active / Archived (underline tabs) =====================
   Rendered once in wppm_tasks.php above the task list / grid (WordPress admin menus
   are only two levels deep, so these sub-pages live here as tabs). Same look as the
   My Tasks tabs. Hidden while a single task is open. */
.wppm-tasks-page .wppm-tasks-scope {
  display: flex;
  gap: 4px;
  width: 99%;
  margin: 12px 0 16px;
  padding: 0 4px;
  border-bottom: 1px solid #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wppm-tasks-page .wppm-tasks-scope-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px 12px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color .15s ease;
}
.wppm-tasks-page .wppm-tasks-scope-tab .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
}
.wppm-tasks-page .wppm-tasks-scope-tab:hover,
.wppm-tasks-page .wppm-tasks-scope-tab:focus {
  color: #111827;
  text-decoration: none;
  box-shadow: none;
}
.wppm-tasks-page .wppm-tasks-scope-tab:focus-visible {
  outline: none;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(79,70,229,.35);
}
.wppm-tasks-page .wppm-tasks-scope-tab::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background-color .15s ease;
}
.wppm-tasks-page .wppm-tasks-scope-tab:hover::after {
  background: #c7d2fe;
}
.wppm-tasks-page .wppm-tasks-scope-tab.is-current {
  color: #4338ca;
}
.wppm-tasks-page .wppm-tasks-scope-tab.is-current::after {
  background: #4f46e5;
}
.wppm-tasks-page:has(#wppm_open_task) .wppm-tasks-scope,
.wppm-tasks-page:has(#wppm_add_new_task) .wppm-tasks-scope {
  display: none;
}@media (max-width: 782px) {
  .wppm-tasks-page .wppm-tasks-scope-tab {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* ===================== Modern light table header (shared) =====================
   Task List (#wppm_task_table), Project List (#wppm_project_table) and
   Project > Tasks (#tbl_project_tasks) get .wppm-modern-thead only while their
   Appearance header colors are still the defaults (#304FFE / white); those are then
   swapped for #f8fafc / #64748b in PHP (WPPM_Functions::wppm_apply_modern_list_header).
   Customized header colors never get this class, so they render exactly as before. */
table.wppm-modern-thead th {
  border-bottom: 1px solid #e5e7eb !important;
  font-weight: 600 !important;
  letter-spacing: .06em;
}
/* The sort arrows are white SVGs made for the blue header: tint them slate grey. */
table.wppm-modern-thead th .wppm_chevron_img {
  filter: brightness(0) invert(.45);
  opacity: .9;
}
table.wppm-modern-thead th .wppm_chevron_img:hover {
  filter: brightness(0) invert(.25);
  opacity: 1;
}

/* ===================== Add New: same style as the open project / Project List primary button =====================
   36px tall, 9px radius, 13px semibold, 14px plus badge, soft inner highlight + indigo tinted
   shadow. Colors stay inline from Settings > Appearance. No display rule: the buttons carry an
   inline display (from a filter) that must still be able to hide them. */
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn.primary {
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 1px 2px rgba(15,23,42,.12),
    0 4px 12px -6px rgba(79,70,229,.55);
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn.primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 1px 2px rgba(15,23,42,.12),
    0 6px 16px -6px rgba(79,70,229,.65);
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn.primary:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 3px rgba(79,70,229,.30);
}
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn.primary .wppm_add_new_task_img {
  width: 14px;
  height: 14px;
}
/* Dashboard sits next to it at the same height */
#wppm_task_list_container .wppm-tl-header-actions .wppm-add-new-btn.secondary {
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1;
}

/* ===================== Task list inside a project (project > Tasks tab) =====================
   Same list as the Tasks page; the project header above provides the title, tabs and "Add Task",
   so the Project filter and Project column are hidden (every row belongs to this project). */
/* The project shell already provides background + padding (same as the embedded Kanban View). */
#wppm_task_list_container.wppm-tl-shell.wppm-tl-in-project {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
#wppm_task_list_container.wppm-tl-in-project .wppm-tl-toolbar {
  margin-top: 0;
}
#wppm_task_list_container.wppm-tl-in-project .wppm-tl-project-filter {
  display: none !important;
}
#wppm_task_list_container.wppm-tl-in-project #wppm_task_table > thead > tr > th:nth-child(3),
#wppm_task_list_container.wppm-tl-in-project #wppm_task_table > tbody > tr > td:nth-child(3) {
  display: none;
}

/* =====================================================================
   Task list polish (modern SaaS, same as the project list), styling only
   ===================================================================== */
/* Toolbar: labels inline before their control, so every control sits on one 36px row */
#wppm_task_list_container .wppm-tl-toolbar,
#wppm_task_list_container .wppm-tl-toolbar-filters,
#wppm_task_list_container #wppm_task_filter_container,
#wppm_task_list_container .tb-filters {
  align-items: center !important;
}
#wppm_task_list_container .wppm-filter-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#wppm_task_list_container .wppm-filter-item label {
  display: inline-block;
  margin: 0 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
}

/* Dates: the date, with the time small and muted underneath */
#wppm_task_list_container .wppm-tl-date.is-split {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.3;
}
#wppm_task_list_container .wppm-tl-date.is-split .wppm-tl-date-day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
}
#wppm_task_list_container .wppm-tl-date.is-split small {
  color: var(--wppm-tl-muted);
  font-size: 11px;
}
/* Overdue: a compact red badge on the date only */
#wppm_task_list_container .wppm-tl-date.is-split.overdue {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-weight: 500;
}
#wppm_task_list_container .wppm-tl-date.is-split.overdue .wppm-tl-date-day {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef2f2;
  box-shadow: inset 0 0 0 1px #fecaca;
  color: #dc2626;
  font-weight: 600;
}
#wppm_task_list_container .wppm-tl-date.is-split.overdue small {
  padding-left: 8px;
  font-weight: 400;
}

/* Rows: more air, separators instead of stripes, clear hover */
#wppm_task_list_container #wppm_task_table td {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}
#wppm_task_list_container #wppm_task_table tbody tr:last-child td {
  border-bottom: none;
}
#wppm_task_list_container #wppm_task_table tbody tr {
  transition: background-color .12s ease;
}

/* Filter dropdown: admin.css caps .wppm-filter-item at 200px, but the label + dropdown button
   (150-260px) need more, so the button spilled over the Filters button next to it (worst on the
   frontend, where theme fonts are larger). Let the item size to its content. */
#wppm_task_list_container .wppm-filter-item {
  flex: none;
  max-width: none;
  min-width: 0;
}
#wppm_task_list_container .wppm-filter-item .wppm-fs {
  flex: none;
}
