/* ============================================================
   VentureXperience Dashboard — Design System
   Aligned with venturexperience.ai landing visual identity
   ============================================================ */

:root {
  /* Core Colors — deep navy (not pitch black) */
  --bg-master:       #080d1a;
  --bg-surface:      #0e1525;
  --bg-card:         rgba(18, 26, 44, 0.92);
  --bg-input:        #151e30;
  --bg-hover:        rgba(37, 99, 235, 0.08);

  /* Accent Gradient (blue → cyan) */
  --gradient:        linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(37,99,235,0.15) 0%, rgba(6,182,212,0.15) 100%);

  /* Primary accent */
  --primary:         #06b6d4;
  --primary-blue:    #2563eb;
  --primary-hover:   #0891b2;

  /* Text */
  --text-main:   #f1f5f9;
  --text-sub:    #cbd5e1;
  --text-muted:  #7a8fa6;

  /* Borders — slightly more visible */
  --border:         rgba(255, 255, 255, 0.10);
  --border-accent:  rgba(6, 182, 212, 0.22);
  --border-focus:   rgba(6, 182, 212, 0.55);

  /* Shadows */
  --shadow-card:  0 4px 32px -8px rgba(0, 0, 0, 0.5);
  --shadow-glow:  0 0 40px -10px rgba(37, 99, 235, 0.2);

  /* Spacing */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-master);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  /* Subtle tech grid pattern from landing */
  background-image:
    radial-gradient(circle at 20% 20%, rgba(37,99,235,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(6,182,212,0.04) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hidden { display: none !important; }

/* ============================================================
   Glass effect
   ============================================================ */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

/* ============================================================
   App shell
   ============================================================ */
#app { width: 100%; display: flex; }
.view { width: 100%; min-height: 100vh; }

/* ============================================================
   Login View
   ============================================================ */
#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-master);
  position: relative;
  overflow: hidden;
}

/* Animated orbs */
.login-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(37,99,235,0.7) 0%, transparent 70%);
  top: -140px; left: -100px;
  animation-duration: 15s;
}
.orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(6,182,212,0.6) 0%, transparent 70%);
  bottom: -100px; right: -80px;
  animation-duration: 11s;
  animation-delay: -5s;
}
.orb-3 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(124,58,237,0.45) 0%, transparent 70%);
  top: 45%; left: 55%;
  animation-duration: 19s;
  animation-delay: -9s;
}

.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 72%);
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  33%       { transform: translateY(-28px) scale(1.05); }
  66%       { transform: translateY(18px) scale(0.97); }
}

.login-card {
  position: relative;
  z-index: 2;
  padding: 48px 44px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 0 60px -10px rgba(37,99,235,0.3), var(--shadow-card);
  border: 1px solid rgba(255,255,255,0.1);
}

.login-card .brand {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  width: 84px; height: 84px;
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(6,182,212,0.18));
  border: 1px solid rgba(6,182,212,0.28);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 0 32px -6px rgba(6,182,212,0.35);
}

.login-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
  line-height: 1.15;
}

.login-sub {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* ============================================================
   Forms & Inputs
   ============================================================ */
.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: 0.01em;
}

.input-group input,
.input-group textarea,
.input-group select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input-group input::placeholder { color: var(--text-muted); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  width: 100%;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 16px -4px rgba(37, 99, 235, 0.4);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px -4px rgba(37, 99, 235, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
  width: auto;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-accent);
}
.btn-outline:hover {
  background: rgba(6, 182, 212, 0.08);
}

/* ============================================================
   Dashboard Layout
   ============================================================ */
#view-dashboard { display: flex; }

.sidebar {
  width: 256px;
  min-width: 256px;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  border-right: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.sidebar .brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 36px;
  padding: 0 8px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

.nav-item:hover {
  color: var(--text-sub);
  background: rgba(255,255,255,0.04);
}

.nav-item.active {
  color: var(--primary);
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.12);
}

.user-profile {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-sub);
}

