/* ============================================
   HOME PAGE - PÁGINA INICIAL DO GERENTE
   ============================================ */

#home-container {
  display: none;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

#home-container.active {
  display: block;
}

/* Header da Home */
.home-header {
  text-align: center;
  margin-bottom: 3rem;
}

.home-header h1 {
  color: var(--text-color, #fff);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.home-header p {
  color: var(--text-secondary, #888);
  font-size: 1.1rem;
}

/* Grid de Atalhos */
.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Card de Atalho */
.shortcut-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.shortcut-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, #667eea);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.shortcut-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary, #667eea);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.shortcut-card:hover::before {
  transform: scaleX(1);
}

.shortcut-card .icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  color: #fff;
  transition: transform 0.3s ease;
}

.shortcut-card:hover .icon {
  transform: scale(1.1);
}

.shortcut-card h3 {
  color: var(--text-color, #fff);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.shortcut-card p {
  color: var(--text-secondary, #888);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Cores dos ícones */
.shortcut-card.dashboard .icon {
  background: linear-gradient(135deg, #10b981, #059669);
}
.shortcut-card.pmi .icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.shortcut-card.seo .icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.shortcut-card.social .icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}
.shortcut-card.business .icon {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}
.shortcut-card.tech .icon {
  background: linear-gradient(135deg, #ec4899, #be185d);
}

/* Barra de Pesquisa Inline */
.search-shortcut-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 1.5rem;
}

.search-shortcut-card h4 {
  color: var(--text-color, #fff);
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-shortcut-card h4 i {
  color: var(--primary, #667eea);
}

.search-input-group {
  display: flex;
  gap: 0.75rem;
}

.search-input-group input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
  border-radius: 10px;
  background: var(--input-bg, rgba(255, 255, 255, 0.05));
  color: var(--text-color, #fff);
  font-size: 0.95rem;
}

.search-input-group input::placeholder {
  color: var(--text-secondary, #888);
}

.search-input-group button {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-input-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Seção de Demandas */
.home-demands-section {
  margin-top: 2rem;
}

.home-demands-section h2 {
  color: var(--text-color, #fff);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-demands-section h2 i {
  color: var(--primary, #667eea);
}

.home-demands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.home-demand-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-demand-card:hover {
  border-color: var(--primary, #667eea);
  transform: translateY(-2px);
}

.home-demand-card .demand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.home-demand-card .demand-title {
  color: var(--text-color, #fff);
  font-weight: 600;
  font-size: 1rem;
}

.home-demand-card .demand-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.home-demand-card .demand-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.home-demand-card .demand-status.in-progress {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.home-demand-card .demand-meta {
  color: var(--text-secondary, #888);
  font-size: 0.85rem;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary, #667eea);
  font-weight: 600;
  margin-top: 1rem;
  cursor: pointer;
  transition: gap 0.2s ease;
}

.view-all-link:hover {
  gap: 0.75rem;
}

/* Empty State */
.home-empty-demands {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary, #888);
}

.home-empty-demands i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsivo */
@media (max-width: 768px) {
  .home-shortcuts {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-header h1 {
    font-size: 1.75rem;
  }

  .shortcut-card {
    padding: 1.5rem 1rem;
  }

  .shortcut-card .icon {
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .home-shortcuts {
    grid-template-columns: 1fr;
  }

  .search-input-group {
    flex-direction: column;
  }
}

/* ============================================
   MODO CLARO - Light Mode Overrides
   ============================================ */

/* Quando está em modo claro */
html[data-theme="light"] #home-container .home-header h1,
:root:not([data-theme="dark"]) #home-container .home-header h1 {
  color: #1e293b !important;
}

html[data-theme="light"] #home-container .home-header p,
:root:not([data-theme="dark"]) #home-container .home-header p {
  color: #64748b !important;
}

html[data-theme="light"] #home-container .shortcut-card,
:root:not([data-theme="dark"]) #home-container .shortcut-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] #home-container .shortcut-card:hover,
:root:not([data-theme="dark"]) #home-container .shortcut-card:hover {
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15) !important;
}

html[data-theme="light"] #home-container .shortcut-card h3,
:root:not([data-theme="dark"]) #home-container .shortcut-card h3 {
  color: #1e293b !important;
}

html[data-theme="light"] #home-container .shortcut-card p,
:root:not([data-theme="dark"]) #home-container .shortcut-card p {
  color: #64748b !important;
}

html[data-theme="light"] #home-container .search-shortcut-card,
:root:not([data-theme="dark"]) #home-container .search-shortcut-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] #home-container .search-shortcut-card h4,
:root:not([data-theme="dark"]) #home-container .search-shortcut-card h4 {
  color: #1e293b !important;
}

html[data-theme="light"] #home-container .search-input-group input,
:root:not([data-theme="dark"]) #home-container .search-input-group input {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

html[data-theme="light"] #home-container .search-input-group input::placeholder,
:root:not([data-theme="dark"]) #home-container .search-input-group input::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="light"] #home-container .home-demands-section h2,
:root:not([data-theme="dark"]) #home-container .home-demands-section h2 {
  color: #1e293b !important;
}

html[data-theme="light"] #home-container .home-demand-card,
:root:not([data-theme="dark"]) #home-container .home-demand-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] #home-container .home-demand-card:hover,
:root:not([data-theme="dark"]) #home-container .home-demand-card:hover {
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15) !important;
}

html[data-theme="light"] #home-container .home-demand-card .demand-title,
:root:not([data-theme="dark"]) #home-container .home-demand-card .demand-title {
  color: #1e293b !important;
}

html[data-theme="light"] #home-container .home-demand-card .demand-meta,
:root:not([data-theme="dark"]) #home-container .home-demand-card .demand-meta {
  color: #64748b !important;
}

html[data-theme="light"] #home-container .home-empty-demands,
:root:not([data-theme="dark"]) #home-container .home-empty-demands {
  color: #64748b !important;
}

/* ============================================
   MODO ESCURO - Dark Mode Overrides
   ============================================ */

html[data-theme="dark"] #home-container .home-header h1 {
  color: #ffffff !important;
}

html[data-theme="dark"] #home-container .home-header p {
  color: #a1a1aa !important;
}

html[data-theme="dark"] #home-container .shortcut-card {
  background: rgba(30, 30, 45, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] #home-container .shortcut-card:hover {
  border-color: #667eea !important;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25) !important;
}

