@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --primary-color: #4f46e5;
    --secondary-color: #10b981;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    @apply bg-slate-50 text-slate-900;
  }
}

@layer components {
  .btn-primary {
    @apply bg-primary hover:bg-indigo-600 text-white font-medium py-2 px-4 rounded-lg transition-all duration-200 shadow-sm hover:shadow-md;
  }
  
  .btn-secondary {
    @apply bg-secondary hover:bg-emerald-600 text-white font-medium py-2 px-4 rounded-lg transition-all duration-200 shadow-sm hover:shadow-md;
  }
  
  .card {
    @apply bg-white rounded-xl shadow-sm border border-slate-200 p-6;
  }
  
  .input-field {
    @apply w-full px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-primary outline-none transition-all duration-200;
  }
  
  .sidebar-link {
    @apply flex items-center gap-3 px-4 py-3 text-slate-600 hover:bg-slate-100 hover:text-primary rounded-lg transition-all duration-200;
  }
  
  .sidebar-link.active {
    @apply bg-indigo-50 text-primary font-medium;
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
  
  .animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

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

::-webkit-scrollbar-track {
  @apply bg-slate-100;
}

::-webkit-scrollbar-thumb {
  @apply bg-slate-300 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-slate-400;
}

/* Rich text editor styles */
.ql-editor {
  @apply min-h-[200px] text-slate-900 font-sans;
}

.ql-toolbar {
  @apply border-slate-200 rounded-t-lg;
}

.ql-container {
  @apply border-slate-200 rounded-b-lg;
}

/* Chart container styles */
.recharts-wrapper {
  @apply w-full;
}

.recharts-responsive-container {
  @apply w-full;
}

/* Loading skeleton */
.skeleton {
  @apply animate-pulse bg-slate-200 rounded;
}

/* Modal overlay */
.modal-overlay {
  @apply fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4;
}

.modal-content {
  @apply bg-white rounded-2xl shadow-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto;
}

/* Toast notifications */
.toast {
  @apply fixed bottom-4 right-4 bg-white rounded-lg shadow-lg border border-slate-200 p-4 z-50 animate-fade-in;
}

.toast.success {
  @apply border-l-4 border-secondary;
}

.toast.error {
  @apply border-l-4 border-red-500;
}

.toast.info {
  @apply border-l-4 border-primary;
}
