/* ==========================================================
   Trello Kanban Board - Modern Design System & Stylesheet
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette - Light */
  --bg-app: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f8fafc;
  --bg-surface-hover: #f1f5f9;
  --bg-list: #ebecf0;
  --bg-list-hover: #e2e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-card-dragging: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-focus: #3b82f6;
  --border-strong: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-primary-light: #e0f2fe;

  --badge-overdue-bg: #fee2e2;
  --badge-overdue-text: #b91c1c;
  --badge-duesoon-bg: #fef3c7;
  --badge-duesoon-text: #b45309;
  --badge-completed-bg: #dcfce7;
  --badge-completed-text: #15803d;

  --header-bg: rgba(255, 255, 255, 0.85);
  --header-border: rgba(226, 232, 240, 0.8);
  --header-text: #0f172a;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.09), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 8px -1px rgba(0, 0, 0, 0.12), 0 2px 4px -2px rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-surface: #111827;
  --bg-surface-subtle: #1e293b;
  --bg-surface-hover: #334155;
  --bg-list: #1e293b;
  --bg-list-hover: #334155;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --bg-card-dragging: #1e293b;

  --border-subtle: #334155;
  --border-focus: #60a5fa;
  --border-strong: #475569;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --header-bg: rgba(15, 23, 42, 0.85);
  --header-border: rgba(51, 65, 85, 0.8);
  --header-text: #f8fafc;

  --badge-overdue-bg: #450a0a;
  --badge-overdue-text: #fca5a5;
  --badge-duesoon-bg: #451a03;
  --badge-duesoon-text: #fcd34d;
  --badge-completed-bg: #052e16;
  --badge-completed-text: #86efac;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Board Background Themes */
.bg-theme-gradient-blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #1e1b4b 100%) !important;
}
.bg-theme-gradient-sunset {
  background: linear-gradient(135deg, #f97316 0%, #db2777 50%, #4c1d95 100%) !important;
}
.bg-theme-gradient-emerald {
  background: linear-gradient(135deg, #059669 0%, #0d9488 50%, #134e4a 100%) !important;
}
.bg-theme-gradient-purple {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #1e1b4b 100%) !important;
}
.bg-theme-gradient-obsidian {
  background: linear-gradient(135deg, #18181b 0%, #09090b 50%, #000000 100%) !important;
}
.bg-theme-gradient-aurora {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%) !important;
}
.bg-theme-solid-slate {
  background: #334155 !important;
}
.bg-theme-solid-navy {
  background: #0f172a !important;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-app);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  transition: background 0.3s ease;
}

/* Top Global Navigation Bar */
.top-nav {
  height: 54px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 40;
  flex-shrink: 0;
  gap: 12px;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  color: #0284c7;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -0.02em;
  padding-right: 12px;
  border-right: 1px solid var(--border-subtle);
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

/* Board Header Bar (Secondary Nav) */
.board-header {
  height: 52px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #ffffff;
  z-index: 30;
  flex-shrink: 0;
  gap: 12px;
}

.board-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-title-input {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  outline: none;
  transition: var(--transition-fast);
  cursor: pointer;
  max-width: 320px;
}

.board-title-input:hover {
  background: rgba(255, 255, 255, 0.2);
}

.board-title-input:focus {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-focus);
  cursor: text;
}

.star-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.star-btn:hover {
  color: #facc15;
  background: rgba(255, 255, 255, 0.15);
}

.star-btn.active {
  color: #facc15;
}

/* Buttons and Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.btn-subtle {
  background-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-subtle:hover {
  background-color: rgba(255, 255, 255, 0.28);
}

.btn-light {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-light:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-danger-outline {
  background-color: transparent;
  color: #ef4444;
  border-color: #fca5a5;
}

.btn-danger-outline:hover {
  background-color: #fee2e2;
}

/* Board Canvas & Lists Container */
.board-canvas {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px 20px 20px 20px;
  gap: 16px;
  align-items: flex-start;
  user-select: none;
}

/* Custom Scrollbar for Canvas */
.board-canvas::-webkit-scrollbar {
  height: 12px;
}
.board-canvas::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  margin: 0 20px;
}
.board-canvas::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 6px;
}
.board-canvas::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* List / Column Component */
.kanban-list {
  width: 290px;
  min-width: 290px;
  max-height: calc(100vh - 140px);
  background-color: var(--bg-list);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.kanban-list.is-dragging {
  opacity: 0.4;
  transform: rotate(2deg) scale(0.98);
}

.list-header {
  padding: 12px 14px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: grab;
}

.list-header:active {
  cursor: grabbing;
}

.list-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.list-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 1px solid transparent;
  background: transparent;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  outline: none;
  width: 100%;
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.list-title:hover {
  background: rgba(0, 0, 0, 0.05);
}

.list-title:focus {
  background: var(--bg-surface);
  border-color: var(--border-focus);
  cursor: text;
}

.card-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.list-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.list-menu-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

/* Cards Scroll Container in List */
.list-cards {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 20px;
}

.list-cards::-webkit-scrollbar {
  width: 6px;
}
.list-cards::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* Kanban Card Component */
.kanban-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.kanban-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.kanban-card.is-dragging {
  opacity: 0.85;
  transform: rotate(3deg) scale(1.02);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-focus);
  cursor: grabbing;
}

