/* Modern SaaS Design System */
:root {
  /* Color Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-900: #1e3a8a;
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Typography */
  --font-family-base: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  
  /* Spacing */
  --header-height: 72px;
  --footer-height: 80px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

/* Base Styles */
html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  color: var(--gray-900);
  background-color: var(--gray-50);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Modern Navbar */
.navbar-custom {
  background-color: white !important;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  min-height: var(--header-height);
  padding: 0;
}

.navbar-custom .navbar-brand {
  font-weight: 700;
  color: var(--bs-heading-color);
}

.navbar-custom .nav-link {
  color: var(--gray-600) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--primary-600) !important;
  background-color: var(--primary-50);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
  color: var(--gray-600);
  border-color: var(--gray-300);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
  background-color: var(--gray-100);
  border-color: var(--gray-400);
  color: var(--gray-700);
}

/* Dropdown Menu */
.dropdown-menu {
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.dropdown-divider {
  border-color: var(--gray-200);
  margin: 0.5rem 0;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
}

/* Cards */
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  color: var(--gray-900);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: 700;
  line-height: 1.4;
}

.text-muted {
  color: var(--gray-500) !important;
}

/* Code blocks */
code {
  font-family: var(--font-family-mono);
  background-color: var(--gray-100);
  color: var(--gray-800);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

pre {
  background-color: var(--gray-900);
  color: var(--gray-100);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-family-mono);
}

/* Modern Footer */
.footer {
  background-color: white;
  border-top: 1px solid var(--gray-200);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h5 {
  color: var(--gray-900);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-600);
}

.footer-bottom {
  border-top: 1px solid var(--gray-200);
  padding-top: 2rem;
  text-align: center;
  color: var(--gray-500);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-custom .navbar-nav {
    padding-top: 1rem;
  }
  
  .main-content {
    padding: 1rem 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-custom {
  background-color: var(--primary-100);
  color: var(--primary-700);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* User Avatar */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Animation Utilities */

/* Avoid clash with Silicon's .fade-in class */
.fade-in-llm {
  animation: fadeIn 0.6s ease-in-out;
}

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