/* ── CSS custom properties ── */
:root {
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-border: #e2e6ea;
  --color-text: #1a1d23;
  --color-text-muted: #6b7280;
  --color-primary: #378ADD;
  --color-primary-dark: #2a6ab0;
  --color-danger: #e53e3e;
  --color-danger-dark: #c53030;
  --color-sidebar-bg: #1e2330;
  --color-sidebar-text: #cdd5e0;
  --color-sidebar-hover: #2d3448;
  --color-sidebar-active: #3a4260;
  --color-gantt-header: #f8f9fb;
  --color-gantt-today: rgba(55, 138, 221, 0.12);
  --color-gantt-row-odd: #ffffff;
  --color-gantt-row-even: #f9fafb;
  --color-gantt-line: #e9ecef;
  --color-gantt-weekend: #f3f4f6;

  --sidebar-width: 260px;
  --mobile-header-height: 56px;
  --toolbar-height: 52px;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.18);

  --transition: 200ms ease;

  --gantt-label-width: 180px;
  --gantt-day-width: 36px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow: hidden;
}
button { cursor: pointer; font: inherit; border: none; background: none; }
input, select, textarea { font: inherit; }
label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 4px; color: var(--color-text); }

/* ── Layout ── */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Mobile header ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--mobile-header-height);
  background: var(--color-sidebar-bg);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 100;
  box-shadow: var(--shadow);
}
.mobile-header .app-title { color: #fff; font-size: 1.1rem; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Sidebar overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 110;
}
.sidebar-overlay.visible { display: block; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  z-index: 120;
  position: relative;
}
.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  cursor: ew-resize;
  z-index: 5;
  background: transparent;
  transition: background 0.15s;
}
.sidebar-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 1px;
  transform: translateY(-50%);
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.sidebar-resize-handle:hover::after,
.sidebar-resize-handle.dragging::after {
  background: rgba(255,255,255,0.25);
}
@media (max-width: 767px) {
  .sidebar-resize-handle { display: none; }
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
}
.sidebar-header .app-title { color: #fff; font-size: 1.1rem; font-weight: 700; }
.sidebar-close { display: none; color: var(--color-sidebar-text); font-size: 1.1rem; padding: 6px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  min-height: 36px;
  transition: background var(--transition), border-color var(--transition);
}
.btn:hover { background: #f0f2f5; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn-danger:hover { background: var(--color-danger-dark); border-color: var(--color-danger-dark); }
.btn-full { width: calc(100% - 32px); margin: 0 16px 16px; }
.btn-sm { padding: 5px 10px; font-size: 0.8125rem; min-height: 32px; }
.btn-icon {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--color-border); color: var(--color-text); }

/* ── Project list ── */
.project-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 16px;
}
.project-item {
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  overflow: hidden;
}
.project-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  cursor: pointer;
  min-height: 44px;
  color: var(--color-sidebar-text);
  transition: background var(--transition);
}
.project-header:hover { background: var(--color-sidebar-hover); border-radius: var(--radius-sm); }
.project-header.active { background: var(--color-sidebar-active); border-radius: var(--radius-sm); }
.project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.project-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-header:hover .project-actions { opacity: 1; }
.project-actions .btn-icon { color: var(--color-sidebar-text); width: 28px; height: 28px; min-height: 28px; font-size: 0.8rem; }
.project-actions .btn-icon:hover { background: rgba(255,255,255,0.12); color: #fff; }
.project-chevron {
  font-size: 0.65rem;
  transition: transform var(--transition);
  color: var(--color-sidebar-text);
  flex-shrink: 0;
}
.project-chevron.open { transform: rotate(90deg); }

.task-list-sidebar {
  display: none;
  padding: 0 0 4px 32px;
}
.task-list-sidebar.open { display: block; }
.task-item-sidebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 7px 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-sidebar-text);
  font-size: 0.8125rem;
  min-height: 36px;
  transition: background var(--transition);
}
.task-item-sidebar:hover { background: var(--color-sidebar-hover); }
.task-item-sidebar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.5;
}

