/* ==========================================
   SaaS de Gestão de Projetos - Estilo Premium
   Dark Mode & Glassmorphism (Monday.com / Asana)
   ========================================== */

/* Importação do Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Variáveis de Design (Design System) */
:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Cores de Fundo (Tema Escuro Profundo) */
  --bg-app: #090b11;
  --bg-sidebar: #10121d;
  --bg-card: rgba(22, 26, 41, 0.65);
  --bg-card-hover: rgba(30, 36, 56, 0.8);
  --bg-input: rgba(13, 16, 27, 0.8);
  --bg-active: rgba(99, 102, 241, 0.15);
  --bg-panel: #0d101c;
  --border-color: rgba(255, 255, 255, 0.08);
  
  /* Cores de Borda e Detalhes Glass */
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-focus: rgba(99, 102, 241, 0.4);
  
  /* Cores de Marca & Estado */
  --primary: #6366f1; /* Indigo */
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --success: #10b981; /* Emerald */
  --warning: #f59e0b; /* Amber */
  --danger: #ef4444; /* Rose */
  --info: #06b6d4; /* Cyan */
  --neutral: #8b949e;
  
  /* Texto */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  /* Statuses (Estilo Monday) */
  --status-todo-bg: #4b5563;
  --status-working-bg: #fd7e14;
  --status-blocked-bg: #e03131;
  --status-done-bg: #0ca678;
  
  /* Prioridades */
  --priority-low-bg: #374151;
  --priority-med-bg: #1e3a8a;
  --priority-high-bg: #991b1b;

  /* Novas variáveis para compatibilidade de temas */
  --bg-header: rgba(9, 11, 17, 0.45);
  --bg-container: rgba(22, 26, 41, 0.45);
  --bg-subcontainer: rgba(13, 16, 27, 0.45);
  --bg-th: rgba(9, 11, 17, 0.2);
  --bg-btn-secondary: rgba(255, 255, 255, 0.05);
  --bg-btn-secondary-hover: rgba(255, 255, 255, 0.08);
  --bg-progress-bar: rgba(255, 255, 255, 0.05);
  --bg-avatar-border: #0f111a;
  --bg-row-hover: rgba(255, 255, 255, 0.02);
  --bg-add-task-row: rgba(255, 255, 255, 0.01);
  --bg-donut-hole: #161a29;
  --bg-chart-track: rgba(255, 255, 255, 0.03);
  --bg-subtask-row: rgba(255, 255, 255, 0.01);
  --bg-comment-card: rgba(255, 255, 255, 0.02);
  --bg-modal-footer: rgba(9, 11, 17, 0.2);
  --bg-toast: #161a29;
  --calendar-filter: invert(1);
  --scrollbar-thumb: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.2);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --header-height: 70px;
  --transition-speed: 0.25s;
  --border-radius: 12px;
}

/* Redefinição para Tema Claro */
body.light-theme {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: #f1f5f9;
  --bg-active: rgba(99, 102, 241, 0.08);
  --bg-panel: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-focus: rgba(99, 102, 241, 0.5);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --status-todo-bg: #64748b;
  --status-working-bg: #f77f00;
  --status-blocked-bg: #d62828;
  --status-done-bg: #2a9d8f;

  --priority-low-bg: #475569;
  --priority-med-bg: #1d4ed8;
  --priority-high-bg: #b91c1c;

  /* Novas variáveis no Tema Claro */
  --bg-header: rgba(255, 255, 255, 0.9);
  --bg-container: #ffffff;
  --bg-subcontainer: #f1f5f9;
  --bg-th: #e2e8f0;
  --bg-btn-secondary: rgba(0, 0, 0, 0.05);
  --bg-btn-secondary-hover: rgba(0, 0, 0, 0.08);
  --bg-progress-bar: rgba(0, 0, 0, 0.06);
  --bg-avatar-border: #ffffff;
  --bg-row-hover: rgba(0, 0, 0, 0.015);
  --bg-add-task-row: rgba(0, 0, 0, 0.01);
  --bg-donut-hole: #ffffff;
  --bg-chart-track: rgba(0, 0, 0, 0.03);
  --bg-subtask-row: rgba(0, 0, 0, 0.01);
  --bg-comment-card: rgba(0, 0, 0, 0.015);
  --bg-modal-footer: #f8fafc;
  --bg-toast: #ffffff;
  --calendar-filter: invert(0);
  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);
}

