/* ======================================================================
 * dw3-timesheet.css — DW3 B5 (2026-10-18): Timesheet, "easier on the
 * eyes". Loaded last (after the B5 marker); overrides timesheets.css
 * and the shared parity7.css at equal specificity.
 *
 * The calm pass, in one list:
 *   · KPI strip: one quiet card row, no coloured edge bars, no gold
 *     figure (gold stays on + Add a shift alone); a 4th "Waiting for
 *     approval" figure
 *   · week grid: the dashed gold "+" in every cell (≈40 gold rings per
 *     screen) becomes a faint "+" that shows on row hover / focus —
 *     always visible on touch screens; shift chips are compact; today's
 *     column is tinted; holidays are named in the header
 *   · register + project tab: one line per shift, employee its own
 *     column, project name over address, icon actions, status edge
 *   · drawer: the sticky footer carries the live total and the buttons
 * ====================================================================== */

/* ---------- KPI strip ---------- */
body.skin-billdr #app .ts-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 20px;
  background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r); overflow: hidden; }
body.skin-billdr #app .ts-strip-card { border: 0 !important; border-radius: 0; padding: 16px 20px; background: none; box-shadow: none; }
body.skin-billdr #app .ts-strip-card + .ts-strip-card { border-left: 1px solid var(--ds-hair) !important; }
body.skin-billdr #app .ts-strip-k { font-size: var(--ds-fs-xs); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ds-muted); margin: 0 0 4px; }
body.skin-billdr #app .ts-strip-v, body.skin-billdr #app .ts-strip-v.gold { font-size: 20px; font-weight: 700; color: var(--ds-navy); }
body.skin-billdr #app .ts-strip-queue .ts-strip-v { color: var(--ds-orange-ink); }
body.skin-billdr #app .ts-strip-none { color: var(--ds-faint); font-weight: 500; }