/* ============================================================
   Badges & Tags
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
  border: 1px solid;
}

.badge-default {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  border-color: rgba(100, 116, 139, 0.2);
}

.badge-primary {
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary);
  border-color: rgba(6, 182, 212, 0.2);
}

.badge-blue {
  background: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.2);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}

/* ============================================================
   Main content
   ============================================================ */
.main-content {
  flex: 1;
  padding: 36px 40px;
  overflow-y: auto;
  min-width: 0;
}

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

.topbar h1 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border-accent); }
.card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 18px; color: var(--text-main); }

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

/* ============================================================
   Tables
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

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

thead tr {
  border-bottom: 1px solid var(--border);
}

th {
  padding: 10px 16px;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  padding: 13px 16px;
  color: var(--text-sub);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); }

.td-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   Grid layouts
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ============================================================
   Stat card (dashboard metrics)
   ============================================================ */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-subtle);
  border: 1px solid var(--border-accent);
  flex-shrink: 0;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  stroke-width: 2;
}

.stat-body { display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.75rem; font-weight: 700; font-family: 'Outfit', sans-serif; color: var(--text-main); letter-spacing: -0.02em; }

/* ============================================================
   Toasts / Notifications
   ============================================================ */
#notification-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  background: #0f172a;
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 0.875rem;
  box-shadow: var(--shadow-card);
  animation: slideIn 0.25s ease forwards;
  pointer-events: all;
  max-width: 340px;
}

.toast.error   { border-left: 3px solid #ef4444; }
.toast.success { border-left: 3px solid #10b981; }

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================================
   Impersonation Banner
   ============================================================ */
.impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #7c3aed, #2563eb);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9000;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 2px 16px rgba(124, 58, 237, 0.3);
}

.impersonation-banner .btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  width: auto;
}

/* ============================================================
   SVG Icons (inline helper class)
   ============================================================ */
.icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sidebar { width: 200px; min-width: 200px; }
  .main-content { padding: 24px 20px; }
}

@media (max-width: 640px) {
  .sidebar { display: none; }
  .main-content { padding: 20px 16px; }
}

/* ============================================================
   Sidebar nav sections & labels
   ============================================================ */
.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 10px 6px;
  margin-top: 4px;
}
.nav-section-label:first-child { padding-top: 0; }
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

/* ============================================================
   Tab navigation system
   ============================================================ */
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn:hover { color: var(--text-sub); background: rgba(255,255,255,0.03); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(6,182,212,0.05);
}
.tab-btn svg { opacity: 0.7; }
.tab-btn.active svg { opacity: 1; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Tab badge (for unread count) */
.tab-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 20px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

/* ============================================================
   Project header sticky bar
   ============================================================ */
.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(2, 6, 23, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  margin: -32px -32px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.project-header-title { display: flex; align-items: center; gap: 12px; }
.project-header h2 { font-size: 1.0625rem; font-weight: 700; margin: 0; }
.project-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ============================================================
   Decision card — GO/NOGO prominent display
   ============================================================ */
.decision-card {
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid;
  text-align: center;
}
.decision-card.go {
  background: rgba(16,185,129,0.08);
  border-color: rgba(16,185,129,0.2);
}
.decision-card.nogo {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
}
.decision-card.pending {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.2);
}
.decision-score {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.decision-label {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0;
}

/* ============================================================
   Scope / feature list
   ============================================================ */
.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: none; }
.feature-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.feature-status-dot.done { background: #10b981; }
.feature-status-dot.in-dev { background: #06b6d4; }
.feature-status-dot.pending { background: #64748b; }
.feature-status-dot.rejected { background: #ef4444; }

/* ============================================================
   Grant tracker
   ============================================================ */
.grant-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.grant-row:last-child { border-bottom: none; }

/* ============================================================
   Mentoring session
   ============================================================ */
.session-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.session-row:last-child { border-bottom: none; }
.session-date-badge {
  background: var(--gradient-subtle);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
  flex-shrink: 0;
  min-width: 52px;
}