/* Reset Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbars Modernos */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Estrutura Principal da App (Grid Layout) */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
  width: 100vw;
  transition: grid-template-columns var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

/* ==========================================
   Menu Lateral (Sidebar)
   ========================================== */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 100;
  transition: width var(--transition-speed) ease;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-glass);
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-container.has-img {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  -webkit-background-clip: initial !important;
}

.brand-logo-img {
  height: 36px;
  border-radius: 4px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.sidebar-collapsed .brand-logo-img {
  height: 28px !important;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  -webkit-text-fill-color: white;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: absolute;
  right: 16px;
}

.sidebar-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

/* Navegação da Sidebar */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-dim);
  padding-left: 8px;
  letter-spacing: 0.5px;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sidebar-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.sidebar-nav-item.active {
  background-color: var(--bg-active);
  color: var(--text-main);
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.05);
}

.sidebar-nav-item i {
  font-size: 1.1rem;
  width: 18px;
}

/* Projetos Agrupados na Sidebar */
.sidebar-project-list {
  margin-top: 4px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-project-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.sidebar-project-item.active {
  color: var(--primary);
  font-weight: 600;
}

.project-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}

.sidebar-footer {
  padding: 15px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
  overflow: hidden;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Sidebar Colapsada */
.sidebar-collapsed .sidebar,
.sidebar.collapsed {
  width: 72px !important;
  min-width: 72px !important;
}

.sidebar-collapsed .logo-container span,
.sidebar-collapsed .sidebar-section-title,
.sidebar-collapsed .sidebar-nav-item span,
.sidebar-collapsed .sidebar-project-list,
.sidebar-collapsed .user-info,
.sidebar.collapsed .logo-container span,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .sidebar-nav-item span,
.sidebar.collapsed .sidebar-project-list,
.sidebar.collapsed .user-info {
  display: none !important;
}

.sidebar-collapsed .logo-container,
.sidebar.collapsed .logo-container {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.sidebar-collapsed .sidebar-header {
  flex-direction: column;
  height: auto;
  gap: 10px;
  padding: 16px 0;
  justify-content: center;
}

.sidebar-collapsed .sidebar-toggle-btn {
  position: relative;
  right: auto;
  margin: 0 auto;
}

.sidebar-collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar-collapsed .sidebar-footer {
  justify-content: center;
}

/* ==========================================
   Área de Conteúdo Principal
   ========================================== */
.main-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-app);
}

/* Header Superior */
.main-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-header);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 50; /* Garante que elementos do header (como notificações) fiquem por cima do viewport */
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.workspace-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-btn-secondary);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.workspace-badge:hover {
  background-color: var(--bg-btn-secondary-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 260px;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-box i,
.search-box svg {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--text-dim) !important;
  width: 16px !important;
  height: 16px !important;
  pointer-events: none !important;
}

.icon-button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

.icon-button:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--danger);
  border-radius: 50%;
}

/* Área da View Ativa */
.viewport-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

/* Botões Modernos */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-secondary {
  background-color: var(--bg-btn-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-btn-secondary-hover);
  border-color: var(--border-glass);
}

/* ==========================================
   Visão de Portfólio de Projetos
   ========================================== */
.portfolio-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.portfolio-group {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portfolio-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

/* Card de Projeto no Portfólio */
.project-card {
  background-color: var(--bg-subcontainer);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  padding: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: var(--project-color, var(--primary));
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  background-color: var(--bg-card-hover);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.project-health-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.health-ontrack {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.health-atrisk {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.health-offtrack {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Barra de Progresso do Projeto */
.project-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-bar-bg {
  height: 6px;
  background-color: var(--bg-progress-bar);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #818cf8 100%);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-card-date {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Membros do Projeto (Avatares Empilhados) */
.member-avatars-stack {
  display: flex;
  align-items: center;
}

.avatar-stacked {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bg-avatar-border);
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
  background-color: var(--avatar-bg, var(--primary));
  overflow: hidden;
}

.avatar-stacked:first-child {
  margin-left: 0;
}

.avatar-stack-more {
  background-color: #374151;
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ==========================================
   Cabeçalho do Board de Projeto
   ========================================== */
.board-header-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.board-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.board-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.board-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.board-name-input {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  border-bottom: 1px solid transparent;
  padding: 2px 4px;
}

.board-name-input:focus {
  border-bottom-color: var(--border-glass-focus);
}

.board-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Seção de Abas de Visão (Tabs) */
.board-views-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.views-tabs {
  display: flex;
  gap: 8px;
}

.view-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all 0.2s;
}

.view-tab:hover {
  color: var(--text-main);
}

.view-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.view-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  box-shadow: 0 -2px 10px var(--primary-glow);
}

.board-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
}

/* ==========================================
   Visão em Tabela (Estilo Monday)
   ========================================== */
.table-view-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.table-group {
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  background-color: var(--bg-container);
  overflow: visible;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s;
}

.table-group:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.group-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-subcontainer);
  border-bottom: 1px solid var(--border-glass);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.group-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.group-title-input {
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  border-bottom: 1px solid transparent;
}

.group-title-input:focus {
  border-bottom-color: var(--border-glass-focus);
}

.group-task-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.task-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.task-grid-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-glass);
  background-color: var(--bg-th);
}

