/* Idea-stage mockup only: Projects vs Tasks layout. Does not change the staff app. */

/* Fill the viewport without the live test banner (header is 79px / 67px on phone). */
.workspace{min-height:calc(100vh - 79px)}
@media(max-width:600px){.workspace{min-height:calc(100vh - 67px)}}

/* Keep the Google Tasks chrome tight; the live sheet already pads the bottom for the dock. */
main.content:has([data-tasks]){padding-left:20px;padding-right:20px}
@media(max-width:600px){
  main.content:has([data-tasks]){padding-left:8px;padding-right:8px}
}

/* Projects sits next to Tasks in the workspace nav. */
.nav-link .nav-badge.project-count{
  background:var(--fill-strong,#3a3f46);
  color:var(--ink);
}
:root:has([data-tasks]) .nav-link .nav-badge.project-count{
  background:#2a2e33;
  color:#d0d4d8;
}

/* ----- Option A: board + open project ----- */
.projects-split{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:16px;
  align-items:stretch;
  min-width:0;
}
.projects-split .projects-board{
  height:auto;
  min-height:0;
  max-height:none;
  padding-bottom:8px;
  align-items:stretch;
}
.projects-board .crm-list{flex:1 1 0;min-width:200px;max-width:none;height:auto;min-height:280px}
.projects-board .list-cards{flex:0 1 auto}
.project-card .lead-open{padding-bottom:10px}
.project-card .project-next{
  display:block;
  margin-top:2px;
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
  overflow:hidden;
  overflow-wrap:anywhere;
  white-space:normal;
}
.project-card.is-open{box-shadow:0 0 0 2px var(--blue)}
@media(max-width:600px){.project-card.is-open .project-next{display:none}}
.project-card-detail{display:none}
.task-dot.active{background:var(--blue)}

.project-panel{
  min-width:0;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  padding:16px 16px 18px;
  overflow:auto;
  max-height:calc(100vh - 190px);
  box-shadow:0 1px 1px var(--card-shadow);
}
.project-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.project-panel-head h2{
  margin:0;
  font-size:18px;
  font-weight:650;
  letter-spacing:-.3px;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.project-panel .next-callout{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:0 0 14px;
  padding:10px 12px;
  border-radius:10px;
  background:color-mix(in srgb,var(--gt-accent,#fabd00) 14%,var(--surface-2));
  border:1px solid color-mix(in srgb,var(--gt-accent,#fabd00) 35%,var(--line));
}
.project-panel .next-callout .eyebrow,
.project-card-detail .next-callout .eyebrow{margin:0;color:var(--gt-accent-ink,var(--ink-2));letter-spacing:.08em}
:root:has([data-tasks]) .project-panel .next-callout .eyebrow,
:root:has([data-tasks]) .project-card-detail .next-callout .eyebrow{color:#fabd00}
.project-panel .next-callout strong,
.project-card-detail .next-callout strong{font-size:14px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}
.project-section-label{
  margin:0 0 6px;
  font-size:10px;
  font-weight:700;
  letter-spacing:1.2px;
  text-transform:uppercase;
  color:var(--muted);
}
.project-notes{
  margin:0 0 16px;
  font-size:13px;
  line-height:1.55;
  color:var(--ink-2);
  overflow-wrap:anywhere;
}
.project-task-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.project-task-list .gt-item{min-height:0;padding:8px 4px;gap:8px}
.project-task-list .gt-title{white-space:normal;font-size:14px}
.project-task-list .gt-check{width:28px;height:28px}
.project-task-list .gt-when{font-size:12px}

.project-task-list .gt-line{flex-wrap:wrap;align-items:flex-start;gap:2px 10px}
.project-task-list .gt-title{white-space:normal;overflow:visible;text-overflow:unset;flex:1 1 auto}
.project-task-list .gt-when{margin-left:auto}
@media(max-width:600px){
  .project-task-list .gt-line{flex-direction:column;align-items:flex-start;gap:2px}
  .project-task-list .gt-when{margin-left:0}
  .project-panel{max-height:none}
}

.project-empty{color:var(--muted);font-size:12px;padding:8px 0}

/* Phone A: in-column expanded card, not a second panel and not a side-by-side composite. */
@media(max-width:600px){
  .projects-split{display:block}
  .project-panel{display:none}
  .projects-split .projects-board{
    min-height:0;
    max-height:none;
    height:auto;
    padding-bottom:4px;
  }
  .project-card.is-open .project-card-detail{
    display:block;
    margin:4px 8px 10px;
    padding-top:10px;
    border-top:1px solid var(--line);
  }
  .project-card-detail .next-callout{
    display:flex;
    flex-direction:column;
    gap:2px;
    margin:0 0 12px;
    padding:8px 10px;
    border-radius:10px;
    background:color-mix(in srgb,var(--gt-accent,#fabd00) 14%,var(--surface-2));
    border:1px solid color-mix(in srgb,var(--gt-accent,#fabd00) 35%,var(--line));
  }
  .project-card-detail .project-notes{margin-bottom:12px;font-size:13px}
}

/* ----- Option B: expandable chips above the Tasks list ----- */
.projects-strip{margin:0 4px 16px;min-width:0}
.projects-strip-label{
  margin:0 2px 8px;
  font-size:11px;
  font-weight:650;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.projects-chips{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.project-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  min-height:36px;
  padding:6px 12px;
  border:1px solid var(--line-strong);
  border-radius:999px;
  background:var(--surface);
  color:var(--ink);
  font-size:13px;
  line-height:1.3;
  text-align:left;
}
.project-chip-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.project-chip-text b{font-weight:650}
.project-chip-text span{color:var(--muted);font-weight:450}
.project-chip.is-open{
  border-color:var(--blue);
  background:var(--surface-raised,var(--surface));
  box-shadow:0 0 0 1px var(--blue);
}
.project-chip-detail{
  margin-top:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface);
  padding:14px 16px 12px;
  box-shadow:0 1px 1px var(--card-shadow);
  min-width:0;
}
.project-chip-detail h3{
  margin:0 0 8px;
  font-size:16px;
  font-weight:650;
  letter-spacing:-.2px;
  overflow-wrap:anywhere;
}
.project-chip-detail .next-callout{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:0 0 12px;
  padding:8px 10px;
  border-radius:10px;
  background:color-mix(in srgb,var(--gt-accent,#fabd00) 14%,var(--surface-2));
  border:1px solid color-mix(in srgb,var(--gt-accent,#fabd00) 35%,var(--line));
}
.project-chip-detail .next-callout .eyebrow{margin:0}
:root:has([data-tasks]) .project-chip-detail .next-callout .eyebrow{color:#fabd00}
.project-chip-detail .next-callout strong{font-size:14px;font-weight:650;overflow-wrap:anywhere}
.project-chip-detail .project-notes{margin-bottom:12px}

/* ----- Option C: compact strip + nav count, still on Tasks ----- */
.projects-mini{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 4px 14px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  min-width:0;
  overflow-x:auto;
  scrollbar-width:thin;
}
.projects-mini-kicker{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
  font-size:13px;
  font-weight:650;
  color:var(--ink);
  text-decoration:none;
  white-space:nowrap;
}
.projects-mini-count{
  display:inline-grid;
  place-items:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:10px;
  background:#2a2e33;
  color:#d0d4d8;
  font-size:11px;
  font-weight:700;
}
.projects-mini-chip{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  max-width:220px;
  min-height:26px;
  padding:3px 10px;
  border-radius:999px;
  background:#2a2e33;
  color:#d0d4d8;
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Table chips for a linked project. */
.chip.project-link-chip{
  display:inline-flex;
  align-items:center;
  max-width:180px;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Desktop Tasks chrome: keep the compact bar from eating vertical space. */
@media(min-width:601px){
  .gt-bar{margin-bottom:10px}
  .is-table .gt-dock,.is-board.option-a .gt-dock{display:none}
  main.content:has([data-tasks]){padding-bottom:24px}
}

/* Don't let the fixed dock cover the last list rows in a clipped phone shot. */
@media(max-width:600px){
  .gt-list{padding-bottom:8px}
}

@media(max-width:600px){
  .project-card-detail .project-notes{margin-bottom:8px}
  .project-card-detail .next-callout{margin-bottom:8px}
  .project-task-list .gt-item{padding:6px 2px}
  .projects-mini-chip{max-width:160px}
}

/* Keep a linked-project chip on one line in the Tasks table. Hide the tight ↗ so the chip isn't clipped. */
.tasks-table .row-open{display:none}
.tasks-table .cell-row{flex-wrap:nowrap}
.tasks-table .cell-row .cell-edit{flex:0 1 auto;min-width:0}
.tasks-table .chip.project-link-chip{flex:0 0 auto;max-width:none}
.tasks-table th[data-col=title],.tasks-table td[data-col=title]{min-width:240px}
