* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #F8F7F4;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  height: 100%;
  background-color: #F8F7F4;
}

:root {
  --font-family: 'Space Grotesk', sans-serif;
  --background-color: #F8F7F4;

  /* New Theme based on Reference */
  --primary: #f98006;
  --background-light: #f8f7f5;
  --surface-light: #ffffff; /* For cards */
  --sidebar-light: #fcfaf8;
  --border-light: #e9dbce;
  --surface-interactive: #f4ede6;
  --text-primary-light: #1c140d;
  --text-secondary-light: #9e7347;

  --positive-change: #07880e;
  --negative-change: #e71008;

  /* Mapped old variables to new ones for compatibility */
  --background: var(--background-light);
  --surface: var(--surface-interactive);
  --secondary: #ff9800; /* Keeping a secondary orange */
  --text: var(--text-primary-light);
  --text-light: var(--text-secondary-light);
  --border-stroke: var(--border-light);

  --Neutral-5: #fffaf0;
  --Neutral-10: #f8f7f5;
  --Neutral-15: #f4ede6;
  --Neutral-20: #e9dbce;

  --Green-700: #07880e;
  --Red-600: #e71008;
  --Yellow-500: #f59e0b;
  --Yellow-600: #d97706;
  --Yellow-800: #b45309;
  --Yellow-100: #fef3c7;
  --Yellow-200: #fde68a;

  --gray-200: #bcaaa4;
  --gray-300: #a1887f;
  --gray-500: #8d6e63;
  --gray-700: #6d4c41;

  --accent-blue: var(--primary);
  --accent-blue-headers: var(--primary);
  --Blue-500: var(--primary);
  --Blue-400: #fb923c; /* A lighter shade for hover */

  --card-border-radius: 0.75rem; /* 12px */
}

.icon, .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1;
}

button {
  font-family: var(--font-family);
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  overflow-x: hidden;
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-left: 0;
}

.content-area {
  flex-grow: 1;
  overflow-y: auto;
  width: 100%;
}

.app-container.sidebar-open .main-content {
  margin-left: 256px; /* 16rem or w-64 */
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid #d1d5db;
  color: #1f2937;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

header h1 {
  font-size: 24px;
  margin: 0;
  cursor: pointer;
}

.settings-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.settings-button .icon {
  font-size: 28px;
}

/* Base Card Style (New Bordered Style) */
.card {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: var(--card-border-radius);
  padding: 24px; /* p-6 */
}


/* AI Chat Page - Transcription as Chat Bubbles */
.transcription-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.transcription-view {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message-container {
  display: flex;
  gap: 12px;
  max-width: 75%;
  align-items: flex-end;
}

.chat-message-container.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message-container.agent {
  align-self: flex-start;
}

.agent-avatar-chat.small {
  width: 36px;
  height: 36px;
  font-size: 20px;
}

.agent-avatar-chat.large {
  width: 60px;
  height: 60px;
  font-size: 32px;
  margin-bottom: 12px;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  color: var(--text);
  min-width: 50px;
}

.chat-bubble.user {
  background-color: var(--primary);
  color: white;
  border-radius: 18px 18px 4px 18px;
}

.chat-bubble.agent {
  background: var(--surface-interactive);
  border-radius: 18px 18px 18px 4px;
}

.chat-message-container.interim .chat-bubble {
  opacity: 0.7;
}

.chat-bubble-footer {
  text-align: right;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.transcription-text-content pre {
  background-color: rgba(0,0,0,0.05);
  padding: 10px;
  border-radius: 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Space Mono', monospace;
}

.grounding-chunks {
  margin-top: 10px;
  font-size: 14px;
}
.grounding-chunks strong {
  color: var(--text);
}
.grounding-chunks ul {
  padding-left: 20px;
  margin: 5px 0 0;
}
.grounding-chunks a {
  color: var(--Blue-500);
}

/* Modal Styles */
.modalShroud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  padding: 24px;
  border-radius: var(--card-border-radius);
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modalClose {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
}

.modalContent {
  margin-top: 16px;
}

.call-summary-modal h2 {
  margin-top: 0;
  font-size: 22px;
  color: var(--text);
}

.call-summary-modal h3 {
  font-size: 16px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-stroke);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.call-summary-modal .audio-player-container {
  margin-bottom: 24px;
}

.call-summary-modal audio {
  width: 100%;
}

.call-summary-modal .summary-container .loading-text {
  color: var(--text-light);
}

/* Error Screen */
.error-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 100;
  padding: 20px;
}
.error-message-container {
  margin: 20px 0;
}
.error-screen .close-button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 20px;
}

/* Base button styles to be overridden by components */
.header-action-btn {
  background-color: var(--surface-interactive);
  color: var(--text-primary-light);
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.header-action-btn:hover {
  background-color: #e9dbce; /* A bit darker */
}

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

.header-action-btn.primary:hover {
  background-color: #e07404; /* Darker primary */
}

/* New Sidebar Overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}


/* Hide Scrollbar UI Globally */
.content-area,
.sidebar-nav,
.transcription-container,
.call-summary-modal,
.dashboard-container,
.my-agents-container,
.agent-config-page,
.payment-gateway-container,
.developer-container,
.call-history-container,
.contacts-container,
.contact-detail-container,
.notes-list,
.tasks-list,
.gmail-list {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.content-area::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
.transcription-container::-webkit-scrollbar,
.call-summary-modal::-webkit-scrollbar,
.dashboard-container::-webkit-scrollbar,
.my-agents-container::-webkit-scrollbar,
.agent-config-page::-webkit-scrollbar,
.payment-gateway-container::-webkit-scrollbar,
.developer-container::-webkit-scrollbar,
.call-history-container::-webkit-scrollbar,
.contacts-container::-webkit-scrollbar,
.contact-detail-container::-webkit-scrollbar,
.notes-list::-webkit-scrollbar,
.tasks-list::-webkit-scrollbar,
.gmail-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}


/* --- Responsive Design --- */

/* Tablet and smaller: Sidebar overlays content */
@media (max-width: 900px) {
  .main-content {
    margin-left: 0 !important;
    transition: none;
  }
  .app-container.sidebar-open .main-content {
    margin-left: 0 !important;
  }
  
  /* Show overlay on mobile when sidebar is open */
  .app-container.sidebar-open .sidebar-overlay {
    display: block;
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  :root {
    /* Slightly smaller base fonts for mobile */
    font-size: 14px;
  }

  .content-area {
    padding: 10px; /* Reduce padding on mobile */
  }

  header {
    padding: 10px 15px;
  }

  header h1 {
    font-size: 20px;
  }

  .card {
    padding: 15px;
  }
  
  .page-header h1 {
    font-size: 24px;
  }

  .page-header p {
    font-size: 14px;
  }
}.blocking-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  animation: slideIn 0.3s ease-out;
}

.notification-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.notification-icon {
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-text {
  flex: 1;
}

.notification-text h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.notification-text p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.notification-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.notification-btn.primary {
  background: #3b82f6;
  color: white;
}

.notification-btn.primary:hover {
  background: #2563eb;
}

.notification-btn.secondary {
  background: #f3f4f6;
  color: #374151;
}

.notification-btn.secondary:hover {
  background: #e5e7eb;
}

.notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.notification-close:hover {
  background: #f3f4f6;
  color: #374151;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .blocking-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .notification-actions {
    flex-direction: column;
  }
  
  .notification-btn {
    width: 100%;
    text-align: center;
  }
}
/* Loading Spinner - Clean Static Design */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f8fafc;
  font-family: 'system-ui', -apple-system, sans-serif;
}

.loading-spinner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  /* Ensure no rotation is applied to the container */
  transform: none !important;
}