.task-grid-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-main);
  vertical-align: middle;
}

.task-grid-table tr:last-child td {
  border-bottom: none;
}

.task-grid-table tr:hover td {
  background-color: var(--bg-row-hover);
}

/* Colunas Específicas */
.col-name {
  width: 35%;
}

.col-assignee {
  width: 12%;
}

.col-status {
  width: 12%;
}

.col-priority {
  width: 12%;
}

.col-start-date {
  width: 11%;
}

.col-end-date {
  width: 11%;
}

.col-sp {
  width: 60px;
}

.sp-select-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  text-align-last: center;
  text-align: center;
  cursor: pointer;
  outline: none;
  width: 32px;
  height: 24px;
  margin: 0 auto;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.2s ease;
}

.sp-select-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
}

tr.dragging {
  opacity: 0.4;
  background: rgba(99, 102, 241, 0.1) !important;
}

.col-actions {
  width: 7%;
  text-align: right;
}

/* Célula de Nome da Tarefa */
.task-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-name-cell i {
  color: var(--text-dim);
  cursor: grab;
}

.task-name-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.85rem;
  width: 100%;
  border-bottom: 1px solid transparent;
}

.task-name-input:focus {
  border-bottom-color: var(--primary);
}

.task-completed-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-glass);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.task-completed-checkbox:checked {
  background-color: var(--success);
  border-color: var(--success);
}

.task-completed-checkbox:checked::after {
  content: '\eab2'; /* check icon from lucide */
  font-family: inherit;
  color: white;
  font-size: 10px;
}

.task-row-completed .task-name-input {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Pickers e Dropdowns */
.pill-dropdown {
  position: relative;
  cursor: pointer;
}

.pill-select {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  user-select: none;
  transition: opacity 0.15s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pill-select:hover {
  opacity: 0.9;
}

.pill-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 999;
  display: none;
  overflow: hidden;
}

.pill-dropdown-menu.show {
  display: block;
}

.pill-dropdown-item {
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-align: center;
  transition: opacity 0.1s;
}

.pill-dropdown-item:hover {
  opacity: 0.85;
}

/* Cores de Status */
.status-todo { background-color: var(--status-todo-bg); }
.status-working { background-color: var(--status-working-bg); }
.status-blocked { background-color: var(--status-blocked-bg); }
.status-done { background-color: var(--status-done-bg); }

/* Cores de Prioridade */
.priority-low { background-color: var(--priority-low-bg); }
.priority-med, .priority-medium { background-color: var(--priority-med-bg); }
.priority-high { background-color: var(--priority-high-bg); }

/* Seletor de Datas */
.date-picker-cell {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  width: 100%;
  outline: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.date-picker-cell:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
}

.date-picker-cell::-webkit-calendar-picker-indicator {
  filter: var(--calendar-filter);
  cursor: pointer;
}

/* Responsável (Assignee Cell) */
.assignee-cell {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.assignee-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  transition: all 0.2s;
}

.assignee-placeholder:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.assignee-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--avatar-bg, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
}

.assignee-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 180px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 999;
  display: none;
  padding: 6px 0;
}

.assignee-menu.show {
  display: block;
}

.assignee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.assignee-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* Adicionar Nova Tarefa (Linha de Cadastro) */
.add-task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background-color: var(--bg-add-task-row);
  border-top: 1px solid var(--border-glass);
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.add-task-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.85rem;
}

