/* === Variables et thèmes === */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #111827;
  --surface: #1f2937;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: #374151;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Topbar === */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 64px;
}
.logo { font-size: 1.1rem; font-weight: 700; }
.icon-btn {
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer; padding: 6px 10px; border-radius: 8px;
}
.icon-btn:hover { background: var(--bg); }

/* === Sidebar === */
.sidebar {
  position: fixed; top: 0; left: -260px; bottom: 0;
  width: 260px; background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 70px 16px 16px;
  transition: left 0.3s ease;
  z-index: 40;
  overflow-y: auto;
}
.sidebar.open { left: 0; }
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 12px;
  text-decoration: none; color: var(--text-muted);
  background: none; border: none; cursor: pointer; font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.nav-link:hover {
  background: var(--bg); color: var(--text);
  transform: translateX(4px);
}
.nav-link.active {
  background: var(--primary); color: white;
  box-shadow: var(--shadow);
}
.nav-link.logout { color: var(--danger); margin-top: 20px; }

/* === Main === */
.main {
  padding: 16px;
  padding-bottom: 90px;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 767px) {
  .main {
    padding-top: 80px; /* Augmenté de 20px à 80px pour passer sous le header (64px) */
  }
}
.page { 
  animation: fadeIn 0.25s ease; 
  padding-top: 40px; /* Augmenté de 20px à 40px */
}

