* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0F2A4B;
  --accent-color: #1E4A7B;
  --text-primary: #0F2A4B;
  --text-secondary: #4A5568;
  --bg-light: #F8FAFC;
  --border-color: #E2E8F0;
  --success-color: #10B981;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background-color: #f9fafb;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Navigation Styles */
header {
  background-color: #FFFFFF;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo span {
  color: #0F2A4B;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: #0F2A4B;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.7;
}

.nav-links a.active {
  border-bottom: 2px solid #0F2A4B;
  padding-bottom: 2px;
}

.nav-link {
  color: #0F2A4B;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  transition: opacity 0.3s;
}

.nav-link:hover {
  opacity: 0.7;
}

/* Page link styling (same as nav-link but not affected by JS) */
.nav-page-link {
  color: #0F2A4B;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  transition: opacity 0.3s;
}

.nav-page-link:hover {
  opacity: 0.7;
}

.btn-signup {
  background-color: #0F2A4B;
  color: white !important;
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn-signup:hover {
  background-color: #1E4A7B;
}

.btn-login {
  color: #0F2A4B !important;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: opacity 0.3s;
}

.btn-login:hover {
  opacity: 0.7;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
}

.mobile-menu-toggle:hover {
  background-color: #F8FAFC;
  border-radius: 4px;
}

.hamburger-line {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #0F2A4B;
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-direction: column;
    gap: 0;
    padding: 20px;
    z-index: 1000;
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    text-align: center;
  }

  .nav-links a:hover {
    background-color: #F8FAFC;
    opacity: 1;
  }

  .btn-signup {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* User dropdown in mobile menu */
  #user-menu {
    width: 100%;
  }

  #user-menu .user-dropdown {
    width: 100%;
  }

  #user-menu .user-menu-btn {
    width: 100%;
    justify-content: space-between;
  }

  #user-menu .user-dropdown-menu {
    position: static;
    margin-top: 0.5rem;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}

/* Dashboard Navigation Styles */
.nav-container {
  position: sticky;
  top: 80px;
  z-index: 40;
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
}

.nav-container.scrolled {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.nav-tabs {
  display: flex;
  gap: 2rem;
  padding: 0 1rem;
  overflow-x: auto;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: #374151;
  border-bottom-color: #d1d5db;
}

.nav-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.mobile-menu {
  display: none;
}

@media (max-width: 640px) {
  .nav-tabs {
    display: none;
  }

  .mobile-menu {
    display: block;
    padding: 0.5rem 1rem;
  }

  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-menu-button {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    cursor: pointer;
  }

  .mobile-menu-dropdown {
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  }

  .mobile-menu-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
  }

  .mobile-menu-item:last-child {
    border-bottom: none;
  }

  .mobile-menu-item:hover {
    background-color: #f9fafb;
  }

  .mobile-menu-item.active {
    background-color: #eff6ff;
    color: #1e40af;
  }
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 1.5rem 0;
}

.tab-content.active {
  display: block;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Pipeline specific grid layout */
#pipeline-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); /* 30% thinner: 320px * 0.7 = 224px */
  gap: 1rem; /* Reduced gap */
  padding-bottom: 1rem;
  /* Force scrollbar to always show */
  scrollbar-gutter: stable;
  overflow-x: scroll; /* Horizontal scrollbar always visible */
  overflow-y: hidden; /* No vertical scrollbar */
}

/* For very large screens, show more columns with thinner width */
@media (min-width: 1536px) {
  #pipeline-kanban {
    grid-template-columns: repeat(6, minmax(224px, 1fr)); /* Show all 6 stages */
  }
}

/* For large screens, show 4-5 columns */
@media (min-width: 1280px) and (max-width: 1535px) {
  #pipeline-kanban {
    grid-template-columns: repeat(5, minmax(224px, 1fr));
  }
}

/* For medium screens, show 3-4 columns */
@media (min-width: 1024px) and (max-width: 1279px) {
  #pipeline-kanban {
    grid-template-columns: repeat(4, minmax(224px, 1fr));
  }
}

/* For tablets, show 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
  #pipeline-kanban {
    grid-template-columns: repeat(2, minmax(224px, 1fr));
  }
}

/* For mobile, show 1 column */
@media (max-width: 767px) {
  #pipeline-kanban {
    grid-template-columns: repeat(1, minmax(224px, 1fr));
  }
}

/* Custom scrollbar for pipeline kanban - ALWAYS VISIBLE */
#pipeline-kanban {
  scrollbar-width: auto; /* For Firefox - use auto instead of thin for visibility */
  scrollbar-color: #666 #e5e7eb; /* For Firefox - darker thumb, lighter track */
}

/* Force scrollbar to always be visible */
#pipeline-kanban::-webkit-scrollbar {
  height: 14px; /* Make it bigger for visibility */
  -webkit-appearance: none;
  appearance: none;
}

#pipeline-kanban::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

#pipeline-kanban::-webkit-scrollbar-thumb {
  background: #6b7280; /* Darker color for better visibility */
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  min-width: 80px; /* Ensure thumb is always visible */
}

#pipeline-kanban::-webkit-scrollbar-thumb:hover {
  background: #4b5563; /* Even darker on hover */
}

/* Make scrollbar area always present */
#pipeline-kanban::-webkit-scrollbar-button {
  display: none;
}

#pipeline-kanban:hover::-webkit-scrollbar {
  height: 16px; /* Slightly larger on hover */
}

#pipeline-kanban:hover::-webkit-scrollbar-thumb {
  background: #4b5563;
}

/* Startup Card */
.startup-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  cursor: default;
  border: 2px solid transparent;
  transition: all 0.3s;
}


.startup-card.selected {
  border-color: #2563eb;
}

