/* ══════════════════════════════════════════════════════════════
   LOG TIME MODAL + RATE CARD DRAWER + FLOATING ACTIONS
   ══════════════════════════════════════════════════════════════ */

/* ── floating actions ─────────────────────────────────────── */
.wk-lt-fab {
  position: fixed; right: 20px; bottom: 20px;
  z-index: 900;
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end;
  font-family: Inter, system-ui, sans-serif;
}
.wk-lt-fab-main, .wk-lt-fab-rates {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; cursor: pointer;
  font: inherit; font-weight: 600;
  box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.25);
  transition: filter 0.15s, transform 0.15s;
}
.wk-lt-fab-main {
  padding: 11px 18px; border-radius: 999px;
  background: var(--wt-theme-primary, #4f46e5);
  color: #fff; font-size: 13px;
}
.wk-lt-fab-main:hover { filter: brightness(0.95); transform: translateY(-1px); }
.wk-lt-fab-rates {
  padding: 7px 14px; border-radius: 999px;
  background: #fff; color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 11.5px;
}
.wk-lt-fab-rates:hover { color: var(--wt-theme-primary, #4f46e5); border-color: var(--wt-theme-primary, #4f46e5); }

/* ── log time modal ───────────────────────────────────────── */
.wk-lt-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: none;
  font-family: Inter, system-ui, sans-serif;
}
.wk-lt-overlay.is-open { display: flex; align-items: center; justify-content: center; }
body.wk-lt-locked { overflow: hidden; }
.wk-lt-scrim {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.wk-lt-modal {
  position: relative; z-index: 1;
  background: #fff;
  width: 480px; max-width: calc(100vw - 32px);
  border-radius: 14px;
  box-shadow: 0 30px 60px -10px rgba(15, 23, 42, 0.3);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 32px);
  animation: wkLtIn 0.2s ease-out;
}
@keyframes wkLtIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.wk-lt-head {
  padding: 18px 22px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.wk-lt-title { margin: 0; font-size: 17px; font-weight: 700; color: #0f172a; }
.wk-lt-close {
  width: 30px; height: 30px; border: none; background: transparent;
  border-radius: 8px; font-size: 22px; line-height: 1; cursor: pointer; color: #64748b;
}
.wk-lt-close:hover { background: #f1f5f9; color: #0f172a; }

.wk-lt-body {
  padding: 8px 22px 16px;
  overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 12px;
}
.wk-lt-row { display: flex; flex-direction: column; gap: 5px; }
.wk-lt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wk-lt-lbl {
  font-size: 11px; font-weight: 600;
  color: #475569; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wk-lt-input {
  width: 100%; box-sizing: border-box;
  padding: 8px 11px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  font: inherit; font-size: 13px; background: #fff; color: #0f172a;
  outline: none;
}
.wk-lt-input:focus {
  border-color: var(--wt-theme-primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.wk-lt-input--num { text-align: right; }
textarea.wk-lt-input { resize: vertical; min-height: 50px; font-family: inherit; }
.wk-lt-summary {
  padding: 10px 12px; border-radius: 8px;
  background: #f8fafc; font-size: 12.5px; color: #475569;
}
.wk-lt-summary strong { color: var(--wt-theme-primary, #4f46e5); }
.wk-lt-foot {
  padding: 12px 22px 18px;
  display: flex; gap: 8px; justify-content: flex-end;
  border-top: 1px solid #f1f5f9;
}
.wk-lt-btn {
  padding: 8px 18px; border-radius: 8px; border: none;
  font: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
}
.wk-lt-btn--ghost { background: transparent; color: #475569; }
.wk-lt-btn--ghost:hover { background: #f1f5f9; }
.wk-lt-btn--primary {
  background: var(--wt-theme-primary, #4f46e5); color: #fff;
}
.wk-lt-btn--primary:hover { filter: brightness(0.95); }

/* ══ rate card — one consultant, one popup ═══════════════════
   Picking which rates something billed at and editing the card are
   the same object, so they are the same modal: rows you tick, each
   one openable in place, and "add a rate" at the bottom.
   NOTE on shape: the tenant theme forces a border-radius on EVERY
   <button> via a 5-pseudo-class selector, which outranks a plain
   class even with !important — anything round or pill-shaped here
   has to be id-scoped (#wkRateCardModal …) to win. */
.wk-rc-overlay {
  position: fixed; inset: 0; z-index: 13600;
  display: none;
  font-family: Inter, system-ui, sans-serif;
}
.wk-rc-overlay.is-open { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
body.wk-rc-locked { overflow: hidden; }
.wk-rc-scrim {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}
.wk-rc-modal {
  position: relative; z-index: 1;
  background: #fff;
  width: 520px; max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 32px 70px -12px rgba(15, 23, 42, 0.42), 0 0 0 1px rgba(15, 23, 42, 0.06);
  display: flex; flex-direction: column;
  max-height: min(calc(100vh - 48px), 760px);
  overflow: hidden;
  animation: wkRcIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wkRcIn { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wk-rc-modal { animation: none; } }

/* ── head ── */
.wk-rc-head {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border-s, #eef2f7);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}
.wk-rc-head-id { display: flex; align-items: center; gap: 13px; min-width: 0; }
.wk-rc-head-txt { min-width: 0; }
.wk-rc-avatar {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%; overflow: hidden;
  background: var(--c-blue, #004b7c);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -0.01em;
  box-shadow: 0 0 0 3px rgba(0, 75, 124, 0.1);
}
.wk-rc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-rc-eyebrow {
  font-size: 9.5px; font-weight: 850; color: var(--c-blue, #004b7c);
  text-transform: uppercase; letter-spacing: 0.11em;
}
.wk-rc-title {
  margin: 2px 0 0; font-size: 18px; font-weight: 800; color: var(--ink, #0f172a);
  letter-spacing: -0.02em; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wk-rc-sub { font-size: 11.5px; font-weight: 600; color: var(--ink2, #7b8794); margin-top: 2px; }
.wk-rc-close {
  width: 32px; height: 32px; flex: 0 0 32px;
  border: none; background: transparent;
  font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink2, #64748b);
  transition: background 0.14s ease, color 0.14s ease;
}
#wkRateCardModal .wk-rc-close { border-radius: 9px !important; }
.wk-rc-close:hover { background: #f1f5f9; color: var(--ink, #0f172a); }

/* ── body ── */
.wk-rc-body { flex: 1; overflow-y: auto; padding: 16px 20px 4px; }
.wk-rc-ask { margin-bottom: 13px; }
.wk-rc-ask-t {
  font-size: 13.5px; font-weight: 800; color: var(--ink, #0f172a);
  letter-spacing: -0.01em; margin-bottom: 3px;
}
.wk-rc-ask-s { font-size: 11.5px; line-height: 1.55; color: var(--ink2, #6b7787); }
.wk-rc-lock {
  padding: 8px 12px; border-radius: 9px; margin-bottom: 12px;
  background: #fffbeb; color: #92400e; font-size: 11.5px; font-weight: 600;
}
.wk-rc-srch {
  display: flex; align-items: center; gap: 7px; margin-bottom: 10px;
  padding: 0 11px; border: 1px solid var(--border, #e4e9f0); border-radius: 10px;
  background: #fff; color: var(--ink2, #94a3b8);
}
.wk-rc-srch:focus-within { border-color: var(--c-blue, #004b7c); box-shadow: 0 0 0 3px rgba(0, 75, 124, 0.09); }
.wk-rc-srch svg { flex: 0 0 14px; }
.wk-rc-srch input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink, #0f172a);
  padding: 9px 0;
}

/* ── the rows ── */
.wk-rc-rows { display: flex; flex-direction: column; gap: 6px; }
.wk-rc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e4e9f0); border-radius: 11px;
  background: #fff;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.wk-rc-row--pick { cursor: pointer; }
.wk-rc-row--pick:hover { border-color: #cbd5e1; background: #fbfcfe; }
.wk-rc-row.is-on {
  border-color: var(--c-green, #16a34a);
  background: rgba(22, 163, 74, 0.05);
  box-shadow: inset 3px 0 0 var(--c-green, #16a34a);
}
.wk-rc-row.is-off { opacity: 0.62; background: #fafbfc; cursor: default; }
.wk-rc-row:focus-visible { outline: 2px solid var(--c-blue, #004b7c); outline-offset: 1px; }
.wk-rc-tick {
  width: 19px; height: 19px; flex: 0 0 19px; border-radius: 6px;
  border: 1.5px solid #cbd5e1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #fff; line-height: 1;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.wk-rc-row.is-on .wk-rc-tick { background: var(--c-green, #16a34a); border-color: var(--c-green, #16a34a); }
.wk-rc-row.is-off .wk-rc-tick { border-style: dashed; }
.wk-rc-nm {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 700; color: var(--ink, #0f172a);
  display: flex; flex-direction: column; gap: 1px;
}
.wk-rc-unnamed { font-style: italic; font-weight: 600; color: #b0b9c4; }
.wk-rc-why { font-size: 10.5px; font-weight: 600; color: var(--ink2, #94a3b8); font-style: italic; }
.wk-rc-amt {
  flex: 0 0 auto; font-size: 13.5px; font-weight: 800; color: var(--ink, #0f172a);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.wk-rc-amt em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--ink2, #94a3b8); }
.wk-rc-def {
  flex: 0 0 auto; font-size: 9px; font-weight: 850; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--c-blue, #004b7c);
  background: rgba(0, 75, 124, 0.09); padding: 3px 7px; border-radius: 999px;
}
.wk-rc-def-sp { flex: 0 0 auto; width: 0; }
.wk-rc-edit {
  flex: 0 0 26px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer;
  color: #b0b9c4; transition: background 0.14s ease, color 0.14s ease;
}
#wkRateCardModal .wk-rc-edit { border-radius: 8px !important; }
.wk-rc-edit:hover { background: #eef2f7; color: var(--c-blue, #004b7c); }

/* ── a row opened for editing ── */
.wk-rc-row--edit {
  display: block; padding: 13px;
  border-color: var(--c-blue, #004b7c);
  box-shadow: 0 0 0 3px rgba(0, 75, 124, 0.09);
  background: #fff;
}
.wk-rc-edit-grid { display: flex; gap: 10px; align-items: flex-end; }
.wk-rc-fld { flex: 1; min-width: 0; display: block; }
.wk-rc-fld--amt { flex: 0 0 118px; }
.wk-rc-fld > span {
  display: block; font-size: 9.5px; font-weight: 850; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink2, #94a3b8); margin-bottom: 4px;
}
.wk-rc-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 11px; border: 1px solid var(--border, #e4e9f0); border-radius: 9px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink, #0f172a);
  background: #fff; outline: none;
}
.wk-rc-input:focus { border-color: var(--c-blue, #004b7c); box-shadow: 0 0 0 3px rgba(0, 75, 124, 0.09); }
.wk-rc-amt-in { position: relative; display: flex; align-items: center; }
.wk-rc-amt-in i {
  position: absolute; left: 11px; font-style: normal;
  font-size: 13px; font-weight: 800; color: var(--ink2, #94a3b8); pointer-events: none;
}
.wk-rc-amt-in .wk-rc-input { padding-left: 24px; font-variant-numeric: tabular-nums; }
.wk-rc-edit-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border-s, #f1f5f9);
}
.wk-rc-defbox {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 11.5px; font-weight: 650; color: var(--ink2, #5b6b7d);
}
.wk-rc-defbox input { width: 15px; height: 15px; accent-color: var(--c-blue, #004b7c); cursor: pointer; }
.wk-rc-edit-acts { display: flex; align-items: center; gap: 6px; }
.wk-rc-del, .wk-rc-done {
  border: 1px solid var(--border, #e4e9f0); background: #fff;
  padding: 6px 13px; font: inherit; font-size: 11.5px; font-weight: 750; cursor: pointer;
  color: var(--ink2, #5b6b7d); transition: all 0.14s ease;
}
#wkRateCardModal .wk-rc-del, #wkRateCardModal .wk-rc-done { border-radius: 8px !important; }
.wk-rc-del:hover { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
.wk-rc-done { border-color: var(--c-blue, #004b7c); background: var(--c-blue, #004b7c); color: #fff; }
.wk-rc-done:hover { filter: brightness(1.08); }

/* ── add ── */
.wk-rc-add {
  width: 100%; margin: 9px 0 16px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent; border: 1.5px dashed #cfd8e3; color: var(--ink2, #5b6b7d);
  padding: 10px; font: inherit; font-size: 12.5px; font-weight: 750; cursor: pointer;
  transition: all 0.14s ease;
}
#wkRateCardModal .wk-rc-add { border-radius: 11px !important; }
.wk-rc-add:hover { border-color: var(--c-blue, #004b7c); color: var(--c-blue, #004b7c); background: rgba(0, 75, 124, 0.035); }
/* Bordered, NOT `background: currentColor` — the icon inherits the button's
   colour, so filling it and then setting the glyph white paints white on white. */
.wk-rc-add-ic {
  width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid currentColor; border-radius: 50%;
  font-size: 12px; font-weight: 850; line-height: 1; padding-bottom: 1px;
}
.wk-rc-empty {
  padding: 22px 12px; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--ink2, #94a3b8);
  border: 1px dashed var(--border, #e4e9f0); border-radius: 11px;
}
.wk-rc-err {
  margin: 10px 0 14px; padding: 9px 12px; border-radius: 9px;
  background: #fef2f2; color: #b91c1c; font-size: 11.5px; font-weight: 700;
  border: 1px solid #fecaca;
}

/* ── foot ── */
.wk-rc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 20px; border-top: 1px solid var(--border-s, #eef2f7);
  background: #fbfcfe;
}
.wk-rc-foot-sum { font-size: 11.5px; font-weight: 650; color: var(--ink2, #6b7787); min-width: 0; }
.wk-rc-foot-sum b { color: var(--ink, #0f172a); font-weight: 850; }
.wk-rc-linkbtn {
  border: none; background: transparent; padding: 0 0 0 6px;
  font: inherit; font-size: 11.5px; font-weight: 750; cursor: pointer;
  color: var(--c-blue, #004b7c); text-decoration: underline; text-underline-offset: 2px;
}
.wk-rc-linkbtn:hover { filter: brightness(1.25); }
.wk-rc-foot-acts { display: flex; gap: 8px; flex-shrink: 0; }
.wk-rc-btn {
  padding: 9px 17px; border: 1px solid transparent;
  font: inherit; font-weight: 750; font-size: 12.5px; cursor: pointer;
  transition: all 0.14s ease;
}
#wkRateCardModal .wk-rc-btn { border-radius: 10px !important; }
.wk-rc-btn--ghost { background: #fff; border-color: var(--border, #e4e9f0); color: var(--ink2, #5b6b7d); }
.wk-rc-btn--ghost:hover { background: #f1f5f9; color: var(--ink, #0f172a); }
.wk-rc-btn--save { background: var(--c-blue, #004b7c); color: #fff; }
.wk-rc-btn--save:hover:not(:disabled) { filter: brightness(1.08); }
.wk-rc-btn--save:disabled { opacity: 0.42; cursor: default; }

@media (max-width: 560px) {
  .wk-rc-edit-grid { flex-direction: column; align-items: stretch; }
  .wk-rc-fld--amt { flex: 1; }
  .wk-rc-foot { flex-direction: column; align-items: stretch; }
  .wk-rc-foot-acts { justify-content: flex-end; }
}

/* ── minutes, not just quarter hours ────────────────────────────────────────
   Presets + -5m/+5m nudges under any hours field, injected by
   wk-duration.js. Lives here because the log-time drawer is the field's
   home; the same classes serve every other hours input it attaches to. */
.wkdur { margin-top: 6px; }
.wkdur-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wkdur-chip {
  appearance: none; border: 1px solid var(--wk-line, #d8dee8);
  background: var(--wk-surface, #fff); color: var(--wk-ink, #223);
  border-radius: 999px; padding: 4px 9px; font-size: 11.5px; font-weight: 700;
  line-height: 1.1; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.wkdur-chip:hover { border-color: var(--wk-accent, #2f6fed); color: var(--wk-accent, #2f6fed); }
.wkdur-chip:active { transform: scale(.97); }
.wkdur-chip.is-on {
  background: var(--wk-accent, #2f6fed); border-color: var(--wk-accent, #2f6fed); color: #fff;
}
.wkdur-nudge { font-variant-numeric: tabular-nums; opacity: .85; }
.wkdur-hint {
  margin-top: 4px; font-size: 11.5px; font-weight: 600;
  color: var(--wk-muted, #6b7688); min-height: 14px;
}
/* the field itself no longer jumps in quarter hours */
.wk-lt-input--num { text-align: right; }
/* keep -5m/+5m visually apart from the presets so the row reads as
   "pick one" then "nudge it" */
.wkdur-nudge--first { margin-left: 10px; }
