/* OIP Platform — Dark Dashboard */
:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --border: #1e1e2e;
  --border-light: #2a2a3e;
  --primary: #06b6d4;
  --primary-dark: #0891b2;
  --primary-glow: rgba(6,182,212,.15);
  --secondary: #8b5cf6;
  --secondary-glow: rgba(139,92,246,.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #e5e7eb;
  --text-light: #9ca3af;
  --text-muted: #6b7280;
  --sidebar-w: 260px;
  --topbar-h: 64px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Layout */
.layout { display:flex; min-height:100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(18,18,26,.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}

.sidebar-logo .logo-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Nav */
.nav-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.nav-section:last-child { border-bottom: none; }

.nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 8px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  transition: all .2s;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--primary-glow);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.nav-item .icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--primary);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Main */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: rgba(10,10,15,.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.topbar-title {
  font-size: 18px;
  font-weight: 600;
}

.topbar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}

.topbar-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.topbar-btn .dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

/* Content */
.content {
  padding: 32px;
}

/* Page Header */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  color: var(--text-muted);
  font-size: 14px;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all .3s;
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.stat-card .stat-glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: .15;
}

.stat-card .stat-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-card .stat-change {
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  transition: all .3s;
}

.card:hover {
  border-color: var(--border-light);
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.card-action {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.card-action:hover {
  text-decoration: underline;
}

/* Grid Layouts */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:24px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }

/* Opportunity Cards */
.opp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all .3s;
  cursor: pointer;
}

.opp-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

.opp-card .opp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.opp-card .opp-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--primary-glow);
  color: var(--primary);
}

.opp-card .opp-category.funding { background: rgba(16,185,129,.15); color: var(--success); }
.opp-card .opp-category.revenue { background: rgba(245,158,11,.15); color: var(--warning); }
.opp-card .opp-category.vendor { background: rgba(139,92,246,.15); color: var(--secondary); }
.opp-card .opp-category.research { background: rgba(6,182,212,.15); color: var(--primary); }
.opp-card .opp-category.compliance { background: rgba(239,68,68,.15); color: var(--danger); }
.opp-card .opp-category.saving { background: rgba(16,185,129,.15); color: var(--success); }
.opp-card .opp-category.personal { background: rgba(245,158,11,.15); color: var(--warning); }
.opp-card .opp-category.investment { background: rgba(139,92,246,.15); color: var(--secondary); }

.opp-card .opp-score {
  font-size: 24px;
  font-weight: 800;
}

.opp-card .opp-score.high { color: var(--success); }
.opp-card .opp-score.medium { color: var(--warning); }
.opp-card .opp-score.low { color: var(--danger); }

