/* ═══════════════════════════════════════════════════════════════
   work-bulk-enhance.css  v5  —  Final staging overlay polish.
   Two-column cards (title left, pills right), no status control,
   scroll-lock, FlowGen chat with typing entrance, apply-all
   de-sync, drag-reorder, park/minimize, polished transitions.
   ═══════════════════════════════════════════════════════════════ */

/* ── Overall shell: wider ── */
.bk-stage-shell {
  width: min(1160px, 96vw);
  border-radius: 20px;
  position: relative;
  transition: box-shadow .3s ease;
}

/* ── SCROLL LOCK when overlay open ── */
body.bk-scroll-lock {
  overflow: hidden !important;
  padding-right: var(--bk-scrollbar-w, 0px);
}
/* Prevent scroll bleed from task list to body */
.bk-stage-list {
  overscroll-behavior: contain;
}

/* ── PARK / MINIMIZE STATE ── */
.bk-stage-overlay.is-parked {
  background: transparent !important;
  backdrop-filter: none !important;
  pointer-events: none;
  opacity: 1;
  transition: background .35s ease, backdrop-filter .35s ease;
}
.bk-stage-overlay.is-parked .bk-stage-shell {
  pointer-events: auto;
  transform: translateX(calc(100% - 52px)) scale(.94);
  opacity: .92;
  border-radius: 20px;
  box-shadow: -4px 0 24px rgba(0,0,0,.18);
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .3s ease, box-shadow .3s ease;
}
.bk-stage-overlay:not(.is-parked) .bk-stage-shell {
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .3s ease, box-shadow .3s ease;
}
.bk-stage-overlay.is-parked .bk-stage-shell:hover {
  transform: translateX(calc(100% - 160px)) scale(.96);
  opacity: 1;
  box-shadow: -8px 0 40px rgba(0,0,0,.22);
}
.bk-stage-overlay.is-parked .bk-park-tab {
  opacity: 1;
  pointer-events: auto;
}

/* Unpark button (floating tab on the right edge when parked) */
.bk-park-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12501;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  border: none;
  border-radius: 12px 0 0 12px;
  padding: 12px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .5px;
  box-shadow: -2px 0 12px rgba(99,102,241,.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, background .2s ease, transform .2s ease;
}
.bk-park-tab:hover {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
}
.bk-park-tab svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
  margin-bottom: 6px;
}

/* Park (minimize) button in header */
.bk-park-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--ink3, #888);
  line-height: 1;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}