.startup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.startup-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.startup-author {
  font-size: 0.875rem;
  color: #6b7280;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.score-high {
  background-color: #d1fae5;
  color: #065f46;
}

.score-medium {
  background-color: #fef3c7;
  color: #92400e;
}

.score-low {
  background-color: #fee2e2;
  color: #991b1b;
}

.industry-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #dbeafe;
  color: #1e40af;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(to right, #1d4ed8, #4338ca);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

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

.btn-danger {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #e5e7eb !important;
  color: #9ca3af !important;
  border-color: #d1d5db !important;
}

.add-to-pipeline-btn:disabled {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  border-color: #d1d5db !important;
}

.btn-full {
  width: 100%;
}

/* Pipeline Styles */
.pipeline-stage {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  min-height: 24rem;
  min-width: 224px; /* 30% thinner: 320px * 0.7 = 224px */
}

.pipeline-header {
  padding: 0.5rem 0.75rem; /* Reduced padding */
  border-radius: 0.5rem 0.5rem 0 0;
  font-weight: 500;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pipeline-content {
  padding: 0.75rem; /* Reduced padding */
  min-height: 20rem;
}

.pipeline-card {
  background: white;
  padding: 0;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
  position: relative;
  min-width: 196px; /* 30% thinner: 280px * 0.7 = 196px */
}

.pipeline-card::before {
  content: "⋮⋮";
  position: absolute;
  top: 8px;
  right: 8px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1;
  opacity: 0.6;
  pointer-events: none;
}

.pipeline-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.pipeline-card.dragging {
  opacity: 0.7;
  cursor: grabbing;
  transform: rotate(3deg) scale(1.05);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border: 2px solid #3b82f6;
}

.remove-from-pipeline-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pipeline-card:hover .remove-from-pipeline-btn {
  opacity: 1;
}

.pipeline-card.dragging .remove-from-pipeline-btn {
  display: none;
}

.pipeline-stage.drag-over {
  box-shadow: 0 0 0 3px #10b981;
  border-radius: 0.5rem;
  background-color: rgba(16, 185, 129, 0.1);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

.pipeline-stage.drag-over .pipeline-content {
  min-height: 22rem;
  border: 2px dashed #10b981;
  border-radius: 0.5rem;
  background-color: rgba(16, 185, 129, 0.05);
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Filter Section */
.filter-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.input-field {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  width: 100%;
}

.input-field:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Comparison Table */
.comparison-table {
  overflow-x: auto;
}

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

.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.comparison-table th {
  background-color: #f9fafb;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.comparison-table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Loading State */
.loading-skeleton {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.skeleton-box {
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  height: 1rem;
  margin-bottom: 0.5rem;
}

/* Utility Classes */
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.75rem;
}
.text-lg {
  font-size: 1.125rem;
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.text-gray-500 {
  color: #6b7280;
}
.text-gray-600 {
  color: #4b5563;
}
.text-gray-900 {
  color: #111827;
}
.text-blue-600 {
  color: #2563eb;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mt-4 {
  margin-top: 1rem;
}
.space-y-2 > * + * {
  margin-top: 0.5rem;
}
.space-y-4 > * + * {
  margin-top: 1rem;
}
.hidden {
  display: none;
}
.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.font-bold {
  font-weight: 700;
}

/* Investor Code Display Styles */
.investor-code-container {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.investor-code-container:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: #94a3b8;
}

.investor-code-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0; /* Allow content to shrink */
}

.investor-code-label {
  font-weight: 500;
  color: #475569;
  font-size: 0.95rem;
  white-space: nowrap;
}

.investor-code-value {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: #0F2A4B;
  background: white;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 100px;
}

.investor-code-value:hover {
  border-color: #0F2A4B;
  box-shadow: 0 2px 4px rgba(15, 42, 75, 0.1);
}

.investor-code-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #0F2A4B;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.investor-code-btn:hover {
  background: #1e3a5f;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 42, 75, 0.2);
}

.investor-code-btn:active {
  transform: translateY(0);
}

.investor-code-btn .copy-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Responsive design for smaller viewports */
@media (max-width: 640px) {
  .investor-code-container {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 10px;
  }

  .investor-code-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .investor-code-label {
    font-size: 0.875rem;
  }

  .investor-code-value {
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    padding: 10px 12px;
  }

  .investor-code-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }

  .investor-code-btn .btn-text {
    display: inline;
  }
}

@media (max-width: 480px) {
  .investor-code-container {
    padding: 12px 14px;
  }

  .investor-code-label {
    font-size: 0.8rem;
  }

  .investor-code-value {
    font-size: 0.875rem;
    padding: 8px 10px;
    letter-spacing: 0.3px;
  }

  .investor-code-btn {
    font-size: 0.8rem;
    padding: 9px 14px;
  }

  .investor-code-btn .copy-icon {
    width: 14px;
    height: 14px;
  }
}

/* Medium tablets */
@media (min-width: 641px) and (max-width: 768px) {
  .investor-code-container {
    padding: 14px 18px;
  }

  .investor-code-content {
    gap: 10px;
  }

  .investor-code-value {
    font-size: 0.95rem;
    padding: 7px 14px;
  }

  .investor-code-btn {
    padding: 7px 14px;
    font-size: 0.85rem;
  }
}

/* User Dropdown Styles */
.user-dropdown {
  position: relative;
}

.user-menu-btn {
  background: none;
  border: none;
  color: #0F2A4B;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 18px;
}

.user-menu-btn:hover {
  background: #f1f5f9;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.user-dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #0F2A4B;
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-size: 16px;
}

.user-dropdown-menu a:hover {
  background: #f1f5f9;
}

/* Header user dropdown menu should be hidden by default */
.user-dropdown-menu {
  display: none;
}

.user-dropdown-menu.show {
  display: block;
}