.opp-card .opp-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.opp-card .opp-source {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.opp-card .opp-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.opp-card .opp-deadline {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Score Bars */
.score-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.score-bar .score-label {
  font-size: 12px;
  color: var(--text-muted);
  width: 100px;
  text-align: right;
}

.score-bar .score-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar .score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .8s ease;
}

.score-fill.primary { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); }
.score-fill.success { background: linear-gradient(90deg, #059669, var(--success)); }
.score-fill.warning { background: linear-gradient(90deg, #d97706, var(--warning)); }
.score-fill.danger { background: linear-gradient(90deg, #dc2626, var(--danger)); }
.score-fill.secondary { background: linear-gradient(90deg, #7c3aed, var(--secondary)); }

.score-bar .score-val {
  font-size: 12px;
  font-weight: 600;
  width: 32px;
}

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

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

th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tr:hover td {
  background: rgba(6,182,212,.05);
}

/* Status Badges */
.status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.status.open { background: rgba(16,185,129,.15); color: var(--success); }
.status.closing { background: rgba(245,158,11,.15); color: var(--warning); }
.status.closed { background: rgba(107,114,128,.15); color: var(--text-muted); }
.status.submitted { background: rgba(6,182,212,.15); color: var(--primary); }
.status.approved { background: rgba(16,185,129,.15); color: var(--success); }
.status.rejected { background: rgba(239,68,68,.15); color: var(--danger); }
.status.preparing { background: rgba(139,92,246,.15); color: var(--secondary); }
.status.discovered { background: rgba(107,114,128,.15); color: var(--text-light); }
.status.interested { background: rgba(245,158,11,.15); color: var(--warning); }
.status.won { background: rgba(16,185,129,.25); color: var(--success); }
.status.lost { background: rgba(239,68,68,.2); color: var(--danger); }
.status.review { background: rgba(6,182,212,.15); color: var(--primary); }

/* Kanban */
.kanban {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-col {
  min-width: 250px;
  flex: 1;
}

.kanban-col-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-col-header .count {
  background: rgba(255,255,255,.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: grab;
  transition: all .2s;
}

.kanban-card:hover {
  border-color: var(--primary);
}

/* Priority List */
.priority-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  transition: all .2s;
}

.priority-item:hover {
  background: var(--primary-glow);
}

.priority-rank {
  font-size: 24px;
  font-weight: 800;
  width: 40px;
  text-align: center;
  color: var(--primary);
}

.priority-info { flex:1; }
.priority-info .p-title { font-weight: 600; margin-bottom: 4px; }
.priority-info .p-meta { font-size: 12px; color: var(--text-muted); }

.priority-score {
  text-align: right;
}

.priority-score .p-score {
  font-size: 28px;
  font-weight: 800;
  color: var(--success);
}

.priority-score .p-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Source Cards */
.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .2s;
}

.source-card:hover {
  border-color: var(--primary);
}

.source-icon {
  width: 40px; height: 40px;
  background: var(--primary-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.source-info { flex:1; }
.source-info .s-name { font-weight: 600; font-size: 14px; }
.source-info .s-url { font-size: 12px; color: var(--text-muted); }

.source-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.source-status.active { background: rgba(16,185,129,.15); color: var(--success); }
.source-status.pending { background: rgba(245,158,11,.15); color: var(--warning); }

/* Evidence Vault */
.vault-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .2s;
}

.vault-card:hover {
  border-color: var(--primary);
}

.vault-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.vault-icon.has-doc { background: rgba(16,185,129,.15); }
.vault-icon.missing { background: rgba(239,68,68,.15); }

.vault-info { flex:1; }
.vault-info .v-name { font-weight: 600; font-size: 14px; }
.vault-info .v-meta { font-size: 12px; color: var(--text-muted); }

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

/* Timeline */
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-dot.success { background: var(--success); }
.timeline-dot.warning { background: var(--warning); }
.timeline-dot.danger { background: var(--danger); }

.timeline-content { flex:1; }
.timeline-content .t-title { font-weight: 600; font-size: 14px; }
.timeline-content .t-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.timeline-content .t-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Playbook Steps */
.playbook-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.step-content { flex:1; }
.step-content .s-title { font-weight: 600; }
.step-content .s-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Chart Placeholder */
.chart-placeholder {
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Bar chart (simple CSS) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 20px 0;
}

.bar {
  flex: 1;
  background: linear-gradient(to top, var(--primary-dark), var(--primary));
  border-radius: 6px 6px 0 0;
  min-width: 30px;
  position: relative;
  transition: all .3s;
}

.bar:hover {
  opacity: .8;
}

.bar-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
}

/* Donut chart placeholder */
.donut {
  width: 180px; height: 180px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center {
  position: absolute;
  text-align: center;
}

.donut-center .dc-val { font-size: 28px; font-weight: 800; }
.donut-center .dc-label { font-size: 11px; color: var(--text-muted); }

/* CTA */
.cta-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6,182,212,.3);
}

/* Mobile */
@media (max-width: 1024px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .hamburger {
    display: block;
  }

  .content {
    padding: 20px;
  }

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

  .kanban {
    flex-direction: column;
  }

  .kanban-col {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Notification items */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.notif-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notif-icon.alert { background: rgba(239,68,68,.15); }
.notif-icon.info { background: rgba(6,182,212,.15); }
.notif-icon.success { background: rgba(16,185,129,.15); }

.notif-content { flex:1; }
.notif-content .n-title { font-size: 13px; font-weight: 600; }
.notif-content .n-desc { font-size: 12px; color: var(--text-muted); }
.notif-content .n-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Responsive overflow */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

.sidebar-overlay.open { display: block; }

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 600;
}

/* Profile cards */
.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.profile-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.profile-field:last-child { border-bottom: none; }
.profile-field .pf-label { color: var(--text-muted); }
.profile-field .pf-value { font-weight: 500; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .es-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-light); }
