/* Team Report page — self-contained additions. Loads after style.css and
   only on team.html. Tokens come from :root in style.css. */

/* pill variants style.css does not define */
.pill.bad { background: rgba(239, 68, 68, 0.12); color: #B91C1C; }
.pill.sm { padding: 2px 9px; font-size: 11px; }

/* ---------- shared bits ---------- */

.tavatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: #E8EEF0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.tavatar.sm { width: 32px; height: 32px; font-size: 11.5px; }

.youtag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 9999px;
  background: rgba(232, 227, 110, 0.4);
  color: var(--yellow-ink);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.spark { display: block; color: var(--muted); }
.spark.ok { color: var(--ok); }
.spark.bad { color: var(--bad); }

/* ---------- the conversations block ---------- */

.convoblock {
  background: var(--teal);
  border-radius: var(--radius);
  padding: 18px 20px 10px;
  margin: 0 0 26px;
  color: #E8EEF0;
}

.convohead {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8FA9B0;
  font-weight: 600;
  padding-bottom: 10px;
}

.convo {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  min-width: 0;
}
.convo:first-of-type { border-top: 0; }
.convo:hover .convo-go { color: var(--yellow); }
.convo .tavatar { background: rgba(255, 255, 255, 0.12); }

.convo-body { flex: 1; min-width: 0; }
.convo-who { font-weight: 600; font-size: 14.5px; }
.convo-who .pill { margin-left: 8px; vertical-align: 1px; }
.convo-line { color: #B9CCD1; font-size: 13px; line-height: 1.5; margin-top: 2px; }

.convo-go {
  flex: 0 0 auto;
  font-size: 12.5px;
  color: #8FA9B0;
  white-space: nowrap;
  transition: color 120ms ease;
}

.convoblock .pill.bad { background: rgba(239, 68, 68, 0.28); color: #FECACA; }

/* ---------- the table ---------- */

.tablehead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.tablehead h2 { font-size: 17px; margin: 0; }
.tablehint { color: var(--muted); font-size: 12.5px; }

.tablecard { padding: 4px 18px; overflow-x: auto; }

.teamtable { min-width: 660px; }

.trow {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(5, minmax(72px, 1fr)) minmax(104px, 1.1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 13px 2px;
  border-top: 1px solid var(--line);
  transition: background 120ms ease;
}
.trow:hover { background: rgba(5, 36, 46, 0.035); }
.trow.thead { cursor: default; border-top: 0; padding: 10px 2px 8px; }
.trow.thead:hover { background: none; }
.trow.me { background: rgba(232, 227, 110, 0.12); }
.trow.me:hover { background: rgba(232, 227, 110, 0.2); }

.tcell { min-width: 0; }
.tcell.agent { display: flex; align-items: center; gap: 11px; }
.tcell.agent .tid { display: flex; flex-direction: column; min-width: 0; }
.tcell.agent b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcell.agent small { color: var(--muted); font-size: 12px; }

.tcell.num { text-align: right; }
.tcell.num b { display: block; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.tcell.num em { display: block; font-style: normal; color: var(--muted); font-size: 11px; }
.tcell.num.ok b { color: #15803D; }
.tcell.num.bad b { color: var(--bad); }

.thead .tcell.num b, .thead .tcell.agent { font-size: 12.5px; color: var(--ink); }
.thead .tcell.num { font-weight: 600; font-size: 12.5px; }

.gradecell { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.gradecell b { font-size: 19px; }
.thead .tcell:last-child { display: block; }

/* ---------- seat drawer ---------- */

.seatdrawer { overflow-y: auto; }

.seatdim {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  min-width: 0;
}
.seatdim:first-of-type { border-top: 0; }

.dimtop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dimlabel { font-size: 13px; font-weight: 600; }
.dimmarket { color: var(--muted); font-weight: 400; font-size: 11.5px; margin-left: 4px; }
.dimscore.big { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dimscore.big.ok { color: #15803D; }
.dimscore.big.bad { color: var(--bad); }

.sparkrow { margin: 6px 0 2px; }

.dimwhy { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 6px 0 4px; }

.dimsrc {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  margin: 0 0 10px;
  padding-left: 9px;
  border-left: 2px solid var(--line);
}

.receipt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  min-width: 0;
}
.receipt .pill { flex: 0 0 auto; margin-top: 1px; }
.receipt-t { font-size: 13px; line-height: 1.45; min-width: 0; }

.worklog {
  margin-top: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.worklog-line { margin: 6px 0 8px; font-size: 13.5px; line-height: 1.5; }

.tweek {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.tweek p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; }
.tweek.indrawer { margin-top: 14px; }

/* ---------- the seat pitch card ---------- */

.seatcase { margin-top: 26px; }
.seatcase .seatline { font-size: 14.5px; line-height: 1.6; margin: 0 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .trow, .convo-go { transition: none; }
}

@media (max-width: 720px) {
  .convo-go { display: none; }
  .tablecard { padding: 4px 12px; }
}

/* v3: headshots, deltas, gate, full seat page */
img.tavatar { object-fit: cover; border-radius: 50%; border: 0; }
img.tavatar.sm { width: 30px; height: 30px; }
img.tavatar.big { width: 64px; height: 64px; }
span.tavatar.big { width: 64px; height: 64px; font-size: 20px; }
.deltachip { font-size: 10.5px; font-weight: 700; margin-left: 5px; }
.deltachip.up { color: var(--ok); }
.deltachip.down { color: var(--bad); }
.gradecell em { display: block; font-size: 10px; color: var(--muted); }
.seatpage { width: min(720px, 94vw); }
.seathead { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.seathead-t { flex: 1; min-width: 0; }
.seathead-t h2 { margin: 2px 0 4px; }
.seatgrade { flex: 0 0 auto; text-align: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; }
.seatgrade b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.seatgrade small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.seatgrade.ok b { color: var(--ok); }
.seatgrade.bad b { color: var(--bad); }
.seatbook { margin: 0 0 12px; }
.bookrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.bookrow b { font-weight: 600; color: var(--ink); }
.bookrow span { font-size: 12px; color: var(--muted); }
.bookrow.bad span { color: var(--bad); }
.bookrow.warn span { color: #8A5A00; }
.burnbox { border: 1px solid var(--warn); background: #FFF6E8; border-radius: 10px; padding: 11px 13px; margin: 0 0 10px; }
.burnbox b { display: block; font-size: 15px; color: #8A5A00; margin: 4px 0 3px; font-variant-numeric: tabular-nums; }
.burnbox p { font-size: 12.5px; color: #8A5A00; margin: 0; line-height: 1.5; }
.projbox { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 11px 13px; margin: 0 0 14px; }
.projbox p { font-size: 12.5px; color: var(--ink); margin: 4px 0 0; line-height: 1.5; }
