/* ==========================================================================
   CATEDRAL DIGITAL — GESTÃO DE TAREFAS & ENTREGAS
   Design System & Sistema Visual
   ========================================================================== */

:root {
  --card: #fafafa;
  --ring: #2e6aff;
  --input: #cccccc;
  --muted: #ffffff;
  --accent: #ffffff;
  --border: #e7e4e4;
  --radius: 1.3rem;
  --chart-1: #2e67ff;
  --chart-2: #00cdcc;
  --chart-3: #f9ff40;
  --chart-4: #00eeba;
  --chart-5: #ff2822;
  --popover: #ffffff;
  --primary: #2e67ff;
  --sidebar: #fafafa;
  --spacing: 0.25rem;
  --font-mono: Menlo, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
  --secondary: #0e142b;
  --background: #fcfcfc;
  --font-serif: Georgia, serif;
  --foreground: #0e142b;
  --destructive: #ff6c35;
  --shadow-blur: 16px;
  --shadow-color: rgba(46, 106, 255, 0.08);
  --sidebar-ring: #2e6aff;
  --shadow-spread: 0px;
  --letter-spacing: -0.01em;
  --shadow-opacity: 0.08;
  --sidebar-accent: #ffffff;
  --sidebar-border: #e7e4e4;
  --card-foreground: #0e142b;
  --shadow-offset-x: 0px;
  --shadow-offset-y: 6px;
  --sidebar-primary: #2e67ff;
  --muted-foreground: #64748b;
  --accent-foreground: #2e67ff;
  --popover-foreground: #0e142b;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #0e142b;
  --secondary-foreground: #ffffff;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #2e67ff;
  --sidebar-primary-foreground: #ffffff;

  /* Cores de apoio para tags de clientes e status */
  --client-ariel: #8b5cf6;
  --client-barsi: #2e67ff;
  --client-jvm: #059669;
  --client-faria: #d97706;
  --client-catedral: #0e142b;
  
  --priority-urgent: #ef4444;
  --priority-high: #f97316;
  --priority-medium: #3b82f6;
  --priority-low: #64748b;

  --status-todo: #64748b;
  --status-doing: #2e67ff;
  --status-review: #f59e0b;
  --status-done: #10b981;
}

.dark, [data-theme="dark"] {
  --card: #0f0f0f;
  --ring: #2e6aff;
  --input: #162151;
  --muted: #181818;
  --accent: #000e39;
  --border: #26272e;
  --radius: 1.3rem;
  --chart-1: #2e67ff;
  --chart-2: #00cdcc;
  --chart-3: #f9ff40;
  --chart-4: #00eeba;
  --chart-5: #ff2822;
  --popover: #000000;
  --primary: #2b65ff;
  --sidebar: #0f0f0f;
  --spacing: 0.25rem;
  --font-mono: Menlo, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
  --secondary: #ffffff;
  --background: #000000;
  --font-serif: Georgia, serif;
  --foreground: #ffffff;
  --destructive: #ff6c35;
  --shadow-blur: 24px;
  --shadow-color: rgba(0, 0, 0, 0.6);
  --sidebar-ring: #2e6aff;
  --shadow-spread: 0px;
  --letter-spacing: -0.01em;
  --shadow-opacity: 0.4;
  --sidebar-accent: #000e39;
  --sidebar-border: #26272e;
  --card-foreground: #d9d9d9;
  --shadow-offset-x: 0px;
  --shadow-offset-y: 8px;
  --sidebar-primary: #2e6aff;
  --muted-foreground: #94a3b8;
  --accent-foreground: #2b65ff;
  --popover-foreground: #ffffff;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #d9d9d9;
  --secondary-foreground: #0e142b;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #2b65ff;
  --sidebar-primary-foreground: #ffffff;

  --client-ariel: #a78bfa;
  --client-barsi: #60a5fa;
  --client-jvm: #34d399;
  --client-faria: #fbbf24;
  --client-catedral: #93c5fd;
}

@theme inline {
  --color-card: var(--card);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-muted: var(--muted);
  --color-accent: var(--accent);
  --color-border: var(--border);
  --color-radius: var(--radius);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-popover: var(--popover);
  --color-primary: var(--primary);
  --color-sidebar: var(--sidebar);
  --color-spacing: var(--spacing);
  --color-font-mono: var(--font-mono);
  --color-font-sans: var(--font-sans);
  --color-secondary: var(--secondary);
  --color-background: var(--background);
  --color-font-serif: var(--font-serif);
  --color-foreground: var(--foreground);
  --color-destructive: var(--destructive);
  --color-shadow-blur: var(--shadow-blur);
  --color-shadow-color: var(--shadow-color);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-shadow-spread: var(--shadow-spread);
  --color-letter-spacing: var(--letter-spacing);
  --color-shadow-opacity: var(--shadow-opacity);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-border: var(--sidebar-border);
  --color-card-foreground: var(--card-foreground);
  --color-shadow-offset-x: var(--shadow-offset-x);
  --color-shadow-offset-y: var(--shadow-offset-y);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent-foreground: var(--accent-foreground);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary-foreground: var(--primary-foreground);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.5;
  letter-spacing: var(--letter-spacing);
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */

.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar Esquerda */
.sidebar {
  width: 280px;
  background-color: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.25s ease;
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.5rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(46, 103, 255, 0.3);
}

.brand-info h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
}