/* ---------- week grid ---------- */
body.skin-billdr #app .ts-grid th { font-size: var(--ds-fs-xs); font-weight: 600; color: var(--ds-muted); padding: 12px 8px 10px; }
body.skin-billdr #app .ts-grid th.ts-today { color: var(--ds-navy); }
body.skin-billdr #app .ts-grid th.ts-today::after { content: ""; display: block; width: 18px; height: 2px; margin: 4px auto 0; border-radius: 2px; background: var(--ds-gold); }
body.skin-billdr #app .ts-grid { min-width: 0; table-layout: auto; }
body.skin-billdr #app .ts-grid :is(th, td):nth-child(n+2):nth-child(-n+8) { min-width: 0; }
body.skin-billdr #app .ts-cell { min-width: 74px !important; }
body.skin-billdr #app .ts-hol-name { display: block; font-size: 10.5px; font-weight: 500; color: var(--ds-info-ink); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; margin-inline: auto; }
body.skin-billdr #app .ts-grid td { padding: 10px 8px; }
body.skin-billdr #app .ts-grid tbody tr:hover > td { background: var(--ds-tint); }
body.skin-billdr #app .ts-grid tbody tr.ts-detail-row:hover > td { background: var(--ds-tint); }
body.skin-billdr #app .ts-person { padding: 12px 12px 12px 20px !important; min-width: 180px; }
body.skin-billdr #app .ts-person .ts-sub { display: block; margin: 1px 0 0; }
body.skin-billdr #app .ts-pend-pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 6px; box-sizing: border-box; border-radius: var(--ds-r-pill);
  background: var(--ds-orange-bg); color: var(--ds-orange-ink); font-size: 11px; font-weight: 600; vertical-align: 1px;
}
body.skin-billdr #app .ts-person .ts-expand { display: table; margin-top: 4px; font-size: var(--ds-fs-xs); }
/* shift chips: hours bold, times one quiet line */
body.skin-billdr #app .ts-chip { padding: 3px 4px; margin: 0 auto 2px; font-size: var(--ds-fs-sm); }
body.skin-billdr #app .ts-chip small { font-size: 10.5px; color: var(--ds-faint); white-space: nowrap; }
body.skin-billdr #app .ts-chip:hover small { color: var(--ds-muted); }
body.skin-billdr #app .ts-chip::before { width: 6px; height: 6px; margin-right: 5px; vertical-align: 1px; }
/* the add "+": faint until the row is hovered or focused */
body.skin-billdr #app .ts-plus {
  width: 24px; height: 24px; font-size: 15px; border: 1px solid transparent; color: var(--ds-line-strong);
  background: transparent; opacity: .0; transition: opacity .12s, color .12s, border-color .12s;
}
body.skin-billdr #app .ts-cell:not(:has(.ts-chip)) .ts-plus { opacity: .55; }
body.skin-billdr #app .ts-grid tbody tr:hover .ts-plus,
body.skin-billdr #app .ts-plus:focus-visible { opacity: 1; color: var(--ds-gold-ink); border: 1px dashed var(--ds-gold-strong); }
body.skin-billdr #app .ts-plus:hover { border-style: solid !important; background: var(--ds-gold-tint) !important; }
@media (hover: none) { body.skin-billdr #app .ts-plus { opacity: 1; color: var(--ds-gold-ink); border: 1px dashed var(--ds-gold-line); } }
/* time off in a cell: a calm tint, not a hatch */
body.skin-billdr #app .ts-cell.ts-off { background: var(--ds-info-bg) !important; background-image: none !important; }
body.skin-billdr #app .ts-cell.ts-off-req { background-image: none !important; background-color: var(--ds-fill) !important; }
body.skin-billdr #app .ts-off-tag { display: block; font-size: 10.5px; font-weight: 600; color: var(--ds-info-ink); margin-bottom: 2px; }
body.skin-billdr #app .ts-cell.ts-off-req .ts-off-tag { color: var(--ds-muted); }
/* totals columns: the week totals ink; cost/billing a step lighter */
body.skin-billdr #app .ts-grid td.ts-num { font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-ink); }
body.skin-billdr #app .ts-grid td.ts-num.ts-strong { font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); }
body.skin-billdr #app .ts-grid tfoot td { background: var(--ds-fill); }
/* the per-employee summary card (DW2 decision 14) — quieter rows */
body.skin-billdr #app #ts-emp-summary .ts-table td { padding-top: 10px; padding-bottom: 10px; }
body.skin-billdr #app #ts-emp-summary .ts-sub { display: inline; margin-left: 8px; }

/* ---------- registers (global Register + project tab) ---------- */
body.skin-billdr #app .ts-reg-table td { padding-top: 14px !important; padding-bottom: 14px !important; }
body.skin-billdr #app .ts-reg-table td:first-child, body.skin-billdr #app .ts-ptab-table td:first-child { font-weight: 400 !important; }
body.skin-billdr #app :is(.ts-reg-table, .ts-ptab-table) .ts-reg-date { white-space: nowrap; }
body.skin-billdr #app :is(.ts-reg-table, .ts-ptab-table) .ts-reg-date .ts-strong { color: var(--ds-navy); font-weight: 700; }
body.skin-billdr #app .ts-reg-who { color: var(--ds-navy) !important; font-weight: 600; white-space: nowrap; }
body.skin-billdr #app .ts-ptab-table .ts-reg-who { white-space: normal; min-width: 130px; }
body.skin-billdr #app .ts-reg-pname { display: block; color: var(--ds-ink); }
body.skin-billdr #app .ts-reg-proj .ts-sub { max-width: 24ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.skin-billdr #app .ts-reg-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
body.skin-billdr #app .ts-faint { color: var(--ds-faint); font-weight: 400; }
body.skin-billdr #app .ts-reject-note { display: block; max-width: 22ch; min-width: 16ch; color: var(--ds-bad-ink); white-space: normal; line-height: 1.35; }
body.skin-billdr #app :is(.ts-reg-table, .ts-ptab-table) :is(th, td) { padding-left: 12px; padding-right: 12px; }
body.skin-billdr #app :is(.ts-reg-table, .ts-ptab-table) :is(th, td):first-child { padding-left: 20px; }
body.skin-billdr #app :is(.ts-reg-table, .ts-ptab-table) :is(th, td):last-child { padding-right: 16px; }
body.skin-billdr #app .ts-reg-proj { min-width: 0; }
body.skin-billdr #app .ts-reg-proj .ts-reg-pname { max-width: 24ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* status edge on the first cell */
body.skin-billdr #app :is(.ts-reg-table, .ts-ptab-table) tr.ts-row-pending td:first-child { box-shadow: inset 3px 0 0 var(--ds-k-orange); }
body.skin-billdr #app :is(.ts-reg-table, .ts-ptab-table) tr.ts-row-rejected td:first-child { box-shadow: inset 3px 0 0 var(--ds-k-red); }
/* icon actions */
body.skin-billdr #app .ts-reg-actions { white-space: nowrap; text-align: right; width: 1%; }
body.skin-billdr #app .ts-reg-actions .ts-reg-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
  margin-left: 4px; border: 1px solid var(--ds-line); background: var(--ds-card); border-radius: var(--ds-r-sm); color: var(--ds-muted); cursor: pointer;
}
body.skin-billdr #app .ts-reg-actions .ts-reg-btn .ico { width: 15px; height: 15px; }
body.skin-billdr #app .ts-reg-actions .ts-reg-btn:hover { background: var(--ds-bg); color: var(--ds-navy); border-color: var(--ds-line-strong); }
body.skin-billdr #app .ts-reg-actions .ts-act-ok { color: var(--ds-ok-ink); }
body.skin-billdr #app .ts-reg-actions .ts-act-ok:hover { background: var(--ds-ok-bg); color: var(--ds-ok-ink); border-color: transparent; }
body.skin-billdr #app .ts-reg-actions .ts-act-no { color: var(--ds-danger); }
body.skin-billdr #app .ts-reg-actions .ts-act-no:hover { background: var(--ds-bad-bg); color: var(--ds-bad-ink); border-color: transparent; }
/* cost-code chips on the project tab */
body.skin-billdr #app .ts-codechips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
body.skin-billdr #app .ts-codechip { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 8px; border-radius: var(--ds-r-pill); background: var(--ds-fill); font-size: 11.5px; color: var(--ds-muted); white-space: nowrap; }
body.skin-billdr #app .ts-codechip b { color: var(--ds-ink); font-weight: 600; }
body.skin-billdr #app .ts-codechip-un { background: var(--ds-warn-bg); color: var(--ds-warn-ink); }
/* quiet notes + the GPS pin key */
body.skin-billdr #app .ts-quiet { margin: 10px 4px 0; font-size: var(--ds-fs-xs); color: var(--ds-muted); }
body.skin-billdr #app .ts-key { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 5px 0 0; vertical-align: 1px; }
body.skin-billdr #app .ts-key-on { background: #2563eb; }
body.skin-billdr #app .ts-key-off { background: #c0392b; margin-left: 12px; }
body.skin-billdr #app .ts-quiet + .ts-quiet { margin-top: 4px; }
/* empty states */
body.skin-billdr #app .ts-empty { background: var(--ds-card); border: 1px dashed var(--ds-line-strong); border-radius: var(--ds-r); padding: 28px 24px; text-align: center; }
body.skin-billdr #app .ts-empty p { margin: 0; font-size: var(--ds-fs-sm); color: var(--ds-muted); }
body.skin-billdr #app .ts-empty .ts-empty-h { font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); margin-bottom: 4px; }
body.skin-billdr #app #ts-body > .empty { background: var(--ds-card); border: 1px dashed var(--ds-line-strong); border-radius: var(--ds-r); padding: 28px 24px; text-align: center; color: var(--ds-muted); }
/* project tab rhythm */
body.skin-billdr #app .ts-ptab .ts-toolbar { margin-bottom: 16px; }
body.skin-billdr #app .ts-strip-sm .ts-strip-card { padding: 12px 18px; }
body.skin-billdr #app .ts-strip-sm .ts-strip-v { font-size: 18px; }
body.skin-billdr #app .ts-ptab .ds-foot { margin-top: 10px; }