/* ==========================================
   Visão em Kanban (Quadro de Cartões)
   ========================================== */
.kanban-view-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  height: 100%;
  align-items: start;
}

.kanban-column {
  background-color: var(--bg-container);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--column-color, var(--primary));
}

.kanban-column-title {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100px;
  transition: background-color 0.2s, border 0.2s;
}

.kanban-btn-add:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main) !important;
}

.kanban-card-list.drag-over {
  background: rgba(99, 102, 241, 0.06);
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  padding: 6px;
}

.kanban-card.dragging {
  opacity: 0.4;
  background: rgba(99, 102, 241, 0.1) !important;
}

/* Card Kanban */
.kanban-card {
  background-color: var(--bg-subcontainer);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}

.kanban-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: var(--bg-card-hover);
  transform: translateY(-1px);
}

.kanban-card-title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-card-badges {
  display: flex;
  gap: 6px;
}

.kanban-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  color: white;
}

/* ==========================================
   Visão em Gráfico de Gantt / Cronograma
   ========================================== */
.gantt-view-container {
  background-color: var(--bg-container);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.gantt-timeline-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  border-bottom: 1px solid var(--border-glass);
  background-color: var(--bg-subcontainer);
}

.gantt-header-title {
  padding: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid var(--border-glass);
}

.gantt-months-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.gantt-month-label {
  padding: 16px 4px;
  color: var(--text-muted);
  border-right: 1px solid var(--border-glass);
}

.gantt-month-label:last-child {
  border-right: none;
}

.gantt-rows-container {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.gantt-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  border-bottom: 1px solid var(--border-glass);
}

.gantt-row:last-child {
  border-bottom: none;
}

.gantt-task-name {
  padding: 14px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border-right: 1px solid var(--border-glass);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}

.gantt-timeline-track {
  position: relative;
  background-image: linear-gradient(to right, var(--border-glass) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  height: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.gantt-bar {
  position: absolute;
  height: 24px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--bar-color, var(--primary)) 0%, rgba(99, 102, 241, 0.45) 100%);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 0.15s;
}

.gantt-bar:hover {
  transform: scaleY(1.08);
}

/* ==========================================
   Visão em Dashboard (Indicadores)
   ========================================== */
.dashboard-view-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  background-color: var(--bg-container);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary);
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
}

.chart-card-header {
  font-weight: 600;
  font-size: 1rem;
}

/* Gráfico de Rosca SVG */
.donut-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 180px;
}

.donut-chart-svg {
  transform: rotate(-90deg);
}

.donut-hole {
  fill: var(--bg-donut-hole);
}

.donut-ring {
  stroke: rgba(255, 255, 255, 0.03);
}

.donut-segment {
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.8s ease-in-out;
}

.donut-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donut-center-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.donut-center-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Gráfico de Barras CSS */
.bar-chart-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  flex: 1;
}

.bar-chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-chart-label {
  font-size: 0.75rem;
  width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.bar-chart-track {
  flex: 1;
  height: 12px;
  background-color: var(--bg-chart-track);
  border-radius: 6px;
  overflow: hidden;
}

.bar-chart-fill {
  height: 100%;
  background: var(--bar-color, var(--primary));
  border-radius: 6px;
  width: 0;
  transition: width 0.6s ease-out;
}

.bar-chart-value {
  font-size: 0.75rem;
  font-weight: 600;
  width: 30px;
  text-align: right;
}

/* ==========================================
   Painel de Detalhes da Tarefa (Task Modal/Drawer)
   ========================================== */
.task-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
}

.task-drawer-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.task-drawer {
  position: fixed;
  top: 0;
  right: -520px;
  width: 500px;
  height: 100vh;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-glass);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.task-drawer.show {
  right: 0;
}

.drawer-header {
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Checklist de Subtarefas */
.subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: var(--bg-subtask-row);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
}

.subtask-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.8rem;
  flex: 1;
}

.subtask-input:focus {
  border-bottom: 1px solid var(--border-glass-focus);
}

.subtask-completed .subtask-input {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Chat/Comentários da Tarefa */
.comments-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.comment-card {
  display: flex;
  gap: 12px;
  background-color: var(--bg-comment-card);
  border: 1px solid var(--border-glass);
  padding: 12px;
  border-radius: var(--border-radius);
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 600;
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-main);
}