.spinner {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Ensure spinner container doesn't affect text */
  transform: none !important;
}

.spinner-inner {
  width: 50px;
  height: 50px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #f97316;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  /* Only the inner spinner should rotate */
  transform-origin: center;
}

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

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* Ensure text content is completely static */
  transform: none !important;
  position: relative;
  z-index: 1;
}

.loading-content h3 {
  color: #1f2937;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  text-align: center;
  line-height: 1.2;
  /* Ensure text doesn't rotate */
  transform: none !important;
}

.loading-content p {
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  text-align: center;
  /* Ensure text doesn't rotate */
  transform: none !important;
  animation: pulse 2s ease-in-out infinite;
}

/* Alternative loading animation */
.loading-spinner.alternative .spinner-inner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #f97316;
  border-right: 3px solid #f97316;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Subtle pulse animation for loading text only */
.loading-content p {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
  .loading-content h3 {
    font-size: 20px;
  }
  
  .loading-content p {
    font-size: 14px;
  }
  
  .spinner {
    width: 50px;
    height: 50px;
  }
  
  .spinner-inner {
    width: 40px;
    height: 40px;
  }
}.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-light);
  padding: 20px;
  font-family: var(--font-family);
}

.auth-card {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: var(--card-border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.5s ease-out;
}

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

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  color: var(--text-primary-light);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.auth-header p {
  color: var(--text-secondary-light);
  font-size: 16px;
  margin: 0;
}

.auth-form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--text-primary-light);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 16px;
  font-family: var(--font-family);
  background: var(--surface-light);
  color: var(--text-primary-light);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 128, 6, 0.1);
}

.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  width: 0%;
}