/* ---------- the shift drawer ---------- */
body.skin-billdr .fx-dialog.ts-drawer { padding-bottom: 0; display: flex; flex-direction: column; }
body.skin-billdr .ts-drawer .fx-dlg-head .muted { font-size: var(--ds-fs-sm); }
body.skin-billdr .ts-drawer .ts-form-grid { gap: 14px 16px; }
body.skin-billdr .ts-drawer :is(input, select, textarea) { font-family: inherit; }
body.skin-billdr .ts-drawer .ts-rates { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 16px; padding: 10px 14px; }
body.skin-billdr .ts-drawer .ts-rates .ts-field-note { flex: 1 1 100%; order: 3; }
body.skin-billdr .ts-drawer .ts-rates .ts-linkbtn { margin-left: auto; }
body.skin-billdr .ts-drawer .ts-linkbtn {
  appearance: none; display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 2px 0; cursor: pointer;
  font: inherit; font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-gold-ink);
}
body.skin-billdr .ts-drawer .ts-linkbtn:hover { color: var(--ds-gold-ink-hover); text-decoration: underline; text-underline-offset: 3px; }
body.skin-billdr .ts-drawer .ts-linkbtn .ico { width: 15px; height: 15px; }
body.skin-billdr .ts-drawer .ts-linkbtn-danger { color: var(--ds-danger); }
body.skin-billdr .ts-drawer .ts-linkbtn-danger:hover { color: var(--ds-bad-ink); }
body.skin-billdr .ts-drawer .ts-splits-h { justify-content: space-between; }
body.skin-billdr .ts-drawer .ts-splits { padding-top: 16px; border-top: 1px solid var(--ds-hair); }
body.skin-billdr .ts-drawer .ts-route .muted { color: var(--ds-muted); }
body.skin-billdr .ts-drawer .ts-delzone { margin-top: 18px; padding-bottom: 8px; }
/* sticky footer: live total left, actions right */
body.skin-billdr .ts-drawer .ts-drawer-foot {
  position: sticky; bottom: 0; z-index: 2; margin: 20px -28px 0; padding: 14px 28px 18px;
  background: var(--ds-card); border-top: 1px solid var(--ds-line); display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  order: 99;
}
body.skin-billdr .ts-drawer .ts-form-total { display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; }
body.skin-billdr .ts-drawer .ts-form-total b { font-size: var(--ds-fs-lg); color: var(--ds-navy); }
body.skin-billdr .ts-drawer .ts-form-total span { font-size: var(--ds-fs-xs); font-weight: 500; color: var(--ds-muted); }
body.skin-billdr .ts-drawer #ts-reject-open { color: var(--ds-danger); }
@media (max-width: 760px) {
  body.skin-billdr .ts-drawer .ts-drawer-foot { margin: 16px -16px 0; padding: 12px 16px 16px; }
}