/* === Kanban Board === */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-height: 400px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-top: 20px; /* Ajouté pour séparer des boutons */
}
@media (max-width: 767px) {
  .main {
    padding-top: 20px;
  }
}
.page { 
  animation: fadeIn 0.25s ease; 
  padding-top: 20px;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* === Cards === */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card h2 { font-size: 1.1rem; margin-bottom: 12px; }
.card h3 { font-size: 1rem; margin-bottom: 6px; }
.muted { color: var(--text-muted); font-size: 0.9rem; }

/* === Stats Grid === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.stat {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 20px;
  border-radius: 12px; border: none;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }

/* === Forms === */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.form textarea { min-height: 90px; resize: vertical; }

/* === Lists === */
.item-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.item {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.item-header { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.item-title { font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px;
  border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-priority-basse { background: #dbeafe; color: #1e40af; }
.badge-priority-moyenne { background: #fef3c7; color: #92400e; }
.badge-priority-haute { background: #fed7aa; color: #9a3412; }
.badge-priority-urgente { background: #fecaca; color: #991b1b; }
.badge-status-todo { background: #e5e7eb; color: #374151; }
.badge-status-doing { background: #dbeafe; color: #1e40af; }
.badge-status-done { background: #d1fae5; color: #065f46; }

.item-actions { display: flex; gap: 6px; }
.item-actions button {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; padding: 4px 8px; border-radius: 6px;
}
.item-actions button:hover { background: var(--bg); }

/* === Bottom Nav (mobile) === */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 30;
}
.bottom-link {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--text-muted);
  padding: 4px;
}
.bottom-link span { font-size: 1.3rem; }
.bottom-link small { font-size: 0.7rem; }
.bottom-link.active { color: var(--primary); }

/* === Calendar === */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--bg);
  border: 1px solid transparent;
}
.calendar-day:hover { border-color: var(--primary); }
.calendar-day.complete { background: #10b981; color: white; }
.calendar-day.matin, .calendar-day.apresmidi { background: #fbbf24; color: white; }
.calendar-day.conge { background: #60a5fa; color: white; }
.calendar-day.maladie { background: #f87171; color: white; }
.calendar-day.weekend { background: #e5e7eb; color: #9ca3af; cursor: default; }
.calendar-day.holiday { background: #fca5a5; color: #991b1b; }
.calendar-header {
  font-weight: 600; font-size: 0.75rem;
  color: var(--text-muted); text-align: center;
  padding: 6px 0;
}

/* === Login === */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
.login-card {
  background: white;
  padding: 40px 28px;
  border-radius: 20px;
  max-width: 400px; width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-card h1 { margin-bottom: 12px; }
.login-card p { color: #6b7280; margin-bottom: 24px; }
.error { color: var(--danger); margin-top: 16px; min-height: 24px; }

/* === Modal === */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 500px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin-bottom: 16px; }
.modal { display: none; flex-direction: column; gap: 12px; }
.modal-content { display: flex; flex-direction: column; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.day-check {
  position: absolute; top: 2px; left: 4px;
  font-size: 0.7rem; line-height: 1;
}
.day-num { font-weight: 500; }
#day-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; z-index: 100; padding: 16px; }
#day-modal .modal { background: var(--surface); border-radius: var(--radius); padding: 22px; max-width: 500px; width: 100%; }

.calendar-layout { display: flex; gap: 24px; align-items: flex-start; }
.calendar-layout > div:first-child { flex: 1; min-width: 0; }
.calendar-legend { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; background: var(--bg); border-radius: var(--radius); white-space: nowrap; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

@media (max-width: 600px) {
  .calendar-layout { flex-direction: column; }
  .calendar-legend { flex-direction: row; flex-wrap: wrap; white-space: normal; }
}

/* === Responsive === */
@media (min-width: 768px) {
  .sidebar { left: 0; }
  .main { margin-left: 260px; max-width: none; padding: 24px 32px; }
  .topbar { padding-left: 280px; }
  #menu-btn { display: none; }
  .bottom-nav { display: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* === Utils === */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.text-center { text-align: center; }
.empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-muted);
}

/* === Kanban Board === */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-height: 400px;
  overflow-x: auto;
  padding-bottom: 8px;
}
@media (max-width: 900px) {
  .kanban-board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
  }
  .kanban-column {
    min-width: 280px;
    scroll-snap-align: start;
  }
}
.kanban-column {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px;
  border: 2px dashed transparent;
  transition: border-color 0.2s, background 0.2s;
  display: flex; flex-direction: column;
}
.kanban-column.drag-over {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}
.kanban-column-header {
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.kanban-column-header .count {
  background: var(--border); border-radius: 999px;
  padding: 2px 8px; font-size: 0.75rem;
}
.kanban-items {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; min-height: 60px;
}
.kanban-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.kanban-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}
.kanban-card-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.kanban-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.kanban-card .badge { font-size: 0.65rem; }
.kanban-card-actions {
  display: flex; gap: 4px; margin-top: 8px; justify-content: flex-end;
}
.kanban-card-actions button {
  background: none; border: none; cursor: pointer;
  font-size: 0.9rem; padding: 2px 6px; border-radius: 4px;
  color: var(--text-muted); transition: all 0.15s;
}
.kanban-card-actions button:hover { background: var(--bg); color: var(--text); }
.view-toggle {
  display: flex; gap: 4px; margin-bottom: 12px;
  background: var(--bg); border-radius: 10px; padding: 4px;
  width: fit-content;
  position: relative;
  z-index: 10;
}
.view-toggle button {
  background: none; border: none; cursor: pointer;
  padding: 8px 16px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); transition: all 0.2s;
}
.view-toggle button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* === Pipeline === */
.pipeline-bar {
  display: flex; gap: 4px; margin: 8px 0 4px;
  width: 100%;
}
.pipeline-step {
  flex: 1; text-align: center;
  padding: 6px 4px; border-radius: 8px;
  font-size: 0.7rem; font-weight: 600;
  background: var(--bg); color: var(--text-muted);
  transition: all 0.3s;
  cursor: pointer; border: none;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.pipeline-step:hover { background: var(--border); }
.pipeline-step.active {
  background: var(--primary); color: white;
  box-shadow: var(--shadow);
}
.pipeline-step.done {
  background: var(--success); color: white;
}
.pipeline-step.abandoned {
  background: var(--danger); color: white; opacity: 0.7;
}

/* === FAB === */
.fab-container {
  position: fixed; bottom: 80px; right: 16px; z-index: 35;
}
@media (min-width: 768px) {
  .fab-container { bottom: 24px; right: 24px; }
}
.fab-main {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: white; border: none;
  font-size: 1.6rem; cursor: pointer;
  box-shadow: 0 4px 12px rgba(79,70,229,0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; align-items: center; justify-content: center;
}
.fab-main:hover { transform: scale(1.1); }
.fab-main.open { transform: rotate(45deg); background: var(--danger); }
.fab-menu {
  position: absolute; bottom: 68px; right: 0;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-menu.open {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}
.fab-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 12px;
  cursor: pointer; font-size: 0.9rem; font-weight: 600;
  color: var(--text); white-space: nowrap;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.fab-item:hover { transform: translateX(-4px); box-shadow: var(--shadow-lg); }
.fab-backdrop {
  position: fixed; inset: 0; z-index: 34;
  background: transparent; display: none;
}

/* === Pomodoro === */
.pomo-toggle {
  position: fixed; top: 56px; right: 16px; z-index: 25;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  cursor: pointer; font-size: 1.2rem;
  box-shadow: var(--shadow); transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.pomo-toggle:hover { transform: scale(1.1); border-color: var(--primary); }
.pomo-toggle.running { border-color: var(--success); animation: pulse-glow 2s infinite; }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}
.pomo-modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.pomo-modal.open { display: flex; }
.pomo-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 32px; max-width: 360px; width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.pomo-card h2 { font-size: 1.2rem; margin-bottom: 4px; }
.pomo-phase { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.pomo-timer {
  font-size: clamp(3rem, 15vw, 4.5rem); font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  margin: 16px 0;
  color: var(--primary);
}
.pomo-timer.break { color: var(--success); }
.pomo-progress {
  height: 6px; background: var(--bg); border-radius: 3px;
  overflow: hidden; margin-bottom: 24px;
}
.pomo-progress-bar {
  height: 100%; background: var(--primary); border-radius: 3px;
  transition: width 1s linear;
}
.pomo-progress-bar.break { background: var(--success); }
.pomo-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pomo-controls .btn { min-width: 90px; }
.pomo-sessions { margin-top: 16px; padding: 12px; background: var(--bg); border-radius: 12px; font-size: 0.85rem; color: var(--text-muted); }

/* === Charts === */
.chart-container {
  position: relative;
  width: 100%;
  max-height: 200px;
}
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}
.chart-card h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; }
@media (max-width: 600px) {
  .chart-grid { grid-template-columns: 1fr; }
}

/* === Markdown Preview === */
.md-toggle {
  font-size: 0.8rem; padding: 4px 12px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--border);
  cursor: pointer; color: var(--text-muted); float: right;
}
.md-toggle:hover { color: var(--text); }
.md-preview {
  padding: 12px; background: var(--bg); border-radius: 8px;
  font-size: 0.9rem; line-height: 1.7;
  white-space: pre-wrap; word-wrap: break-word;
  margin-top: 4px;
}
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 12px 0 6px; }
.md-preview h1 { font-size: 1.2rem; }
.md-preview h2 { font-size: 1.1rem; }
.md-preview h3 { font-size: 1rem; }
.md-preview strong { font-weight: 700; }
.md-preview em { font-style: italic; }
.md-preview code {
  background: var(--border); padding: 2px 6px; border-radius: 4px;
  font-size: 0.85rem;
}
.md-preview pre {
  background: var(--border); padding: 12px; border-radius: 8px;
  overflow-x: auto; margin: 8px 0;
}
.md-preview pre code { background: none; padding: 0; }
.md-preview ul { padding-left: 20px; margin: 6px 0; }
.md-preview li { margin-bottom: 4px; }
.md-preview a { color: var(--primary); text-decoration: underline; }
.md-preview blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 12px; color: var(--text-muted);
  margin: 8px 0;
}
.md-preview hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* === Enhanced Dashboard Widgets === */
.dashboard-widgets {
  display: grid;
  gap: 16px;
}
.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .dashboard-grid-2 { grid-template-columns: 1fr; }
}
.quick-tasks { list-style: none; }
.quick-tasks li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.quick-tasks li:last-child { border-bottom: none; }
.quick-tasks .status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.quick-tasks .status-dot.todo { background: var(--text-muted); }
.quick-tasks .status-dot.doing { background: var(--primary); }
.quick-tasks .status-dot.done { background: var(--success); }
.quick-tasks .task-due { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); }
.quick-tasks .task-title { flex: 1; }
.mood-slider { display: flex; gap: 6px; margin-top: 8px; }
.mood-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  background: var(--bg); border: 2px solid transparent;
  transition: all 0.2s;
}
.mood-dot:hover, .mood-dot.selected { border-color: var(--primary); transform: scale(1.15); }

/* === Misc === */
.fade-in { animation: fadeIn 0.3s ease; }
.bounce-in { animation: bounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 600;
  background: var(--bg); color: var(--text-muted);
}
.textarea-toolbar {
  display: flex; gap: 4px; margin-bottom: 4px;
}
.textarea-toolbar button {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px;
  cursor: pointer; font-size: 0.85rem; color: var(--text-muted);
  transition: all 0.15s;
}
.textarea-toolbar button:hover { background: var(--bg); color: var(--text); }

/* === Quick-Add Modal === */
.quick-add-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.quick-add-backdrop.open { display: flex; }
.quick-add-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  max-width: 500px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
@media (max-width: 480px) {
  .quick-add-card {
    padding: 20px 16px;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    max-height: 95vh;
  }
}
.quick-add-card h2 { margin-bottom: 16px; font-size: 1.1rem; }
.form-row { display: flex; gap: 8px; }
.form-row > * { flex: 1; }
@media (max-width: 480px) {
  .form-row { flex-direction: column; }
  .kanban-board { grid-template-columns: 1fr; }
}

/* === Edit Modal === */
#edit-modal .modal {
  max-width: 550px;
}
#edit-modal .modal h2 {
  margin-bottom: 16px;
}
#edit-modal .form-row {
  display: flex;
  gap: 8px;
}
#edit-modal .form-row > * {
  flex: 1;
}
@media (max-width: 480px) {
  #edit-modal .form-row {
    flex-direction: column;
  }
}

/* === Edit Modal === */
#edit-modal .modal {
  max-width: 550px;
}
#edit-modal .modal h2 {
  margin-bottom: 16px;
}
#edit-modal .form-row {
  display: flex;
  gap: 8px;
}
#edit-modal .form-row > * {
  flex: 1;
}
@media (max-width: 480px) {
  #edit-modal .form-row {
    flex-direction: column;
  }
}