/* The projects table: every field on one line, editable in place. */

.table-bar {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s3) var(--s6);
  border-bottom: 1px solid var(--rule-soft);
}

.seg {
  display: flex; gap: 2px; padding: 2px;
  background: var(--ink-800); border: 1px solid var(--rule); border-radius: var(--r2);
}
.seg button {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 0; border-radius: var(--r1);
  background: none; color: var(--text-dim); cursor: pointer; font-size: 12.5px;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--ink-600); color: var(--text); }

.table-scroll { height: 100%; overflow: auto; }

.ptable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.ptable thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--ink-850);
  border-bottom: 1px solid var(--rule);
  padding: 9px var(--s3);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 400;
  white-space: nowrap;
}
.ptable thead th.sortable { cursor: pointer; user-select: none; }
.ptable thead th.sortable:hover { color: var(--text-dim); }
.ptable thead th .dir { color: var(--signal); margin-left: 4px; }

.ptable td {
  padding: 6px var(--s3);
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}
.ptable tbody tr:hover td { background: rgba(255, 255, 255, .022); }
.ptable tbody tr.picked td { background: rgba(255, 176, 32, .06); }
.ptable tbody tr.archived td { opacity: .5; }

.ptable .col-sel { width: 38px; text-align: center; }
.ptable .col-name { min-width: 240px; }
.ptable .col-link { width: 210px; }
.ptable .col-status { width: 190px; }
.ptable .col-priority { width: 118px; }
.ptable .col-due { width: 156px; }
.ptable .col-desc { min-width: 260px; }

.ptable input[type="checkbox"] { accent-color: var(--signal); width: 14px; height: 14px; }

.cell-name { display: flex; align-items: center; gap: 8px; }
.cell-name .spine { width: 3px; height: 18px; border-radius: 2px; flex: 0 0 auto; }
.cell-name a { color: var(--text); font-weight: 500; }
.cell-name .open {
  opacity: 0; background: none; border: 0; color: var(--text-faint); cursor: pointer;
  padding: 2px; border-radius: var(--r1);
}
tr:hover .cell-name .open { opacity: 1; }
.cell-name .open:hover { background: var(--ink-600); color: var(--text); }

.cell-link { display: flex; align-items: center; gap: 7px; color: var(--text-faint); }
.cell-link a { color: var(--t-update); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; display: inline-block; }
.cell-link button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; display: flex; }
.cell-link button:hover { color: var(--text); }

.status-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--r1);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-pill:hover { border-color: currentColor; }
.status-pill.unset { color: var(--text-faint); background: none; }

.stars { display: flex; align-items: center; gap: 3px; }
.stars button {
  background: none; border: 0; padding: 0; cursor: pointer;
  width: 18px; height: 18px; display: grid; place-items: center;
  color: var(--rule-strong);
  font-size: 14px; line-height: 1;
}
.stars button.on { color: var(--signal); }
.stars button:hover { color: var(--signal); }
.stars button .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

.date-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-dim);
  background: none; border: 1px solid transparent; border-radius: var(--r1);
  padding: 3px 6px; cursor: pointer;
}
.date-chip:hover { border-color: var(--rule); color: var(--text); }
.date-chip.empty { color: var(--text-faint); }
.date-chip.overdue { color: var(--t-blocker); }
.date-chip.today { color: var(--signal); }

.cell-desc {
  display: block;
  color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 420px;
  cursor: text;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: var(--r1);
}
.cell-desc:hover { border-color: var(--rule); }
.cell-desc.empty::before { content: "Add a note"; color: var(--text-faint); opacity: 0; }
tr:hover .cell-desc.empty::before { opacity: 1; }

.inline-input {
  width: 100%;
  background: var(--ink-700);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r1);
  padding: 3px 6px;
  font: inherit;
  outline: none;
}

/* --- bulk bar --------------------------------------------------------------- */

.bulk-bar {
  position: sticky; bottom: var(--s4); z-index: 20;
  margin: 0 auto;
  width: fit-content;
  display: flex; align-items: center; gap: var(--s3);
  padding: 8px 10px 8px 16px;
  background: var(--ink-700);
  border: 1px solid var(--rule-strong);
  border-radius: 30px;
  box-shadow: var(--shadow-3);
}
.bulk-bar .n { font-family: var(--font-mono); font-size: 11px; color: var(--signal); white-space: nowrap; }

/* --- status picker ---------------------------------------------------------- */

.picker {
  position: fixed; z-index: var(--z-picker);
  min-width: 220px; max-height: 60vh; overflow: auto;
  background: var(--ink-800);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r3);
  box-shadow: var(--shadow-3);
  padding: var(--s1);
}
.picker button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 9px; background: none; border: 0; border-radius: var(--r2);
  text-align: left; cursor: pointer; font-size: 13px;
}
.picker button:hover { background: var(--ink-600); }
.picker .swatch { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
.picker .sep { height: 1px; background: var(--rule); margin: var(--s1) 0; }
.picker .tick { margin-left: auto; color: var(--signal); }

/* --- status manager --------------------------------------------------------- */

.status-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.status-row:last-of-type { border-bottom: 0; }
.status-row input[type="color"] {
  width: 26px; height: 26px; padding: 0; border: 1px solid var(--rule); border-radius: var(--r1);
  background: none; cursor: pointer;
}
.status-row .count { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }
.status-row .move { display: flex; gap: 2px; }