.bk-park-btn:hover {
  background: rgba(99,102,241,.08);
  color: var(--wt-theme-primary, #6366f1);
}
.bk-park-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* ═══ AI SIDEBAR: White, wide, FlowGen-style ═══ */
.bk-ai-side {
  width: 380px;
  background: #fff;
  color: #1e293b;
  border-right: 1px solid #e5e7eb;
}

/* Header: unified with main panel */
.bk-ai-head {
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bk-ai-head:active { cursor: grabbing; }

/* AI sparkle icon badge */
.bk-ai-icon-badge {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bk-ai-icon-badge svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; }

.bk-ai-head-title {
  font-size: 14px; font-weight: 700; color: #0f172a; flex: 1;
}
.bk-ai-head-sub {
  font-size: 11px; color: #64748b; font-weight: 400;
}

/* Messages area */
.bk-ai-msgs {
  scrollbar-color: #e2e8f0 transparent;
  padding: 16px 20px;
  gap: 14px;
  background: #fafbfc;
}

/* Message bubbles */
.bk-ai-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.bk-ai-msg--bot {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* Welcome message card style */
.bk-ai-welcome {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #ddd6fe;
  border-radius: 16px;
  padding: 14px 16px;
  animation: bkWelcomeFade .5s .3s ease both;
}
.bk-ai-welcome-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.bk-ai-welcome-badge {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bk-ai-welcome-badge svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 2; }
.bk-ai-welcome-title { font-size: 13px; font-weight: 700; color: #4c1d95; }
.bk-ai-welcome-body { font-size: 12px; color: #5b21b6; line-height: 1.7; }
.bk-ai-welcome-body .bk-wcmd {
  display: inline-block;
  background: rgba(124,58,237,.08);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #7c3aed;
  margin: 2px 1px;
}
@keyframes bkWelcomeFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bk-ai-msg--user {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(124,58,237,.2);
}

/* Typing indicator */
.bk-ai-typing span {
  background: #94a3b8;
}

/* Input bar */
.bk-ai-input {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  gap: 8px;
}
.bk-ai-input input {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.bk-ai-input input::placeholder { color: #94a3b8; }
.bk-ai-input input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
  background: #fff;
}
.bk-ai-send {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  transition: transform .1s, box-shadow .15s;
}
.bk-ai-send:hover { box-shadow: 0 2px 10px rgba(124,58,237,.3); }
.bk-ai-send:active { transform: scale(.9); }

/* ═══ MAIN PANEL HEADER ═══ */
.bk-stage-head {
  padding: 14px 20px;
  cursor: grab;
  user-select: none;
}
.bk-stage-head:active { cursor: grabbing; }
.bk-stage-head h2 { font-size: 15px; }

/* ═══ APPLY-ALL BAR: icon-only triggers ═══ */
.bk-apply-bar {
  flex-wrap: nowrap;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  align-items: center;
}
.bk-apply-bar::-webkit-scrollbar { display: none; }
.bk-apply-bar .bk-al {
  font-size: 10px; white-space: nowrap;
  margin-right: 4px; flex-shrink: 0;
}
/* Hide native selects when enhanced */
.bk-apply-bar select.bk-ab-sel,
.bk-apply-bar input.bk-ab-sel { display: none; }
/* Also hide status native from apply bar */
.bk-apply-bar .bk-apply-status { display: none !important; }

/* ═══ ICON-PILL BUTTONS (notes-todo style) ═══ */
.bk-icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: rgba(0,0,0,.04);
  border-radius: 8px;
  cursor: pointer;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: #475569;
  transition: background .25s ease, color .25s ease, transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}
.bk-icon-pill:hover {
  background: rgba(0,0,0,.07);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.bk-icon-pill:active { transform: scale(.93); }
.bk-icon-pill svg { width: 13px; height: 13px; flex-shrink: 0; }
.bk-icon-pill .bk-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%; flex-shrink: 0;
}

/* Colored states — with smooth color transitions */
.bk-icon-pill[data-field="priority"][data-val="high"] { background: #fff1f1; color: #ef4444; transition: background .3s ease, color .3s ease, transform .15s; }
.bk-icon-pill[data-field="priority"][data-val="medium"] { background: #fef3c7; color: #f59e0b; transition: background .3s ease, color .3s ease, transform .15s; }
.bk-icon-pill[data-field="priority"][data-val="low"] { background: #defbe6; color: #16a34a; transition: background .3s ease, color .3s ease, transform .15s; }
.bk-icon-pill[data-field="project"]:not([data-val=""]) { background: rgba(59,130,246,.08); color: #2563eb; transition: background .3s ease, color .3s ease, transform .15s; }
.bk-icon-pill[data-field="recurring"]:not([data-val=""]):not([data-val="once"]) { background: rgba(139,92,246,.08); color: #7c3aed; transition: background .3s ease, color .3s ease, transform .15s; }
.bk-icon-pill[data-field="goal"]:not([data-val=""]) { background: rgba(139,92,246,.08); color: #8b5cf6; transition: background .3s ease, color .3s ease, transform .15s; }
.bk-icon-pill[data-field="due"][data-has="1"] { background: #faf5ff; color: #7c3aed; transition: background .3s ease, color .3s ease, transform .15s; }
.bk-icon-pill[data-field="due"].is-overdue { background: #fef2f2; color: #ef4444; transition: background .3s ease, color .3s ease, transform .15s; }

/* ═══ POPUP MENUS (notes-todo style, position:fixed) ═══ */
.bk-popup {
  position: fixed;
  z-index: 100001;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04);
  padding: 4px;
  min-width: 150px;
  max-height: 280px;
  overflow-y: auto;
  animation: bkPopIn .15s ease both;
  scrollbar-width: thin;
}
@keyframes bkPopIn {
  from { opacity: 0; transform: translateY(-4px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.bk-popup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background .12s;
  font-family: inherit;
  white-space: nowrap;
}
.bk-popup-item:hover { background: rgba(99,102,241,.06); }
.bk-popup-item.is-selected {
  background: rgba(99,102,241,.1);
  font-weight: 700;
  color: #4f46e5;
}
.bk-popup-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.bk-popup-item .bk-pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0;
}
.bk-popup-divider {
  height: 1px;
  background: rgba(0,0,0,.06);
  margin: 3px 0;
}
/* Custom recurring row */
.bk-popup-custom-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: #64748b;
}
.bk-popup-custom-row input,
.bk-popup-custom-row select {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11px;
  outline: none;
  font-family: inherit;
}
.bk-popup-custom-row input:focus,
.bk-popup-custom-row select:focus { border-color: #7c3aed; }
.bk-popup-custom-row input[type="number"] { width: 48px; }
.bk-popup-set-btn {
  border: none;
  background: #7c3aed;
  color: #fff;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* ═══ MINI CALENDAR (notes-todo style) ═══ */
.bk-mini-cal {
  position: fixed;
  z-index: 100001;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04);
  padding: 10px;
  width: 220px;
  animation: bkPopIn .15s ease both;
  user-select: none;
}
.bk-cal-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}
.bk-cal-title { font-size: 12px; font-weight: 700; color: #0f172a; }
.bk-cal-nav {
  width: 24px; height: 24px; border-radius: 6px;
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; font-size: 14px; transition: background .12s;
}
.bk-cal-nav:hover { background: rgba(0,0,0,.06); }
.bk-cal-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr);
  text-align: center; margin-bottom: 2px;
}
.bk-cal-wd { font-size: 9px; font-weight: 700; color: #94a3b8; padding: 2px 0; }
.bk-cal-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.bk-cal-day {
  width: 28px; height: 28px; border-radius: 8px;
  border: none; background: transparent; cursor: pointer;
  font-size: 10px; font-weight: 500; color: #334155;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s, color .1s; margin: 0 auto;
}
.bk-cal-day:hover { background: rgba(99,102,241,.08); }
.bk-cal-day.is-today { font-weight: 800; color: #6366f1; }
.bk-cal-day.is-selected { background: #6366f1; color: #fff; font-weight: 700; }
.bk-cal-day.is-other { opacity: .3; }
.bk-cal-clear {
  display: block; width: 100%; margin-top: 6px; padding: 5px;
  border: none; background: rgba(239,68,68,.06); color: #ef4444;
  border-radius: 6px; font-size: 10px; font-weight: 600;
  cursor: pointer; transition: background .12s;
}
.bk-cal-clear:hover { background: rgba(239,68,68,.12); }

/* ═══ TASK CARDS: two-column — title left, pills right ═══ */
.bk-card {
  border-radius: 12px;
  min-height: 56px;
  transition: box-shadow .3s cubic-bezier(.22,1,.36,1), transform .3s cubic-bezier(.22,1,.36,1), border-color .25s ease, opacity .3s ease;
  animation: bkCardIn .3s cubic-bezier(.22,1,.36,1) both;
}
@keyframes bkCardIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: none; }
}
/* Stagger cards */
.bk-card:nth-child(1) { animation-delay: 0s; }
.bk-card:nth-child(2) { animation-delay: .03s; }
.bk-card:nth-child(3) { animation-delay: .06s; }
.bk-card:nth-child(4) { animation-delay: .09s; }
.bk-card:nth-child(5) { animation-delay: .12s; }
.bk-card:nth-child(n+6) { animation-delay: .15s; }

/* Top accent bar: smooth color transitions */
.bk-card::before {
  transition: background .35s ease;
}

/* Unchecked card — smooth fade */
.bk-card.is-unchecked {
  opacity: .35 !important;
  transform: none !important;
  transition: opacity .35s ease, transform .3s ease, box-shadow .3s ease;
}

/* ── DRAG-REORDER ── */
.bk-card .bk-drag-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
  cursor: grab;
  color: #cbd5e1;
  padding: 0 2px;
  margin-right: -4px;
  border-radius: 4px;
  transition: color .15s, background .12s;
  align-self: stretch;
  touch-action: none;
}
.bk-card .bk-drag-grip:hover { color: #94a3b8; background: rgba(0,0,0,.03); }
.bk-card .bk-drag-grip:active { cursor: grabbing; }
.bk-card .bk-drag-grip svg { width: 12px; height: 12px; }
.bk-card.is-dragging {
  opacity: .5;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  transform: scale(.98);
  z-index: 10;
  transition: none;
}
.bk-card.is-drag-over-above {
  border-top: 2px solid var(--wt-theme-primary, #6366f1) !important;
  margin-top: -1px;
}
.bk-card.is-drag-over-below {
  border-bottom: 2px solid var(--wt-theme-primary, #6366f1) !important;
  margin-bottom: -1px;
}

/* Drag ghost (floating clone) */
.bk-drag-ghost {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  opacity: .88;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22), 0 0 0 2px var(--wt-theme-primary, #6366f1);
  transform: rotate(1.5deg) scale(1.02);
  transition: none;
  overflow: hidden;
}

/* Delete button on cards */
.bk-card-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s, background .12s, color .12s;
  z-index: 2;
  padding: 0;
}
.bk-card:hover .bk-card-del { opacity: 1; }
.bk-card-del:hover { background: #fef2f2; color: #ef4444; }
.bk-card-del svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Delete confirm state */
.bk-card.bk-del-confirm {
  border-color: #fca5a5 !important;
  box-shadow: 0 0 0 2px rgba(239,68,68,.12) !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.bk-card.bk-del-confirm .bk-card-del {
  opacity: 1;
  width: auto;
  background: #ef4444;
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
}
.bk-del-confirm-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* Add-task input row (matches main .mw-quick-add bar) */
.bk-add-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px dashed var(--border, #e2e8f0);
  border-radius: 12px;
  transition: border-color .2s, background .2s, box-shadow .2s;
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
}
.bk-add-task-row:focus-within {
  border-color: var(--wt-theme-primary, #6366f1);
  border-style: solid;
  background: rgba(99,102,241,.03);
}
.bk-add-task-row.is-img-drag {
  border-color: var(--wt-theme-primary, #6366f1) !important;
  background: rgba(99,102,241,.06) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.bk-add-task-row .bk-add-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink, #111);
  outline: none;
  font-family: inherit;
  padding: 4px 0;
}
.bk-add-task-row .bk-add-input::placeholder { color: var(--ink4, #94a3b8); }
.bk-add-task-row .bk-add-task-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--wt-theme-primary, #6366f1);
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  flex-shrink: 0;
}
.bk-add-task-row .bk-add-task-btn:hover { opacity: .85; }
.bk-add-task-row .bk-add-task-btn:disabled { opacity: .3; cursor: not-allowed; }
.bk-add-task-row .bk-add-task-btn:active { transform: scale(.93); }

/* AI toggle pill in add-task row (mirrors .mw-qa-ai-toggle) */
.bk-add-ai-toggle {
  height: 26px;
  padding: 0 8px;
  gap: 4px;
  border: 1.5px solid rgba(139,92,246,.25);
  background: rgba(139,92,246,.06);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #7c3aed;
  font-family: inherit;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.bk-add-ai-toggle svg { width: 12px; height: 12px; flex-shrink: 0; }
.bk-add-ai-label { font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.bk-add-ai-toggle:hover {
  background: rgba(139,92,246,.14);
  border-color: rgba(139,92,246,.4);
  box-shadow: 0 2px 8px rgba(139,92,246,.1);
}
.bk-add-ai-toggle:active { transform: scale(.93); }

/* ── Add-task option buttons (mirrors main page .qa-options) ── */
.bk-add-opts {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.bk-add-opt-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all .2s cubic-bezier(.22,1,.36,1);
  position: relative;
  padding: 0;
}
.bk-add-opt-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink4, #94a3b8);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s ease;
}
.bk-add-opt-btn:hover { background: var(--bg, #f1f5f9); border-color: var(--border-s, #e2e8f0); }
.bk-add-opt-btn:hover svg { stroke: var(--ink2, #555); }
.bk-add-opt-btn.is-set { background: var(--c-blue-bg, rgba(0,75,124,.08)); border-color: var(--c-blue-bg, rgba(0,75,124,.15)); }
.bk-add-opt-btn.is-set svg { stroke: var(--c-blue, #3b82f6); }
.bk-add-opt-btn.is-colored { background: color-mix(in srgb, var(--qa-btn-color) 10%, transparent); border-color: color-mix(in srgb, var(--qa-btn-color) 20%, transparent); }
.bk-add-opt-btn.is-colored svg { stroke: var(--qa-btn-color); }
.bk-add-opt-divider {
  width: 1px;
  height: 16px;
  background: var(--border-s, #e2e8f0);
  margin: 0 4px;
  flex-shrink: 0;
}
/* Show opts on hover/focus like main page */
.bk-add-task-row .bk-add-opts { opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.bk-add-task-row:focus-within .bk-add-opts,
.bk-add-task-row:hover .bk-add-opts { opacity: 1; pointer-events: auto; }

/* Sort dropdown trigger */
.bk-sort-trigger {
  font-size: 11px;
  font-weight: 700;
  background: none;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--ink3, #666);
  transition: background .15s, color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.bk-sort-trigger:hover {
  border-color: var(--wt-theme-primary, #6366f1);
  color: var(--wt-theme-primary, #6366f1);
  background: rgba(99,102,241,.04);
}
.bk-sort-trigger svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

/* AI image upload button */
.bk-ai-img-btn {
  background: none;
  border: none;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  transition: color .15s, background .15s;
  flex-shrink: 0;
  padding: 0;
}
.bk-ai-img-btn:hover { color: #6366f1; background: rgba(99,102,241,.06); }
.bk-ai-img-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.bk-ai-img-file { display: none; }
/* Image thumbnail in chat */
.bk-ai-msg--user img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 10px;
  margin-top: 6px;
  display: block;
}

/* Row number (priority rank) */
.bk-row-num {
  font-size: 9px;
  font-weight: 800;
  color: #94a3b8;
  min-width: 16px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bk-card-left {
  padding: 10px 0 10px 12px;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
/* card-content: only title, no meta below */
.bk-card-content { gap: 0; }
.bk-card-title {
  line-height: 1.5;
  white-space: normal !important;
  overflow: visible !important;
}

/* Move meta to the RIGHT column */
.bk-card-right {
  padding: 8px 12px 8px 8px;
  gap: 5px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  max-width: 280px;
  min-width: 140px;
}
/* The right-side separator line */
.bk-card-right::before { display: none; }

/* Move the meta row INTO the right side (done by JS) */
.bk-card-meta {
  gap: 4px;
  margin-top: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Hide old native selects/inputs once enhanced */
.bk-card-meta select.bk-pill-sel,
.bk-card-meta input.bk-date-pill { display: none; }
/* Assignee popup uses bk-popup styles (no hidden select) */

/* Hide status pill on cards */
.bk-card-meta .bk-icon-pill[data-field="status"],
.bk-card-meta select.bk-pill--status { display: none !important; }

/* Avatar click styling */
.bk-card-avatar { cursor: pointer; transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease, background .3s ease; }
.bk-card-avatar:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.bk-card-avatar:active { transform: scale(.95); }

/* ═══ FOOTER ═══ */
.bk-stage-foot { padding: 12px 20px; }

/* ═══ OVERLAY ENTRANCE ═══ */
.bk-stage-overlay {
  transition: opacity .3s ease, backdrop-filter .3s ease;
}

/* ═══ DRAG STATE ═══ */
.bk-stage-shell.is-dragging {
  box-shadow: 0 32px 100px rgba(0,0,0,.28);
  transition: none;
}
.bk-stage-overlay.is-dragged {
  align-items: flex-start;
  justify-content: flex-start;
}
.bk-stage-overlay.is-dragged .bk-stage-shell {
  position: absolute;
  margin: 0;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .bk-stage-shell { flex-direction: column; }
  .bk-ai-side {
    width: 100%; max-height: 40vh;
    border-right: none; border-bottom: 1px solid #e5e7eb;
  }
  .bk-ai-head, .bk-stage-head { cursor: default; }
  .bk-card-right { max-width: none; }
}
@media (max-width: 700px) {
  .bk-ai-side { display: flex !important; max-height: 35vh; }
}
