/* ═══════════════════════════════════════════
   Harvey Family App — Kanban
   ═══════════════════════════════════════════ */

/* ── Modal field styles (not in shared.css) ── */
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: .55rem .75rem;
  outline: none;
  -webkit-appearance: none;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--primary-md);
}
.field-textarea {
  resize: vertical;
  min-height: 80px;
}
.field-select {
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888780'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
}
.delete-link {
  display: block;
  width: 100%;
  margin-top: .5rem;
  padding: .5rem;
  background: none;
  border: none;
  color: var(--red);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.delete-link:active { background: var(--red-lt); }

/* ── Board bar ── */
.kb-board-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .35rem 1.25rem .5rem;
  flex-shrink: 0;
}
.kb-board-sel {
  flex: 1;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.kb-icon-btn {
  width: 34px; height: 34px;
  border-radius: 99px;
  background: var(--gray-lt);
  border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

/* ── Columns container ── */
.kb-columns {
  display: flex;
  gap: 10px;
  padding: 0 1.25rem 5rem;
  overflow-x: auto;
  overflow-y: visible;
  flex: 1;
  align-items: flex-start;
  scrollbar-width: thin;
}
.kb-columns::-webkit-scrollbar { height: 4px; }
.kb-columns::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Column ── */
.kb-column {
  flex-shrink: 0;
  width: 260px;
  background: var(--gray-lt);
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
}
.kb-column.move-target {
  border-style: dashed;
  border-color: var(--primary);
  background: var(--primary-lt);
  cursor: pointer;
}
.kb-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .6rem .75rem .5rem;
  flex-shrink: 0;
}
.kb-col-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kb-col-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-col-count {
  font-size: 11px;
  color: var(--muted);
  background: var(--border);
  border-radius: 99px;
  padding: 1px 7px;
  flex-shrink: 0;
}
.kb-col-add {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}
.kb-col-menu-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}
.kb-move-target-label {
  display: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  padding: .3rem 0 .1rem;
}
.kb-column.move-target .kb-move-target-label { display: block; }
.kb-column.move-target .kb-col-add { display: none; }

/* Cards list */
.kb-cards {
  overflow-y: auto;
  padding: .3rem .5rem .5rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.kb-cards::-webkit-scrollbar { width: 3px; }
.kb-cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Card ── */
.kb-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: .55rem .7rem .5rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  transition: box-shadow .15s, opacity .2s;
  border-left: 3px solid transparent;
}
.kb-card:active { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.kb-card.priority-low      { border-left-color: #6b7280; }
.kb-card.priority-medium   { border-left-color: #f59e0b; }
.kb-card.priority-high     { border-left-color: #ef4444; }
.kb-card.priority-critical { border-left-color: #7c3aed; }
.kb-card.is-moving {
  opacity: .45;
  box-shadow: 0 0 0 2px var(--primary);
  pointer-events: none;
}
.kb-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: .25rem;
}
.kb-card-labels {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}
.kb-label-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kb-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: .2rem;
  flex-wrap: wrap;
}
.kb-card-due {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.kb-card-due.overdue { color: #ef4444; font-weight: 600; }
.kb-card-link {
  font-size: 10px;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.kb-priority-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Add column button ── */
.kb-add-col-btn {
  flex-shrink: 0;
  width: 220px;
  min-height: 52px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
}
.kb-add-col-btn:active { background: var(--gray-lt); }

/* ── Move mode overlay hint ── */
.kb-move-hint {
  display: none;
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 99px;
  z-index: 100;
  white-space: nowrap;
  pointer-events: none;
}
.kb-move-hint.show { display: block; }
.kb-cancel-move-btn {
  display: none;
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  z-index: 100;
}
.kb-cancel-move-btn.show { display: block; }

/* ── Empty column ── */
.kb-col-empty {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: .75rem .5rem;
  line-height: 1.5;
}
.kb-col-empty-btn {
  display: block;
  width: 100%;
  padding: .6rem .5rem;
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}

/* ── Modal label picker ── */
.kb-label-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: .3rem;
}
.kb-label-pick-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  color: #fff;
  cursor: pointer;
  opacity: .45;
  border: 2px solid transparent;
  transition: opacity .15s;
}
.kb-label-pick-chip.selected {
  opacity: 1;
  border-color: rgba(0,0,0,.25);
}

/* ── Column menu dropdown ── */
.kb-col-dropdown {
  position: absolute;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 50;
  min-width: 150px;
  overflow: hidden;
}
.kb-col-dropdown-item {
  display: block;
  width: 100%;
  padding: .6rem .9rem;
  font-size: 13px;
  font-family: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.kb-col-dropdown-item:hover, .kb-col-dropdown-item:active { background: var(--gray-lt); }
.kb-col-dropdown-item.danger { color: #ef4444; }

/* ── Manage labels ── */
.kb-label-mgr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .3rem 0;
}
.kb-label-swatch {
  width: 18px; height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
}
