


:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --bg-dark: #181818;
  --card-dark: #232336;
  --gray-900: #181818;
  --gray-800: #232336;
  --gray-200: #e5e7eb;
  --gray-100: #f9fafb;
  --scheme-pastel: #cddbf9;
  --scheme-dark: #3b3f5c;
  --scheme-primary: #6366F1;
  --scheme-coral: #FF6B6B;
  --scheme-purple: #6C5CE7;
  --scheme-charcoal: #2D3436;
}

/* Primary color utilities */
.bg-primary-50{background-color:#eef2ff;}
.bg-primary-100{background-color:#e0e7ff;}
.bg-primary-200{background-color:#c7d2fe;}
.bg-primary-300{background-color:#a5b4fc;}
.bg-primary-400{background-color:#818cf8;}
.bg-primary-500{background-color:var(--primary);}
.bg-primary-600{background-color:var(--primary-dark);}
.bg-primary-700{background-color:#3730a3;}
.bg-primary-800{background-color:#312e81;}
.bg-primary-900{background-color:#1e1b4b;}
.text-primary-500{color:var(--primary);}
.text-primary-600{color:var(--primary-dark);}
.border-primary-200{border-color:#c7d2fe;}
.border-primary-500{border-color:var(--primary);}

body {
  font-family: 'Inter', sans-serif;
  background: #f6f8fa;
  color: #181818;
  transition: background 0.3s, color 0.3s;
}

.dark body {
  background: var(--bg-dark);
  color: #f6f8fa;
}

.bg-gradient {
  background: linear-gradient(90deg, #6366F1 0%, #8B5CF6 100%);
}

.gradient-text {
  background: linear-gradient(90deg,#6366F1,#8B5CF6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-name {
  font-weight: 700;
  color: var(--primary-dark);
}

input, button {
  font-family: inherit;
}

input:focus, button:focus {
  outline: 2px solid var(--primary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
  color: #4F46E5;
}

/* Card style */
.card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.dark .card {
  background: #1f2937;
  border-color: #374151;
}

.shadow {
  box-shadow: 0 2px 8px rgba(93,92,222,0.08);
}

/* Button style */
.bg-gradient {
  background: linear-gradient(90deg, #6366F1 0%, #8B5CF6 100%);
  color: #fff;
  border: none;
  border-radius: .5rem;
  padding: .75rem 1.5rem;
  font-weight: 600;
  transition: box-shadow 0.2s, opacity 0.2s;
}

button:hover, .bg-gradient:hover {
  opacity: 0.93;
  box-shadow: 0 4px 16px rgba(93,92,222,0.14);
}

input[type="text"], input[type="password"], input[type="email"] {
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  transition: border 0.2s;
  background: #fff;
  color: #181818;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  border-color: var(--primary);
  background: #fff;
}

.dark input[type="text"],
.dark input[type="password"],
.dark input[type="email"] {
  background: var(--card-dark);
  color: #f6f8fa;
  border-color: #232336;
}.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff40;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.bg-error { background-color: #dc2626; }
#sidebar {
  width: 16rem;
  transition: width 0.3s;
  position: relative;
}
#sidebar.collapsed {
  width: 5rem; /* slightly wider so icons aren't flush with the edge */
}
#sidebar.collapsed .tab-text {
  display: none;
}
#sidebar.collapsed .collapse-icon {
  transform: rotate(180deg);
}
#sidebar.collapsed .settings-title {
  display: none;
}
#sidebar.collapsed #sidebar-collapse {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}
#sidebar.collapsed nav {
  margin-top: 2rem;
}
.tab-active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.tab-inactive {
  color: #4b5563;
}
.dark .tab-inactive {
  color: #9ca3af;
}
.tab-inactive:hover {
  background-color: #f3f4f6;
  color: #111827;
}
.dark .tab-inactive:hover {
  background-color: #374151;
  color: #e5e7eb;
}
.tooltip {
  position: relative;
}
.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  background-color: #333;
  color: #fff;
  border-radius: 0.25rem;
  white-space: nowrap;
  font-size: 0.75rem;
  z-index: 10;
}

.stats-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.dark .stats-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3), 0 10px 10px -5px rgba(0,0,0,0.2);
}
.dot-pattern {
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}
.dark .dot-pattern {
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
}
.bg-gradient-primary {
  background: linear-gradient(135deg, #6366F1 0%, #A5B4FF 100%);
}
.card-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.bg-dot-pattern {
  background-image: radial-gradient(circle, #6366F1 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0;
  opacity: 0.1;
}
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 20px;
  background-color: currentColor;
  margin-left: 2px;
  animation: blink 1s infinite;
}
/* Ensure chart containers fill their parent */
.report-card, .chart-container {
  height: 100%;
  min-height: 120px;
  box-sizing: border-box;
}

.chart-container {
  position: relative;
}
.chart-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
}
.chart-toolbar button {
  padding: 0.25rem;
  border-radius: 0.25rem;
  color: #6b7280;
}
.chart-toolbar button:hover {
  background-color: rgba(99, 102, 241, 0.1);
  color: #6366F1;
}
@media (max-width: 768px) {
  .chart-container {
    height: 100%;
    min-height: 120px;
  }
}
.markdown-content h1 { font-size: 1.5rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.markdown-content h2 { font-size: 1.25rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.markdown-content h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.5rem; }
.markdown-content p { margin-bottom: 0.75rem; }
.markdown-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.markdown-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.markdown-content pre { background: rgba(0,0,0,0.05); padding: 0.5rem; border-radius: 0.375rem; overflow-x: auto; margin-bottom: 0.75rem; }
.markdown-content code { font-family: monospace; }
.markdown-content blockquote { border-left: 3px solid #6366F1; padding-left: 1rem; margin-left: 0; margin-right: 0; font-style: italic; }
.markdown-content table { width: 100%; border-collapse: collapse; margin-bottom: 0.75rem; }
.markdown-content th, .markdown-content td { padding: 0.5rem; border: 1px solid #e2e8f0; }
.dark .markdown-content pre { background: rgba(255,255,255,0.1); }
.dark .markdown-content th, .dark .markdown-content td { border-color: #4a5568; }
* {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.settings-panel { background-color: rgba(0,0,0,0.03); }
.dark .settings-panel { background-color: rgba(255,255,255,0.05); }
#settingsModal > div {
  display: flex;
}
#settingsPreview {
  width: 100%;
  height: 100%;
  flex-grow: 1;
}
.chart-type-btn.selected { background-color: #6366F1; color: #fff; }
#reportsContainer {
  position: relative;
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}
.bg-grid {
  background-image: radial-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px);
  background-size: 25px 25px;
}
.dot {
  transition: transform 0.2s;
}
.peer:checked ~ .dot {
  transform: translateX(16px);
}

/* Custom opacity background utilities */
.bg-white\/90 { --tw-bg-opacity: 0.9; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); }
.dark .bg-gray-900\/90, .dark .dark\:bg-gray-900\/90 {
  --tw-bg-opacity: 0.9;
  background-color: rgb(17 24 39 / var(--tw-bg-opacity));
}

/* Sticky positioning utilities */
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.z-10 { z-index: 10; }

/* Custom modal utilities */
.rounded-\[16px\] { border-radius: 16px; }
.modal-shadow { box-shadow: 0 8px 40px rgba(0,0,0,0.20); }


/* Modal two-pane layout enhancements */
#settingsModal .settings-panel {
  background-color: rgba(0,0,0,0.01);
}
#settingsModal .preview-panel {
  background-color: #fafbfc;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
@media (max-width: 900px) {
  #settingsModal .settings-panel,
  #settingsModal .preview-panel {
    min-width: 0 !important;
    max-width: none !important;
    border-right: none !important;
    border-bottom: 1px solid #eee;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  #settingsModal .flex-1 {
    flex-direction: column !important;
  }
}
/* Modal dimension utilities */
.w-\[90vw\] { width: 90vw; }
.max-w-\[1200px\] { max-width: 1200px; }
.h-\[90vh\] { height: 90vh; }

/* Chart type controls */
.chart-type-icon {
  transition: all 0.2s ease;
}
.chart-type-icon:hover {
  background-color: #eef2ff;
  border-color: #c7d2fe;
  color: #6366F1;
}
.chart-type-icon.active {
  background-color: #6366F1;
  border-color: #6366F1;
  color: #fff;
}
.chart-type-preview {
  position: absolute;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  pointer-events: none;
  z-index: 50;
}
.chart-type-preview svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* Glass effect utility for modern headers/footers */
.glass-effect {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.dark .glass-effect {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Additional utility classes from modern settings template */
.gradient-bg {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 50%, #eef2ff 100%);
}
.dark .gradient-bg {
  background: linear-gradient(135deg, #111827 0%, #1e3a8a 50%, #312e81 100%);
}
.loading-dots {
  display: inline-block;
}
.loading-dots:after {
  content: '';
  animation: dots 1.5s infinite;
}
@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}
.progress-glow {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}
.feature-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(245, 245, 245, 0.6));
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}
.dark .feature-card {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.75), rgba(17, 24, 39, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}
.status-indicator {
  position: relative;
}
.status-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(45deg, #6366F1, #7c3aed, #06b6d4);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.slide-in {
  animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
  0% { transform: translateX(-10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.bounce-gentle {
  animation: bounceGentle 2s infinite;
}
@keyframes bounceGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.animate-fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

/* Dashboard Details Styles */
  /* Enhanced styling for modern BI dashboard */
  .chart-type-icon { 
    transition: all 0.3s ease;
    border-radius: 8px;
  }
  .chart-type-icon:hover {
    background-color: #eef2ff;
    border-color: #c7d2fe;
    color: #6366F1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  }
  .chart-type-icon.active {
    background-color: #6366F1;
    border-color: #6366F1;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
  }
  .color-scheme { 
    width: 24px; 
    height: 24px; 
    border-radius: 6px; 
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
  }
  .color-scheme:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .color-scheme.active {
    box-shadow: 0 0 0 3px #3b82f6;
    transform: scale(1.1);
  }
  .scheme-pastel { background-color: var(--scheme-pastel); }
  .scheme-dark { background-color: var(--scheme-dark); }
  .scheme-primary { background-color: var(--scheme-primary); }
  .scheme-coral { background-color: var(--scheme-coral); }
  .scheme-purple { background-color: var(--scheme-purple); }
  .scheme-charcoal { background-color: var(--scheme-charcoal); }
  
  /* Modern report card styling */
  .report-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
  }
  .dark .report-card {
    background: #1f2937;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .report-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-2px);
  }
  .report-card.edit-mode {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 12px 40px rgba(99, 102, 241, 0.2);
  }
  .report-card.edit-mode .resize-handle {
    opacity: 1;
  }
  
  /* Report header - clean design */
  .report-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    position: relative;
  }
  .dark .report-header {
    border-bottom-color: #374151;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  }
  
  /* Fixed card action buttons positioning */
  .card-actions {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 20;
  }
  
  .card-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    color: #6b7280;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
  }
  .dark .card-action-btn {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
  }
  .card-action-btn:hover {
    background: white;
    color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }
  .dark .card-action-btn:hover {
    background: #374151;
    color: #f3f4f6;
  }
  
  /* Tooltip positioned at bottom to avoid clipping */
  .card-action-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 6px 12px;
    background: #1f2937;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  .card-action-btn[title]:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    border: 6px solid transparent;
    border-bottom-color: #1f2937;
    z-index: 1001;
  }

  /* Enhanced drag handles */
  .resize-handle {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
  }
  .resize-handle::after {
    content: '';
    position: absolute;
    background: #6366F1;
    border-radius: 2px;
  }
  .resize-handle-se {
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
  }
  .resize-handle-se::after {
    bottom: 4px;
    right: 4px;
    width: 12px;
    height: 2px;
    box-shadow: 0 4px 0 #6366F1, 0 8px 0 #6366F1;
  }

  @media (max-width: 640px) {
    .resize-handle-se {
      width: 44px;
      height: 44px;
    }
    .drag-handle {
      width: 44px;
      height: 44px;
    }
  }
  
  .report-card.is-dragging {
    z-index: 200;
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }

  /* Enhanced grid system */
  .grid-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    background-image: 
      linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 100px 100px; /* Corresponds to cellW/cellH */
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: -1; /* Ensure it is behind cards */
  }
  .edit-mode-active .grid-background {
    opacity: 1;
    z-index: 1; /* Bring it above the main background in edit mode */
  }
  
  /* Enhanced tabs */
  .report-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 6px;
    margin: 16px 20px;
  }
  .dark .report-tabs {
    background: #374151;
  }
  .tab-btn {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: #6b7280;
    font-weight: 500;
  }
  .tab-btn.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .dark .tab-btn.active {
    background: #1f2937;
    color: white;
  }
  
  /* Loading states */
  .loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
  }
  @keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  
  /* Enhanced modals */
  .modal-shadow {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
  
  /* Edit mode indicator */
  .edit-mode-indicator {
    position: fixed;
    top: 5rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  .edit-mode-indicator.active {
    transform: translateX(0);
  }
  
  /* Professional modal styling */
  .professional-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(203, 213, 225, 0.3);
  }
  .dark .professional-modal {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: rgba(71, 85, 105, 0.3);
  }
  
  /* Chat-style New Report Modal */
  .chat-modal {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 420px;
    max-height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .dark .chat-modal {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  }
  .chat-modal.active {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  
  .chat-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #6366F1, #7C3AED);
    color: white;
    border-radius: 20px 20px 0 0;
  }
  .dark .chat-header {
    border-bottom-color: #374151;
  }
  
  .chat-content {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
  }
  
  .agent-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
  }
  
  .agent-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366F1, #7C3AED);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
  }
  
  .message-bubble {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px 16px 16px 4px;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.5;
  }
  .dark .message-bubble {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
  }
  
  .typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: #f8fafc;
    border-radius: 16px 16px 16px 4px;
    margin-left: 48px;
  }
  .dark .typing-indicator {
    background: #374151;
  }
  
  .typing-dots {
    display: flex;
    gap: 4px;
  }
  .typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
  }
  .typing-dot:nth-child(2) { animation-delay: 0.2s; }
  .typing-dot:nth-child(3) { animation-delay: 0.4s; }
  
  @keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
  }
  
  .quick-examples {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  
  .example-chip {
    padding: 10px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
  }
  .dark .example-chip {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
  }
  .example-chip:hover {
    background: #e2e8f0;
    border-color: #6366F1;
    transform: translateY(-1px);
  }
  .dark .example-chip:hover {
    background: #4b5563;
  }
  
  .chat-input-container {
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    border-radius: 0 0 20px 20px;
  }
  .dark .chat-input-container {
    border-top-color: #374151;
    background: #111827;
  }
  
  .chat-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: all 0.2s;
    min-height: 44px;
    max-height: 120px;
  }
  .dark .chat-input {
    background: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
  }
  .chat-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }
  
  .send-button {
    position: absolute;
    right: 28px;
    bottom: 28px;
    width: 32px;
    height: 32px;
    background: #6366F1;
    border: none;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  .send-button:hover {
    background: #4F46E5;
    transform: scale(1.05);
  }
  .send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }
  
  /* Responsive improvements */
  @media (max-width: 768px) {
    .report-card {
      position: static !important;
      transform: none !important;
      height: auto !important;
      margin-bottom: 1rem;
    }
    .card-actions {
      position: static;
      justify-content: flex-end;
      margin-top: 12px;
    }
    .chat-modal {
      bottom: 1rem;
      right: 1rem;
      left: 1rem;
      width: auto;
    }
  }
.invalid-drop {
  border: 2px solid #f87171 !important;
  animation: shake 0.3s linear;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
