/* ==========================================================================
   Checklist Hub Styles
   Simple two-column layout: main content + comments sidebar
   ========================================================================== */

/* Wide layout with sidebar */
.checklist-hub {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.checklist-hub--wide {
  max-width: 1600px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
}

.checklist-main {
  min-width: 0;
}

/* Comments Sidebar */
.checklist-sidebar {
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-lg, 14px);
  padding: 1rem;
  height: fit-content;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
}

.checklist-sidebar__header {
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

.checklist-sidebar__header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  color: var(--ph-color-text-strong, #0f172a);
}

.checklist-sidebar__form {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

/* Context Bar - shown when commenting on specific item */
.checklist-sidebar__context-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--ph-color-primary, #1d4ed8);
  color: #ffffff;
  border-radius: var(--ph-radius-sm, 10px);
  font-size: 0.78rem;
}

.checklist-sidebar__context-bar strong {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-sidebar__exit {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #ffffff;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.checklist-sidebar__exit:hover {
  background: rgba(255,255,255,0.3);
}

/* Comment badge active state */
.comment-badge--active {
  background: var(--ph-color-primary, #1d4ed8);
  border-color: var(--ph-color-primary, #1d4ed8);
  color: #ffffff;
}

.checklist-sidebar__list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist-sidebar__empty {
  color: var(--ph-color-text-muted, #4b5563);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

.checklist-comment-item {
  padding: 0.5rem;
  background: var(--ph-color-surface-soft, #fbfdff);
  border-radius: var(--ph-radius-sm, 10px);
  border-left: 3px solid var(--ph-color-primary, #1d4ed8);
}

.checklist-comment-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.checklist-comment-item__item {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-comment-item__time {
  font-size: 0.68rem;
  color: var(--ph-color-text-soft, #6b7280);
  white-space: nowrap;
}

.checklist-comment-item__body {
  font-size: 0.78rem;
  color: var(--ph-color-text-primary, #1f2937);
  line-height: 1.4;
}

/* Items Panel */
.checklist-items-panel {
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-lg, 14px);
  padding: 1rem;
  margin-top: 1rem;
}

.checklist-items-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

#panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
}

/* Comment Badge */
.comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--ph-color-surface-alt, #eef2ff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-pill, 999px);
  font-size: 0.72rem;
  color: var(--ph-color-text-muted, #4b5563);
  cursor: pointer;
  transition: all 0.15s ease;
}

.comment-badge:hover {
  border-color: var(--ph-color-primary, #1d4ed8);
  color: var(--ph-color-primary, #1d4ed8);
}

.comment-badge i {
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .checklist-hub--wide {
    grid-template-columns: 1fr;
  }
  .checklist-sidebar {
    position: static;
    max-height: 400px;
  }
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

.checklist-header__title h1 {
  font-size: 1.6rem; /* T1 — Page title */
  font-weight: 700;
  color: var(--ph-color-text-strong, #0f172a);
  margin: 0 0 0.25rem 0;
}

.checklist-header__subtitle {
  font-size: 0.9rem; /* T4 — Body text */
  color: var(--ph-color-text-muted, #4b5563);
  margin: 0;
}

/* Stats Row */
.checklist-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.checklist-stat {
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-sm, 10px);
  padding: 0.75rem 1.25rem;
  min-width: 100px;
  text-align: center;
}

.checklist-stat__value {
  display: block;
  font-size: 1.28rem; /* T2 — Section headers */
  font-weight: 700;
  color: var(--ph-color-text-strong, #0f172a);
}

.checklist-stat__label {
  display: block;
  font-size: 0.78rem; /* T5 — Small meta */
  color: var(--ph-color-text-muted, #4b5563);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.checklist-stat--done {
  border-color: var(--ph-color-success, #16a34a);
}
.checklist-stat--done .checklist-stat__value {
  color: var(--ph-color-success, #16a34a);
}

.checklist-stat--jeremy {
  border-color: #3b82f6;
}
.checklist-stat--jeremy .checklist-stat__value {
  color: #3b82f6;
}

.checklist-stat--blocked {
  border-color: var(--ph-color-warning, #f97316);
}
.checklist-stat--blocked .checklist-stat__value {
  color: var(--ph-color-warning, #f97316);
}

/* Overall Progress Bar */
.checklist-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-sm, 10px);
}

.checklist-progress__bar {
  flex: 1;
  height: 12px;
  background: var(--ph-color-surface-alt, #eef2ff);
  border-radius: var(--ph-radius-pill, 999px);
  overflow: hidden;
}

.checklist-progress__fill {
  height: 100%;
  border-radius: var(--ph-radius-pill, 999px);
  transition: width 0.5s ease, background 0.3s ease;
}

.checklist-progress__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ph-color-text-strong, #0f172a);
  white-space: nowrap;
}

/* Categories */
.checklist-categories {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.checklist-category {
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-lg, 14px);
  padding: 1rem 1.25rem;
  box-shadow: var(--ph-shadow-card, 0 8px 14px rgba(30, 64, 175, 0.06));
}

.checklist-category__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

.checklist-category__name {
  font-size: 1.08rem; /* T3 — Card labels */
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-category__name i {
  color: var(--ph-color-primary, #1d4ed8);
}

.checklist-category__count {
  font-size: 0.78rem; /* T5 — Small meta */
  font-weight: 400;
  color: var(--ph-color-text-muted, #4b5563);
}

.checklist-category__desc {
  font-size: 0.9rem; /* T4 — Body text */
  color: var(--ph-color-text-muted, #4b5563);
  margin: 0.25rem 0 0 0;
}

/* Items - Single Row Layout */
.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.checklist-items__empty {
  padding: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ph-color-text-muted, #4b5563);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--ph-color-surface-soft, #fbfdff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-sm, 10px);
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checklist-item:hover {
  border-color: var(--ph-color-border-strong, #c5cee3);
}

.checklist-item--pending {
  background: var(--ph-checklist-pending-bg);
  border-color: var(--ph-checklist-pending-border);
}

.checklist-item--done {
  background: var(--ph-checklist-done-bg);
  border: var(--ph-checklist-done-border-width) solid var(--ph-checklist-done-border);
  font-weight: var(--ph-font-weight-label);
}

.checklist-item--done .checklist-item__title {
  text-decoration: line-through;
  color: var(--ph-color-text-muted, #4b5563);
}

.checklist-item--doing {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
}

.checklist-item--blocked {
  background: var(--ph-variant-row-bg, #ffedd5);
  border-left: 3px solid var(--ph-color-warning, #f97316);
}

/* Title - prominent, takes remaining space */
.checklist-item__title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ph-color-text-strong, #0f172a);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-item__title .badge-sm {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

/* Status - small pill select */
.checklist-item__status {
  width: auto;
  min-width: 70px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  border-radius: var(--ph-radius-pill, 999px);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  background: var(--ph-color-surface, #ffffff);
  cursor: pointer;
}

.checklist-item--high {
  border-left: 3px solid var(--ph-color-danger, #dc2626);
}

.checklist-item__main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checklist-item__status {
  width: auto;
  min-width: 90px;
  font-size: 0.78rem; /* T5 */
}

.checklist-item__content {
  flex: 1;
  min-width: 0;
}

.checklist-item__title {
  font-size: 0.9rem; /* T4 — Body text */
  font-weight: 500;
  color: var(--ph-color-text-primary, #1f2937);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checklist-item__desc {
  font-size: 0.78rem; /* T5 — Small meta */
  color: var(--ph-color-text-muted, #4b5563);
  margin-top: 0.25rem;
}

/* Toggles */
.checklist-item__toggles {
  display: flex;
  gap: 0.5rem;
}

.checklist-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--ph-color-border-strong, #c5cee3);
  border-radius: var(--ph-radius-xs, 8px);
  background: var(--ph-color-surface, #ffffff);
  cursor: pointer;
  font-size: 0.78rem; /* T5 */
  font-weight: 600;
  color: var(--ph-color-text-muted, #4b5563);
  transition: all 0.15s ease;
}

.checklist-toggle:hover {
  border-color: var(--ph-color-primary, #1d4ed8);
  color: var(--ph-color-primary, #1d4ed8);
}

.checklist-toggle--on {
  background: var(--ph-color-success, #16a34a);
  border-color: var(--ph-color-success, #16a34a);
  color: #ffffff;
}

.checklist-toggle--on:hover {
  background: #15803d;
  border-color: #15803d;
  color: #ffffff;
}

.checklist-toggle__label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.checklist-toggle__icon {
  font-size: 0.9rem;
}

/* Actions */
.checklist-item__actions {
  display: flex;
  gap: 0.25rem;
}

.checklist-item__actions .btn-link {
  padding: 0.25rem;
  color: var(--ph-color-text-muted, #4b5563);
}

.checklist-item__actions .btn-link:hover {
  color: var(--ph-color-primary, #1d4ed8);
}

/* Links */
.checklist-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--ph-color-border-soft, #dde3f1);
}

.checklist-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--ph-color-surface-alt, #eef2ff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-pill, 999px);
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem; /* T5 */
}

.checklist-link__anchor {
  color: var(--ph-color-primary, #1d4ed8);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.checklist-link__anchor:hover {
  text-decoration: underline;
}

.checklist-link__delete {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.25rem;
  cursor: pointer;
  color: var(--ph-color-text-muted, #4b5563);
  font-size: 0.9rem;
  line-height: 1;
}

.checklist-link__delete:hover {
  color: var(--ph-color-danger, #dc2626);
}

/* Comments */
.checklist-item__comments {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--ph-color-border-soft, #dde3f1);
}

.checklist-comment {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.78rem; /* T5 */
  margin-bottom: 0.35rem;
}

.checklist-comment__author {
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
}

.checklist-comment__body {
  color: var(--ph-color-text-primary, #1f2937);
  flex: 1;
}

.checklist-comment__time {
  color: var(--ph-color-text-soft, #6b7280);
  font-size: 0.7rem;
}

.comment-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.comment-form input {
  flex: 1;
}

/* Empty State */
.checklist-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ph-color-text-muted, #4b5563);
}

/* Modal tweaks */
#addCategoryModal .modal-header,
#addItemModal .modal-header,
#addLinkModal .modal-header {
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

#addCategoryModal .modal-footer,
#addItemModal .modal-footer,
#addLinkModal .modal-footer {
  border-top: 1px solid var(--ph-color-border-soft, #dde3f1);
}

/* ==========================================================================
   TILE TOGGLE VIEW (Compact Category Tiles + Full-Width Panel)
   ========================================================================== */

/* Category Tiles Row */
.checklist-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Individual Tile */
.checklist-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  min-width: 140px;
  max-width: 200px;
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-sm, 10px);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  position: relative;
}

.checklist-tile:hover {
  border-color: var(--ph-color-primary, #1d4ed8);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.1);
}

.checklist-tile--active {
  border-color: var(--ph-color-primary, #1d4ed8);
  background: var(--ph-color-surface-alt, #eef2ff);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.checklist-tile--complete {
  border-color: var(--ph-color-success, #16a34a);
}

.checklist-tile--complete .checklist-tile__bar-fill {
  background: var(--ph-color-success, #16a34a);
}

.checklist-tile__name {
  font-size: 0.85rem; /* T4 */
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-tile__progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-tile__count {
  font-size: 0.72rem; /* T5 */
  font-weight: 500;
  color: var(--ph-color-text-muted, #4b5563);
  white-space: nowrap;
}

.checklist-tile__bar {
  flex: 1;
  height: 8px;
  min-width: 50px;
  background: var(--ph-color-surface-alt, #e5e7eb);
  border-radius: var(--ph-radius-pill, 999px);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.checklist-tile__bar-fill {
  display: block;
  height: 100%;
  border-radius: var(--ph-radius-pill, 999px);
  transition: width 0.4s ease, background 0.3s ease;
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

/* Color the bar based on progress - use data attribute or inline style */
.checklist-tile--complete .checklist-tile__bar-fill {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* For tiles with low progress (under 50%) show red/orange */
.checklist-tile:not(.checklist-tile--complete) .checklist-tile__bar-fill {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.checklist-tile__blocked {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  color: var(--ph-color-warning, #f97316);
  font-size: 0.85rem;
}

/* Full-Width Expansion Panel */
.checklist-panel {
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-lg, 14px);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  box-shadow: var(--ph-shadow-card, 0 8px 14px rgba(30, 64, 175, 0.06));
}

.checklist-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

.checklist-panel__title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

#panel-category-name {
  font-size: 1.08rem; /* T3 */
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
}

.checklist-panel__desc {
  font-size: 0.85rem; /* T4 */
  color: var(--ph-color-text-muted, #4b5563);
}

.checklist-panel__actions {
  display: flex;
  gap: 0.5rem;
}

.checklist-panel__comment {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem; /* T5 */
  color: var(--ph-color-text-soft, #6b7280);
  background: var(--ph-color-surface-alt, #eef2ff);
  padding: 0.5rem 0.75rem;
  border-radius: var(--ph-radius-sm, 10px);
  margin-bottom: 0.75rem;
}

.checklist-panel__comment i {
  color: var(--ph-color-primary, #1d4ed8);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

#panel-comment-text {
  color: var(--ph-color-text-primary, #1f2937);
  font-style: italic;
}

/* Category Card */
.checklist-card {
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-lg, 14px);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--ph-shadow-card, 0 8px 14px rgba(30, 64, 175, 0.06));
}

.checklist-card:hover {
  border-color: var(--ph-color-primary, #1d4ed8);
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.12);
}

.checklist-card--expanded {
  border-color: var(--ph-color-primary, #1d4ed8);
  background: var(--ph-color-surface-soft, #fbfdff);
}

.checklist-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.checklist-card__title {
  font-size: 1.08rem; /* T3 */
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-card__title i {
  color: var(--ph-color-primary, #1d4ed8);
}

.checklist-card__badge {
  font-size: 0.78rem; /* T5 */
  font-weight: 500;
  color: var(--ph-color-text-muted, #4b5563);
  background: var(--ph-color-surface-alt, #eef2ff);
  padding: 0.15rem 0.5rem;
  border-radius: var(--ph-radius-pill, 999px);
}

.checklist-card__chevron {
  transition: transform 0.2s ease;
}

.checklist-card--expanded .checklist-card__chevron {
  transform: rotate(180deg);
}

.checklist-card__desc {
  font-size: 0.85rem; /* T4 */
  color: var(--ph-color-text-muted, #4b5563);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

/* Progress Bar */
.checklist-card__progress {
  margin-bottom: 0.75rem;
}

.checklist-card__progress .progress {
  background: var(--ph-color-surface-alt, #eef2ff);
  border-radius: var(--ph-radius-pill, 999px);
}

/* Mini Stats Row */
.checklist-card__stats {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.checklist-card__stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem; /* T5 */
  color: var(--ph-color-text-muted, #4b5563);
}

.checklist-card__stat-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.checklist-card__stat-value {
  font-weight: 500;
}

.checklist-card__stat--blocked {
  color: var(--ph-color-warning, #f97316);
}

/* Latest Comment Preview */
.checklist-card__comment {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem; /* T5 */
  color: var(--ph-color-text-soft, #6b7280);
  background: var(--ph-color-surface-alt, #eef2ff);
  padding: 0.5rem 0.75rem;
  border-radius: var(--ph-radius-sm, 10px);
  margin-top: 0.5rem;
}

.checklist-card__comment i {
  color: var(--ph-color-primary, #1d4ed8);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.checklist-card__comment-text {
  color: var(--ph-color-text-primary, #1f2937);
  font-style: italic;
}

/* Collapsible Panel */
.checklist-collapse {
  margin-top: 0.75rem;
}

.checklist-collapse__content {
  background: var(--ph-color-surface, #ffffff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-lg, 14px);
  padding: 1rem;
}

.checklist-collapse__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ph-color-border-soft, #dde3f1);
}

.checklist-collapse__title {
  font-size: 0.9rem; /* T4 */
  font-weight: 600;
  color: var(--ph-color-text-strong, #0f172a);
}

/* ==========================================================================
   SIMPLIFIED NOTES SECTION
   ========================================================================== */

.checklist-item__notes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--ph-color-border-soft, #dde3f1);
  flex-wrap: wrap;
}

.checklist-item__note-form {
  flex: 1;
  min-width: 200px;
  display: flex;
  gap: 0.5rem;
}

.checklist-item__note-form input {
  flex: 1;
  font-size: 0.78rem; /* T5 */
}

.checklist-item__notes-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--ph-color-surface-alt, #eef2ff);
  border: 1px solid var(--ph-color-border-soft, #dde3f1);
  border-radius: var(--ph-radius-pill, 999px);
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem; /* T5 */
  color: var(--ph-color-text-muted, #4b5563);
  cursor: pointer;
  transition: all 0.15s ease;
}

.checklist-item__notes-toggle:hover {
  border-color: var(--ph-color-primary, #1d4ed8);
  color: var(--ph-color-primary, #1d4ed8);
}

.checklist-item__notes-toggle i {
  font-size: 0.85rem;
}

.checklist-item__comments-list {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--ph-color-surface-alt, #eef2ff);
  border-radius: var(--ph-radius-sm, 10px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .checklist-dashboard {
    grid-template-columns: 1fr;
  }
  
  .checklist-item__main {
    flex-wrap: wrap;
  }
  
  .checklist-item__status {
    order: 1;
  }
  
  .checklist-item__content {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .checklist-item__toggles {
    order: 2;
  }
  
  .checklist-item__actions {
    order: 4;
  }
}