.brand-info span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Navegação e Filtros da Sidebar */
.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.06em;
  padding: 0 0.6rem;
  margin-bottom: 0.5rem;
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.client-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: calc(var(--radius) * 0.6);
  cursor: pointer;
  color: var(--sidebar-foreground);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.client-item:hover {
  background-color: var(--card);
  border-color: var(--border);
}

.client-item.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(46, 103, 255, 0.25);
}

.client-item.active .badge-count {
  background-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.client-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.client-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-count {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background-color: var(--muted);
  color: var(--muted-foreground);
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-sidebar-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: calc(var(--radius) * 0.6);
  background-color: transparent;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.btn-sidebar-action:hover {
  background-color: var(--card);
  color: var(--foreground);
  border-color: var(--ring);
}

/* Área de Conteúdo Principal */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  background-color: var(--background);
}

/* Header Superior */
.top-header {
  padding: 1.25rem 2rem;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-title-area h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
}

.header-title-area p {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-top: 0.15rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 14px rgba(46, 103, 255, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(46, 103, 255, 0.4);
}

.btn-secondary {
  background-color: var(--muted);
  color: var(--foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--card);
  border-color: var(--ring);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background-color: var(--muted);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--ring);
  color: var(--primary);
  background-color: var(--muted);
}

/* Barra de Estatísticas / Métricas Rápidas */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.5rem 2rem 0.5rem 2rem;
}

.stat-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur) var(--shadow-color);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--ring);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: calc(var(--radius) * 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-info .stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  font-family: var(--font-mono);
  color: var(--foreground);
}

.stat-info .stat-label {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Toolbar & Filtros Rápidos */
.toolbar-section {
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(46, 106, 255, 0.15);
}

.search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
  font-size: 1rem;
}

.search-box .kbd-shortcut {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background-color: var(--muted);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.select-filter {
  padding: 0.6rem 2rem 0.6rem 0.9rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  transition: border-color 0.2s ease;
}

.select-filter:focus {
  border-color: var(--ring);
}

.view-toggle {
  display: flex;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem;
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: calc(var(--radius) * 0.7);
  background-color: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(46, 103, 255, 0.25);
}

/* ==========================================================================
   QUADRO KANBAN
   ========================================================================== */

.board-container {
  flex: 1;
  padding: 0.5rem 2rem 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
  min-height: 480px;
}

.kanban-column {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
  box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur) var(--shadow-color);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kanban-column.drag-over {
  background-color: rgba(46, 103, 255, 0.05);
  border-color: var(--ring);
  border-style: dashed;
}

.column-header {
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--foreground);
}

.column-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.column-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: var(--muted);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  padding: 0.15rem 0.55rem;
  border-radius: 1rem;
  font-weight: 600;
}

.column-cards {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  min-height: 120px;
  flex: 1;
}

/* Card de Tarefa (Kanban) */
.task-card {
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.8);
  padding: 1rem;
  cursor: grab;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  user-select: none;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: var(--ring);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.task-card.dragging {
  opacity: 0.45;
  cursor: grabbing;
  transform: scale(0.98);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.client-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.priority-pill {
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--card-foreground);
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.card-description {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Checklist Progresso no Card */
.checklist-progress-bar {
  width: 100%;
  height: 5px;
  background-color: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.checklist-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.checklist-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  margin-bottom: 0.35rem;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.deadline-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
}

.deadline-tag.overdue {
  color: var(--destructive);
  font-weight: 700;
}

.deadline-tag.today {
  color: var(--priority-high);
  font-weight: 700;
}

.card-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.btn-card-action:hover {
  color: var(--primary);
  background-color: var(--card);
}

/* ==========================================================================
   VISÃO EM TABELA / LISTA
   ========================================================================== */

.list-view-container {
  padding: 0.5rem 2rem 2rem 2rem;
  display: none;
}

.table-wrapper {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur) var(--shadow-color);
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.tasks-table th {
  background-color: var(--muted);
  padding: 0.9rem 1.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.tasks-table td {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  vertical-align: middle;
}

.tasks-table tr:last-child td {
  border-bottom: none;
}

.tasks-table tr:hover td {
  background-color: rgba(46, 103, 255, 0.02);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

/* ==========================================================================
   MODAL DE CRIAÇÃO / EDIÇÃO
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.5rem;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--foreground);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  padding: 0.7rem 0.9rem;
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.6);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(46, 106, 255, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Checklist no Modal */
.checklist-builder {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.6);
  padding: 0.75rem;
  background-color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist-item-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checklist-item-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checklist-item-text {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 0.88rem;
  outline: none;
}

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

.checklist-add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.modal-footer {
  padding: 1.15rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 150;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.25rem;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLETS)
   ========================================================================== */

@media (max-width: 1024px) {
  .board-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .board-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .stats-bar, .toolbar-section, .list-view-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
