/* ══════════════════════════════════════════════════════════════
   PROGRAM BUILDER DRAWER  —  3-step Create flow
   Visual sibling of grant-builder-drawer (.wk-gbd-*)
   ══════════════════════════════════════════════════════════════ */

.wk-pbd-overlay {
  position: fixed; inset: 0;
  /* 65000 clears the wdp/task popups (55000–60000) AND the goal builder
     (64000), so when "+ Create new project" is fired from inside the goal
     builder this drawer renders in front of it. Below materials browser (70000). */
  z-index: 65000;
  display: none;
  align-items: center; justify-content: center;
  padding: 32px 24px;
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}
.wk-pbd-overlay.is-open { display: flex; }
body.wk-pbd-locked { overflow: hidden; }

.wk-pbd-scrim {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  animation: wkPbdScrimIn 0.18s ease-out;
}
@keyframes wkPbdScrimIn { from { opacity: 0; } to { opacity: 1; } }

.wk-pbd-drawer {
  position: relative;
  width: 100%; max-width: 920px;
  max-height: min(94vh, 920px);
  background: #fff;
  border-radius: 16px;
  display: flex; flex-direction: column;
  box-shadow:
    0 30px 80px -20px rgba(15, 23, 42, 0.45),
    0 10px 24px -8px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  animation: wkPbdPopIn 0.24s cubic-bezier(0.34, 1.2, 0.64, 1);
}
@keyframes wkPbdPopIn {
  from { transform: translateY(12px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── header ─────────────────────────────────────────────── */
.wk-pbd-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 28px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}
.wk-pbd-head-text { min-width: 0; }
.wk-pbd-eyebrow {
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 11px; font-weight: 700;
  color: var(--wt-theme-primary, #4f46e5);
}
.wk-pbd-title { margin: 6px 0 0; font-size: 22px; font-weight: 700; color: #0f172a; }
.wk-pbd-name-pill {
  display: inline-block; margin-top: 10px;
  padding: 6px 12px; border-radius: 999px;
  background: #f1f5f9; color: #64748b;
  font-size: 12.5px; font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px dashed #cbd5e1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.wk-pbd-name-pill.is-ready {
  background: #ecfdf5; color: #065f46;
  border: 1px solid #a7f3d0; border-style: solid;
}
.wk-pbd-close {
  width: 36px; height: 36px; border-radius: 10px;
  border: none; background: transparent;
  font-size: 24px; line-height: 1; cursor: pointer; color: #64748b;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.wk-pbd-close:hover { background: #f1f5f9; color: #0f172a; }

/* ── steps ──────────────────────────────────────────────── */
.wk-pbd-steps {
  display: flex; gap: 4px;
  padding: 0 24px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.wk-pbd-step {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 14px 12px;
  background: transparent; border: none; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: #94a3b8;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.wk-pbd-step:hover { color: #475569; }
.wk-pbd-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #e2e8f0; color: #64748b;
  font-size: 11px; font-weight: 700;
  transition: background 0.18s, color 0.18s;
}
.wk-pbd-step.is-active { color: var(--wt-theme-primary, #4f46e5); border-bottom-color: var(--wt-theme-primary, #4f46e5); }
.wk-pbd-step.is-active .wk-pbd-step-num { background: var(--wt-theme-primary, #4f46e5); color: #fff; }
.wk-pbd-step.is-done { color: #16a34a; }
.wk-pbd-step.is-done .wk-pbd-step-num { background: #16a34a; color: #fff; }

/* ── body ───────────────────────────────────────────────── */
.wk-pbd-body {
  flex: 1; overflow-y: auto;
  padding: 24px 28px 32px;
}
.wk-pbd-body.is-fade { animation: wkPbdBodyFade 0.22s ease-out; }
@keyframes wkPbdBodyFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── fields ─────────────────────────────────────────────── */
.wk-pbd-field { margin-bottom: 20px; }
.wk-pbd-lbl {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700;
  color: #475569; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.wk-pbd-lbl-meta {
  font-weight: 500; font-size: 11px; color: #94a3b8;
  text-transform: none; letter-spacing: 0;
}
.wk-pbd-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 9px;
  font: inherit; font-size: 13.5px; background: #fff; color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.wk-pbd-input:focus {
  border-color: var(--wt-theme-primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.wk-pbd-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.wk-pbd-hint {
  font-size: 11.5px; color: #94a3b8; margin-top: 6px;
}

/* ── chip pickers (program type) ────────────────────────── */
.wk-pbd-chips {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.wk-pbd-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 11px 12px; border-radius: 11px;
  border: 1.5px solid #e2e8f0; background: #fff;
  cursor: pointer; transition: all 0.18s;
  font: inherit; font-size: 13px; font-weight: 600; color: #0f172a;
  text-align: left;
}
.wk-pbd-chip:hover { border-color: #cbd5e1; transform: translateY(-1px); }
.wk-pbd-chip-name { font-weight: 600; }
.wk-pbd-chip-meta { font-weight: 500; font-size: 10.5px; color: #94a3b8; }
.wk-pbd-chip.is-active {
  border-color: var(--wt-theme-primary, #4f46e5);
  background: var(--wt-theme-primary-mist, #eef2ff);
  color: var(--wt-theme-primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.wk-pbd-chip.is-active .wk-pbd-chip-meta { color: var(--wt-theme-primary-dark, #4338ca); }

/* ── combobox (client / owner / grants) ─────────────────── */
.wk-pbd-combo { position: relative; }
.wk-pbd-combo-input { padding-right: 36px; }
.wk-pbd-combo-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 6px;
  background: transparent; border: none; cursor: pointer;
  color: #64748b; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.22s, color 0.15s;
}
.wk-pbd-combo-toggle svg { width: 16px; height: 16px; }
.wk-pbd-combo-toggle:hover { background: #f1f5f9; color: #0f172a; }
.wk-pbd-combo.is-open .wk-pbd-combo-toggle { transform: translateY(-50%) rotate(180deg); }

.wk-pbd-combo-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
  max-height: 260px; overflow-y: auto;
  padding: 4px;
  z-index: 20;
  animation: wkPbdComboIn 0.14s ease-out;
}
@keyframes wkPbdComboIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wk-pbd-combo-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  font: inherit; font-size: 13px; color: #0f172a;
  text-align: left;
  transition: background 0.12s;
}
.wk-pbd-combo-item:hover, .wk-pbd-combo-item.is-hover { background: #f1f5f9; }
.wk-pbd-combo-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-pbd-combo-sub  { font-size: 11.5px; color: #94a3b8; flex-shrink: 0; }
.wk-pbd-combo-item mark {
  background: rgba(79, 70, 229, 0.16);
  color: var(--wt-theme-primary-dark, #4338ca);
  padding: 0; border-radius: 2px;
}
.wk-pbd-combo-create {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 12px; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--wt-theme-primary, #4f46e5);
  text-align: left;
  border-top: 1px solid #f1f5f9; margin-top: 4px;
  transition: background 0.12s;
}
.wk-pbd-combo-create:hover, .wk-pbd-combo-create.is-hover { background: rgba(79, 70, 229, 0.06); }
.wk-pbd-combo-create svg { width: 14px; height: 14px; flex-shrink: 0; }
.wk-pbd-combo-create strong { font-weight: 700; color: #0f172a; }
/* Pinned-to-top variant: separator below it instead of above, and a soft tint
   so it reads as a primary "Add new" affordance even when results are listed. */
.wk-pbd-combo-create--top {
  margin-top: 0; border-top: none;
  border-bottom: 1px solid #f1f5f9;
  background: rgba(79, 70, 229, 0.04);
}
.wk-pbd-combo-empty {
  padding: 14px; text-align: center;
  font-size: 12.5px; color: #94a3b8;
}

/* ── multi-select tags (grants) ─────────────────────────── */
.wk-pbd-combo--multi {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px 36px 6px 8px;
  border: 1px solid #e2e8f0; border-radius: 9px;
  background: #fff; min-height: 44px;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wk-pbd-combo--multi:focus-within {
  border-color: var(--wt-theme-primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.wk-pbd-tags { display: contents; }
.wk-pbd-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 4px 4px 10px;
  background: var(--wt-theme-primary-mist, #eef2ff);
  color: var(--wt-theme-primary-dark, #4338ca);
  border: 1px solid color-mix(in srgb, var(--wt-theme-primary, #4f46e5) 25%, transparent);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  animation: wkPbdTagIn 0.16s cubic-bezier(0.34, 1.5, 0.64, 1);
}
@keyframes wkPbdTagIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.wk-pbd-tag-name { white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.wk-pbd-tag-x {
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--wt-theme-primary-dark, #4338ca);
  font-size: 14px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.wk-pbd-tag-x:hover { background: rgba(79, 70, 229, 0.18); color: #1e1b4b; }
.wk-pbd-combo-input--bare {
  flex: 1; min-width: 120px;
  padding: 6px 4px; border: none; outline: none;
  background: transparent;
  font: inherit; font-size: 13.5px; color: #0f172a;
}

/* ── date picker ────────────────────────────────────────── */
.wk-pbd-date { position: relative; }
.wk-pbd-date-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 9px;
  background: #fff; color: #0f172a;
  font: inherit; font-size: 13.5px; cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wk-pbd-date-btn:hover  { border-color: #cbd5e1; }
.wk-pbd-date-btn:focus  { outline: none; border-color: var(--wt-theme-primary, #4f46e5); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14); }
.wk-pbd-date-btn svg    { width: 16px; height: 16px; color: #64748b; flex-shrink: 0; }
.wk-pbd-date-label      { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wk-pbd-date-pop {
  position: absolute; left: 0; top: calc(100% + 6px);
  width: 280px;
  background: #fff;
  border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 10px;
  z-index: 30;
  animation: wkPbdComboIn 0.14s ease-out;
}
.wk-pbd-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 8px;
}
.wk-pbd-cal-month { font-size: 13.5px; font-weight: 700; color: #0f172a; }
.wk-pbd-cal-nav {
  width: 28px; height: 28px; border-radius: 7px;
  border: none; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.wk-pbd-cal-nav:hover { background: #f1f5f9; color: #0f172a; }
.wk-pbd-cal-dow {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-align: center; padding: 4px 0; text-transform: uppercase; letter-spacing: 0.04em;
}
.wk-pbd-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.wk-pbd-cal-day {
  height: 32px; border: none; background: transparent;
  font: inherit; font-size: 12.5px; color: #0f172a;
  border-radius: 7px; cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.wk-pbd-cal-day:hover    { background: #f1f5f9; }
.wk-pbd-cal-day.is-other { color: #cbd5e1; }
.wk-pbd-cal-day.is-today { font-weight: 700; color: var(--wt-theme-primary, #4f46e5); }
.wk-pbd-cal-day.is-today::after {
  content: ''; display: block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--wt-theme-primary, #4f46e5); margin: 1px auto 0;
}
.wk-pbd-cal-day.is-selected {
  background: var(--wt-theme-primary, #4f46e5) !important;
  color: #fff !important; font-weight: 700;
}
.wk-pbd-cal-day.is-selected::after { background: #fff; }
.wk-pbd-cal-foot {
  border-top: 1px solid #f1f5f9; margin-top: 6px; padding-top: 6px;
  display: flex; justify-content: flex-end;
}
.wk-pbd-cal-quick {
  padding: 5px 10px; border-radius: 6px; border: none;
  background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--wt-theme-primary, #4f46e5);
  transition: background 0.12s;
}
.wk-pbd-cal-quick:hover { background: rgba(79, 70, 229, 0.08); }

/* ── budget buckets ─────────────────────────────────────── */
.wk-pbd-bucket-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.wk-pbd-mini {
  background: transparent; border: 1px dashed #cbd5e1;
  color: #475569; padding: 6px 12px; border-radius: 7px;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.wk-pbd-mini:hover {
  border-color: var(--wt-theme-primary, #4f46e5);
  color: var(--wt-theme-primary, #4f46e5);
  border-style: solid;
  background: rgba(79, 70, 229, 0.04);
}
/* ── Single-page mode: stacked sections, TOC nav, anchor blocks ── */
.wk-pbd-drawer--single { max-width: 980px; max-height: min(94vh, 1100px); }
.wk-pbd-steps--toc {
  position: sticky; top: 0; z-index: 2;
  background: #fff;
  padding: 10px 28px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.wk-pbd-step--toc {
  border-bottom: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid transparent;
}
.wk-pbd-step--toc:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.wk-pbd-step--toc.is-done {
  background: #ecfdf5;
  color: #047857;
  border-color: #99f6e4;
}
.wk-pbd-step--toc.is-done .wk-pbd-step-num {
  background: #10b981;
  color: #fff;
}

.wk-pbd-section-block {
  scroll-margin-top: 60px;
  padding: 22px 4px 8px;
  border-bottom: 1px dashed #f1f5f9;
}
.wk-pbd-section-block:last-child { border-bottom: none; }
.wk-pbd-section-block.is-flash {
  animation: wkPbdSectionFlash .9s ease;
}
@keyframes wkPbdSectionFlash {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .35); }
  30%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, .15); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.wk-pbd-section-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.wk-pbd-section-h .wk-pbd-section-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--wt-theme-primary, #4f46e5);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.wk-pbd-section-h h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.wk-pbd-section-sub {
  font-size: 12px;
  color: #64748b;
  margin-left: auto;
}

.wk-pbd-buckets { display: flex; flex-direction: column; gap: 8px; }
.wk-pbd-bucket {
  display: grid; grid-template-columns: 1fr 150px 110px 36px; gap: 8px; align-items: center;
  animation: wkPbdRowIn 0.18s ease-out;
}
.wk-pbd-bucket-freq {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  appearance: menulist;
  text-align: center;
}
.wk-pbd-bucket-total-hint {
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 500;
  margin-left: 4px;
}
@keyframes wkPbdRowIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wk-pbd-money {
  position: relative; display: flex; align-items: center;
}
.wk-pbd-money-prefix {
  position: absolute; left: 12px; color: #94a3b8; font-weight: 600;
  pointer-events: none; font-size: 13.5px;
}
.wk-pbd-money .wk-pbd-input { padding-left: 24px; text-align: right; }
/* kill native number-input spinners (we use type=text but be explicit) */
.wk-pbd-bucket-amt::-webkit-outer-spin-button,
.wk-pbd-bucket-amt::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wk-pbd-bucket-amt { -moz-appearance: textfield; }
.wk-pbd-bucket-del {
  width: 36px; height: 38px; border-radius: 8px;
  border: 1px solid #e2e8f0; background: #fff; color: #94a3b8;
  cursor: pointer; font-size: 18px; line-height: 1;
  transition: all 0.15s;
}
.wk-pbd-bucket-del:hover:not([disabled]) {
  color: #dc2626; border-color: #fca5a5; background: #fef2f2;
}
.wk-pbd-bucket-del[disabled] { opacity: 0.4; cursor: not-allowed; }
.wk-pbd-bucket-total {
  margin-top: 12px; padding: 10px 14px;
  background: #f8fafc; border-radius: 9px; font-size: 13px; color: #475569;
  border: 1px solid #f1f5f9;
}
.wk-pbd-bucket-total strong { color: #0f172a; font-size: 14px; }

/* ── plan grid (step 3) ─────────────────────────────────── */
.wk-pbd-plan-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 14px;
}
.wk-pbd-plan-title {
  font-size: 16px; font-weight: 700; color: #0f172a;
}
.wk-pbd-plan-sub {
  font-size: 12px; color: #94a3b8; margin-top: 3px;
}

.wk-pbd-grid {
  border: 1px solid #e2e8f0; border-radius: 10px;
  overflow: hidden; background: #fff;
}
.wk-pbd-grid-head {
  display: grid;
  grid-template-columns: 130px 1fr 130px 80px 100px 36px;
  gap: 1px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.wk-pbd-gh {
  padding: 9px 10px;
  font-size: 10.5px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.wk-pbd-gh--hrs, .wk-pbd-gh--due { text-align: right; }
.wk-pbd-grid-rows { display: flex; flex-direction: column; }
.wk-pbd-grid-row {
  display: grid;
  grid-template-columns: 130px 1fr 130px 80px 100px 36px;
  gap: 0;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background 0.12s;
  animation: wkPbdRowIn 0.18s ease-out;
}
.wk-pbd-grid-row:last-child { border-bottom: none; }
.wk-pbd-grid-row:hover { background: #fafbff; }
.wk-pbd-cell {
  width: 100%; box-sizing: border-box;
  padding: 9px 10px;
  border: none; background: transparent;
  font: inherit; font-size: 13px; color: #0f172a;
  outline: none;
  border-right: 1px solid #f1f5f9;
  transition: background 0.12s, box-shadow 0.12s;
}
.wk-pbd-cell:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--wt-theme-primary, #4f46e5);
  position: relative; z-index: 1;
  border-radius: 4px;
}
.wk-pbd-cell--num   { text-align: right; font-variant-numeric: tabular-nums; }
.wk-pbd-cell--select {
  appearance: none; -webkit-appearance: none;
  padding-right: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}
.wk-pbd-row-del {
  width: 36px; height: 100%;
  border: none; background: transparent;
  color: #cbd5e1; cursor: pointer;
  font-size: 18px; line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.wk-pbd-row-del:hover { color: #dc2626; background: #fef2f2; }
.wk-pbd-grid-empty {
  padding: 28px 16px; text-align: center;
  font-size: 13px; color: #64748b; background: #f8fafc;
}
.wk-pbd-grid-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 4px 2px;
}
.wk-pbd-grid-totals {
  font-size: 12px; color: #475569; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── footer ─────────────────────────────────────────────── */
.wk-pbd-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}
.wk-pbd-foot-spacer { flex: 1; }
.wk-pbd-foot-hint {
  font-size: 12px; color: #ef4444; font-weight: 600;
  margin-right: 4px;
  animation: wkPbdHintIn 0.18s ease-out;
}
@keyframes wkPbdHintIn {
  from { opacity: 0; transform: translateX(4px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wk-pbd-btn {
  padding: 10px 18px; border-radius: 9px; border: none;
  font: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  transition: all 0.15s;
}
.wk-pbd-btn--sm { padding: 7px 12px; font-size: 12px; }
.wk-pbd-btn[disabled] { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.3); }
.wk-pbd-btn--ghost { background: transparent; color: #475569; border: 1px solid #e2e8f0; }
.wk-pbd-btn--ghost:hover:not([disabled]) { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
.wk-pbd-btn--primary {
  background: var(--wt-theme-primary, #4f46e5); color: #fff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}
.wk-pbd-btn--primary:hover:not([disabled]) {
  background: var(--wt-theme-primary-dark, #4338ca);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.32);
  transform: translateY(-1px);
}
.wk-pbd-btn--save {
  background: linear-gradient(180deg, var(--wt-theme-primary, #4f46e5) 0%, var(--wt-theme-primary-dark, #4338ca) 100%);
  padding: 10px 22px;
}

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 880px) {
  .wk-pbd-overlay.is-open { padding: 0; }
  .wk-pbd-drawer { max-width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .wk-pbd-grid-2 { grid-template-columns: 1fr; }
  .wk-pbd-chips  { grid-template-columns: 1fr 1fr; }
  .wk-pbd-grid-head, .wk-pbd-grid-row {
    grid-template-columns: 110px 1fr 110px 70px 80px 32px;
  }
}
@media (max-width: 580px) {
  .wk-pbd-bucket { grid-template-columns: 1fr 130px 100px 32px; }
  .wk-pbd-grid { font-size: 12px; }
  .wk-pbd-grid-head, .wk-pbd-grid-row {
    grid-template-columns: 90px 1fr 90px 60px 70px 28px;
  }
}

/* AI button sits inline next to the drawer title */
.wk-pbd-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.wk-pbd-title-row .wk-pbd-title { margin: 0; }
