/* projects screen styles (redesign) — builds on assets/css/testflow.css tokens */

.tf-ink { color: var(--tf-ink); }

.tf-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tf-chip-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--tf-border-strong);
  border-radius: 0;
  background: var(--tf-surface);
  color: var(--tf-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tf-chip-btn:hover { background: var(--tf-chip); }

.tf-chip-btn[aria-pressed="true"] {
  background: var(--tf-ink);
  border-color: var(--tf-ink);
  color: var(--tf-surface);
}

.tf-chip-btn[aria-pressed="true"] .tf-count { color: inherit; opacity: 0.8; }

.tf-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.tf-project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tf-project-card:hover,
.tf-project-card:focus-within {
  border-color: var(--tf-accent);
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
}

.tf-project-card[hidden] { display: none; }

/* Cover: the product image when there is one, otherwise an icon on one of five tints */
.tf-project-card-cover {
  position: relative;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tf-project-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.tf-tint-0 { background: #D6E4F5; color: #1D3A6D; }
.tf-tint-1 { background: #EAF5F2; color: #2F7363; }
.tf-tint-2 { background: #F4EFE6; color: #7A5A25; }
.tf-tint-3 { background: #F0ECF8; color: #5B4597; }
.tf-tint-4 { background: #EEF1F4; color: #465467; }
[data-bs-theme=dark] .tf-project-card-cover { filter: brightness(0.8); }
.tf-project-card-pill { position: absolute; top: 12px; left: 12px; }

.tf-project-card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 18px;
}

.tf-project-card-title {
  margin: 0;
  font-family: var(--tf-font);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
}

.tf-project-card-title a {
  color: var(--tf-ink);
  text-decoration: none;
}

.tf-project-card-title a:focus-visible { outline: none; }

.tf-project-card-desc {
  margin: 4px 0 0;
  color: var(--tf-muted);
}

.tf-project-card-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  color: var(--tf-text);
}

.tf-project-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--tf-divider);
  font-size: 13px;
  color: var(--tf-muted);
}
/* The actions menu sits above the card-wide link */
.tf-project-card-foot .tf-more { position: relative; z-index: 2; margin: -8px -8px -8px 0; }
.tf-project-card-foot .tf-more > ul { bottom: calc(100% + 4px); top: auto; }

/* Ways to start a project (dialog, options page, empty state) */
.tf-create-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-create-options a {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--tf-border);
  border-radius: 0;
  background: var(--tf-surface);
  color: var(--tf-ink);
  text-decoration: none;
}

.tf-create-options a:hover,
.tf-create-options a:focus-visible {
  border-color: var(--tf-accent);
  background: var(--tf-surface-2);
}

.tf-create-option-icon {
  flex: 0 0 40px;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: var(--tf-chip);
  color: var(--tf-ink);
}

.tf-create-option-title {
  display: block;
  font-weight: 600;
}

.tf-create-option-text {
  display: block;
  font-size: 14px;
  color: var(--tf-muted);
}

/* ---------- Project overview ---------- */
.tf-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.tf-overview-main {
  flex: 999 1 520px;
  min-width: 0;
}

.tf-overview-side {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tf-plan-progress { width: 160px; }

.tf-plan {
  margin: 0;
}

.tf-plan-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--tf-divider);
}

.tf-plan-row:last-child { border-bottom: 0; }

.tf-plan-row dt {
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--tf-ink);
}

.tf-plan-row dd {
  margin: 0;
  color: var(--tf-text);
}

.tf-plan-empty {
  color: var(--tf-muted);
  font-style: italic;
}

.tf-rich > :last-child { margin-bottom: 0; }

.tf-rich p { margin: 0 0 0.6em; }

.tf-rich ul,
.tf-rich ol { margin: 0 0 0.6em; padding-left: 1.25em; }

.tf-list-link,
.tf-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: inherit;
  text-decoration: none;
}

.tf-list-link { min-height: 56px; color: var(--tf-muted); }

.tf-list-link:hover { background: var(--tf-surface-2); }

.tf-list-meta {
  display: block;
  font-size: 13px;
  color: var(--tf-muted);
}

.tf-dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
  flex-shrink: 0;
  background: var(--tf-accent);
}

.tf-dot.is-done { background: var(--tf-success); }

.tf-quick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
}

.tf-quick .tf-panel-title { margin-bottom: 4px; }

.tf-quick a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--tf-border);
  border-radius: 0;
  color: var(--tf-text);
  font-weight: 500;
  text-decoration: none;
}

.tf-quick a:hover {
  border-color: var(--tf-accent);
  color: var(--tf-accent-ink);
}

/* "Start a new project" tile at the end of the project grid */
.tf-start-card {
  border-style: dashed;
  background: transparent;
}

.tf-create-options.is-compact {
  gap: 8px;
  margin-top: 14px;
}

.tf-create-options.is-compact a {
  align-items: center;
  padding: 10px 12px;
}

.tf-create-options.is-compact .tf-create-option-icon {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
}