.add-task-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 0;
  color: var(--color-primary);
  font-size: 0.8125rem;
  min-height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.add-task-btn:hover { background: var(--color-sidebar-hover); }

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Gantt toolbar ── */
.gantt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--toolbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  gap: 12px;
}
.gantt-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gantt-period {
  font-weight: 600;
  font-size: 0.9375rem;
  min-width: 160px;
  text-align: center;
}
.gantt-zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}
.gantt-zoom select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  background: var(--color-surface);
  cursor: pointer;
}

/* ── Gantt chart ── */
.gantt-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.gantt-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
}
.gantt-container {
  display: inline-block;
  min-width: 100%;
}

/* Header row */
.gantt-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-gantt-header);
  border-bottom: 2px solid var(--color-border);
}
.gantt-header-label {
  width: var(--gantt-label-width);
  min-width: var(--gantt-label-width);
  flex-shrink: 0;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-right: 1px solid var(--color-border);
  position: sticky;
  left: 0;
  background: var(--color-gantt-header);
  z-index: 11;
}
.gantt-header-days {
  display: flex;
  flex: 1;
}
.gantt-header-month {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
}
.gantt-header-month-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 4px 8px 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
}
.gantt-header-month-days {
  display: flex;
}
.gantt-day-cell {
  width: var(--gantt-day-width);
  min-width: var(--gantt-day-width);
  text-align: center;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  padding: 3px 0;
  border-right: 1px solid var(--color-gantt-line);
  user-select: none;
}
.gantt-day-cell.weekend { background: var(--color-gantt-weekend); }
.gantt-day-cell.today { background: var(--color-gantt-today); color: var(--color-primary); font-weight: 700; }
.gantt-day-num {
  display: block;
  line-height: 1;
}
.gantt-day-name {
  display: block;
  font-size: 0.6rem;
  opacity: 0.75;
}

/* Body rows */
.gantt-body { position: relative; }

.gantt-project-row {
  display: flex;
  background: #e8edf2;
  border-bottom: 1px solid var(--color-border);
  min-height: 36px;
}
.gantt-project-label {
  width: var(--gantt-label-width);
  min-width: var(--gantt-label-width);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-right: 1px solid var(--color-border);
  border-left: 4px solid transparent;
  position: sticky;
  left: 0;
  background: #e8edf2;
  z-index: 5;
}
.gantt-project-cells {
  flex: 1;
  display: flex;
  align-items: center;
}
.gantt-project-day-cell {
  width: var(--gantt-day-width);
  min-width: var(--gantt-day-width);
  height: 36px;
  border-right: 1px solid var(--color-gantt-line);
  flex-shrink: 0;
}
.gantt-project-day-cell.weekend { background: var(--color-gantt-weekend); }
.gantt-project-day-cell.today { background: var(--color-gantt-today); }

.gantt-task-row {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  min-height: 44px;
  position: relative;
}
.gantt-task-row:nth-child(even) { background: var(--color-gantt-row-even); }
.gantt-task-row:nth-child(odd) { background: var(--color-gantt-row-odd); }