.comment-input-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.comment-input-box textarea {
  flex: 1;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}

.comment-input-box textarea:focus {
  border-color: var(--primary);
}

/* ==========================================
   Modais Genéricos (Nova Categoria/Membro/Projeto)
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-container {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  width: 440px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.modal-footer {
  padding: 16px 24px;
  background-color: var(--bg-modal-footer);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Notificações Toaster */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  background-color: var(--bg-toast);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--primary);
  padding: 14px 20px;
  border-radius: var(--border-radius);
  color: var(--text-main);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastSlideIn {
  from {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ==========================================
   Estilos de Dropdown de Notificações
   ========================================== */
.notification-dropdown {
  position: absolute;
  top: 75px;
  right: 24px;
  width: 360px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 150;
  display: none;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(15px);
  animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-dropdown.show {
  display: flex;
}

.notification-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.1);
}

.notification-dropdown-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: background-color 0.15s;
  align-items: flex-start;
  position: relative;
}

.notification-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
  background-color: rgba(99, 102, 241, 0.04);
}

.notification-item.unread::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  position: absolute;
  left: 6px;
  top: 18px;
}

.notification-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-item-text {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text-main);
}

.notification-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================
   Estilos de Dropdown de Workspace
   ========================================== */
.workspace-dropdown {
  position: absolute;
  top: 55px;
  left: 0;
  width: 300px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 150;
  display: none;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(15px);
  animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace-dropdown.show {
  display: flex;
}

.workspace-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.workspace-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.workspace-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.85rem;
  color: var(--text-main);
}

.workspace-item:hover {
  background-color: var(--bg-row-hover);
}

.workspace-item.active {
  background-color: var(--bg-active);
  font-weight: 600;
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.workspace-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-item i {
  color: var(--text-muted);
}

.workspace-item.active i {
  color: var(--primary);
}

.workspace-dropdown-actions {
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================
   Novos Estilos Premium (Roadmap)
   ========================================== */

/* Switch Toggle (Automações) */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
}

body.light-theme .slider {
  background-color: rgba(0, 0, 0, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
  border-color: var(--primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Custom Fields na Tabela */
.col-custom-field {
  padding: 4px 8px;
}

.custom-field-input {
  border: none;
  background: transparent;
  width: 100%;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.custom-field-input:focus {
  background: var(--bg-input);
  box-shadow: 0 0 0 1px var(--border-glass-focus);
}

/* Workload Tasks */
.workload-task-item:hover {
  background-color: var(--bg-row-hover) !important;
  border-color: var(--border-glass-focus) !important;
}

/* ==========================================
   Estilos do Painel Administrativo PaaS
   ========================================== */

/* Toggle Switch do Modo Admin */
.switch-control input:checked + .slider-round {
  background-color: var(--primary) !important;
}

.switch-control input:checked + .slider-round::before {
  transform: translateX(12px) !important;
}

.switch-control .slider-round::before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.2s;
  border-radius: 50%;
}

/* Grid de Métricas PaaS */
.paas-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.paas-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.paas-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glass-focus);
}

.paas-card-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.paas-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.paas-card-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Sub-navegação do Painel Admin */
.paas-tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.paas-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.paas-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.paas-tab-btn.active {
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.15);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* Tabela Administrativa */
.paas-table {
  width: 100%;
  border-collapse: collapse;
}

.paas-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}

.paas-table td {
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.paas-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Chat e Suporte */
.support-inbox-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  height: 480px;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.support-tickets-list {
  border-right: 1px solid var(--border-glass);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.support-ticket-item {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.15s;
}

.support-ticket-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.support-ticket-item.active {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--primary);
}

.support-chat-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.support-chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.01);
}

.support-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble.admin {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-bubble.user {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
}

.support-chat-input-area {
  padding: 12px 20px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  gap: 10px;
}

/* Indicadores Pulsantes de Infra */
.infra-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.6s infinite;
}

.infra-pulse.warning {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse-yellow 1.6s infinite;
}

