/* ==========================================================================
   Labour Life practice system: reports.css. Owner: reports (M7).
   Staff activity report (SPEC 7.5.11). Class prefix rep-.
     .rep-card, .rep-hint               the card with the range
     .rep-range (__dates __quick)       From, To and the quick buttons
     .rep-table                         the box of the table
     .rep-who (__n)                     a person in the first column
     .rep-n                             a number that opens its tasks
     .rep-total                         the totals row
     .rep-drill (__sub)                 the list of tasks in the dialog
     .rep-parts                         Staff activity and SMS per company (2 Nov 2026)
     .rep-who__b                        a name that opens what the person did, or a company's SMS
     .rep-person (__head __total __tools __days)   what one person did (decision 370)
     .rep-day (__h __t __list __i __at __what __co)  one day of it
   Phone first: the base styles are the phone. This file only adds classes.
   ========================================================================== */

.rep-card { margin-bottom: var(--s5); }
.rep-hint { margin: var(--s3) 0 0; }

/* A phone: the two dates stack, then the quick buttons. */
.rep-range { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.rep-range__dates { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.rep-range__quick { justify-self: start; }
@media (min-width: 720px) {
  .rep-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s5); }
  .rep-range__dates { grid-template-columns: repeat(2, minmax(160px, 200px)); align-items: start; }
  /* An error sentence under a date must not push the buttons off their line. */
  .rep-range__quick { margin-bottom: 0; }
}

.rep-who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-width: 0; }
.rep-who__n { min-width: 0; overflow-wrap: anywhere; }

/* Nine number columns: a heading may take two lines, so the table fits a laptop without a sideways scroll. */
.rep-table .tbl th.num { white-space: normal; vertical-align: bottom; }
.rep-table .tbl th.num .tbl__sort { text-align: right; }
.rep-table .tbl th.num .tbl__sort svg { flex: none; }
.rep-table .tbl td.tbl__main { min-width: 180px; }
.rep-table .tbl td.num { font-variant-numeric: tabular-nums; vertical-align: middle; }
.rep-table .tbl td.tbl__main { vertical-align: middle; }
.rep-table .tbl-box { overflow-x: auto; }

/* A number that opens its tasks: it looks like a link and is at least 44px to touch. */
.rep-n {
  display: inline-flex; align-items: center; justify-content: flex-end;
  min-width: var(--control-h-sm); min-height: var(--control-h-sm);
  margin: calc(var(--s2) * -1) calc(var(--s2) * -1) calc(var(--s2) * -1) 0; padding: 0 var(--s2);
  border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--link); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.rep-n:hover { background: var(--tint); color: var(--link-hover); }
.rep-n .badge { text-decoration: none; cursor: pointer; }
@media (pointer: coarse) { .rep-n { min-width: var(--tap); min-height: var(--tap); } }

.rep-total th, .rep-total td {
  padding: var(--s3); border-top: 2px solid var(--line-strong);
  background: var(--sunken); font-weight: 600; text-align: left;
}
.rep-total td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* A phone: every user is a card, and so is the totals row. */
@media (max-width: 719px) {
  .rep-table .tbl td.num { vertical-align: baseline; }
  .rep-table .tbl td[data-k] > .rep-n { margin: 0; justify-content: flex-start; padding: 0; min-width: var(--tap); min-height: var(--tap); }
  .rep-total, .rep-total tr, .rep-total th, .rep-total td { display: block; }
  .rep-total tr { padding: var(--s3) var(--s4); background: var(--sunken); border-top: 2px solid var(--line-strong); }
  .rep-total th, .rep-total td { padding: 2px 0; border: 0; background: transparent; }
  .rep-total th { font-size: var(--fs-lg); padding-bottom: var(--s1); }
  .rep-total td.num { text-align: left; }
}

.rep-drill__sub { margin: 0 0 var(--s3); }

/* ---------- 2 Nov 2026: the two parts, a person's days, SMS per company ---------- */

.rep-parts { margin-bottom: var(--s4); }

/* A name that opens a dialog: it reads as a link, and is at least 44px to touch on a phone. */
.rep-who__b {
  display: inline; padding: 0; border: 0; background: transparent;
  color: var(--link); font: inherit; font-weight: 600; text-align: left;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.rep-who__b:hover { color: var(--link-hover); }
@media (pointer: coarse) { .rep-who__b { min-height: var(--tap); } }

.rep-person { display: grid; gap: var(--s4); }
.rep-person__head { display: grid; gap: var(--s2); }
.rep-person__head p { margin: 0; }
.rep-person__total { font: 700 var(--fs-lg)/var(--lh-snug) var(--font-display); color: var(--ink); }
.rep-person__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.rep-person__days { display: grid; gap: var(--s4); }

.rep-day { display: grid; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.rep-day__h {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s3);
  margin: 0; font: 700 var(--fs-body)/var(--lh-snug) var(--font-body); color: var(--ink);
}
.rep-day__t { font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rep-day__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.rep-day__i {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 2px var(--s3);
  padding: var(--s1) 0; border-bottom: 1px solid var(--line);
}
.rep-day__i:last-child { border-bottom: 0; }
.rep-day__at { color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.rep-day__what { overflow-wrap: anywhere; }
.rep-day__co { grid-column: 2; overflow-wrap: anywhere; }
