/* ----------------------------------------------------------
   XenoCRM – Enterprise SaaS UI System (Linear / Stripe / Vercel Aesthetic)
   ---------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-bg: #f8fafc;
  --color-card: #ffffff;
  --color-border: #e2e8f0;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
}

/* Base Body Styles */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Workspace Layout Edge Padding */
.p-margin-edge {
  padding: 1.5rem 2rem 2.5rem 2rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1024px) {
  .p-margin-edge {
    padding: 1.25rem 1.5rem 2rem 1.5rem !important;
  }
}

@media (max-width: 640px) {
  .p-margin-edge {
    padding: 1rem 0.875rem 1.5rem 0.875rem !important;
  }
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Shimmer Animation for Skeleton Loaders */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
.animate-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Card & Surface Classes */
.saas-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.saas-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
}

.saas-card-interactive {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.saas-card-interactive:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.1);
}

/* Sticky Header Table Style */
.saas-table-container {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
}
.saas-table {
  width: 100%;
  text-align: left;
  border-collapse: separate;
  border-spacing: 0;
}
.saas-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #f8fafc;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}
.saas-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  font-size: 0.875rem;
  vertical-align: middle;
}
.saas-table tr:last-child td {
  border-bottom: none;
}
.saas-table tr:hover td {
  background-color: #f8fafc;
}

/* Status Badges */
.badge-saas {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}
.badge-success {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-warning {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-danger {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.badge-info {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-neutral {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Button System Components */
.btn-saas {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.btn-saas:active {
  transform: scale(0.98);
}
.btn-saas-primary {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.2);
}
.btn-saas-primary:hover {
  background-color: #1d4ed8;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.3);
}
.btn-saas-secondary {
  background-color: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}
.btn-saas-secondary:hover {
  background-color: #e2e8f0;
}
.btn-saas-outline {
  background-color: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
}
.btn-saas-outline:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.btn-saas-ghost {
  background-color: transparent;
  color: #64748b;
}
.btn-saas-ghost:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}
.btn-saas-danger {
  background-color: #ef4444;
  color: #ffffff;
}
.btn-saas-danger:hover {
  background-color: #dc2626;
}

/* Button Sizes */
.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}
.btn-md {
  height: 2.25rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}
.btn-lg {
  height: 2.75rem;
  padding: 0 1.25rem;
  font-size: 1rem;
}

/* Form Inputs & Controls */
.input-saas {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.input-saas:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.input-saas::placeholder {
  color: #94a3b8;
}

/* Glass Card Elevation */
.glass-card {
  background-color: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}