.gantt-task-label {
  width: var(--gantt-label-width);
  min-width: var(--gantt-label-width);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 24px;
  font-size: 0.8rem;
  border-right: 1px solid var(--color-border);
  position: sticky;
  left: 0;
  z-index: 5;
  cursor: pointer;
  transition: background var(--transition);
}
.gantt-task-row:nth-child(even) .gantt-task-label { background: var(--color-gantt-row-even); }
.gantt-task-row:nth-child(odd) .gantt-task-label { background: var(--color-gantt-row-odd); }
.gantt-task-label:hover { background: #eef2f7 !important; }
.gantt-task-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-task-cells {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}
.gantt-task-day-cell {
  width: var(--gantt-day-width);
  min-width: var(--gantt-day-width);
  height: 44px;
  border-right: 1px solid var(--color-gantt-line);
  flex-shrink: 0;
}
.gantt-task-day-cell.weekend { background: var(--color-gantt-weekend); }
.gantt-task-day-cell.today { background: var(--color-gantt-today); }

/* Task bar */
.gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  transition: filter var(--transition), box-shadow var(--transition);
  z-index: 2;
  min-width: 4px;
}
.gantt-bar:hover {
  filter: brightness(0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.gantt-bar-progress {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(255,255,255,0.22);
  pointer-events: none;
}
.gantt-bar-label {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.gantt-bar-dur {
  opacity: 0.65;
  font-size: 0.68rem;
  font-weight: 400;
  margin-left: 3px;
}
.gantt-bar-overdue {
  background-image: repeating-linear-gradient(
    -45deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 5px,
    rgba(0,0,0,0.15) 5px, rgba(0,0,0,0.15) 10px
  );
}
.gantt-bar-done { opacity: 0.65; }

/* Today line */
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-primary);
  pointer-events: none;
  z-index: 6;
}
.gantt-today-label {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Gantt stats bar ── */
.gantt-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.gantt-stats-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.gantt-stat { color: var(--color-text-muted); }
.gantt-stat b { color: var(--color-text); font-weight: 700; }
.gantt-stat.g-done b { color: #22c55e; }
.gantt-stat.g-prog b { color: var(--color-primary); }
.gantt-stat.g-overdue b { color: #ef4444; }
.gantt-stat-sep { color: var(--color-border); user-select: none; }
.gantt-nav-inline {
  background: rgba(0,0,0,0.06);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 28px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.gantt-nav-inline:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* ── Task status dot ── */
.gantt-task-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Project label ── */
.gantt-proj-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-proj-count {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ── Row hover ── */
.gantt-task-row:hover { background: rgba(55,138,221,0.05); }
.gantt-task-row:hover .gantt-task-label { background: #edf2f8 !important; }

/* ── Overdue row ── */
.gantt-task-row.is-overdue .gantt-task-label-text { color: #ef4444; }

/* ── Milestone ── */
.gantt-milestone {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(-50%);
  font-size: 15px;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
  transition: transform var(--transition), filter var(--transition);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}
.gantt-milestone:hover {
  transform: translateY(-50%) translateX(-50%) scale(1.25);
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
}

/* ── Week number in header ── */
.gantt-day-name.is-week {
  color: var(--color-primary);
  font-weight: 700;
  opacity: 1;
  font-size: 0.58rem;
}

/* ── Tooltip ── */
.gantt-tooltip {
  position: fixed;
  z-index: 1000;
  background: #1c2235;
  color: #e8edf5;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.8rem;
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms;
  max-width: 230px;
  min-width: 170px;
  border: 1px solid rgba(255,255,255,0.09);
}
.gantt-tooltip.visible { opacity: 1; }
.gantt-tip-title { font-weight: 700; font-size: 0.875rem; margin-bottom: 3px; line-height: 1.3; }
.gantt-tip-proj { font-size: 0.75rem; margin-bottom: 9px; opacity: 0.85; }
.gantt-tip-rows { display: flex; flex-direction: column; gap: 4px; }
.gantt-tip-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; }
.gantt-tip-row span { color: rgba(255,255,255,0.45); }
.gantt-tip-row strong { color: #e8edf5; text-align: right; }
.gantt-tip-note {
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px;
}
.gantt-tip-overdue { margin-top: 7px; font-size: 0.75rem; color: #f87171; font-weight: 600; }

/* ── Gantt dark theme (matches kanban) ── */
#ganttView { background: #12151c; }
#ganttView .gantt-scroll { background: #12151c; }

#ganttView .gantt-stats-bar {
  background: #1a1f2e;
  border-bottom-color: rgba(255,255,255,0.06);
}
#ganttView .gantt-stat { color: #8a93a8; }
#ganttView .gantt-nav-inline {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #8a93a8;
}
#ganttView .gantt-nav-inline:hover {
  background: rgba(255,255,255,0.12);
  color: #c5cedd;
}
#ganttView .gantt-stat b { color: #e8edf5; }
#ganttView .gantt-stat-sep { color: rgba(255,255,255,0.15); }

#ganttView .gantt-header {
  background: #1a1f2e;
  border-bottom-color: rgba(255,255,255,0.08);
}
#ganttView .gantt-header-label {
  background: #1a1f2e;
  color: #8a93a8;
  border-right-color: rgba(255,255,255,0.08);
}
#ganttView .gantt-header-month { border-right-color: rgba(255,255,255,0.07); }
#ganttView .gantt-header-month-label {
  color: #8a93a8;
  border-bottom-color: rgba(255,255,255,0.06);
}
#ganttView .gantt-day-cell {
  color: #8a93a8;
  border-right-color: rgba(255,255,255,0.04);
}
#ganttView .gantt-day-cell.weekend { background: rgba(255,255,255,0.025); }
#ganttView .gantt-day-cell.today { background: rgba(55,138,221,0.18); color: #60abf8; }

#ganttView .gantt-project-row { border-bottom-color: rgba(255,255,255,0.07); }
#ganttView .gantt-project-label {
  color: #e8edf5;
  border-right-color: rgba(255,255,255,0.07);
}
#ganttView .gantt-project-day-cell { border-right-color: rgba(255,255,255,0.04); }
#ganttView .gantt-project-day-cell.weekend { background: rgba(255,255,255,0.025); }
#ganttView .gantt-project-day-cell.today { background: rgba(55,138,221,0.12); }

#ganttView .gantt-task-row { border-bottom-color: rgba(255,255,255,0.04); }
#ganttView .gantt-task-row:nth-child(even) { background: #151923; }
#ganttView .gantt-task-row:nth-child(odd)  { background: #12151c; }
#ganttView .gantt-task-row:nth-child(even) .gantt-task-label { background: #151923; }
#ganttView .gantt-task-row:nth-child(odd)  .gantt-task-label { background: #12151c; }
#ganttView .gantt-task-label {
  color: #c5cedd;
  border-right-color: rgba(255,255,255,0.06);
}
#ganttView .gantt-task-label:hover { background: #1d2338 !important; }
#ganttView .gantt-task-day-cell { border-right-color: rgba(255,255,255,0.04); }
#ganttView .gantt-task-day-cell.weekend { background: rgba(255,255,255,0.025); }
#ganttView .gantt-task-day-cell.today { background: rgba(55,138,221,0.1); }

