/* Custom CSS for SaaS CRM Platform */

/* :root {
  --primary-color: #7c3aed;
  --primary-light: #a855f7;
  --primary-dark: #5b21b6;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --light-color: #f9fafb;
  --dark-color: #1f2937;
  --sidebar-width: 250px;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
} */


:root {
  /* --- CORES DA MARCA SERVUS CRM --- */
  
  /* Primária (Azul Marinho Profundo: #1E40AF) - Base Sólida do CRM */
  --primary-color: #1E40AF; 
  /* Tom mais claro do azul (para hover, botões secundários) */
  --primary-light: #3B82F6; 
  /* Tom mais escuro do azul (para fundo escuro ou sidebar) */
  --primary-dark: #1E3A8A; 
  
  /* Cor de Destaque / Acento (Verde Ciano: #06B6D4) - Conexão/WhatsApp */
  --accent-color: #06B6D4; 

  /* --- CORES SECUNDÁRIAS E STATUS (Mantidas ou ajustadas para bom contraste) --- */
  
  /* Cor Secundária (Geralmente um cinza neutro para texto e bordas) */
  --secondary-color: #6b7280; 
  /* Sucesso */
  --success-color: #10b981; 
  /* Perigo/Erro */
  --danger-color: #ef4444; 
  /* Aviso */
  --warning-color: #f59e0b; 
  /* Informação (Pode ser usado o --accent-color ou um azul padrão) */
  --info-color: #3b82f6; 
  /* Cor Clara (Fundo/Bordas leves) */
  --light-color: #f9fafb; 
  /* Cor Escura (Texto principal/Códigos) */
  --dark-color: #1f2937; 
  
  /* --- LAYOUT E ESTILOS GERAIS --- */
  --sidebar-width: 250px;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}


.space-info {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background-color: #f9fafb;
  color: var(--dark-color);
}


img.logo-crm {
    max-width: 100%;
}

/* Authentication Layout */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-lg);
  overflow: hidden;
}

.auth-header {
  text-align: center;
  padding: 40px 40px 20px 40px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
}

.auth-header h2 {
  margin-bottom: 10px;
  font-weight: 600;
}

.auth-form {
  padding: 40px;
}

.auth-footer {
  text-align: center;
  padding: 20px 40px 40px 40px;
  border-top: 1px solid #e5e7eb;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: white;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: var(--box-shadow-lg);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
}

.sidebar-nav {
  padding: 20px 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-weight: 500;
}

.sidebar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: rgba(255, 255, 255, 0.3);
}

.sidebar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: white;
}

.sidebar-nav .nav-link i {
  width: 20px;
  margin-right: 12px;
  font-size: 1.1rem;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--box-shadow);
}

.header-left {
  display: flex;
  align-items: center;
}

.sidebar-toggle {
  border: none;
  background: none;
  font-size: 1.25rem;
  margin-right: 16px;
  padding: 8px;
  border-radius: 8px;
  color: var(--secondary-color);
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

.page-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-color);
}

.header-right {
  display: flex;
  align-items: center;
}

.user-menu {
  border: none;
  background: none;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.user-menu:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

.profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
  object-fit: cover;
}

/* Content */
.content {
  padding: 32px;
}

/* Dashboard Stats Cards */
.stats-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 28px;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-lg);
  border-color: var(--primary-color);
}

.stats-icon {
  font-size: 2.5rem;
  margin-right: 20px;
  padding: 16px;
  border-radius: 12px;
  background-color: rgba(124, 58, 237, 0.1);
}

.stats-icon.text-primary { color: var(--primary-color) !important; }
.stats-icon.text-warning { color: var(--warning-color) !important; }
.stats-icon.text-danger { color: var(--danger-color) !important; }
.stats-icon.text-success { color: var(--success-color) !important; }

.stats-content h3 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--dark-color);
}

.stats-content p {
  margin: 0;
  color: var(--secondary-color);
  font-weight: 500;
  font-size: 0.95rem;
}

/* Cards */
.card {
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  background: white;
}

.card:hover {
  box-shadow: var(--box-shadow-lg);
  border-color: var(--primary-color);
}

.card-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  padding: 20px 24px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body {
  padding: 24px;
}

/* Task and Lead Items */
.task-item,
.lead-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.task-item:hover,
.lead-item:hover {
  background-color: var(--light-color);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 8px;
}

.task-item:last-child,
.lead-item:last-child {
  border-bottom: none;
}

/* Profile Page */
.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
}

.profile-placeholder {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-color);
  border-radius: 50%;
  margin: 0 auto;
  border: 4px solid var(--primary-color);
}

.profile-placeholder i {
  font-size: 4rem;
  color: var(--secondary-color);
}

/* Table Avatars */
.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Service Cards */
.service-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-lg);
  border-color: var(--primary-color);
}

/* CRM Kanban Board */
.kanban-board {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 20px 0;
  min-height: 400px;
}

.kanban-column {
  min-width: 300px;
  background: var(--light-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: var(--box-shadow);
}

.kanban-header {
  padding: 16px 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.kanban-body {
  padding: 16px;
  min-height: 300px;
}

.kanban-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: grab;
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.kanban-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.kanban-card.dragging {
  opacity: 0.6;
  transform: rotate(5deg);
}

.lead-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.lead-value {
  font-weight: 700;
  color: var(--success-color);
  margin: 8px 0;
  font-size: 1.1rem;
}

.lead-contacts {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin: 8px 0;
}

.lead-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

/* Error Pages */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  max-width: 500px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .content {
    padding: 20px 16px;
  }
  
  .kanban-board {
    flex-direction: column;
  }
  
  .kanban-column {
    min-width: 100%;
  }
  
  .header {
    padding: 16px 20px;
  }
  
  .page-title {
    font-size: 1.5rem;
  }

  .stats-card {
    padding: 20px;
  }

  .stats-icon {
    font-size: 2rem;
    margin-right: 16px;
    padding: 12px;
  }

  .stats-content h3 {
    font-size: 1.75rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.card,
.stats-card,
.kanban-card {
  animation: fadeIn 0.4s ease;
}

/* Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
}

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 10px 20px;
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Form Controls */
.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  transition: all 0.2s ease;
  padding: 12px 16px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
}

/* Alerts */
.alert {
  border-radius: 10px;
  border: none;
  padding: 16px 20px;
  font-weight: 500;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border-left: 4px solid var(--info-color);
}

/* Tables */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background-color: var(--light-color);
  font-weight: 600;
  color: var(--dark-color);
  border-bottom: 2px solid #e5e7eb;
  padding: 16px;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.table-hover tbody tr:hover {
  background-color: rgba(124, 58, 237, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Activity Items */
.activity-item {
  background: white;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  box-shadow: var(--box-shadow);
}

/* Stage Items */
.stage-item {
  background: white;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}

/* Dropdown Menus */
.dropdown-menu {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: var(--box-shadow-lg);
  padding: 8px 0;
}

.dropdown-item {
  padding: 10px 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
}

/* Input Groups */
.input-group-text {
  background-color: var(--light-color);
  border-color: #d1d5db;
  font-weight: 600;
  color: var(--secondary-color);
}

/* Form Check */
.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Text Colors */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--secondary-color) !important; }