/* ---------- time off tab ---------- */
body.skin-billdr #app .tof-table .tof-days { font-weight: 600; color: var(--ds-navy); }
body.skin-billdr #app #tof-note { font-size: var(--ds-fs-xs); }

/* ---------- narrow ---------- */
@media (max-width: 1100px) {
  body.skin-billdr #app .ts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.skin-billdr #app .ts-strip-card:nth-child(3) { border-left: 0 !important; }
  body.skin-billdr #app .ts-strip-card:nth-child(n+3) { border-top: 1px solid var(--ds-hair) !important; }
  body.skin-billdr #app .ts-reg-proj .ts-sub { display: none; }
}

/* 1024-wide: the grid scrolls inside its card (never the page), with
 * the employee column pinned so a row never loses its name. */
body.skin-billdr #app .ts-grid-wrap { overflow-x: auto; max-width: 100%; }
@media (max-width: 1280px) {
  body.skin-billdr #app .ts-grid { min-width: 940px; }
  body.skin-billdr #app .ts-grid :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--ds-card); box-shadow: 1px 0 0 var(--ds-hair); }
  body.skin-billdr #app .ts-grid tfoot td:first-child { background: var(--ds-fill); }
  body.skin-billdr #app .ts-grid tbody tr:hover > td:first-child { background: var(--ds-tint); }
}
@media (max-width: 1280px) {
  body.skin-billdr #app .ts-grid-wrap {
    background:
      linear-gradient(to left, var(--ds-card) 30%, rgba(255, 255, 255, 0)) right / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 100% 50%, rgba(15, 34, 51, .14), rgba(15, 34, 51, 0)) right / 10px 100% no-repeat scroll,
      var(--ds-card);
  }
}