html[data-theme="dark"] #home-container .shortcut-card h3 {
  color: #ffffff !important;
}

html[data-theme="dark"] #home-container .shortcut-card p {
  color: #a1a1aa !important;
}

html[data-theme="dark"] #home-container .search-shortcut-card {
  background: rgba(30, 30, 45, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] #home-container .search-shortcut-card h4 {
  color: #ffffff !important;
}

html[data-theme="dark"] #home-container .search-input-group input {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] #home-container .search-input-group input::placeholder {
  color: #71717a !important;
}

html[data-theme="dark"] #home-container .home-demands-section h2 {
  color: #ffffff !important;
}

html[data-theme="dark"] #home-container .home-demand-card {
  background: rgba(30, 30, 45, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] #home-container .home-demand-card:hover {
  border-color: #667eea !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2) !important;
}

html[data-theme="dark"] #home-container .home-demand-card .demand-title {
  color: #ffffff !important;
}

html[data-theme="dark"] #home-container .home-demand-card .demand-meta {
  color: #a1a1aa !important;
}

html[data-theme="dark"] #home-container .home-empty-demands {
  color: #a1a1aa !important;
}

/* ============================================
   PERFORMANCE DASHBOARD - RENDIMENTO E DESEMPENHO
   ============================================ */

.performance-dashboard {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.performance-section {
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 1.5rem;
}

.performance-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color, #fff);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.performance-section h2 i {
  color: var(--primary, #667eea);
}

/* Grid de Métricas dos Membros */
.member-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.member-metric-card {
  background: var(--card-bg-secondary, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.member-metric-card:hover {
  border-color: var(--primary, #667eea);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.member-metric-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.member-avatar-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.25rem;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.member-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-metric-header .member-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.member-metric-header .member-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color, #fff);
}

.member-metric-header .member-role {
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.member-metric-body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.metric-progress {
  flex-shrink: 0;
}

.progress-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary, #667eea) var(--progress, 0%),
    rgba(255, 255, 255, 0.1) var(--progress, 0%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-ring::before {
  content: '';
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--card-bg-secondary, rgba(30, 30, 45, 0.95));
  position: absolute;
}

.progress-value {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary, #667eea);
}

.metric-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.metric-stats .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
}

.metric-stats .stat-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-color, #fff);
}

.metric-stats .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.metric-stats .stat-item.success .stat-value {
  color: #10b981;
}

.metric-stats .stat-item.danger .stat-value {
  color: #ef4444;
}

/* Grid de Estatísticas Gerais */
.overall-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.stats-card {
  background: var(--card-bg-secondary, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stats-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stats-card.total .stats-icon {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
}

.stats-card.success .stats-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stats-card.warning .stats-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stats-card.danger .stats-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.stats-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stats-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color, #fff);
  line-height: 1;
}

.stats-label {
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

/* Cards de Distribuição */
.stats-card.distribution {
  grid-column: span 1;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.distribution-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-color, #fff);
  font-size: 0.95rem;
}

.distribution-header i {
  color: var(--primary, #667eea);
}

.distribution-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bar-item {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bar-label i {
  width: 14px;
  font-size: 0.7rem;
}

.bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.bar-fill.private { background: linear-gradient(90deg, #667eea, #764ba2); }
.bar-fill.open { background: linear-gradient(90deg, #10b981, #06b6d4); }
.bar-fill.project { background: linear-gradient(90deg, #f59e0b, #f97316); }
.bar-fill.started { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.bar-fill.expiring { background: linear-gradient(90deg, #f59e0b, #eab308); }
.bar-fill.completed { background: linear-gradient(90deg, #10b981, #22c55e); }

.bar-value {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color, #fff);
  text-align: right;
}

/* Loading e Empty States */
.loading-state, .empty-state {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  grid-column: 1 / -1;
}

.loading-state i, .empty-state i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.error-message {
  text-align: center;
  color: #ef4444;
  padding: 1.5rem;
}

/* Responsivo */
@media (max-width: 768px) {
  .member-metrics-grid {
    grid-template-columns: 1fr;
  }

  .overall-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-card.distribution {
    grid-column: span 2;
  }

  .bar-item {
    grid-template-columns: 80px 1fr 30px;
  }
}

@media (max-width: 480px) {
  .overall-stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-card.distribution {
    grid-column: span 1;
  }
}

/* Tema Claro */
html[data-theme="light"] .performance-section,
:root:not([data-theme="dark"]) .performance-section {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .performance-section h2,
:root:not([data-theme="dark"]) .performance-section h2 {
  color: #1e293b !important;
}

html[data-theme="light"] .member-metric-card,
html[data-theme="light"] .stats-card,
:root:not([data-theme="dark"]) .member-metric-card,
:root:not([data-theme="dark"]) .stats-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .member-name,
html[data-theme="light"] .stats-value,
html[data-theme="light"] .distribution-header,
html[data-theme="light"] .bar-value,
:root:not([data-theme="dark"]) .member-name,
:root:not([data-theme="dark"]) .stats-value,
:root:not([data-theme="dark"]) .distribution-header,
:root:not([data-theme="dark"]) .bar-value {
  color: #1e293b !important;
}

html[data-theme="light"] .member-role,
html[data-theme="light"] .stats-label,
html[data-theme="light"] .bar-label,
:root:not([data-theme="dark"]) .member-role,
:root:not([data-theme="dark"]) .stats-label,
:root:not([data-theme="dark"]) .bar-label {
  color: #64748b !important;
}

html[data-theme="light"] .progress-ring::before,
:root:not([data-theme="dark"]) .progress-ring::before {
  background: #f8fafc !important;
}

html[data-theme="light"] .bar-track,
:root:not([data-theme="dark"]) .bar-track {
  background: #e2e8f0 !important;
}
