/* ================================================================
   Timesheets (TS, wave22-ts) — the week grid (Per employee |
   Per category), the shift form, and the project Timesheet tab,
   over time_shifts + time_shift_splits (the schema Micheal ran
   2026-10-16). Mirrors the register CSS conventions of the money
   surfaces (tc-/po-): navy active tabs, quiet cards, gold only
   for the one main action and the single most important number
   (the week's Tot. cost).
   ================================================================ */

.ts-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ts-tab {
  appearance: none; border: 1px solid var(--line); background: var(--card-bg, #fff);
  color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; cursor: pointer;
}
.ts-tab.active { background: var(--navy, #0B2235); color: #fff; border-color: var(--navy, #0B2235); }

.ts-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ts-toolbar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ts-weeknav { display: flex; align-items: center; gap: 8px; }
.ts-weeklabel { font-size: 14px; font-weight: 600; white-space: nowrap; }
.ts-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ts-f select {
  font-size: 14px; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card-bg, #fff); color: var(--ink);
}
.ts-check { display: flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; padding-bottom: 2px; }
.ts-flash {
  border: 1px solid #b7dfc2; background: #eefaf1; color: #14532d;
  border-radius: 8px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 12px;
}

/* --- the summary strip: Tot. hrs / Tot. cost / Tot. billing --- */
.ts-strip { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ts-strip-card {
  background: var(--card-bg, #fff); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; min-width: 170px; flex: 0 1 auto;
}
.ts-strip-k { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.ts-strip-v { font-size: 20px; font-weight: 650; margin: 0; }
.ts-strip-v.gold { color: #b98f3e; }
.ts-note { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }

/* --- the week grid --- */
.ts-grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg, #fff); }
.ts-grid { width: 100%; border-collapse: collapse; min-width: 880px; }
.ts-grid th {
  text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.ts-grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.ts-grid tr:last-child td { border-bottom: none; }
.ts-num { text-align: right; white-space: nowrap; }
.ts-strong { font-weight: 600; }
.ts-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ts-person { min-width: 150px; }
.ts-pending-note { display: block; font-size: 12px; color: #b45309; margin-top: 3px; }
.ts-expand {
  appearance: none; border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 12.5px; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px;
}
.ts-cell { min-width: 86px; }
.ts-chip {
  appearance: none; display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: #f7f9fb;
  padding: 5px 8px; font-size: 13px; margin-bottom: 5px; color: var(--ink);
}
.ts-chip:hover { border-color: var(--navy, #0B2235); }
.ts-chip small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.ts-chip.st-approved { border-left: 3px solid #16a34a; }
.ts-chip.st-pending { border-left: 3px solid #d97706; }
.ts-chip.st-rejected { border-left: 3px solid #dc2626; }
.ts-plus {
  appearance: none; border: 1px dashed var(--line); background: none; color: var(--muted);
  border-radius: 8px; width: 26px; height: 26px; font-size: 16px; line-height: 1; cursor: pointer;
}
.ts-plus:hover { color: var(--navy, #0B2235); border-color: var(--navy, #0B2235); }
.ts-detail-row td { background: #fbfcfd; }
.ts-detail-item {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  padding: 6px 2px; border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.ts-detail-item:last-child { border-bottom: none; }
.ts-detail-item .grow { flex: 1 1 auto; }

/* --- status pills --- */
.ts-pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ts-pill-pending { background: #fef3c7; color: #92400e; }
.ts-pill-approved { background: #dcfce7; color: #166534; }
.ts-pill-rejected { background: #fee2e2; color: #991b1b; }

/* --- per-category table --- */
.ts-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg, #fff); }
.ts-table { width: 100%; border-collapse: collapse; }
.ts-table th {
  text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line);
}
.ts-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.ts-table tr.ts-division td {
  background: #f1f5f9; font-size: 12px; font-weight: 650; letter-spacing: .03em;
  text-transform: uppercase; color: var(--muted); padding: 6px 10px;
}
.ts-table tr.ts-total td { font-weight: 650; border-bottom: none; }
.ts-table tr.ts-uncat td { background: #fffbeb; }

/* --- the shift form (inside fxDialog) --- */
.fx-dialog.ts-dialog { max-width: 680px; width: calc(100vw - 32px); }
.ts-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 6px; }
.ts-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.ts-form-grid input, .ts-form-grid select, .ts-form-grid textarea {
  font-size: 14px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card-bg, #fff); color: var(--ink); width: 100%; box-sizing: border-box;
}
.ts-form-grid .wide { grid-column: 1 / -1; }
.ts-field-note { font-size: 12px; color: var(--muted); }
.ts-rates {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f7f9fb; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font-size: 13.5px; margin-top: 12px;
}
.ts-stepper { display: flex; align-items: center; gap: 8px; }
.ts-stepper button {
  appearance: none; border: 1px solid var(--line); background: var(--card-bg, #fff);
  width: 30px; height: 30px; border-radius: 8px; font-size: 16px; cursor: pointer; color: var(--ink);
}
.ts-stepper-val { font-size: 14px; color: var(--ink); min-width: 64px; text-align: center; }
.ts-splits { margin-top: 14px; }
.ts-splits-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ts-splits-h h4 { margin: 0; font-size: 14px; }
.ts-split-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ts-split-row select {
  flex: 1 1 auto; font-size: 14px; padding: 8px 9px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card-bg, #fff); color: var(--ink); min-width: 0;
}
.ts-split-row input {
  width: 96px; font-size: 14px; padding: 8px 9px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card-bg, #fff); color: var(--ink);
}
.ts-split-row input.ts-split-hrs, .ts-split-row input.ts-split-min { width: 62px; }
.ts-split-dur { font-size: 12.5px; color: var(--muted); min-width: 52px; }
.ts-split-x {
  appearance: none; border: none; background: none; color: var(--muted);
  font-size: 17px; cursor: pointer; padding: 2px 6px;
}
.ts-tally { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.ts-tally.over { color: #991b1b; font-weight: 600; }
.ts-banner {
  border-radius: 8px; padding: 9px 12px; font-size: 13.5px; margin-top: 12px;
}
.ts-banner-rejected { border: 1px solid #fecaca; background: #fef2f2; color: #7f1d1d; }
.ts-banner-approved { border: 1px solid #b7dfc2; background: #eefaf1; color: #14532d; }
.ts-form-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px;
}
.ts-form-total { font-size: 14px; font-weight: 600; margin-right: auto; }
.ts-delzone { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.ts-reject-zone { margin-top: 12px; }
.ts-reject-zone textarea {
  width: 100%; box-sizing: border-box; font-size: 14px; padding: 8px 9px;
  border: 1px solid var(--line); border-radius: 8px; min-height: 64px;
  background: var(--card-bg, #fff); color: var(--ink);
}

/* ======================= DW1 · Timesheets (design wave, 2026-10-17) ======================= */
/* Capture §9. Grey segmented control for the three views; one white
 * 40px week control; caption-less employee dropdown; iOS switch for
 * "Only show employees with shifts"; gold text-links for Expand all /
 * Manage team / Export; Billdr's neutral outline "✓ Approve pending";
 * "+ Add a shift" is the gold primary, pinned top-right with Manage
 * team (≥1100px). KPI strip = accent cards. Week grid = white card,
 * centred grey day heads with vertical hairlines, centred navy hours
 * with a status mark, dashed gold "+" circles, bold navy totals. */

/* shared icon mask for the text-links / outline button below */
body.skin-billdr #app :is(#ts-manageteam, #ts-export, #ts-approve-all)::before {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: var(--ts-ico) center / contain no-repeat; mask: var(--ts-ico) center / contain no-repeat;
}
body.skin-billdr #app #ts-manageteam { --ts-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20c1.4-3.4 4.3-5 7.5-5s6.1 1.6 7.5 5'/%3E%3C/svg%3E"); }
body.skin-billdr #app #ts-export { --ts-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4M7.5 8.5L12 4l4.5 4.5M5 14.5V19h14v-4.5'/%3E%3C/svg%3E"); }
body.skin-billdr #app #ts-approve-all { --ts-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.6l5 5L19.5 6.6'/%3E%3C/svg%3E"); }

/* ---------- view tabs → segmented control (rule 8) ---------- */
body.skin-billdr #app .ts-tabs {
  display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 3px; margin-bottom: 20px;
  background: #e9edf3; border-radius: var(--ds-r-ctl);
}
body.skin-billdr #app .ts-tab {
  border: 0; background: transparent; border-radius: var(--ds-r-sm); padding: 7px 14px;
  font-size: var(--ds-fs-sm); font-weight: 500; color: var(--ds-muted);
}
body.skin-billdr #app .ts-tab:hover { color: var(--ds-navy); }
body.skin-billdr #app .ts-tab.active { background: var(--ds-card); color: var(--ds-navy); font-weight: 600; border: 0; box-shadow: 0 1px 3px rgba(15, 34, 51, .14); }

/* ---------- toolbar ---------- */
body.skin-billdr #app .ts-toolbar { gap: 12px; margin-bottom: 20px; align-items: center; }
/* Week picker: one white rounded 40px control — ← label → | Current week */
body.skin-billdr #app .ts-weeknav {
  gap: 2px; min-height: var(--ds-ctl); padding: 0 4px; background: var(--ds-card);
  border: 1px solid var(--ds-line); border-radius: var(--ds-r-ctl);
}
body.skin-billdr #app .ts-weeknav > .btn {
  min-height: 30px; padding: 0 8px; border: 0; background: transparent; color: var(--ds-muted);
  font-weight: 500; border-radius: var(--ds-r-sm);
}
body.skin-billdr #app .ts-weeknav > :is(#ts-prev, #ts-next, #ts-p-prev, #ts-p-next) { width: 30px; padding: 0; }
body.skin-billdr #app .ts-weeknav > .btn:hover:not(:disabled) { background: var(--ds-bg); color: var(--ds-navy); border: 0; }
body.skin-billdr #app .ts-weeklabel { font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-navy); padding: 0 6px; }
body.skin-billdr #app .ts-weeknav > :is(.muted, #ts-thisweek, #ts-p-thisweek) {
  margin-left: 4px; padding: 0 8px 0 12px; border-left: 1px solid var(--ds-line); border-radius: 0;
  font-size: var(--ds-fs-sm); line-height: 22px; min-height: 22px;
}
body.skin-billdr #app .ts-weeknav > .muted { color: var(--ds-muted); }
body.skin-billdr #app .ts-weeknav > :is(#ts-thisweek, #ts-p-thisweek) { color: var(--ds-navy); font-weight: 600; }
body.skin-billdr #app .ts-weeknav > :is(#ts-thisweek, #ts-p-thisweek):hover:not(:disabled) { background: transparent; color: var(--ds-navy); text-decoration: underline; text-underline-offset: 3px; }
/* Employee filter: Billdr's caption-less dropdown. The caption text
 * stays in the DOM as the select's accessible name (font-size 0). */
body.skin-billdr #app .ts-toolbar .ts-f { gap: 0; font-size: 0; line-height: 0; color: transparent; }
body.skin-billdr #app .ts-toolbar .ts-f select {
  min-width: 220px; min-height: var(--ds-ctl); padding: 0 34px 0 14px; line-height: normal;
  font-size: var(--ds-fs-sm); font-weight: 500; color: var(--ds-ink); border: 1px solid var(--ds-line); border-radius: var(--ds-r-ctl);
}
body.skin-billdr #app .ts-toolbar .ts-f select:hover { border-color: var(--ds-line-strong); }
/* "Only show employees with shifts" — the real checkbox wears the iOS
 * switch (same drawing as the shared .ds-switch); label text kept. */
body.skin-billdr #app .ts-toolbar .ts-check { gap: 10px; padding: 0; font-size: var(--ds-fs-sm); color: var(--ds-ink); }
body.skin-billdr #app :is(.ts-toolbar .ts-check, .ts-form-grid .ts-check) input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 36px; height: 20px; min-width: 36px; min-height: 0; padding: 0; border: 0; border-radius: var(--ds-r-pill);
  background: #d3d9e1 radial-gradient(circle, #fff 7px, transparent 7.5px) no-repeat 0 0 / 20px 20px;
  transition: background-color .15s, background-position .15s;
}
body.skin-billdr #app :is(.ts-toolbar .ts-check, .ts-form-grid .ts-check) input[type="checkbox"]:checked { background-color: var(--ds-gold-strong); background-position: 16px 0; }
body.skin-billdr #app :is(.ts-toolbar .ts-check, .ts-form-grid .ts-check) input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--ds-focus); }
/* Text-links: Expand all, Manage team, Export */
body.skin-billdr #app :is(#ts-expand, #ts-manageteam, #ts-export) {
  min-height: 32px; padding: 0 4px; border: 0; background: transparent; box-shadow: none;
  color: var(--ds-navy); font-size: var(--ds-fs-sm); font-weight: 600;
}
body.skin-billdr #app :is(#ts-expand, #ts-manageteam, #ts-export):hover:not(:disabled) {
  background: transparent; border: 0; color: var(--ds-navy); text-decoration: underline; text-underline-offset: 3px;
}
body.skin-billdr #app .ts-toolbar-actions { gap: 16px; align-items: center; }
/* "✓ Approve pending (n)": Billdr's neutral outline (grey border, dark text). */
body.skin-billdr #app #ts-approve-all {
  background: var(--ds-card); color: var(--ds-ink); border: 1px solid var(--ds-line-strong); font-weight: 600;
}
body.skin-billdr #app #ts-approve-all:hover:not(:disabled) { background: var(--ds-tint); border-color: #b9c2cd; }
body.skin-billdr #app #ts-approve-all:disabled { background: var(--ds-card); color: var(--ds-faint); border-color: var(--ds-line); }
/* "+ Add a shift" is the page's gold primary. */
body.skin-billdr #app #ts-add { background: var(--ds-gold); color: var(--ds-on-gold); border: 0; font-weight: 600; }
body.skin-billdr #app #ts-add:hover:not(:disabled) { background: var(--ds-gold-hover); }
/* Wide screens: Billdr's top-right pair — Manage team + the primary —
 * pinned beside the H1; Export + Approve stay at the filter row's right
 * end (the actions wrapper dissolves into the toolbar's flex row). */
@media (min-width: 1100px) {
  body.skin-billdr #view-timesheets { position: relative; }
  body.skin-billdr #view-timesheets .ts-toolbar-actions { display: contents; }
  body.skin-billdr #view-timesheets #ts-export { margin-left: auto; }
  body.skin-billdr #view-timesheets #ts-add { position: absolute; top: 0; right: 0; width: 140px; }
  body.skin-billdr #view-timesheets #ts-manageteam { position: absolute; top: 4px; right: 160px; }
}

/* Billdr's second filter line: "Expand all" + the switch sit under the
 * week / employee / Export / Approve row. A zero-height ::before is the
 * line break (layout only, no content); flex order does the rest. */
body.skin-billdr #view-timesheets .ts-toolbar:has(#ts-expand) { row-gap: 8px; }
body.skin-billdr #view-timesheets .ts-toolbar:has(#ts-expand)::before { content: ""; order: 15; flex: 0 0 100%; height: 0; }
body.skin-billdr #view-timesheets .ts-toolbar #ts-expand { order: 20; padding-left: 0; }
body.skin-billdr #view-timesheets .ts-toolbar .ts-check { order: 21; margin-left: 12px; }

/* ---------- KPI strip → accent cards (rule 7) ---------- */
body.skin-billdr #app .ts-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0 0 20px; }
body.skin-billdr #app .ts-strip-card {
  min-width: 0; padding: 16px 20px; background: var(--ds-card); border: 1px solid var(--ds-line);
  border-left: 4px solid var(--ds-k-navy); border-radius: var(--ds-r);
}
body.skin-billdr #app .ts-strip-card:has(.ts-strip-v.gold) { border-left-color: var(--ds-k-gold); }
body.skin-billdr #app .ts-strip-card:nth-child(3) { border-left-color: var(--ds-k-green); }
body.skin-billdr #app .ts-strip-k { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); margin: 0 0 6px; }
body.skin-billdr #app .ts-strip-v { font-size: var(--ds-fs-kpi); font-weight: 700; color: var(--ds-navy); line-height: 1.15; font-variant-numeric: tabular-nums; }
/* House rule: the week's Tot. cost is the one gold number — gold INK
 * (text-safe, 5.3:1), not the fill gold. */
body.skin-billdr #app .ts-strip-v.gold { color: var(--ds-gold-ink); }
body.skin-billdr #app .ts-note { font-size: var(--ds-fs-sm); color: var(--ds-muted); margin: 12px 4px 16px; }
body.skin-billdr #app .ts-flash { background: var(--ds-ok-bg); color: var(--ds-ok-ink); border: 0; border-radius: var(--ds-r-ctl); padding: 10px 14px; font-size: var(--ds-fs-sm); margin-bottom: 16px; }

/* ---------- the week grid ---------- */
body.skin-billdr #app .ts-grid-wrap { background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r); }
body.skin-billdr #app .ts-grid { border-collapse: separate; border-spacing: 0; }
body.skin-billdr #app .ts-grid th {
  font-size: var(--ds-fs-xs); font-weight: 500; color: var(--ds-muted); text-transform: none; letter-spacing: 0;
  padding: 14px 12px 12px; border-bottom: 1px solid var(--ds-line); background: var(--ds-card); vertical-align: bottom;
}
body.skin-billdr #app .ts-grid th:first-child { padding-left: 20px; }
/* day columns: centred, vertical hairlines (and one before Tot. hrs) */
body.skin-billdr #app .ts-grid :is(th, td):nth-child(n+2):nth-child(-n+8) { text-align: center; }
body.skin-billdr #app .ts-grid tr:not(.ts-detail-row) > :is(th, td):nth-child(n+2):nth-child(-n+9) { border-left: 1px solid var(--ds-hair); }
body.skin-billdr #app .ts-grid th.ts-num, body.skin-billdr #app .ts-grid td.ts-num { text-align: right; }
body.skin-billdr #app .ts-grid :is(th, td):last-child { padding-right: 20px; }
body.skin-billdr #app .ts-grid td { padding: 16px 12px; border-bottom: 1px solid var(--ds-hair); vertical-align: middle; font-size: var(--ds-fs-sm); color: var(--ds-ink); }
body.skin-billdr #app .ts-grid tbody tr:last-child td { border-bottom: 0; }
/* employee cell: bold navy name over grey role. (Billdr's name is an
 * indigo link; ours opens nothing, so it stays navy — no fake link.) */
body.skin-billdr #app .ts-person { padding-left: 20px; min-width: 170px; }
body.skin-billdr #app .ts-person .ts-strong { display: block; font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); line-height: 1.35; }
body.skin-billdr #app .ts-sub { font-size: var(--ds-fs-xs); color: var(--ds-muted); margin-top: 2px; }
body.skin-billdr #app .ts-pending-note { font-size: var(--ds-fs-xs); font-weight: 600; color: var(--ds-orange-ink); margin-top: 4px; }
body.skin-billdr #app .ts-expand {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 0;
  color: var(--ds-navy); font-size: var(--ds-fs-xs); font-weight: 600; text-decoration: none;
}
body.skin-billdr #app .ts-expand::after {
  content: ""; width: 14px; height: 14px; background: currentColor; transition: transform .15s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.skin-billdr #app tr:has(+ tr.ts-detail-row) .ts-expand::after { transform: rotate(180deg); }
body.skin-billdr #app .ts-expand:hover { color: var(--ds-navy); text-decoration: underline; text-underline-offset: 3px; }
/* day cells: centred navy hours with a small status mark —
 * approved = solid green dot, pending = hollow orange ring,
 * rejected = red dot + red figure (shape differs, not colour alone). */
body.skin-billdr #app .ts-cell { min-width: 92px; }
body.skin-billdr #app .ts-chip {
  display: block; width: auto; margin: 0 auto 4px; padding: 4px 6px; text-align: center;
  background: transparent; border: 0; border-radius: var(--ds-r-sm);
  font-size: var(--ds-fs); font-weight: 600; color: var(--ds-navy); line-height: 1.3; white-space: nowrap;
}
body.skin-billdr #app .ts-chip.st-approved, body.skin-billdr #app .ts-chip.st-pending, body.skin-billdr #app .ts-chip.st-rejected { border-left: 0; }
body.skin-billdr #app .ts-chip:hover { background: var(--ds-tint); border: 0; }
body.skin-billdr #app .ts-chip::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: 2px; box-sizing: border-box;
}
body.skin-billdr #app .ts-chip.st-approved::before { background: var(--ds-k-green); }
body.skin-billdr #app .ts-chip.st-pending::before { border: 1.5px solid var(--ds-k-orange); background: transparent; }
body.skin-billdr #app .ts-chip.st-rejected::before { background: var(--ds-k-red); }
body.skin-billdr #app .ts-chip.st-rejected { color: var(--ds-bad-ink); }
body.skin-billdr #app .ts-chip small { white-space: normal; font-size: 11px; font-weight: 400; color: var(--ds-muted); margin-top: 1px; }
/* Billdr's dashed-circle "+" in gold */
body.skin-billdr #app .ts-plus {
  display: block; margin: 2px auto 0; width: 28px; height: 28px; padding: 0;
  border: 1.5px dashed var(--ds-navy); border-radius: 50%; background: transparent;
  color: var(--ds-navy); font-size: 17px; font-weight: 500; line-height: 1;
}
body.skin-billdr #app .ts-plus:hover { border-style: solid; background: var(--ds-nav-active); color: var(--ds-navy); border-color: var(--ds-navy); }
/* totals: bold navy */
body.skin-billdr #app .ts-grid td.ts-num { font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); font-variant-numeric: tabular-nums; }
/* expanded shifts */
body.skin-billdr #app .ts-detail-row td { background: var(--ds-tint); padding: 8px 20px; }
body.skin-billdr #app .ts-detail-item { border-bottom: 1px solid var(--ds-hair); padding: 10px 0; font-size: var(--ds-fs-sm); gap: 12px; align-items: center; }
body.skin-billdr #app .ts-detail-item:last-child { border-bottom: 0; }
body.skin-billdr #app .ts-detail-item .ts-strong { color: var(--ds-navy); font-weight: 700; }
body.skin-billdr #app .ts-detail-item .btn { min-height: var(--ds-ctl-sm); padding: 0 12px; font-size: var(--ds-fs-sm); border-radius: var(--ds-r-sm); }

/* ---------- status pills → shared pastels (rule 6) ---------- */
body.skin-billdr #app .ts-pill { padding: 3px 10px; font-size: 12px; font-weight: 600; border-radius: var(--ds-r-pill); }
body.skin-billdr #app .ts-pill-pending { background: var(--ds-orange-bg); color: var(--ds-orange-ink); }
body.skin-billdr #app .ts-pill-approved { background: var(--ds-ok-bg); color: var(--ds-ok-ink); }
body.skin-billdr #app .ts-pill-rejected { background: var(--ds-bad-bg); color: var(--ds-bad-ink); }

/* ---------- per-category table (+ the register's / project tab's base) ---------- */
body.skin-billdr #app .ts-table-wrap { background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r); }
body.skin-billdr #app .ts-table { border-collapse: separate; border-spacing: 0; }
body.skin-billdr #app .ts-table th {
  font-size: var(--ds-fs-xs); font-weight: 500; color: var(--ds-muted); text-transform: none; letter-spacing: 0;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--ds-line); background: var(--ds-card); white-space: nowrap; vertical-align: bottom;
}
body.skin-billdr #app .ts-table td { padding: 16px; border-bottom: 1px solid var(--ds-hair); font-size: var(--ds-fs-sm); color: var(--ds-ink); vertical-align: middle; }
body.skin-billdr #app .ts-table :is(th, td):first-child { padding-left: 20px; }
body.skin-billdr #app .ts-table :is(th, td):last-child { padding-right: 20px; }
body.skin-billdr #app .ts-table :is(th, td).ts-num { text-align: right; font-variant-numeric: tabular-nums; }
body.skin-billdr #app .ts-table tbody tr:last-child td { border-bottom: 0; }
body.skin-billdr #app .ts-table tr.ts-division td {
  background: var(--ds-card); padding: 20px 16px 8px 20px; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); border-bottom: 1px solid var(--ds-hair);
}
body.skin-billdr #app .ts-table tr.ts-uncat td { background: var(--ds-warn-bg); }
body.skin-billdr #app .ts-table tr.ts-total td {
  font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); border-top: 1px solid var(--ds-line); border-bottom: 0; background: var(--ds-card);
}
body.skin-billdr #app .ts-table tr.ts-total td:first-child { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); }
body.skin-billdr #app .ts-count { font-size: var(--ds-fs-sm); margin: 0 0 12px; }

@media (max-width: 760px) {
  body.skin-billdr #app .ts-toolbar .ts-f, body.skin-billdr #app .ts-toolbar .ts-f select { flex: 1 1 100%; width: 100%; }
}

/* ======================= DW2 P10 · Timesheets: WEEKLY TOTAL + per-employee summary ======================= */
/* Structure (both appearances): the grid's footer row and the second
 * summary card under it. Look (light skin): Billdr's small-caps label
 * and bold navy totals. */
.ts-grid tfoot td { padding: 10px; border-top: 2px solid var(--line); font-weight: 700; font-size: 14px; }
.ts-grid tfoot td:first-child { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ts-grid tfoot td.ts-daytotal { font-weight: 600; font-size: 13px; color: var(--muted); text-align: center; }
.ts-sum-card { margin-top: 16px; }
.ts-sum-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.ts-sum-table td .ts-sub { display: block; }
.ts-sum-table :is(th, td).ts-num { text-align: right; }

body.skin-billdr #app .ts-grid tfoot td { padding: 14px 12px; border-top: 1px solid var(--ds-line); border-bottom: 0; background: var(--ds-card); color: var(--ds-navy); font-size: var(--ds-fs); font-variant-numeric: tabular-nums; }
body.skin-billdr #app .ts-grid tfoot td:first-child { padding-left: 20px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); }
body.skin-billdr #app .ts-grid tfoot td.ts-daytotal { font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-navy); }
body.skin-billdr #app .ts-grid tfoot tr { border-radius: 0 0 var(--ds-r) var(--ds-r); }
body.skin-billdr #app .ts-sum-card { margin-top: 20px; }
body.skin-billdr #app .ts-sum-table td.ts-num { font-weight: 700; color: var(--ds-navy); font-size: var(--ds-fs); }
body.skin-billdr #app .ts-sum-table td:first-child .ts-strong { color: var(--ds-navy); font-weight: 700; }

/* ======================= DW2 P14 · Time off (tab, list, grid marks) ======================= */
/* Structure (both appearances). */
.ts-tab-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  margin-left: 4px; padding: 0 5px; border-radius: 999px; background: #d97706; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px;
}
.tof-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tof-fpill {
  appearance: none; border: 1px solid var(--line); background: var(--card-bg, #fff); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.tof-fpill.active { background: var(--navy, #0B2235); border-color: var(--navy, #0B2235); color: #fff; }
.tof-fpill-n { opacity: .7; font-variant-numeric: tabular-nums; margin-left: 2px; }
.tof-table td.tof-days { white-space: nowrap; }
.tof-table td .ts-sub { display: block; }
.tof-table td.tof-acts { text-align: right; white-space: nowrap; }
.tof-table td.tof-acts .btn + .btn { margin-left: 6px; }
.tof-err { margin: 10px 4px 0; }
.tof-pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tof-pill-pending { background: #fef3c7; color: #92400e; }
.tof-pill-approved { background: #dcfce7; color: #166534; }
.tof-pill-denied { background: #fee2e2; color: #991b1b; }
.tof-pill-cancelled { background: #eef0f4; color: #5c6878; }
.tof-dlg-count { margin: -4px 0 4px; font-size: 13px; }
/* The week grid: an approved day is marked, never locked. */
.ts-cell.ts-off { background: repeating-linear-gradient(135deg, rgba(100, 116, 139, .10) 0 6px, transparent 6px 12px); }
.ts-cell.ts-off-req { background: repeating-linear-gradient(135deg, rgba(217, 119, 6, .06) 0 6px, transparent 6px 12px); }
.ts-off-tag {
  display: inline-block; margin: 0 0 4px; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: #e2e8f0; color: #334155; white-space: nowrap;
}
.ts-off-req .ts-off-tag { background: transparent; border: 1px dashed #d97706; color: #92400e; font-weight: 500; opacity: .85; }

/* Look (light skin). */
body.skin-billdr #app .ts-tab-badge { background: var(--ds-k-orange); color: #fff; }
body.skin-billdr #app .tof-fpill {
  min-height: var(--ds-ctl-sm); padding: 0 14px; border: 1px solid var(--ds-line); background: var(--ds-card);
  color: var(--ds-ink); font-size: var(--ds-fs-sm); font-weight: 500; border-radius: var(--ds-r-pill);
}
body.skin-billdr #app .tof-fpill:hover { border-color: var(--ds-line-strong); }
body.skin-billdr #app .tof-fpill.active { background: var(--ds-navy); border-color: var(--ds-navy); color: #fff; font-weight: 600; }
body.skin-billdr #app .tof-fpill:focus-visible { outline: none; box-shadow: var(--ds-focus); }
body.skin-billdr #app .tof-table td .ts-sub { color: var(--ds-muted); font-size: var(--ds-fs-xs); }
body.skin-billdr #app .tof-table td.tof-days { color: var(--ds-navy); font-weight: 600; }
body.skin-billdr #app .tof-table .tof-deny, body.skin-billdr #app .tof-table .tof-cancel { color: var(--ds-danger); }
body.skin-billdr #app .ts-off-tag { background: var(--ds-neutral-bg); color: var(--ds-neutral-ink); }
body.skin-billdr #app .ts-off-req .ts-off-tag { background: transparent; border-color: var(--ds-k-orange); color: var(--ds-orange-ink); }
/* Wide screens: "+ Request time off" takes the page's top-right
 * primary seat, the way "+ Add a shift" does on the week tabs. */
@media (min-width: 1100px) {
  body.skin-billdr #view-timesheets #tof-request { position: absolute; top: 0; right: 0; }
}

/* Parity pass (2026-10-20), S8: the "No location" mark when the company
   requires location on mobile clock-ins (field-timesheets.js). */
.ts-noloc { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #fdeceb; color: #b3261e; vertical-align: 1px; }
body.skin-billdr #app .ts-noloc { background: var(--ds-bad-bg); color: var(--ds-bad-ink); font-size: var(--ds-fs-xs); }
body.skin-billdr #app .ts-gps-formnote { margin: 8px 0 0; color: var(--ds-muted); font-size: var(--ds-fs-xs); }

/* Wave191 (2026-10-28): the range view — the period head over the
   per-person period table, and the stacked week blocks (each block
   is the single-week view under its own week heading). */
.ts-period { margin-bottom: 10px; }
.ts-period-h { font-size: 14px; font-weight: 700; margin: 12px 0 6px; }
.ts-week-block { margin-top: 20px; }
.ts-week-h { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.ts-week-anchor { font-size: 13px; font-weight: 400; color: var(--muted); }