/* Drop Placeholder Indicator */
.card-drop-placeholder {
  background: rgba(2, 132, 199, 0.12);
  border: 2px dashed #0284c7;
  border-radius: var(--radius-md);
  height: 64px;
  margin: 4px 0;
  transition: all 0.2s ease;
}

.list-drop-placeholder {
  width: 290px;
  min-width: 290px;
  height: calc(100vh - 140px);
  background: rgba(255, 255, 255, 0.15);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
}

/* Card Cover */
.card-cover {
  height: 32px;
  margin: -10px -12px 2px -12px;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
}

/* Card Labels */
.card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.label-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

.label-pill.blue { background-color: #2563eb; }
.label-pill.red { background-color: #dc2626; }
.label-pill.purple { background-color: #7c3aed; }
.label-pill.pink { background-color: #db2777; }
.label-pill.emerald { background-color: #059669; }
.label-pill.amber { background-color: #d97706; }
.label-pill.orange { background-color: #ea580c; }
.label-pill.cyan { background-color: #0891b2; }
.label-pill.slate { background-color: #475569; }

/* Card Title */
.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

/* Card Badges Row */
.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.04);
}

.card-badge.due-overdue {
  background-color: var(--badge-overdue-bg);
  color: var(--badge-overdue-text);
  font-weight: 700;
}

.card-badge.due-soon {
  background-color: var(--badge-duesoon-bg);
  color: var(--badge-duesoon-text);
  font-weight: 700;
}

.card-badge.due-completed {
  background-color: var(--badge-completed-bg);
  color: var(--badge-completed-text);
  font-weight: 700;
}

.card-badge.checklist-completed {
  background-color: var(--badge-completed-bg);
  color: var(--badge-completed-text);
}

/* Card Quick Add Footer */
.list-footer {
  padding: 6px 10px 10px 10px;
}

.btn-add-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-card:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

/* Quick Card Composer */
.card-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.card-composer textarea {
  width: 100%;
  border: none;
  resize: none;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-primary);
  background: transparent;
  outline: none;
  min-height: 54px;
}

.card-composer-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Add New List Column Button */
.add-list-column {
  width: 290px;
  min-width: 290px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition-fast);
}

.btn-add-list-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.btn-add-list-trigger:hover {
  background: rgba(255, 255, 255, 0.18);
}

.add-list-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-list);
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.add-list-input {
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.add-list-input:focus {
  border-color: var(--border-focus);
}

/* ==========================================================
   MODAL & POPUP DIALOGS (Card Details Modal)
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-subtle);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Cover Banner */
.modal-cover-banner {
  height: 110px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.05);
}

/* Modal Scrollable Body */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-title-input {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  width: 100%;
  outline: none;
  font-family: var(--font-sans);
}

.modal-title-input:hover {
  background: var(--bg-surface-subtle);
}

.modal-title-input:focus {
  background: var(--bg-surface);
  border-color: var(--border-focus);
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 8px;
}

/* Modal Two-Column Content */
.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
}

@media (max-width: 768px) {
  .modal-content-grid {
    grid-template-columns: 1fr;
  }
}

.modal-main-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Section Common Styles */
.modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Checklist Styling */
.checklist-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.checklist-percentage {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 34px;
}

.progress-bar-bg {
  flex: 1;
  height: 8px;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.3s ease;
}

.checklist-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.checklist-item-row:hover {
  background: var(--bg-surface-subtle);
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0284c7;
}

.checklist-item-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.checklist-item-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.btn-delete-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-fast);
}

.checklist-item-row:hover .btn-delete-item {
  opacity: 1;
}

.btn-delete-item:hover {
  color: #ef4444;
}

/* Comments & Activity Stream */
.comments-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.comment-card {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-time {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.comment-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Sidebar Action Buttons */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-heading {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.btn-sidebar-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sidebar-action:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Popover & Flyouts */
.popover-card {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 12px;
  width: 280px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#filterDrawer.active {
  display: flex !important;
}

/* Color Palettes */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.color-swatch-btn {
  height: 32px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.color-swatch-btn:hover {
  transform: scale(1.1);
}

.color-swatch-btn.selected {
  border-color: var(--text-primary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.25s ease;
}

.toast.toast-success {
  background: #065f46;
  border-left: 4px solid #34d399;
}

.toast.toast-error {
  background: #991b1b;
  border-left: 4px solid #f87171;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
