/* kanban.css — Kanban board, calendar, task modal styles
 * Flat Design: clean lines, bold status colors, no ornate shadows,
 * fast transitions (150-200ms), typography-focused.
 */

/* ── Drawer slide animation ────────────────────────────── */
.kanban-slide-enter { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.kanban-slide-enter-start { transform: translateX(100%); }
.kanban-slide-enter-end { transform: translateX(0); }
.kanban-slide-leave { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.kanban-slide-leave-start { transform: translateX(0); }
.kanban-slide-leave-end { transform: translateX(100%); }

/* ── Drawer layout ─────────────────────────────────────── */
.kanban-drawer {
  position: fixed; top: 0; right: 0;
  width: 100vw; height: 100vh;
  background: var(--paper, #fafafa);
  z-index: 1000;
  display: flex; flex-direction: column; overflow: hidden;
}

/* ── Header — clean bar with toggles ───────────────────── */
.kanban-drawer-head {
  padding: 0 32px;
  height: 64px;
  background: var(--card, #fff);
  border-bottom: 1px solid var(--border, #e5e5e5);
  display: flex; justify-content: space-between; align-items: center;
}
.kanban-head-left  { display: flex; align-items: center; gap: 24px; }
.kanban-head-right { display: flex; align-items: center; gap: 12px; }
.kanban-drawer-head h3 {
  font-weight: 700; font-size: 20px; margin: 0;
  letter-spacing: -0.03em; color: var(--ink, #0a0a0a);
}
.kanban-drawer-body {
  flex: 1; overflow-y: auto; overflow-x: auto;
  padding: 32px;
  background: var(--paper, #fafafa);
}

/* ── View toggles — pill switcher ──────────────────────── */
.kanban-view-toggles {
  display: flex;
  background: var(--paper-2, #f4f4f5);
  padding: 4px; border-radius: 10px;
  border: 1px solid var(--border, #e5e5e5);
}
.kanban-view-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-3, #525252); background: transparent;
  border: none; cursor: pointer;
  transition: all 150ms ease;
}
.kanban-view-btn:hover { color: var(--ink, #0a0a0a); background: rgba(0,0,0,0.03); }
.kanban-view-btn.is-active {
  background: var(--card, #fff); color: var(--ink, #0a0a0a);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Board columns — flat, clean ───────────────────────── */
.kanban-board {
  display: flex; gap: 24px;
  height: 100%; align-items: flex-start;
  min-width: min-content;
}
.kanban-column {
  flex: 0 0 340px;
  background: var(--card, #fff);
  border-radius: 16px; padding: 0;
  display: flex; flex-direction: column;
  max-height: 100%;
  border: 1px solid var(--border, #e5e5e5);
  overflow: hidden;
}
.kanban-column-header {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 13px;
  color: var(--ink, #0a0a0a);
  padding: 18px 20px 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border, #e5e5e5);
  background: var(--paper, #fafafa);
}
.kb-col-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.dot-todo { background: var(--ink-4, #a3a3a3); }
.dot-prog { background: var(--info, #2563eb); }
.dot-done { background: var(--ok, #059669); }
.kanban-badge {
  margin-left: auto;
  background: var(--paper-2, #f4f4f5);
  color: var(--ink-3, #525252);
  padding: 2px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--border, #e5e5e5);
  min-width: 28px; text-align: center;
}
.kanban-column-cards {
  display: flex; flex-direction: column; gap: 0;
  overflow-y: auto;
  padding: 12px;
}

/* ── Cards — clean flat tiles with colored left edge ───── */
.kanban-card {
  background: var(--paper, #fafafa);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 150ms ease;
  position: relative;
  margin-bottom: 10px;
  border-left: 4px solid var(--ink-4, #a3a3a3);
}
.kanban-card.has-date     { border-left-color: var(--info, #2563eb); }
.kanban-card:not(.has-date) { border-left-color: var(--ink-4, #a3a3a3); }
.kanban-card:hover {
  background: var(--card, #fff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.kanban-card--done { opacity: 0.5; }
.kanban-card--done .kanban-card-title { text-decoration: line-through; }
.kanban-card-title {
  font-weight: 600; font-size: 14px; line-height: 1.4;
  color: var(--ink, #0a0a0a); margin-bottom: 8px;
}
.kanban-card-meta { margin-bottom: 8px; }
.kc-desc-hint {
  font-size: 12px; color: var(--ink-4, #a3a3a3);
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 500;
}
.kanban-card-footer {
  display: flex; align-items: center; gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #e5e5e5);
}
.kc-date-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--info-tint, #dbeafe);
  color: var(--info, #2563eb);
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--info, #2563eb) 20%, transparent);
}
.kc-date-pill--done { opacity: 0.5; }
.kc-time    { opacity: 0.7; font-weight: 500; }
.kc-no-date { font-size: 12px; color: var(--ink-4, #a3a3a3); font-style: italic; }

/* ── Add-Task button — dashed, inviting ────────────────── */
.kanban-add-btn {
  align-self: stretch;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px;
  border: 2px dashed var(--border, #e5e5e5) !important;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-3, #525252);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  margin: 0 20px 20px;
}
.kanban-add-btn:hover {
  border-color: var(--accent, #059669) !important;
  color: var(--accent, #059669);
  background: var(--accent-tint, rgba(5,150,105,0.06));
}

/* ── Close / icon buttons — consistent ─────────────────── */
.kanban-close-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e5e5);
  background: var(--card, #fff);
  color: var(--ink-3, #525252);
  cursor: pointer;
  transition: all 150ms ease;
}
.kanban-close-btn:hover {
  background: var(--paper-2, #f4f4f5);
  color: var(--ink, #0a0a0a);
}

/* ── Calendar ──────────────────────────────────────────── */
.kcal { max-width: 960px; margin: 0 auto; width: 100%; }
.kcal-nav {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.kcal-month-label {
  font-size: 22px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink, #0a0a0a); min-width: 200px; text-align: center;
}
.kcal-today-btn { margin-left: auto; }
.kcal-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr);
  gap: 2px; margin-bottom: 4px;
}
.kcal-wd {
  text-align: center; font-size: 11px; font-weight: 700;
  color: var(--ink-4, #a3a3a3); padding: 10px 0;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.kcal-grid {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 2px;
  background: var(--border, #e5e5e5); border-radius: 14px;
  overflow: hidden; border: 1px solid var(--border, #e5e5e5);
}
.kcal-cell {
  background: var(--card, #fff); min-height: 110px;
  padding: 8px 10px; display: flex; flex-direction: column;
  transition: background 150ms ease;
}
.kcal-cell:hover:not(.is-empty) { background: var(--paper-2, #f4f4f5); }
.kcal-cell.is-empty { background: var(--paper, #fafafa); }
.kcal-cell.is-today { background: var(--accent-soft, #dcfce7); }
.kcal-cell.is-today .kcal-day {
  background: var(--accent, #059669); color: #fff; border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.kcal-day {
  font-size: 13px; font-weight: 600;
  color: var(--ink-3, #525252); margin-bottom: 6px;
}
.kcal-dots { display: flex; flex-direction: column; gap: 3px; overflow: hidden; flex: 1; }
.kcal-dot-entry {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 600; cursor: pointer; transition: opacity 100ms;
}
.kcal-dot-entry:hover { opacity: 0.7; }
.kcal-dot-entry.st-todo {
  background: var(--paper-2, #f4f4f5); color: var(--ink-3, #525252);
  border-left: 3px solid var(--ink-4, #a3a3a3);
}
.kcal-dot-entry.st-in_progress {
  background: var(--info-tint, #dbeafe); color: var(--info, #2563eb);
  border-left: 3px solid var(--info, #2563eb);
}
.kcal-dot-entry.st-done {
  background: var(--ok-tint, #dcfce7); color: var(--ok, #059669);
  border-left: 3px solid var(--ok, #059669); text-decoration: line-through;
}
.kcal-more {
  font-size: 10px; color: var(--ink-4, #a3a3a3);
  padding: 2px 8px; font-weight: 700;
}

/* ── Calendar undated section ──────────────────────────── */
.kcal-undated {
  margin-top: 24px; background: var(--card, #fff);
  border: 1px solid var(--border, #e5e5e5); border-radius: 14px;
  padding: 20px;
}
.kcal-undated-head {
  font-weight: 700; font-size: 14px; color: var(--ink-3, #525252);
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.kcal-undated-list { display: flex; flex-direction: column; gap: 8px; }
.kcal-undated-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--paper, #fafafa); border: 1px solid var(--border, #e5e5e5);
  cursor: pointer; transition: all 150ms ease;
}
.kcal-undated-item:hover {
  background: var(--paper-2, #f4f4f5);
  transform: translateX(4px);
}
.kcal-undated-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.st-todo        { background: var(--ink-4, #a3a3a3); }
.st-in_progress { background: var(--info, #2563eb); }
.st-done        { background: var(--ok, #059669); }
.kcal-undated-title {
  flex: 1; font-size: 14px; font-weight: 600;
  color: var(--ink, #0a0a0a);
}
.kcal-undated-status {
  font-size: 11px; color: var(--ink-4, #a3a3a3);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}

/* ── Task modal fields ─────────────────────────────────── */
.ktm-field { margin-bottom: 20px; }
.ktm-field .field-label {
  display: block; font-size: 12px; color: var(--ink-3, #525252);
  margin-bottom: 8px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.ktm-row { display: flex; gap: 16px; }
.ktm-field--half { flex: 1; }
.ktm-status-pills { display: flex; gap: 10px; }
.ktm-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  border: 2px solid var(--border, #e5e5e5);
  background: var(--paper, #fafafa); color: var(--ink-3, #525252);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 150ms ease;
}
.ktm-pill:hover {
  border-color: var(--ink-4, #a3a3a3);
  background: var(--paper-2, #f4f4f5);
}
.ktm-pill.is-active {
  border-color: var(--ink, #0a0a0a); color: var(--ink, #0a0a0a);
  background: var(--card, #fff);
}
.ktm-pill-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .kanban-slide-enter,
  .kanban-slide-leave,
  .kanban-card,
  .kanban-view-btn,
  .kanban-add-btn,
  .kcal-undated-item,
  .ktm-pill { transition: none !important; }
}
