/* teamlog.css — Team Log. Sits on top of style.css and uses its tokens; nothing here
   redefines a colour that style.css already names.

   The one visual idea worth stating: THE POINTS PANEL IS ALWAYS ON SCREEN while an entry is being
   written (.pointsbar, sticky). A manager should never discover what an entry scored after they
   have already had the conversation. */

.tl-actions { display: flex; flex-direction: column; gap: 10px; }
.tl-act {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: #fff; border: 2px solid var(--green); color: var(--green);
  border-radius: 14px; padding: 16px; min-height: 76px; font-size: 18px; font-weight: 700;
}
.tl-act:active { background: #eef5f1; }
.tl-act .ic { font-size: 26px; line-height: 1; }
.tl-act .sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.tl-act .badge {
  margin-left: auto; background: var(--warn); color: #fff; border-radius: 999px;
  padding: 3px 11px; font-size: 14px; font-weight: 800;
}
.tl-act .badge.zero { background: var(--line); color: var(--muted); }

/* ---- people ------------------------------------------------------------- */
.person {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff;
  border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 14px;
  padding: 13px 14px; margin: 8px 0; min-height: 66px;
}
.person:active { border-color: var(--green); }
.person .nm { font-size: 17px; font-weight: 700; color: var(--ink); }
.person .rl { font-size: 13px; color: var(--muted); }
.person .pts { margin-left: auto; text-align: right; }
.person .pts b { font-size: 20px; }
.person .pts .lv { display: block; font-size: 12px; color: var(--muted); }
.person.lv-clear   { border-left-color: var(--ok); }
.person.lv-verbal  { border-left-color: var(--warn); }
.person.lv-written { border-left-color: var(--warn); }
.person.lv-final   { border-left-color: var(--red); }
.person.lv-review  { border-left-color: var(--red); background: var(--red-bg); }

/* ---- choice cards ------------------------------------------------------- */
.choice {
  display: block; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line);
  border-radius: 14px; padding: 14px; margin: 8px 0; min-height: 64px;
}
.choice .ti { font-size: 17px; font-weight: 700; color: var(--ink); }
.choice .sub { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.choice.on { border-color: var(--green); background: #eef5f1; }
.choice.danger { border-color: var(--red); }
.choice.danger .ti { color: var(--red); }
.choice .pt {
  float: right; background: var(--line); color: var(--ink); border-radius: 999px;
  padding: 2px 10px; font-size: 13px; font-weight: 800;
}
.choice.danger .pt { background: var(--red); color: #fff; }
.choice .pt.zero { background: var(--ok-bg); color: var(--ok); }

.grp { font-weight: 800; color: var(--green-d); margin: 18px 4px 6px; font-size: 15px; }
.grp .note { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }

/* ---- the points panel --------------------------------------------------- */
.pointsbar {
  position: sticky; top: 0; z-index: 4; background: var(--ok-bg); border: 1px solid var(--line);
  border-left: 6px solid var(--ok); border-radius: 12px; padding: 12px 14px; margin: 10px 14px;
}
.pointsbar.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.pointsbar.bad  { background: var(--red-bg); border-left-color: var(--red); }
.pointsbar .big { font-size: 19px; font-weight: 800; color: var(--ink); }
.pointsbar .exp { font-size: 14px; color: var(--ink); margin-top: 5px; line-height: 1.45; }
.pointsbar .act { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

/* ---- fields ------------------------------------------------------------- */
.fitem { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 8px 0; }
.fitem .lbl { font-weight: 700; font-size: 16px; }
.fitem .lbl .req { color: var(--red); }
.fitem .ins { color: var(--muted); font-size: 13px; margin: 2px 0 8px; line-height: 1.35; }
.fitem input[type=text], .fitem input[type=date], .fitem input[type=time],
.fitem textarea, .fitem select {
  width: 100%; padding: 12px; font-size: 17px; border: 2px solid var(--line);
  border-radius: 12px; min-height: 52px; background: #fff; color: var(--ink);
}
.fitem textarea { min-height: 96px; line-height: 1.4; }
.yn { display: flex; gap: 10px; }
.yn button {
  flex: 1; padding: 12px; font-size: 16px; font-weight: 800; border: 2px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); min-height: 56px;
}
.yn button.on { background: var(--green); color: #fff; border-color: var(--green); }
.yn button.on.warn { background: var(--warn); border-color: var(--warn); }

.protect { border-left: 6px solid var(--info); background: var(--info-bg); }
.protect .ins { color: #33507a; }

/* ---- signatures --------------------------------------------------------- */
.sigwrap { background: #fff; border: 2px dashed var(--line); border-radius: 14px; padding: 8px; margin-top: 6px; }
.sigwrap.filled { border-style: solid; border-color: var(--green); }
canvas.sig { width: 100%; height: 150px; touch-action: none; display: block; border-radius: 10px; background: #fff; }
.sigrow { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.sigrow .hint { font-size: 12.5px; color: var(--muted); }

/* ---- record ------------------------------------------------------------- */
.hero { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 12px 14px; }
.hero .n { font-size: 22px; font-weight: 800; }
.hero .t { font-size: 40px; font-weight: 800; line-height: 1.1; }
.hero .lv { font-size: 16px; font-weight: 700; }
.hero.lv-clear .t, .hero.lv-clear .lv { color: var(--ok); }
.hero.lv-verbal .t, .hero.lv-verbal .lv, .hero.lv-written .t, .hero.lv-written .lv { color: var(--warn); }
.hero.lv-final .t, .hero.lv-final .lv, .hero.lv-review .t, .hero.lv-review .lv { color: var(--red); }
.hero .sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 1.4; }

.entry { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; }
.entry.k-documented { border-left-color: var(--warn); }
.entry.k-escalation { border-left-color: var(--red); background: var(--red-bg); }
.entry.k-recognition { border-left-color: var(--ok); }
.entry.aged, .entry.void { opacity: .58; }
.entry .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.entry .ti { font-weight: 700; font-size: 15.5px; }
.entry .dt { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.entry .bd { font-size: 13.5px; color: var(--ink); margin-top: 6px; line-height: 1.45; }
.entry .meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.entry .tagline { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--red-bg); color: var(--red); }
.pill.flat { background: var(--line); color: var(--muted); }

/* ---- rules -------------------------------------------------------------- */
.rules table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.rules th { background: var(--green); color: #fff; text-align: left; padding: 9px; font-size: 13px; }
.rules td { border-bottom: 1px solid var(--line); padding: 9px; vertical-align: top; }
.rules td.num { text-align: right; font-weight: 800; width: 76px; white-space: nowrap; }
.rules .wrapt { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.rules li { margin: 8px 0; line-height: 1.45; }

.list { padding: 0 14px 24px; }
.submitbar { position: sticky; bottom: 0; background: var(--bg); padding: 12px 14px; border-top: 1px solid var(--line); }
.stepnote { color: var(--muted); font-size: 13px; margin: 10px 4px 0; line-height: 1.4; }
.search { width: 100%; padding: 13px; font-size: 17px; border: 2px solid var(--line); border-radius: 12px; min-height: 56px; margin: 4px 0 8px; }

/* ---- admin board -------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tile .n { font-size: 28px; font-weight: 800; }
.tile .l { font-size: 12.5px; color: var(--muted); }
.tile.bad .n { color: var(--red); }
.tile.warn .n { color: var(--warn); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tabs button { border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 16px; font-weight: 700; }
.tabs button.on { background: var(--green); border-color: var(--green); color: #fff; }