.strength-1 { width: 25%; background: #e53e3e; }
.strength-2 { width: 50%; background: #dd6b20; }
.strength-3 { width: 75%; background: #d69e2e; }
.strength-4 { width: 100%; background: #38a169; }

.strength-text {
  font-size: 12px;
  font-weight: 600;
}

.strength-1 { color: #e53e3e; }
.strength-2 { color: #dd6b20; }
.strength-3 { color: #d69e2e; }
.strength-4 { color: #38a169; }

.auth-button {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-button.primary {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.auth-button.primary:hover:not(:disabled) {
  background: #e07404;
  border-color: #e07404;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 128, 6, 0.3);
}

.auth-button.google {
  background: var(--surface-light);
  color: var(--text-primary-light);
  border: 1px solid var(--border-light);
}

.auth-button.google:hover:not(:disabled) {
  background: var(--surface-interactive);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-icon {
  width: 20px;
  height: 20px;
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-light);
}

.auth-divider span {
  background: var(--surface-light);
  padding: 0 16px;
  color: var(--text-secondary-light);
  font-size: 14px;
  position: relative;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
}

.auth-footer p {
  color: var(--text-secondary-light);
  font-size: 14px;
  margin: 0;
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.error-message {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #fecaca;
}

.google-signin-container {
  margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 480px) {
  .auth-container {
    padding: 10px;
  }
  
  .auth-card {
    padding: 30px 20px;
  }
  
  .auth-header h1 {
    font-size: 24px;
  }
}
/* components/Sidebar.css */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 256px; /* w-64 */
  background: #ffffff;
  border-right: 1px solid #d1d5db;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center; /* Center the title */
  padding: 20px;
  border-bottom: 1px solid #d1d5db;
  flex-shrink: 0;
  /* Reset button styles and add cursor */
  background: #ffffff;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 22px;
  color: #1f2937;
  font-weight: 700;
  pointer-events: none; /* Prevents text from interfering with click */
}

.sidebar-nav {
  padding: 10px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px; /* Add gaps between navigation items */
}

.nav-item {
  width: 100%;
  padding: 12px 16px;
  background-color: transparent;
  border: none;
  border-radius: 0.5rem; /* rounded-lg */
  color: #1f2937;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; /* text-sm */
  font-weight: 500; /* font-medium */
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px; /* gap-3 */
  
  /* Animation properties */
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 0.3s ease-out,
    transform 0.3s ease-out,
    background-color 0.2s ease,
    color 0.2s ease;
}

.sidebar.open .nav-item {
  opacity: 1;
  transform: translateX(0);
}

.nav-item .icon {
  font-size: 24px;
}

.nav-item:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

.nav-item.active {
  background-color: #e5e7eb;
  color: #1f2937;
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 10px;
  border-top: 1px solid #d1d5db;
  flex-shrink: 0;
  background: #ffffff;
}

.logout-button {
  color: #dc2626;
  border: 1px solid #fca5a5;
  background-color: #fef2f2;
}

.logout-button:hover {
  background-color: #fee2e2;
  color: #b91c1c;
  border-color: #f87171;
}

.logout-button .icon {
  color: #dc2626;
}/* components/dashboard/Dashboard.css */
.dashboard-container {
  padding: 2.5rem; /* p-10 */
  width: 100%;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  background: var(--background-light);
  font-family: 'Space Grotesk', sans-serif;
}

/* Loading States */
.dashboard-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: var(--background-light);
}

.dashboard-loading .loading-spinner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.dashboard-loading .spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.dashboard-loading p {
  color: var(--text-secondary-light);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Tailwind CSS Support */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-items-center { justify-items: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.pt-4 { padding-top: 1rem; }
.min-w-72 { min-width: 18rem; }
.max-w-[480px] { max-width: 30rem; }
.max-w-full { max-width: 100%; }
.w-full { width: 100%; }
.h-10 { height: 2.5rem; }
.h-3 { height: 0.75rem; }
.w-3 { width: 0.75rem; }
.min-h-[220px] { min-height: 13.75rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-t-md { border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-r { border-right-width: 1px; }
.border-t { border-top-width: 1px; }
.bg-white { background-color: white; }
.bg-primary { background-color: var(--primary); }
.bg-primary\/60 { background-color: rgba(249, 128, 6, 0.6); }
.bg-primary\/40 { background-color: rgba(249, 128, 6, 0.4); }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-500 { background-color: #22c55e; }
.bg-green-900\/30 { background-color: rgba(20, 83, 45, 0.3); }
.bg-yellow-100 { background-color: #fef3c7; }
.bg-yellow-500 { background-color: #eab308; }
.bg-yellow-900\/30 { background-color: rgba(133, 77, 14, 0.3); }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-900\/30 { background-color: rgba(153, 27, 27, 0.3); }
.bg-\[#f4ede6\] { background-color: #f4ede6; }
.bg-\[#fcfaf8\] { background-color: #fcfaf8; }
.bg-\[#2c221a\] { background-color: #2c221a; }
.border-\[#e9dbce\] { border-color: #e9dbce; }
.border-\[#3a2d21\] { border-color: #3a2d21; }
.border-green-200 { border-color: #bbf7d0; }
.border-green-800 { border-color: #166534; }
.border-yellow-200 { border-color: #fde68a; }
.border-yellow-800 { border-color: #92400e; }
.border-red-200 { border-color: #fecaca; }
.border-red-800 { border-color: #991b1b; }
.text-left { text-align: left; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-\[22px\] { font-size: 22px; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-semibold { font-weight: 600; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.tracking-\[-0.033em\] { letter-spacing: -0.033em; }
.tracking-\[0.015em\] { letter-spacing: 0.015em; }
.tracking-light { letter-spacing: 0.025em; }
.text-black { color: #000000; }
.text-black { color: #000000; }
.text-\[#07880e\] { color: #07880e; }
.text-\[#e71008\] { color: #e71008; }
.text-green-800 { color: #166534; }
.text-green-200 { color: #bbf7d0; }
.text-green-600 { color: #16a34a; }
.text-green-400 { color: #4ade80; }
.text-yellow-800 { color: #92400e; }
.text-yellow-200 { color: #fde68a; }
.text-yellow-600 { color: #ca8a04; }
.text-yellow-400 { color: #facc15; }
.text-red-800 { color: #991b1b; }
.text-red-200 { color: #fecaca; }
.text-red-600 { color: #dc2626; }
.text-red-400 { color: #f87171; }
.text-white { color: white; }
.cursor-pointer { cursor: pointer; }
.overflow-x-auto { overflow-x: auto; }
.truncate { 
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-flow-col { grid-auto-flow: column; }
.grid-rows-\[1fr_auto\] { grid-template-rows: 1fr auto; }
.hover\:bg-\[#fcfaf8\]:hover { background-color: #fcfaf8; }
.hover\:bg-\[#2c221a\]:hover { background-color: #2c221a; }
.hover\:bg-primary\/20:hover { background-color: rgba(249, 128, 6, 0.2); }
.hover\:bg-primary\/30:hover { background-color: rgba(249, 128, 6, 0.3); }
.hover\:bg-primary\/90:hover { background-color: rgba(249, 128, 6, 0.9); }

/* Dark mode support */
.dark\:bg-background-dark { background-color: var(--background-dark); }
.dark\:bg-primary\/20 { background-color: rgba(249, 128, 6, 0.2); }
.dark\:bg-primary\/40 { background-color: rgba(249, 128, 6, 0.4); }
.dark\:bg-green-900\/30 { background-color: rgba(20, 83, 45, 0.3); }
.dark\:bg-yellow-900\/30 { background-color: rgba(133, 77, 14, 0.3); }
.dark\:bg-red-900\/30 { background-color: rgba(153, 27, 27, 0.3); }
.dark\:border-\[#3a2d21\] { border-color: #3a2d21; }
.dark\:border-green-800 { border-color: #166534; }
.dark\:border-yellow-800 { border-color: #92400e; }
.dark\:border-red-800 { border-color: #991b1b; }
.dark\:text-white { color: white; }
.dark\:text-green-200 { color: #bbf7d0; }
.dark\:text-green-400 { color: #4ade80; }
.dark\:text-yellow-200 { color: #fde68a; }
.dark\:text-yellow-400 { color: #facc15; }
.dark\:text-red-200 { color: #fecaca; }
.dark\:text-red-400 { color: #f87171; }
.dark\:text-gray-400 { color: #9ca3af; }

/* Responsive Grid */
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Custom styles for better integration */
.dashboard-container {
  background: var(--background-light);
  color: var(--text-primary-light);
}

.dashboard-container.dark {
  background: var(--background-dark);
  color: var(--text-primary-dark);
}

/* Professional color scheme */
.dashboard-container {
  background: #f8fafc;
  color: #1f2937;
}

.dashboard-container .bg-white {
  background: #ffffff;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-container .bg-gray-50 {
  background: #f9fafb;
}

.dashboard-container .border-gray-300 {
  border-color: #d1d5db;
}

.dashboard-container .text-black {
  color: #000000;
}

.dashboard-container .text-gray-700 {
  color: #374151;
}

.dashboard-container .text-gray-600 {
  color: #4b5563;
}

/* Agent status cards */
.dashboard-container .bg-green-50 {
  background: #f0fdf4;
  border-color: #86efac;
}

.dashboard-container .bg-yellow-50 {
  background: #fefce8;
  border-color: #fde047;
}

.dashboard-container .bg-red-50 {
  background: #fef2f2;
  border-color: #fca5a5;
}

.dashboard-container .text-green-900 {
  color: #14532d;
}

.dashboard-container .text-yellow-900 {
  color: #713f12;
}

.dashboard-container .text-red-900 {
  color: #7f1d1d;
}

.dashboard-container .text-green-700 {
  color: #15803d;
}

.dashboard-container .text-yellow-700 {
  color: #a16207;
}

.dashboard-container .text-red-700 {
  color: #b91c1c;
}

/* Custom Scrollbar for Agent Status */
.scrollbar-thin {
  scrollbar-width: thin;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Agent Status Container */
.max-h-96 {
  max-height: 24rem;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* Agent Status Card Spacing */
.mb-4 {
  margin-bottom: 1rem;
}

.pr-2 {
  padding-right: 0.5rem;
}
/* Plain Clean AI Chat - Minimal Design */
.ai-agent-page {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  background: #ffffff !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  overflow: hidden !important;
}

.page-header {
  background: #ffffff !important;
  color: #1a1a1a !important;
  padding: 24px !important;
  text-align: center !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.page-title h1 {
  font-size: 32px !important;
  font-weight: 700 !important;
  margin: 0 0 8px 0 !important;
  color: #1a1a1a !important;
}

.page-title p {
  font-size: 18px !important;
  margin: 0 !important;
  color: #6b7280 !important;
  font-weight: 500 !important;
}

.chat-container {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Plain Chat Container */
.whatsapp-chat-container {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  background: #ffffff !important;
  border-radius: 0 !important;
  box-shadow: 0 0 0 !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Messages Container */
.messages-container {
  flex: 1 !important;
  padding: 24px !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  position: relative !important;
  z-index: 5 !important;
}

/* Message Wrapper */
.message-wrapper {
  display: flex !important;
  margin-bottom: 12px !important;
}

.message-wrapper.user {
  justify-content: flex-end !important;
}

.message-wrapper.ai {
  justify-content: flex-start !important;
}

/* Plain Message Bubbles */
.message-bubble {
  max-width: 70% !important;
  padding: 12px 16px !important;
  border-radius: 18px !important;
  position: relative !important;
  word-wrap: break-word !important;
}

.message-wrapper.ai .message-bubble {
  background: #f3f4f6 !important;
  color: #1a1a1a !important;
  border-bottom-left-radius: 4px !important;
}

.message-wrapper.user .message-bubble {
  background: #3b82f6 !important;
  color: white !important;
  border-bottom-right-radius: 4px !important;
}

/* Message Text */
.message-text {
  font-size: 15px !important;
  line-height: 1.5 !important;
  margin-bottom: 4px !important;
  font-weight: 400 !important;
}

/* Message Time */
.message-time {
  font-size: 11px !important;
  opacity: 0.6 !important;
  text-align: right !important;
  margin-top: 4px !important;
  font-weight: 500 !important;
}

.message-wrapper.ai .message-time {
  text-align: left !important;
  color: #6b7280 !important;
}

.message-wrapper.user .message-time {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Plain Input Area */
.input-area {
  background: #ffffff !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 20px !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 10 !important;
}

.input-container {
  display: flex !important;
  align-items: center !important;
  background: #f8fafc !important;
  border: 1px solid #d1d5db !important;
  border-radius: 24px !important;
  padding: 8px 16px !important;
  gap: 8px !important;
  max-width: 100% !important;
  transition: all 0.2s ease !important;
}

.input-container:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.attachment-button {
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  background: #6b7280 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: white !important;
}

.attachment-button:hover {
  background: #4b5563 !important;
}

.message-input {
  flex: 1 !important;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 15px !important;
  color: #1a1a1a !important;
  padding: 8px 0 !important;
  font-weight: 400 !important;
}

.message-input::placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
}

.message-input:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

.mic-button {
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  background: #10b981 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: white !important;
}

.mic-button:hover {
  background: #059669 !important;
}

.mic-button.active {
  background: #ef4444 !important;
}

.mic-button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

.send-button {
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  background: #3b82f6 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: white !important;
}

.send-button:hover:not(:disabled) {
  background: #2563eb !important;
}

.send-button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.icon {
  width: 16px !important;
  height: 16px !important;
}

/* Custom Scrollbar */
.messages-container::-webkit-scrollbar {
  width: 6px !important;
}

.messages-container::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
  border-radius: 3px !important;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 3px !important;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Loading States */
.loading-message {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 12px 16px !important;
  background: #f3f4f6 !important;
  border-radius: 18px !important;
  border-bottom-left-radius: 4px !important;
  max-width: 80px !important;
}

.loading-dots {
  display: flex !important;
  gap: 4px !important;
}

.loading-dots span {
  width: 6px !important;
  height: 6px !important;
  background: #6b7280 !important;
  border-radius: 50% !important;
  animation: loading 1.4s infinite ease-in-out !important;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s !important; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s !important; }
.loading-dots span:nth-child(3) { animation-delay: 0s !important; }

@keyframes loading {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header {
    padding: 20px !important;
  }
  
  .page-title h1 {
    font-size: 28px !important;
  }
  
  .chat-container {
    padding: 0 !important;
  }
  
  .messages-container {
    padding: 20px !important;
  }
  
  .input-area {
    padding: 16px !important;
  }
  
  .message-bubble {
    max-width: 85% !important;
    padding: 10px 14px !important;
  }
  
  .input-container {
    padding: 6px 12px !important;
  }
  
  .attachment-button,
  .mic-button,
  .send-button {
    width: 32px !important;
    height: 32px !important;
  }
  
  .icon {
    width: 14px !important;
    height: 14px !important;
  }
}/* My Agents - Clickable Cards */
.my-agents-container {
  padding: 24px;
  background: #f8fafc;
  min-height: 100vh;
}

.agents-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.header-content h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.header-content p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

.create-agent-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.create-agent-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Clickable Agent Card */
.agent-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: #3b82f6;
}

.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.agent-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.active {
  background: #10b981;
}

.status-dot.inactive {
  background: #6b7280;
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Delete Button - Separate from card click */
.delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
}

.delete-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.delete-btn:active {
  transform: scale(0.95);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  cursor: pointer;
  z-index: 10;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: all 0.3s ease;
  display: block;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-label .toggle-slider {
  background-color: #10b981;
}

.toggle-input:checked + .toggle-label .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-input:focus + .toggle-label .toggle-slider {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.agent-details {
  margin-bottom: 16px;
}

.agent-summary {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid #3b82f6;
}

.summary-text {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}

.agent-metrics {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metric-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.agent-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.view-link {
  color: #ff8c00;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.view-link:hover {
  color: #e67e00;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.pagination-btn {
  background: #f8fafc;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Loading State */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-container p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: #9ca3af;
  margin-bottom: 24px;
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .my-agents-container {
    padding: 16px;
  }
  
  .agents-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .agents-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .agent-card {
    padding: 16px;
  }
  
  .agent-metrics {
    flex-direction: column;
    gap: 12px;
  }
  
  .pagination {
    flex-direction: column;
    gap: 12px;
  }
}/* Agent Configuration Page - Clean Modern Design */
.agent-config-page {
  min-height: 100vh;
  background-color: #f8fafc;
  font-family: 'system-ui', -apple-system, sans-serif;
}

/* Header Section */
.config-header {
  background: linear-gradient(135deg, #ffffff 0%, #fef7f0 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 24px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-info {
  flex: 1;
}

.page-title {
  color: #1f2937;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.page-subtitle {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.save-status {
  display: flex;
  align-items: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.status-indicator.saving {
  background: #fef3c7;
  color: #d97706;
  background-color: #fef3c7;
}

.status-indicator.saved {
  background: #d1fae5;
  color: #059669;
}

.status-indicator.error {
  background: #fee2e2;
  color: #dc2626;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #6b7280;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.save-btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: none;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.save-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.save-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Navigation Tabs */
.config-nav {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-tab:hover {
  background: #f9fafb;
  color: #374151;
}

.nav-tab.active {
  background: linear-gradient(135deg, #fef7f0 0%, #fed7aa 100%);
  color: #f97316;
  font-weight: 600;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #f97316;
  border-radius: 50%;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.nav-text {
  font-weight: inherit;
}

/* Main Content */
.config-content {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-container {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  min-height: 600px;
}

/* Voice & Audio Settings Styles */
.voice-audio-settings {
  padding: 40px;
}

.voice-selection-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.voice-selection-wrapper .form-select-wrapper {
  flex: 1;
}

.preview-button {
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #374151;
}

.preview-button:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #f97316;
}

.preview-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.preview-button .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #6b7280;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}

.toggle-group:last-child {
  border-bottom: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Personality Settings Styles */
.personality-settings {
  padding: 40px;
}

.slider-group {
  margin-bottom: 32px;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.form-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.form-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.form-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.slider-value {
  font-size: 14px;
  font-weight: 600;
  color: #3b82f6;
  text-align: center;
  padding: 4px 8px;
  background: #eff6ff;
  border-radius: 6px;
  width: fit-content;
  margin: 0 auto;
}

/* Knowledge Base Settings Styles */
.knowledge-base-settings {
  padding: 40px;
}

.settings-description {
  color: #6b7280;
  font-size: 14px;
  margin: 8px 0 32px 0;
  line-height: 1.5;
}

.knowledge-base-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.upload-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 10px;
  color: #92400e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.upload-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.add-url-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-url-button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.knowledge-base-list {
  min-height: 200px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  color: #d1d5db;
  margin-bottom: 16px;
}

.empty-text {
  color: #9ca3af;
  font-size: 14px;
  margin: 0;
}

.knowledge-base-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  max-width: 100%;
  overflow: hidden;
}

.knowledge-base-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.item-icon {
  color: #6b7280;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.item-name {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 250px;
}

.item-meta {
  font-size: 12px;
  color: #6b7280;
}

.remove-button {
  width: 32px;
  height: 32px;
  border: none;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-button:hover {
  background: #fecaca;
  transform: scale(1.05);
}

/* AI Testing Settings Styles */
.ai-testing-settings {
  padding: 40px;
}

.testing-interface {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.testing-panel {
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.testing-controls {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.test-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #d1d5db;
}

.test-button.primary {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.test-button.primary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.test-button.secondary {
  background: #f9fafb;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.test-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.test-button.active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.test-button.active:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.test-button.secondary.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.test-button .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #6b7280;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.testing-console {
  flex: 1;
  padding: 20px;
}

.console-wrapper {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  min-height: 300px;
  overflow: hidden;
}

/* Basic Settings Form Styles */
.basic-settings {
  padding: 40px;
}

.settings-header {
  margin-bottom: 32px;
  text-align: center;
}

.settings-title {
  color: #1f2937;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-label {
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label::after {
  content: '*';
  color: #ef4444;
  font-size: 12px;
}

.form-input,
.form-textarea,
.form-select {
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  color: #374151;
  background-color: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
  transform: translateY(-1px);
}

.form-input:disabled {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
  border-color: #d1d5db;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.5;
}

.form-select-wrapper {
  position: relative;
}

.form-select {
  appearance: none;
  padding-right: 48px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
}

.form-select:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23f97316' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Loading States */
.agentconfig-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background-color: #ffffff;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-spinner .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #f97316;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spinner p {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
}

/* No Agent Found */
.no-agent-found {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background-color: #ffffff;
}

.no-agent-content {
  text-align: center;
  max-width: 400px;
  padding: 32px;
}

.no-agent-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-agent-content h3 {
  color: #374151;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.no-agent-content p {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.primary-button {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: none;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .config-content {
    padding: 24px;
  }
  
  .basic-settings {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .config-header {
    padding: 16px 20px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .config-nav {
    padding: 0 20px;
  }
  
  .config-content {
    padding: 20px;
  }
  
  .basic-settings {
    padding: 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .nav-container {
    gap: 4px;
  }
  
  .nav-tab {
    padding: 10px 16px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .config-header {
    padding: 12px 16px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .config-content {
    padding: 16px;
  }
  
  .basic-settings {
    padding: 20px;
  }
  
  .nav-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .nav-text {
    display: none;
  }
}

/* Smart CSV Processing Styles */
.processing-status {
  margin: 16px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  animation: pulse 2s infinite;
}

.processing-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0369a1;
  font-weight: 500;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e0f2fe;
  border-top: 2px solid #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Knowledge Base Item Status */
.knowledge-base-item.processing {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.knowledge-base-item.processed {
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.knowledge-base-item.error {
  border-left: 4px solid #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.status.processing {
  background: #fef3c7;
  color: #92400e;
}

.status.processed {
  background: #d1fae5;
  color: #065f46;
}

.status.error {
  background: #fee2e2;
  color: #991b1b;
}

.smart-csv-summary {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
}

.smart-csv-id {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}

.upload-button.processing {
  background: #fef3c7;
  color: #92400e;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Item Actions Styles */
.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.re-scrape-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.re-scrape-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.re-scrape-button:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.re-scrape-button svg {
  width: 14px;
  height: 14px;
}

/* Clickable Item Details */
.item-details.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
  padding: 4px;
  margin: -4px;
}

.item-details.clickable:hover {
  background: rgba(16, 185, 129, 0.05);
  transform: translateY(-1px);
}

.item-details.clickable:active {
  transform: translateY(0);
  background: rgba(16, 185, 129, 0.1);
}/* Custom URL Input Modal Styles */
.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;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { 
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.modal-title {
  color: #1f2937;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f9fafb;
  color: #6b7280;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 0 24px 24px 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

.url-input {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  background-color: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
}

.url-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.url-input::placeholder {
  color: #9ca3af;
}

.error-message {
  color: #dc2626;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 24px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-end;
}

.modal-button {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  min-width: 80px;
}

.modal-button.cancel {
  background: #ffffff;
  color: #6b7280;
  border-color: #d1d5db;
}

.modal-button.cancel:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.modal-button.confirm {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border-color: #f97316;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
}

.modal-button.confirm:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(249, 115, 22, 0.3);
}

.modal-button.confirm:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: #d1d5db;
}

.modal-button.secondary {
  background: #ffffff;
  color: #6b7280;
  border-color: #d1d5db;
}

.modal-button.secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.modal-button.secondary:disabled {
  background: #f9fafb;
  color: #d1d5db;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

/* Scraping Info Styles */
.scraping-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  margin-top: 16px;
}

.scraping-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.scraping-text {
  color: #0369a1;
  font-size: 14px;
  line-height: 1.5;
}

.scraping-text strong {
  font-weight: 600;
}

/* Scraping Status Styles */
.scraping-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.scraping-status.processing {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f59e0b;
}

.scraping-status.completed {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #374151;
  font-weight: 500;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #fbbf24;
  border-top: 2px solid #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 640px) {
  .modal-container {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header {
    padding: 20px 20px 0 20px;
  }
  
  .modal-body {
    padding: 0 20px 20px 20px;
  }
  
  .modal-footer {
    padding: 20px;
    flex-direction: column;
  }
  
  .modal-button {
    width: 100%;
  }
}
/* Scraped Data Modal Styles */
.scraped-data-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.scraped-data-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.title-content h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
}

.item-type {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.close-button {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: #e5e7eb;
  color: #374151;
}

.modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.info-section {
  margin-bottom: 32px;
}

.info-section:last-child {
  margin-bottom: 0;
}

.info-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-section h4::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 2px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.url-link {
  color: #10b981;
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
}

.url-link:hover {
  text-decoration: underline;
}

.summary-content {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px;
}

.summary-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #166534;
}

.scraped-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.content-text {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metadata-item label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metadata-item span {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.smart-csv-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px;
}

.csv-id {
  margin-bottom: 12px;
}

.csv-id label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.csv-id code {
  background: #e5e7eb;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  color: #374151;
  word-break: break-all;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.processing {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.status-badge.processed {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.status-badge.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.secondary-button {
  padding: 10px 20px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-button:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .scraped-data-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-header,
  .modal-content,
  .modal-footer {
    padding: 16px;
  }
  
  .info-grid,
  .metadata-grid {
    grid-template-columns: 1fr;
  }
  
  .title-content h3 {
    font-size: 16px;
  }
}
/* AI Testing Component - Simplified and Clean */
.ai-testing-settings {
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: 'system-ui', -apple-system, sans-serif;
}

.settings-header {
  margin-bottom: 24px;
}

.settings-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.settings-description {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.testing-interface {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.testing-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.test-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-button.primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.test-button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.test-button.active {
  background: #dc2626;
  color: white;
}

.test-button.active:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.test-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.record-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #374151;
}

.record-button:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.record-button.recording {
  background: #fef2f2;
  border-color: #f87171;
  color: #dc2626;
  animation: pulse 2s infinite;
}

.record-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.agent-info {
  background: #f0fdf4;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}

.agent-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.agent-info p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.agent-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-item {
  font-size: 14px;
  color: #374151;
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.detail-item strong {
  color: #111827;
  font-weight: 600;
}

.error-screen {
  text-align: center;
  padding: 40px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.error-screen h3 {
  font-size: 20px;
  font-weight: 600;
  color: #dc2626;
  margin: 0 0 16px 0;
}

.error-screen p {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.retry-button {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.retry-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

/* Status Indicators */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.status-indicator.connected {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.status-indicator.recording {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #f87171;
}

.status-indicator.disconnected {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-testing-settings {
    padding: 16px;
  }
  
  .testing-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .test-button,
  .record-button {
    justify-content: center;
    width: 100%;
  }
  
  .agent-details {
    flex-direction: column;
    gap: 8px;
  }
  
  .detail-item {
    text-align: center;
  }
}/* components/callhistory/CallHistory.css */
.call-history-container {
  padding: 20px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header h1 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 4px;
}

.page-header p {
  font-size: 16px;
  color: var(--gray-500);
}

.call-history-table-wrapper {
  overflow-x: auto;
}

.call-history-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.call-history-table-wrapper th,
.call-history-table-wrapper td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.call-history-table-wrapper thead {
  background-color: rgba(255, 255, 255, 0.2);
}

.call-history-table-wrapper th {
  font-size: 14px;
  color: var(--text-light);
}

.call-history-table-wrapper .clickable-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.call-history-table-wrapper .clickable-row:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.call-history-table-wrapper .summary-cell {
  white-space: normal;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-calls-message {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
}

@media (max-width: 600px) {
  .call-history-container {
    padding: 10px;
  }
  .call-history-table-wrapper th, .call-history-table-wrapper td {
    padding: 8px 10px;
    font-size: 13px;
  }
}/* components/callhistory/CallTranscript.css */
.call-transcript-container {
  padding: 20px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.call-transcript-container .page-header .back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--text);
  margin-bottom: 16px;
}

.transcript-view-area {
  flex-grow: 1;
  display: flex;
  overflow: hidden;
  padding: 20px;
}

.transcript-chat-log {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 10px; /* Space for scrollbar */
}
/* components/paymentgateway/PaymentGateway.css */
.payment-gateway-container {
  padding: 20px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header h1 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 4px;
}

.page-header p {
  font-size: 16px;
  color: var(--gray-500);
}

.payment-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.subscription-plan h3, .payment-method h3, .billing-history h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.plan-details {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.plan-name {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-blue-headers);
}

.plan-price {
  font-size: 16px;
  color: var(--text);
}

.subscription-plan p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.card-brand {
  font-weight: bold;
  font-size: 16px;
}

.card-number {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
}

.billing-table-wrapper {
  overflow-x: auto;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
}

.billing-table th,
.billing-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.billing-table thead {
  background-color: rgba(255, 255, 255, 0.2);
}

.billing-table th {
  font-size: 14px;
  color: var(--text-light);
}

.billing-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.billing-table .status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-transform: capitalize;
}

.billing-table .status-badge.paid {
  background-color: #e8f5e9; /* Light green */
  color: var(--Green-700);
}

.billing-table .action-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
}

.billing-table .action-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
}

/* Payment Plans Section */
.payment-plans h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.plan-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-blue-headers);
}

.plan-card.current-plan {
  border-color: var(--accent-blue-headers);
  background: rgba(59, 130, 246, 0.1);
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.plan-header h4 {
  font-size: 20px;
  font-weight: bold;
  color: var(--text);
  margin: 0;
}

.plan-price {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-blue-headers);
  text-align: right;
}

.plan-price span {
  font-size: 14px;
  color: var(--text-light);
  font-weight: normal;
}

.plan-description {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.plan-features li {
  padding: 6px 0;
  color: var(--text);
  font-size: 14px;
  position: relative;
  padding-left: 20px;
}

.plan-features li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-blue-headers);
  font-weight: bold;
}

.plan-button {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--accent-blue-headers);
  border-radius: 8px;
  background: transparent;
  color: var(--accent-blue-headers);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.plan-button:hover:not(:disabled) {
  background: var(--accent-blue-headers);
  color: white;
}

.plan-button.current {
  background: var(--accent-blue-headers);
  color: white;
  cursor: default;
}

.plan-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error Message */
.error-message {
  text-align: center;
  padding: 40px 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  margin: 20px 0;
}

.error-message h3 {
  color: #ef4444;
  margin-bottom: 12px;
}

.error-message p {
  color: var(--text-light);
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .payment-gateway-container {
    padding: 10px;
  }
  
  .plans-grid {
    grid-template-columns: 1fr;
  }
  
  .plan-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .plan-price {
    margin-top: 8px;
  }
}/* Developer Page - Modern Theme Matching Application */
.developer-page {
  min-height: 100vh;
  background-color: #f8fafc;
  font-family: 'system-ui', -apple-system, sans-serif;
}

/* Header Section */
.developer-header {
  background: linear-gradient(135deg, #ffffff 0%, #fef7f0 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 24px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  flex: 1;
}

.header-info {
  flex: 1;
}

.page-title {
  color: #1f2937;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.page-subtitle {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
  font-weight: 400;
}

.header-stats {
  display: flex;
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 16px 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  min-width: 100px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Content */
.developer-content {
  display: flex;
  min-height: calc(100vh - 120px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Sidebar */
.developer-sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
}

.nav-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #6b7280;
  text-align: left;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-item:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-item.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.nav-icon {
  font-size: 18px;
}

.nav-text {
  font-size: 14px;
  font-weight: 500;
}

/* Main Content Area */
.developer-main {
  flex: 1;
  padding: 32px 0;
  overflow-y: auto;
}

.content-container {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-height: 600px;
}

/* Loading State */
.developer-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background-color: #f8fafc;
}

.loading-spinner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #f97316;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-spinner p {
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

/* Data Table Styles */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.data-table th {
  background: #f8fafc;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937;
  font-size: 14px;
}

.data-table tr:hover {
  background: #f9fafb;
}

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

.data-table code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
}

.data-table .action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.data-table .action-btn:hover {
  background: #f3f4f6;
  color: #ef4444;
}

/* Status Badge */
.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background-color: #dcfce7;
  color: #166534;
}

.status-badge.inactive {
  background-color: #f1f5f9;
  color: #64748b;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
  background-color: #f97316;
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #e5e7eb;
  color: #374151;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}

.form-textarea:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Card Styles */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.card-content {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #6b7280;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  margin: 0 0 24px 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .developer-content {
    padding: 0 20px;
  }
  
  .content-container {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .developer-header {
    padding: 20px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .header-stats {
    width: 100%;
    justify-content: space-between;
  }

  .developer-content {
    flex-direction: column;
    padding: 0 20px;
  }

  .developer-sidebar {
    width: 100%;
    padding: 20px;
  }

  .nav-items {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-item {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .developer-main {
    padding: 20px 0;
  }

  .content-container {
    padding: 20px;
  }

  .data-table-wrapper {
    overflow-x: auto;
  }

  .data-table th,
  .data-table td {
    padding: 12px 8px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 24px;
  }

  .stat-card {
    padding: 12px 16px;
    min-width: 80px;
  }

  .stat-number {
    font-size: 20px;
  }

  .nav-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .content-container {
    padding: 16px;
  }
}/* Contact Detail Modal Styles */
.contact-detail-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.contact-detail-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.contact-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.contact-details h2 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: #111827;
}

.contact-company {
  margin: 4px 0;
  color: #6B7280;
  font-size: 16px;
}

.contact-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #6B7280;
}

.close-button {
  background: none;
  border: none;
  color: #6B7280;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.close-button:hover {
  background-color: #f3f4f6;
}

.contact-status-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.last-contact {
  color: #6B7280;
  font-size: 14px;
}

.contact-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.tab-button {
  background: none;
  border: none;
  padding: 16px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #6B7280;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-button:hover {
  color: #374151;
  background-color: #f9fafb;
}

.tab-button.active {
  color: #3B82F6;
  border-bottom-color: #3B82F6;
  background-color: #f9fafb;
}

.contact-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Overview Section */
.overview-section {
  max-width: 800px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.stat-card h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #6B7280;
  font-weight: 500;
}

.stat-number {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: #111827;
}

/* Calls Section */
.calls-section {
  height: 100%;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6B7280;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #3B82F6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.calls-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  height: 500px;
}

.calls-list {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow-y: auto;
}

.calls-list h3 {
  margin: 0;
  padding: 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 16px;
  font-weight: 600;
}

.call-item {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background-color 0.2s;
}

.call-item:hover {
  background-color: #f9fafb;
}

.call-item.selected {
  background-color: #eff6ff;
  border-left: 3px solid #3B82F6;
}

.call-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.call-date {
  font-size: 14px;
  color: #6B7280;
}

.call-duration {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.call-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.call-agent {
  font-size: 14px;
  color: #6B7280;
}

.call-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #d1d5db;
  font-size: 14px;
}

.star.filled {
  color: #fbbf24;
}

.call-sentiment {
  display: flex;
  justify-content: flex-end;
}

.sentiment-badge {
  padding: 4px 8px;
  border-radius: 12px;
  color: white;
  font-size: 12px;
  font-weight: 500;
}

/* Call Details Panel */
.call-details-panel {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow-y: auto;
}

.call-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.call-details-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.call-time {
  font-size: 14px;
  color: #6B7280;
}

.call-details-content {
  padding: 24px;
}

.recording-section,
.transcript-section,
.summary-section,
.key-points-section,
.next-steps-section,
.rating-section {
  margin-bottom: 24px;
}

.recording-section h4,
.transcript-section h4,
.summary-section h4,
.key-points-section h4,
.next-steps-section h4,
.rating-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.audio-player {
  width: 100%;
  margin-top: 8px;
}

.transcript-content,
.summary-content {
  background: #f9fafb;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  line-height: 1.6;
  color: #374151;
}

.key-points-list,
.next-steps-list {
  margin: 0;
  padding-left: 20px;
}

.key-points-list li,
.next-steps-list li {
  margin-bottom: 8px;
  color: #374151;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rating-number {
  font-size: 24px;
  font-weight: bold;
  color: #111827;
}

.sentiment-display {
  margin-left: auto;
}

/* Notes Section */
.notes-section {
  max-width: 600px;
}

.notes-editor h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
}

.notes-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 16px;
}

.notes-textarea:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.save-notes-button {
  background: #3B82F6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.save-notes-button:hover {
  background: #2563eb;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: #6B7280;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-detail-modal {
    margin: 10px;
    max-height: 95vh;
  }
  
  .calls-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .contact-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .contact-meta {
    flex-direction: column;
    gap: 4px;
  }
}
/* components/contacts/AddContactModal.css */

.add-contact-modal h2 {
  margin-top: 0;
  font-size: 22px;
  color: var(--text);
}

.add-contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

/* Re-using form styles from agent config for consistency */
.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-light);
  background-color: var(--surface-interactive);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-family);
  font-size: 16px;
  box-sizing: border-box;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--surface-light);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .cancel-button {
  background-color: var(--surface-interactive);
  color: var(--text-primary-light);
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.modal-actions .save-button {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}/* components/contacts/Contacts.css */
.contacts-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: var(--background-light);
}

.contacts-loading .loading-spinner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.contacts-loading .spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.contacts-loading p {
  color: var(--text-secondary-light);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.empty-contacts {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-top: 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-contacts h3 {
  color: var(--text-primary-light);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.empty-contacts p {
  color: var(--text-secondary-light);
  font-size: 16px;
  margin: 0 0 24px 0;
}

.primary-button {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.contacts-container {
  padding: 20px;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--surface-interactive);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0 12px;
  width: 100%;
  max-width: 400px;
}

.search-bar .icon {
  color: var(--text-light);
}

.search-bar input {
  border: none;
  background: transparent;
  padding: 12px 8px;
  font-size: 16px;
  color: var(--text);
  width: 100%;
}

.search-bar input:focus {
  outline: none;
}

.contacts-table-wrapper {
  overflow-x: auto;
}

.contacts-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.contacts-table-wrapper th,
.contacts-table-wrapper td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.contacts-table-wrapper th {
  cursor: pointer;
  user-select: none;
  color: var(--text-light);
}

.contacts-table-wrapper th .icon {
  font-size: 16px;
  vertical-align: middle;
}

.contacts-table-wrapper tbody tr {
  cursor: pointer;
  transition: background-color 0.2s;
}

.contacts-table-wrapper tbody tr:hover {
  background-color: var(--sidebar-light);
}

.status-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.no-results-message {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}/* CRM Dashboard Styles - Matching Application Theme */
.crm-dashboard {
  padding: 24px;
  background: var(--background-light);
  min-height: 100vh;
  font-family: var(--font-family);
}

.crm-header {
  margin-bottom: 32px;
}

.crm-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.crm-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.crm-title h1 {
  color: var(--text-primary-light);
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.crm-title p {
  color: var(--text-secondary-light);
  font-size: 16px;
  margin: 4px 0 0 0;
}

/* Stats Grid */
.crm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-interactive);
  border-radius: 8px;
}

.stat-content h3 {
  color: var(--text-secondary-light);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 4px 0;
}

.stat-value {
  color: var(--text-primary-light);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

/* Tabs */
.crm-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.tab-button {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary-light);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--text-primary-light);
  background: var(--surface-interactive);
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface-interactive);
}

/* Content */
.crm-content {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.overview-card {
  background: var(--background-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
}

.overview-card h3 {
  color: var(--text-primary-light);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

/* Status Distribution */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-label {
  color: var(--text-secondary-light);
  font-size: 14px;
  font-weight: 500;
  min-width: 80px;
}

.status-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-interactive);
  border-radius: 4px;
  overflow: hidden;
}

.status-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.status-count {
  color: var(--text-primary-light);
  font-size: 14px;
  font-weight: 600;
  min-width: 20px;
  text-align: right;
}

/* Performance Metrics */
.performance-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-label {
  color: var(--text-secondary-light);
  font-size: 14px;
  font-weight: 500;
  min-width: 120px;
}

.metric-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-interactive);
  border-radius: 4px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff6b35);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.metric-value {
  color: var(--text-primary-light);
  font-size: 14px;
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

/* Content Headers */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.content-header h3 {
  color: var(--text-primary-light);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.add-button {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h4 {
  color: var(--text-primary-light);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.empty-state p {
  color: var(--text-secondary-light);
  font-size: 14px;
  margin: 0 0 20px 0;
}

.primary-button {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Lists */
.leads-list,
.meetings-list,
.ai-activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-item,
.meeting-item,
.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--background-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.lead-item:hover,
.meeting-item:hover,
.activity-item:hover {
  background: var(--surface-interactive);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lead-info h4,
.meeting-info h4,
.activity-info h4 {
  color: var(--text-primary-light);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.lead-info p,
.meeting-info p,
.activity-info p {
  color: var(--text-secondary-light);
  font-size: 14px;
  margin: 0 0 8px 0;
}

.status-badge,
.outcome-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge.new,
.outcome-badge.interested {
  background: #e3f2fd;
  color: #1976d2;
}

.status-badge.contacted,
.outcome-badge.callback {
  background: #fff3e0;
  color: #f57c00;
}

.status-badge.qualified,
.outcome-badge.meeting_booked {
  background: #e8f5e8;
  color: #388e3c;
}

.status-badge.converted {
  background: #e8f5e8;
  color: #388e3c;
}

.status-badge.lost {
  background: #ffebee;
  color: #d32f2f;
}

.meeting-time,
.activity-time {
  color: var(--text-secondary-light);
  font-size: 12px;
}

.sentiment-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}

.sentiment-badge.positive {
  background: #e8f5e8;
  color: #388e3c;
}

.sentiment-badge.neutral {
  background: #f5f5f5;
  color: #666;
}

.sentiment-badge.negative {
  background: #ffebee;
  color: #d32f2f;
}

.lead-actions,
.meeting-actions {
  display: flex;
  gap: 8px;
}

.action-button {
  padding: 6px 12px;
  background: var(--surface-light);
  color: var(--text-primary-light);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-button:hover {
  background: var(--surface-interactive);
  border-color: var(--primary);
  color: var(--primary);
}

/* Loading State */
.crm-dashboard-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: var(--background-light);
}

.loading-spinner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-spinner p {
  color: var(--text-secondary-light);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .crm-dashboard {
    padding: 16px;
  }
  
  .crm-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .overview-grid {
    grid-template-columns: 1fr;
  }
  
  .lead-item,
  .meeting-item,
  .activity-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .lead-actions,
  .meeting-actions {
    width: 100%;
    justify-content: flex-end;
  }
}/* Workflow Templates Modal Styles */
.workflow-templates-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

.workflow-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 24px;
}

.header-content {
  flex: 1;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.modal-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.modal-body {
  padding: 0 24px 24px 24px;
}

.templates-filters {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.template-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #f97316;
}

.template-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.template-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 115, 22, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
}

.template-info {
  flex: 1;
}

.template-name {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.template-description {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.template-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.complexity-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.time-estimate {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.template-features {
  margin-bottom: 16px;
}

.template-features h4 {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.template-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.template-features li {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  padding-left: 12px;
  position: relative;
}

.template-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 600;
}

.template-actions {
  display: flex;
  justify-content: flex-end;
}

.use-template-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.use-template-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.template-details {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.details-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.close-details {
  background: none;
  border: none;
  font-size: 20px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-details:hover {
  background: #e5e7eb;
  color: #374151;
}

.setup-steps {
  margin-bottom: 20px;
}

.setup-steps h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.setup-steps ol {
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.setup-steps li {
  margin-bottom: 4px;
}

.template-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.implement-btn {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.implement-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.preview-btn {
  background: #ffffff;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preview-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

/* Animations */
@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .workflow-modal {
    margin: 20px;
    max-width: calc(100vw - 40px);
  }

  .templates-grid {
    grid-template-columns: 1fr;
  }

  .template-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .template-meta {
    align-self: flex-start;
    flex-direction: row;
    gap: 8px;
  }

  .template-actions {
    flex-direction: column;
  }

  .implement-btn,
  .preview-btn {
    width: 100%;
  }
}
/* Integrations Page Styles - Matching Application Theme */
.integrations-page {
  min-height: 100vh;
  background-color: #f8fafc;
  font-family: 'system-ui', -apple-system, sans-serif;
}

/* Header Section */
.integrations-header {
  background: linear-gradient(135deg, #ffffff 0%, #fef7f0 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 24px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content {
  flex: 1;
}

.page-title {
  color: #1f2937;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.page-subtitle {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.workflow-templates-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
}

.workflow-templates-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.header-stats {
  display: flex;
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 16px 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  min-width: 100px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Content */
.integrations-content {
  display: flex;
  min-height: calc(100vh - 120px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Sidebar */
.integrations-sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
}

.category-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #6b7280;
  text-align: left;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.filter-icon {
  font-size: 16px;
}

/* Main Grid */
.integrations-main {
  flex: 1;
  padding: 32px 0;
  overflow-y: auto;
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
}

/* Integration Cards */
.integration-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.integration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.integration-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
}

.integration-card:hover::before {
  opacity: 1;
}

.integration-card.connected::before {
  opacity: 1;
  background: linear-gradient(135deg, #10b981, #059669);
}

.integration-card.error::before {
  opacity: 1;
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.integration-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 115, 22, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

.integration-info {
  flex: 1;
}

.integration-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.integration-description {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.integration-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
}

.status-text {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-content {
  margin-bottom: 20px;
}

.integration-features {
  margin-bottom: 16px;
}

.features-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.feature-check {
  color: #10b981;
  font-weight: 600;
}

.integration-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.meta-label {
  color: #6b7280;
  font-weight: 500;
}

.meta-value {
  color: #1f2937;
  font-weight: 600;
}

.meta-link {
  color: #f97316;
  text-decoration: none;
  font-weight: 500;
}

.meta-link:hover {
  text-decoration: underline;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn.connect {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}

.action-btn.connect:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.action-btn.disconnect {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.action-btn.disconnect:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

/* Loading State */
.integrations-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: white;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.integration-setup-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 24px;
}

.modal-title-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.modal-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.modal-body {
  padding: 0 24px 24px 24px;
}

.setup-instructions {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.setup-instructions h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.setup-instructions ol {
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.credentials-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required {
  color: #ef4444;
}

.form-input {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #f9fafb;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
  background: white;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.modal-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.cancel-button {
  background: #f3f4f6;
  color: #6b7280;
}

.cancel-button:hover {
  background: #e5e7eb;
}

.connect-button {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}

.connect-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.connect-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .integrations-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .integrations-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }

  .header-stats {
    width: 100%;
    justify-content: space-between;
  }

  .integrations-content {
    flex-direction: column;
  }

  .integrations-sidebar {
    width: 100%;
    padding: 20px;
  }

  .category-filters {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .filter-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .integrations-main {
    padding: 20px;
  }

  .integrations-grid {
    grid-template-columns: 1fr;
  }

  .integration-card {
    padding: 20px;
  }

  .integration-setup-modal {
    margin: 20px;
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 24px;
  }

  .integration-card {
    padding: 16px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .integration-status {
    align-self: flex-end;
  }
}

/* Documentation Button Styles - Matching Application Theme */
.action-btn.documentation {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.action-btn.documentation::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.action-btn.documentation:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.action-btn.documentation:hover::before {
  left: 100%;
}

.action-btn.documentation:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Documentation Modal Styles - Matching Application Theme */
.documentation-modal {
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.documentation-modal .modal-header {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  color: white;
  padding: 24px 32px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.documentation-modal .modal-title {
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.documentation-modal .modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.documentation-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.documentation-modal .modal-body {
  padding: 32px;
  background: #f8fafc;
}

.documentation-section {
  margin-bottom: 32px;
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.documentation-section h3 {
  color: #1f2937;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px 0;
  border-bottom: 3px solid #f97316;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.documentation-section h3::before {
  content: "📋";
  font-size: 18px;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-item:hover {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.step-item::before {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 16px;
  background: #3b82f6;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.credential-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 20px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.credential-item:hover {
  border-color: #f97316;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  transform: translateY(-1px);
}

.credential-item strong {
  color: #1f2937;
  font-weight: 700;
  font-size: 16px;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.documentation-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.documentation-link:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.documentation-link::after {
  content: "↗";
  font-size: 14px;
  opacity: 0.7;
}

.form-group.oauth-connect-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #f0f9ff;
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  margin-top: 20px;
}

.form-group.oauth-connect-group p {
  color: #3b82f6;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.modal-button.google-oauth-button {
  background-color: #4285f4; /* Google Blue */
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.4);
}

.modal-button.google-oauth-button:hover {
  background-color: #357ae8; /* Darker Google Blue */
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(66, 133, 244, 0.6);
}

.modal-button.google-oauth-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(66, 133, 244, 0.3);
}
