/* Enterprise CRM - Custom Styles */

.eontra-navbar {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.view-section {
  animation: fadeIn 0.3s ease-in;
}

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

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-lead { background: #e3f2fd; color: #1976d2; }
.status-prospect { background: #fff3e0; color: #f57c00; }
.status-customer { background: #e8f5e9; color: #388e3c; }
.status-inactive { background: #f5f5f5; color: #757575; }

.status-pending { background: #fff3e0; color: #f57c00; }
.status-completed { background: #e8f5e9; color: #388e3c; }
.status-cancelled { background: #ffebee; color: #d32f2f; }

.stage-prospect { background: #e3f2fd; color: #1976d2; }
.stage-qualified { background: #f3e5f5; color: #7b1fa2; }
.stage-proposal { background: #fff3e0; color: #f57c00; }
.stage-negotiation { background: #fce4ec; color: #c2185b; }
.stage-won { background: #e8f5e9; color: #388e3c; }
.stage-lost { background: #ffebee; color: #d32f2f; }

/* Table Actions */
.table-actions {
  display: flex;
  gap: 0.5rem;
}

.table-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

/* AI Chat */
#ai-chat .ai-message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: white;
  border: 1px solid #e0e0e0;
}

#ai-chat .ai-message.user {
  background: #e3f2fd;
  border-color: #90caf9;
  text-align: right;
}

#ai-chat .ai-message.assistant {
  background: white;
}

#ai-chat .ai-message strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #666;
}

/* Modal Overlay */
.eontra-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-in;
}

.eontra-modal {
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

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

/* Responsive */
@media (max-width: 768px) {
  .eontra-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .eontra-grid.cols-2 {
    grid-template-columns: 1fr;
  }
  
  .eontra-navbar .eontra-flex {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #2196f3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