#ganttView .gantt-task-row:hover { background: rgba(55,138,221,0.07); }
#ganttView .gantt-task-row:hover .gantt-task-label { background: #1d2338 !important; }
#ganttView .gantt-task-row.is-overdue .gantt-task-label-text { color: #f87171; }

/* ── Empty state ── */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  color: var(--color-text-muted);
  padding: 40px;
  text-align: center;
}
.empty-state.visible { display: flex; }
.empty-state-icon { font-size: 3rem; }
.empty-state p { font-size: 1rem; }

/* ── Modals ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  overflow: hidden;
}
.modal-sm { max-width: 340px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-border);
}
.modal-header h2 { font-size: 1.1rem; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}
.modal-footer .btn-danger { margin-right: auto; }

/* ── Form elements ── */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="text"], input[type="date"], textarea, select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.9375rem;
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
input[type="text"]:focus, input[type="date"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(55,138,221,0.15);
}
textarea { resize: vertical; min-height: 80px; }
input[type="color"] {
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
  cursor: pointer;
  background: none;
}

/* Color swatches */
.color-picker-row { display: flex; align-items: center; gap: 10px; }
.color-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--color-text); transform: scale(1.1); }

/* ── Sync panel ── */
.sync-panel {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 16px 14px;
  flex-shrink: 0;
}
.sync-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-sidebar-text);
  margin-bottom: 10px;
}
.sync-icon { opacity: 0.7; font-size: 1rem; }
.sync-status {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 10px;
}
.sync-status.ok { background: rgba(34,197,94,0.2); color: #4ade80; }
.sync-status.syncing { background: rgba(55,138,221,0.2); color: #60abf8; }
.sync-status.error { background: rgba(239,68,68,0.2); color: #f87171; }

.sync-key-display {
  font-size: 0.78rem;
  color: var(--color-sidebar-text);
  opacity: 0.8;
  margin-bottom: 8px;
}
.sync-actions {
  display: flex;
  gap: 6px;
}
.sync-actions .btn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: var(--color-sidebar-text);
  font-size: 0.78rem;
  padding: 4px 10px;
  min-height: 30px;
}
.sync-actions .btn:hover { background: rgba(255,255,255,0.15); }

.sync-hint {
  font-size: 0.75rem;
  color: var(--color-sidebar-text);
  opacity: 0.55;
  margin-bottom: 8px;
  line-height: 1.4;
}
.sync-input-row {
  display: flex;
  gap: 6px;
}
.sync-input-row input {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--color-sidebar-text);
  border-radius: var(--radius-sm);
}
.sync-input-row input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(55,138,221,0.25);
}
.sync-input-row input::placeholder { color: rgba(255,255,255,0.3); }
.sync-input-row .btn-primary { min-height: 32px; padding: 5px 10px; font-size: 0.8rem; }
.sync-input-row input.input-error { border-color: #f87171; }
.sync-error { font-size: 0.72rem; color: #f87171; margin-top: 5px; line-height: 1.3; }

/* Status toggle (segmented control) */
.status-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.status-btn {
  flex: 1;
  padding: 9px 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
}
.status-btn:last-child { border-right: none; }
.status-btn:hover { background: #f0f2f5; color: var(--color-text); }
.status-btn.active[data-status="in-progress"] { background: #f59e0b; color: #fff; }
.status-btn.active[data-status="done"] { background: #22c55e; color: #fff; }

/* ── Responsive ── */
@media (max-width: 767px) {
  .mobile-header { display: flex; }
  .sidebar-close { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 120;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-header { padding-top: var(--mobile-header-height); }
  .main {
    padding-top: var(--mobile-header-height);
  }
  .gantt-toolbar {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 12px;
    gap: 8px;
  }
  .gantt-period { min-width: 120px; font-size: 0.875rem; }
  :root { --gantt-label-width: 120px; --gantt-day-width: 28px; }
  .gantt-zoom label { display: none; }
  .btn-full { width: calc(100% - 24px); margin: 0 12px 12px; }
}

@media (min-width: 768px) {
  :root { --gantt-day-width: 32px; }
}

@media (min-width: 1280px) {
  :root { --gantt-day-width: 36px; }
}

/* ── Backup panel ── */
/* ── Contacts panel ── */
.contacts-panel {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 16px 4px;
  flex-shrink: 0;
}
.contacts-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.contacts-panel-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.contacts-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.contacts-empty { font-size: 0.78rem; color: rgba(255,255,255,0.3); padding: 4px 0 8px; margin: 0; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}
.contact-row:hover { background: rgba(255,255,255,0.06); }
.contact-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.contact-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-role {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-edit-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.contact-edit-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

.backup-panel {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 16px 16px;
  flex-shrink: 0;
}
.backup-panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-sidebar-text);
  opacity: 0.65;
  margin-bottom: 10px;
}
.backup-actions {
  display: flex;
  gap: 8px;
}
.backup-btn {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: var(--color-sidebar-text);
  font-size: 0.78rem;
  min-height: 32px;
}
.backup-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }
.backup-msg {
  margin-top: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.backup-msg.ok  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.backup-msg.err { background: rgba(239,68,68,0.15);  color: #f87171; }

/* ── Main toolbar (shared by Gantt + Board) ── */
.main-toolbar {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: var(--toolbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  gap: 12px;
}
.gantt-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.gantt-controls[hidden] { display: none; }
#kanbanSizeControl[hidden] { display: none; }

/* View toggle pill */
.view-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  margin-left: auto;
}
.view-btn {
  padding: 5px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: none;
  border-right: 1px solid var(--color-border);
  min-height: 30px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.view-btn:last-child { border-right: none; }
.view-btn.active { background: #1e2330; color: #fff; }

/* ── Gantt view wrapper ── */
#ganttView {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
#ganttView[hidden] { display: none; }
#ganttView .gantt-wrapper { flex: 1; overflow: hidden; }

/* ── Split pane ── */
.split-handle {
  flex: none;
  height: 8px;
  background: #0f1219;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
}
.split-handle-grip {
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.18);
  transition: background 0.15s;
}
.split-handle:hover .split-handle-grip { background: rgba(255,255,255,0.4); }
.main.split-mode #ganttView { flex: none; }
.main.split-mode .kanban-view { flex: 1; min-height: 80px; }

/* Kanban toolbar ── */
.kanban-toolbar {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: var(--toolbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  gap: 12px;
}
.kanban-size-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.kanban-size-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.size-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.size-btn {
  padding: 5px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: none;
  border-right: 1px solid var(--color-border);
  min-height: 30px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.size-btn:last-child { border-right: none; }
.size-btn.active { background: #1e2330; color: #fff; }

/* ── Kanban view ── */
.kanban-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: #12151c;
}

/* Sprint bar */
.kanban-sprint-bar {
  padding: 10px 24px;
  background: #12151c;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sprint-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #8a93a8;
  line-height: 1.25;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sprint-progress-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.sprint-progress-fill {
  height: 100%;
  background: #378ADD;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.sprint-pct { font-size: 0.875rem; font-weight: 700; color: #e8edf5; white-space: nowrap; }
.sprint-days-left { font-size: 0.8rem; color: #8a93a8; white-space: nowrap; }
.sprint-date-range {
  font-size: 0.8rem;
  color: #8a93a8;
  margin-left: auto;
  white-space: nowrap;
  padding-left: 8px;
}

/* Filter bar */
.kanban-filter-bar {
  padding: 10px 24px;
  background: #12151c;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.kanban-filter-btn {
  padding: 6px 18px;
  border-radius: 24px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #1e2330;
  color: #c5cedd;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 34px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.kanban-filter-btn:hover { background: #252b3a; color: #e8edf5; }
.kanban-filter-btn.active { background: #378ADD; color: #fff; border-color: #378ADD; }

/* Board scroll area */
.kanban-scroll {
  flex: 1;
  overflow: auto;
  padding: 20px 24px 32px;
}
.kanban-board {
  display: flex;
  gap: 16px;
  min-height: 100%;
  align-items: flex-start;
}

/* Column widths by size */
.kanban-board[data-size="compact"] .kanban-col { width: 210px; min-width: 210px; }
.kanban-board[data-size="normal"]  .kanban-col { width: 272px; min-width: 272px; }
.kanban-board[data-size="wide"]    .kanban-col { width: 340px; min-width: 340px; }

/* Column */
.kanban-col {
  width: 272px;
  min-width: 272px;
  background: #1c2030;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 16px 12px;
  flex-shrink: 0;
}
.kanban-col-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kanban-col-title { font-weight: 700; font-size: 0.9rem; flex: 1; color: #e8edf5; }
.kanban-col-count {
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Cards list */
.kanban-cards {
  padding: 0 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 320px);
}

/* Card */
.kanban-card {
  background: #252b3a;
  border-radius: 10px;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
  border-left-width: 3px;
  position: relative;
}
.kanban-card:hover {
  background: #2c3348;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.kanban-card.is-dragging {
  opacity: 0.35;
  transform: rotate(1.5deg) scale(0.98);
  box-shadow: none;
}
.kanban-card-grip {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.12);
  line-height: 1;
  margin-bottom: 9px;
  user-select: none;
  cursor: grab;
  letter-spacing: 2px;
}
.kanban-card:hover .kanban-card-grip { color: rgba(255,255,255,0.3); }
.kanban-card-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 11px;
  line-height: 1.38;
  color: #e8edf5;
}
.kanban-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.kanban-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1.5px solid;
  white-space: nowrap;
}
.kanban-tag-project { }
.priority-high   { background: rgba(220,38,38,0.14);  color: #f87171; border-color: rgba(220,38,38,0.4); }
.priority-medium { background: rgba(217,119,6,0.14);  color: #fbbf24; border-color: rgba(217,119,6,0.4); }
.priority-low    { background: rgba(22,163,74,0.14);  color: #4ade80; border-color: rgba(22,163,74,0.4); }

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  gap: 8px;
}
.kanban-card-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kanban-assignee {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  border: 2px solid rgba(255,255,255,0.12);
}
.card-note-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  flex-shrink: 0;
}
.card-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(37,211,102,0.15);
  color: #25d366;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s;
}
.card-wa-btn:hover { background: rgba(37,211,102,0.3); }
.card-rem-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s;
}
.card-rem-btn:hover { background: rgba(245,158,11,0.3); }

/* ── Reminders toolbar button + panel ── */
.reminders-wrap {
  position: relative;
}
.reminders-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
}
.reminders-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  line-height: 1;
}
.reminders-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  background: #1a1f2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  z-index: 200;
  overflow: hidden;
}
.rem-header {
  padding: 10px 14px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.rem-empty {
  padding: 14px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  margin: 0;
  text-align: center;
}
.rem-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.12s;
}
.rem-row:last-child { border-bottom: none; }
.rem-row:hover { background: rgba(255,255,255,0.04); }
.rem-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rem-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rem-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rem-who {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rem-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  flex-shrink: 0;
}
.rem-date.rem-overdue { color: #f87171; }
.rem-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s;
}
.rem-wa-btn:hover { background: rgba(245,158,11,0.3); }

.field-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-left: 4px;
}
.hint-link { color: var(--color-primary); text-decoration: underline; }

/* ── Toast notifications ── */
#toastContainer {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: #22c55e;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.toast.toast-show { opacity: 1; transform: translateY(0); }
.toast.toast-error { background: #ef4444; }

/* Make card WA/rem buttons look the same whether <a> or <button> */
.card-wa-btn, .card-rem-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.kanban-due {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #8a93a8;
  font-weight: 500;
  white-space: nowrap;
}
.kanban-due.overdue { color: #f87171; font-weight: 700; }
.due-cal { font-size: 0.7rem; opacity: 0.7; }

/* Column drop zone highlight */
.kanban-col.drag-over {
  outline: 2px dashed #378ADD;
  outline-offset: -3px;
}
.kanban-col.drag-over .kanban-cards {
  background: rgba(55,138,221,0.06);
  border-radius: 8px;
}

/* Empty column state */
.kanban-col-empty {
  text-align: center;
  padding: 28px 16px;
  color: rgba(255,255,255,0.15);
  font-size: 0.8rem;
  border: 1.5px dashed rgba(255,255,255,0.08);
  border-radius: 10px;
  margin: 2px 4px;
}

/* Add card */
.kanban-add-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 0 0 14px 14px;
  cursor: pointer;
  color: #5a6278;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 44px;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  user-select: none;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.kanban-add-card:hover { background: rgba(255,255,255,0.05); color: #9aa3b8; }

/* Task status toggle extra states */
.status-btn.active[data-status="backlog"] { background: #6b7280; color: #fff; }
.status-btn.active[data-status="review"]  { background: #f59e0b; color: #fff; }

/* Mobile */
@media (max-width: 767px) {
  .kanban-scroll { padding: 12px; }
  .kanban-toolbar { padding: 0 12px; }
  .kanban-filter-bar { padding: 8px 12px; }
  .kanban-sprint-bar { padding: 8px 12px; gap: 8px; }
  .sprint-date-range { display: none; }
  .kanban-cards { max-height: calc(100vh - 360px); }
  .kanban-board[data-size="compact"] .kanban-col,
  .kanban-board[data-size="normal"]  .kanban-col,
  .kanban-board[data-size="wide"]    .kanban-col { width: 240px; min-width: 240px; }
}