.infra-pulse.critical {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-red 1.6s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-yellow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================
   Central de E-mails Simulado (Sandbox Inbox)
   ========================================== */
.email-card {
  padding: 14px;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: background 0.2s, border-left 0.2s;
  border-left: 3px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.email-card.active {
  background: rgba(99, 102, 241, 0.08);
  border-left-color: var(--primary);
}

.email-card.unread {
  border-left-color: #f59e0b;
}

.email-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.email-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.email-card-preview {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Toolbar de Reações (Hover) e Emoji Picker */
.comment-card {
  position: relative;
}
.comment-reaction-toolbar {
  display: none;
  position: absolute;
  top: -16px;
  right: 45px;
  background: #1e1e30; /* Fundo escuro condizente com o modal glass */
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 100;
  gap: 4px;
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.comment-card:hover .comment-reaction-toolbar {
  display: flex;
}
.reaction-toolbar-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  outline: none;
}
.reaction-toolbar-btn:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.08);
}
.reaction-picker-trigger {
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reaction-picker-trigger:hover {
  color: var(--primary);
}

.emoji-picker-dropdown {
  position: absolute;
  top: 32px;
  right: 0;
  background: #1e1e30;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 101;
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 210px;
  max-height: 200px;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.emoji-picker-dropdown.show {
  display: grid;
}
.emoji-picker-item {
  font-size: 1.15rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.emoji-picker-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.15);
}

/* Portfolio Drag and Drop Styles */
.portfolio-group.drag-over {
  border: 2px dashed var(--primary) !important;
  background: rgba(99, 102, 241, 0.05) !important;
  border-radius: 12px;
}
.portfolio-group.drag-over-project {
  border: 2px dashed var(--primary) !important;
  background: rgba(99, 102, 241, 0.03) !important;
  border-radius: 12px;
}
.portfolio-group.dragging {
  opacity: 0.5;
}
.project-card.dragging-project {
  opacity: 0.4;
  border: 1px dashed var(--primary) !important;
}

/* ===== CRM CLIENTES ===== */
.crm-card:hover {
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
  transform: translateY(-2px);
}
.crm-card:active {
  transform: translateY(0);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   Responsive Design System for Mobile & Tablets
   ========================================== */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  /* Hambúrguer Menu & Drawer */
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    outline: none;
  }
  .mobile-menu-btn i {
    width: 22px;
    height: 22px;
  }

  /* Ocultar botão padrão de recolher sidebar */
  #sidebarToggle {
    display: none !important;
  }

  /* Estrutura Grid Principal Mobile */
  .app-container {
    grid-template-columns: 1fr !important;
  }

  /* Transformar Sidebar em Drawer flutuante */
  .sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    height: 100vh;
    z-index: 1000;
    width: var(--sidebar-width);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    transition: left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-container.sidebar-open .sidebar {
    left: 0;
  }

  /* Backdrop do Sidebar */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
  }

  .app-container.sidebar-open .sidebar-backdrop {
    display: block;
  }

  /* Header e Caixas de Busca */
  .main-header {
    padding: 0 16px !important;
    height: 60px !important;
    gap: 8px;
  }
  .header-left {
    gap: 4px;
  }
  .search-box {
    max-width: 130px !important;
  }
  .search-box input {
    font-size: 0.75rem !important;
    padding: 6px 8px 6px 28px !important;
  }

  /* Viewport Padding */
  .viewport-content {
    padding: 14px !important;
  }

  /* Kanban Board Responsivo */
  .kanban-board {
    flex-direction: column !important;
    gap: 16px !important;
    overflow-x: visible !important;
  }
  .kanban-column {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Layouts de duas colunas empilhados verticalmente */
  .support-inbox-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  .support-tickets-list {
    border-right: none !important;
    border-bottom: 1px solid var(--border-glass) !important;
    max-height: 180px !important;
  }
  
  .gantt-timeline-header, .gantt-row {
    grid-template-columns: 140px 1fr !important;
  }

  /* Grids de Dashboard */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Monday Table scroll horizontal */
  .table-group {
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
  }
  .task-grid-table {
    min-width: 780px !important;
  }
  .group-header-row {
    min-width: 780px !important;
  }

  /* Task Drawer responsivo */
  .task-drawer {
    width: 100vw !important;
    right: -105vw !important;
  }
  .task-drawer.show {
    right: 0 !important;
  }

  /* Modais seguros em telas menores */
  .modal-container {
    width: 90% !important;
    max-width: 440px !important;
    margin: 0 auto;
  }
}



