/* Parity 7 (2026-10-16) — Timesheets: the register + the
   shift drawer with its Buildern route layer (finding #23);
   Notifications: the Activity stream in feed cards
   (finding #16). The modules' own sheets keep their rules;
   this file carries the pass's new shapes only. Gold stays
   where the house keeps it — the primary actions — and
   never appears here as decoration. */

/* ---------- TIMESHEETS: the register ---------- */
.ts-reg-row { cursor: pointer; }
.ts-reg-row:hover td { background: #f7f9fc; }
.ts-reg-actions { white-space: nowrap; text-align: right; }
.ts-reg-btn { padding: 2px 9px; font-size: 14px; line-height: 1.5; }

/* ---------- TIMESHEETS: the shift drawer ---------- */
/* The shift form's overlay, right-anchored: the dialog
   becomes a full-height drawer (Billdr's shape) instead of
   a centred card. Its width rule (.fx-dialog.ts-dialog)
   stands in timesheets.css; the drawer narrows it to a
   panel and gives it the height + its own scroll. */
.fx-overlay.ts-overlay {
  padding: 0; justify-content: flex-end; align-items: stretch; overflow: hidden;
}
.fx-dialog.ts-drawer {
  max-width: 640px; width: min(640px, 100vw); height: 100dvh; overflow-y: auto; margin: 0;
  animation: tsDrawerIn .18s ease-out;
}
@keyframes tsDrawerIn {
  from { transform: translateX(42px); opacity: .35; }
  to { transform: none; opacity: 1; }
}

/* ---------- the route layer inside the drawer ---------- */
.ts-route { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.ts-route-h { margin: 0 0 8px; font-size: 14px; }
.ts-map {
  height: 260px; border: 1px solid var(--line); border-radius: 12px;
  background: #eef1f5; z-index: 0;
}
/* wave224-tsmap (2026-10-29): Leaflet's own chrome, calmed to the portal's
 * shapes — small quiet attribution, rounded zoom buttons bottom-right. */
.ts-map .leaflet-control-attribution {
  font-size: 9px; line-height: 1.4; padding: 1px 5px;
  background: rgba(255, 255, 255, .78); color: #8a94a3;
}
.ts-map .leaflet-control-attribution a { color: #8a94a3; }
.ts-map .leaflet-bar { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(9, 22, 36, .18); }
.ts-map .leaflet-bar a { color: #0b2235; border-bottom: 1px solid var(--line); }
.ts-map .leaflet-bar a:last-child { border-bottom: 0; }
.ts-map-off { height: auto; padding: 10px 12px; }
.ts-map-note { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

/* The map pins: IN blue, OUT navy, the site an ink ⌂ — a
   flagged pin (beyond the site radius) wears red, whichever
   end of the shift it is. wave224-tsmap: the blue deepened off
   its neon and the OUT pin took the portal navy, so
   the set sits on the muted basemap instead of shouting over it. */
.ts-pin-wrap { background: none; border: none; }
.ts-pin {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #1e50a2; color: #fff; font-size: 9px; font-weight: 800;
  border: 2px solid #fff; box-shadow: 0 1px 5px rgba(9, 22, 36, .35);
}
.ts-pin-out { background: #33526b; }
.ts-pin-site { background: #0b2235; font-size: 15px; font-weight: 400; box-shadow: 0 0 0 2px rgba(11, 34, 53, .25), 0 1px 5px rgba(9, 22, 36, .35); }
.ts-pin-flagged { background: #c0392b; }

/* The event timeline below the map. */
.ts-timeline {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.ts-tl-row { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.ts-tl-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  align-self: center; background: #9fb3c8;
}
.ts-tl-dot.ts-tl-onsite { background: #1e50a2; } /* wave224-tsmap: matched to the deepened IN pin */
.ts-tl-dot.ts-tl-flagged { background: #c0392b; }
.ts-tl-dot.ts-tl-none { background: transparent; border: 1.5px solid #c4cfda; }
.ts-tl-time { font-weight: 700; white-space: nowrap; min-width: 72px; }
.ts-tl-label { min-width: 0; }
.ts-tl-dist { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.ts-tl-dist.ts-tl-flagged { color: #c0392b; font-weight: 700; }

/* ---------- NOTIFICATIONS: the Activity feed card ---------- */
/* The stream's rows become feed cards: a head (actor ·
   headline · relative time), a short body, then the
   event's media at card scale. The .row card dress (border,
   shadow, padding) is styles.css's, reused as-is. */
.act-card { flex-direction: column; align-items: stretch; gap: 8px; }
.act-card-h { display: flex; gap: 12px; align-items: center; }
.act-card-h .grow { flex: 1; min-width: 0; }
.act-card-where { margin: 0; }
.act-rel { color: var(--muted); font-size: 12px; white-space: nowrap; align-self: flex-start; }
.act-card-body { margin: 0; font-size: 13.5px; }
.act-media { position: relative; }
.act-media-cell {
  position: relative; display: block; border-radius: 10px;
  overflow: hidden; background: #eef1f5;
}
.act-media-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-media .act-media-cell { height: 300px; }
.act-media-strip { display: flex; gap: 6px; }
.act-media-strip .act-media-cell { flex: 1; height: 128px; }
.act-media-more {
  position: absolute; right: 8px; bottom: 8px; z-index: 1;
  background: rgba(9, 22, 36, .78); color: #fff;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.act-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(9, 22, 36, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}

/* Fix pass 6: the feed's light action row + project tint chip —
   every control in the row is a real door (Open = the card's own
   door, Discuss = the project conversation, ••• = mark read to
   here / open project). */
.act-actions { display: flex; align-items: center; gap: 6px; }
.act-actbtn {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: 999px; cursor: pointer;
}
.act-actbtn:hover { background: #eef1f4; color: var(--ink); }
.act-more-wrap { position: relative; margin-left: auto; }
.act-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 5;
  background: var(--card-bg, #fff); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 34, 53, .14); padding: 6px; min-width: 172px;
  display: flex; flex-direction: column;
}
.act-menu.hidden { display: none; }
.act-menu button {
  appearance: none; border: 0; background: transparent; text-align: left;
  font-size: 13px; padding: 7px 9px; border-radius: 7px; cursor: pointer; color: var(--ink);
}
.act-menu button:hover { background: #eef1f4; }
.act-proj { font-weight: 600; color: var(--ink); }

/* ======================= DW1 · Timesheets register + shift drawer (design wave, 2026-10-17) ======================= */
/* Register: the shared table look (white card, grey sentence-case
 * head, ~90px rows with a two-line first cell, money right). Drawer:
 * Billdr's right-hand panel — flat edge, bold navy field labels,
 * 40px inputs, tokens for banners. (Activity .act-* rules above are
 * re-skinned in notifications.css, not here.) */

/* ---------- register ---------- */
body.skin-billdr #app .ts-reg-table td { padding-top: var(--ds-row-pad); padding-bottom: var(--ds-row-pad); }
body.skin-billdr #app .ts-reg-table td:first-child { font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); white-space: nowrap; }
body.skin-billdr #app .ts-reg-table td:first-child .ts-sub { font-weight: 400; }
body.skin-billdr #app .ts-reg-table td:nth-child(2) { color: var(--ds-ink); }
body.skin-billdr #app .ts-reg-row:hover td { background: var(--ds-tint); }
body.skin-billdr #app .ts-reg-actions { display: table-cell; }
body.skin-billdr #app .ts-reg-actions .ts-reg-btn {
  min-height: var(--ds-ctl-sm); width: var(--ds-ctl-sm); padding: 0; margin-left: 4px;
  font-size: 14px; border-radius: var(--ds-r-sm); color: var(--ds-ink); background: var(--ds-card); border: 1px solid var(--ds-line);
}
body.skin-billdr #app .ts-reg-actions .ts-reg-btn:hover:not(:disabled) { background: var(--ds-bg); border-color: var(--ds-line-strong); }
body.skin-billdr #app .ts-reg-actions [data-ts-reg-approve] { color: var(--ds-ok-ink); }
body.skin-billdr #app .ts-reg-actions [data-ts-reg-reject] { color: var(--ds-danger); }

/* ---------- the shift drawer (fx-overlay lives outside #app) ---------- */
body.skin-billdr .fx-dialog.ts-drawer { border-radius: 0; padding: 24px 28px 28px; box-shadow: -16px 0 40px -18px rgba(11, 34, 53, .45); }
body.skin-billdr .ts-drawer .fx-dlg-head h3 { font-size: var(--ds-fs-xl); }
body.skin-billdr .ts-drawer .ts-form-grid { gap: 16px 16px; margin-top: 12px; }
body.skin-billdr .ts-drawer .ts-form-grid > label { font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-navy); gap: 6px; }
body.skin-billdr .ts-drawer .ts-form-grid :is(input:not([type="checkbox"]), select),
body.skin-billdr .ts-drawer .ts-split-row :is(input, select) {
  min-height: var(--ds-ctl); padding: 0 12px; font-size: var(--ds-fs); font-weight: 400;
  border: 1px solid var(--ds-line); border-radius: var(--ds-r-ctl); background-color: var(--ds-card); color: var(--ds-ink);
}
body.skin-billdr .ts-drawer :is(.ts-form-grid, .ts-split-row) select {
  -webkit-appearance: none; appearance: none; padding-right: 34px;
  background: var(--ds-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366717f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px 16px;
}
body.skin-billdr .ts-drawer :is(.ts-form-grid textarea, .ts-reject-zone textarea) {
  padding: 10px 12px; font-size: var(--ds-fs); font-weight: 400; border: 1px solid var(--ds-line); border-radius: var(--ds-r-ctl); color: var(--ds-ink);
}
body.skin-billdr .ts-drawer :is(input, select, textarea):focus { outline: none; border-color: var(--ds-gold); box-shadow: var(--ds-focus); }
body.skin-billdr .ts-drawer :is(.ts-form-grid, .ts-split-row) :is(input:not([type="checkbox"]), select, textarea):disabled { background-color: var(--ds-fill); color: var(--ds-muted); }
body.skin-billdr .ts-drawer .ts-field-note { font-size: var(--ds-fs-xs); font-weight: 400; color: var(--ds-muted); }
/* Billable: the real checkbox, on/off → the iOS switch (gold when on). */
body.skin-billdr .ts-drawer .ts-form-grid .ts-check { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: var(--ds-ctl); font-size: var(--ds-fs-sm); font-weight: 400; color: var(--ds-ink); cursor: pointer; }
body.skin-billdr .ts-drawer .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 .ts-drawer .ts-form-grid .ts-check input[type="checkbox"]:checked { background-color: var(--ds-gold-strong); background-position: 16px 0; }
body.skin-billdr .ts-drawer .ts-form-grid .ts-check input[type="checkbox"]:disabled { opacity: .55; cursor: default; }
body.skin-billdr .ts-drawer .ts-form-grid .ts-check input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--ds-focus); }
body.skin-billdr .ts-drawer .ts-stepper { min-height: var(--ds-ctl); }
body.skin-billdr .ts-drawer .ts-stepper button {
  width: 32px; height: 32px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-sm); background: var(--ds-card); color: var(--ds-ink);
}
body.skin-billdr .ts-drawer .ts-stepper button:hover:not(:disabled) { background: var(--ds-bg); border-color: var(--ds-line-strong); }
body.skin-billdr .ts-drawer .ts-stepper button:disabled { opacity: .45; cursor: default; }
body.skin-billdr .ts-drawer .ts-stepper-val { font-weight: 600; color: var(--ds-navy); }
body.skin-billdr .ts-drawer .ts-rates { background: var(--ds-fill); border: 0; border-radius: var(--ds-r-ctl); padding: 12px 14px; font-size: var(--ds-fs-sm); color: var(--ds-ink); }
body.skin-billdr .ts-drawer .ts-banner { border: 0; border-radius: var(--ds-r-ctl); padding: 10px 14px; font-size: var(--ds-fs-sm); }
body.skin-billdr .ts-drawer .ts-banner-rejected { background: var(--ds-bad-bg); color: var(--ds-bad-ink); }
body.skin-billdr .ts-drawer .ts-banner-approved { background: var(--ds-ok-bg); color: var(--ds-ok-ink); }
body.skin-billdr .ts-drawer .ts-route { border-top: 1px solid var(--ds-line); padding-top: 16px; margin-top: 20px; }
body.skin-billdr .ts-drawer :is(.ts-route-h, .ts-splits-h h4) { font-size: var(--ds-fs-md); font-weight: 700; color: var(--ds-navy); }
body.skin-billdr .ts-drawer .ts-route .muted { font-size: var(--ds-fs-sm); }
body.skin-billdr .ts-drawer .ts-map { border-color: var(--ds-line); border-radius: var(--ds-r); }
body.skin-billdr .ts-drawer .ts-map-note, body.skin-billdr .ts-drawer .ts-tl-dist { color: var(--ds-muted); }
body.skin-billdr .ts-drawer .ts-tl-time { color: var(--ds-navy); }
body.skin-billdr .ts-drawer .ts-splits { margin-top: 20px; }
body.skin-billdr .ts-drawer .ts-split-x { color: var(--ds-muted); }
body.skin-billdr .ts-drawer .ts-split-x:hover { color: var(--ds-danger); }
body.skin-billdr .ts-drawer .ts-tally { font-size: var(--ds-fs-sm); color: var(--ds-muted); }
body.skin-billdr .ts-drawer .ts-tally.over { color: var(--ds-bad-ink); }
body.skin-billdr .ts-drawer .ts-form-foot { gap: 8px; margin-top: 20px; }
body.skin-billdr .ts-drawer .ts-form-total { font-size: var(--ds-fs); font-weight: 700; color: var(--ds-navy); }
/* Plain .btn in the drawer (Save & Approve, Revert to pending) was
 * falling back to the Wave 1 grey fill: neutral outline, as in #app. */
body.skin-billdr .ts-drawer .btn:not(.btn-primary):not(.btn-ghost):not(.fx-dangerbtn) {
  background: var(--ds-card); color: var(--ds-ink); border: 1px solid var(--ds-line-strong); font-weight: 500;
}
body.skin-billdr .ts-drawer .btn:not(.btn-primary):not(.btn-ghost):not(.fx-dangerbtn):hover:not(:disabled) { background: var(--ds-tint); border-color: #b9c2cd; }
/* Destructive confirms are red, not the gold primary (rule 10). */
body.skin-billdr .ts-drawer :is(#ts-reject-yes, #ts-del-yes) { background: var(--ds-danger); color: #fff; border: 0; }
body.skin-billdr .ts-drawer :is(#ts-reject-yes, #ts-del-yes):hover:not(:disabled) { background: var(--ds-bad-ink); }
body.skin-billdr .ts-drawer #ts-del-open { color: var(--ds-danger); border-color: transparent; background: transparent; padding-left: 0; }
body.skin-billdr .ts-drawer .ts-delzone { border-top: 1px solid var(--ds-hair); margin-top: 18px; padding-top: 12px; }
body.skin-billdr .ts-drawer .ts-reject-zone .ts-f { font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-navy); gap: 6px; }
@media (max-width: 760px) {
  body.skin-billdr .fx-dialog.ts-drawer { padding: 18px 16px 24px; }
  body.skin-billdr .ts-drawer .ts-form-grid { grid-template-columns: 1fr; }
}

/* ======================= DW2 P10 · register location pin is a door ======================= */
/* The pin opens the shift's drawer at Route & events. It keeps the
 * dot's look (size / colour from .ts-tl-dot above) and gains a
 * button's reset, a pointer and a focus ring. */
button.ts-pin-btn { padding: 0; margin: 0 0 0 4px; border: 0; cursor: pointer; vertical-align: middle; display: inline-block; }
button.ts-pin-btn:hover { transform: scale(1.35); }
button.ts-pin-btn:focus-visible { outline: 2px solid var(--navy, #0b2235); outline-offset: 2px; }
body.skin-billdr #app button.ts-pin-btn:focus-visible { outline-color: var(--ds-gold); }
