/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f8f9fa;
  color: #1a1a1a;
  font-size: 14px;
  line-height: 1.5;
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.sidebar-header p {
  font-size: 13px;
  color: #6b7280;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 20px;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: #f9fafb;
  color: #1a1a1a;
}

.nav-item.active {
  background: #f0f9ff;
  color: #0369a1;
  border-left-color: #0369a1;
}

.nav-icon {
  font-size: 18px;
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: #f8f9fa;
  padding: 32px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.view-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.03em;
}

.view-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.view-actions .eontra-input {
  min-width: 220px;
  border-color: #d1d5db;
  font-size: 14px;
}

.view-actions .eontra-input:focus {
  border-color: #0369a1;
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.stat-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f9ff;
  color: #0369a1;
  border-radius: 8px;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

/* Startups Grid */
.startups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.startup-card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.startup-card:hover {
  border-color: #0369a1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.startup-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.startup-name {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.startup-industry {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.startup-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge.stage {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #dbeafe;
}

.badge.status {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

.badge.status.paused {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.badge.status.closed {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fee2e2;
}

.startup-description {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.startup-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #6b7280;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.startup-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Tasks List */
.tasks-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: #0369a1;
  color: #0369a1;
  background: #f0f9ff;
}

.filter-btn.active {
  background: #0369a1;
  color: white;
  border-color: #0369a1;
}

#tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  background: white;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.task-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #0369a1;
}

.task-content {
  flex: 1;
}

.task-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: #9ca3af;
}

.task-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #6b7280;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.priority-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.priority-badge.high {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fee2e2;
}

.priority-badge.medium {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.priority-badge.low {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

/* Interactions List */
#interactions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.interaction-item {
  background: white;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.interaction-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 14px;
}

.interaction-title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.interaction-type {
  display: inline-block;
  padding: 4px 12px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.interaction-description {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 12px;
}

.interaction-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #6b7280;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

/* Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.chart-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.chart-label {
  min-width: 110px;
  font-size: 14px;
  color: #1a1a1a;
  font-weight: 600;
}

.chart-bar-bg {
  flex: 1;
  height: 32px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  background: #0369a1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  color: white;
  font-size: 13px;
  font-weight: 700;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Startup Details Tabs */
.startup-details-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  transition: all 0.15s ease;
  font-weight: 600;
}

.tab-btn:hover {
  color: #1a1a1a;
  background: #f9fafb;
}

.tab-btn.active {
  color: #0369a1;
  border-bottom-color: #0369a1;
}

.tab-content {
  display: none;
}

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

.detail-row {
  display: flex;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}

.detail-label {
  width: 160px;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

.detail-value {
  flex: 1;
  color: #4b5563;
  font-size: 14px;
}

.contact-card {
  background: #f9fafb;
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #f3f4f6;
}

.contact-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.contact-role {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
  font-weight: 500;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.milestone-item {
  background: #f9fafb;
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 3px solid #9ca3af;
}

.milestone-item.completed {
  border-left-color: #15803d;
  background: #f0fdf4;
}

.milestone-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}

.milestone-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.document-item {
  background: #f9fafb;
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #f3f4f6;
}

.document-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.document-type-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Form Rows */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Modal Sizes */
.eontra-modal.large {
  max-width: 700px;
}

.eontra-modal.xlarge {
  max-width: 1000px;
}

/* Eontra Overrides for Enterprise Look */
.eontra-btn.primary {
  background: #0369a1;
  border: 1px solid #0369a1;
  font-weight: 600;
  padding: 10px 18px;
  font-size: 14px;
}

.eontra-btn.primary:hover {
  background: #075985;
  border-color: #075985;
}

.eontra-btn.secondary {
  background: white;
  border: 1px solid #d1d5db;
  color: #1a1a1a;
  font-weight: 600;
  padding: 10px 18px;
  font-size: 14px;
}

.eontra-btn.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.eontra-card {
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

.eontra-card-header {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.eontra-input,
.eontra-select,
.eontra-textarea {
  border-color: #d1d5db;
  font-size: 14px;
}

.eontra-input:focus,
.eontra-select:focus,
.eontra-textarea:focus {
  border-color: #0369a1;
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

.eontra-label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

/* Utility */
.mb-3 {
  margin-bottom: 16px;
}

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

/* Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 17px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }
  
  .sidebar-header h1,
  .sidebar-header p,
  .nav-item span:not(.nav-icon) {
    display: none;
  }
  
  .nav-item {
    justify-content: center;
  }
  
  .main-content {
    padding: 20px;
  }
  
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .view-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .stats-grid,
  .dashboard-grid,
  .startups-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}
