/* BynAIrysOS Command Dashboard — uses landing page design tokens */

:root {
  --bg: #080D1A;
  --fg: #F4F5F7;
  --accent: #00E5FF;
  --accent-dim: rgba(0, 229, 255, 0.12);
  --border: rgba(0, 229, 255, 0.1);
  --card-bg: rgba(0, 229, 255, 0.04);
  --muted: rgba(244, 245, 247, 0.4);
  --success: #00D26A;
  --warning: #FFB800;
  --danger: #FF4757;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3 { font-family: 'Sora', sans-serif; }

/* ── Layout ─────────────────────────────────── */

.dashboard-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Nav ────────────────────────────────────── */

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.nav-logo span { color: var(--fg); }

.nav-actions { display: flex; gap: 12px; align-items: center; }

.nav-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Main content ────────────────────────────── */

.dashboard-main {
  padding: 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(0, 210, 106, 0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 210, 106, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(0, 210, 106, 0.05); }
}

.last-updated {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}

/* ── Metric cards ────────────────────────────── */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

.metric-card .metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 10px;
}

.metric-card .metric-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  line-height: 1;
}

.metric-card .metric-sub {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 6px;
}

.metric-card .metric-sub.positive { color: var(--success); }
.metric-card .metric-sub.negative { color: var(--danger); }

/* ── Pipeline table ─────────────────────────── */

.pipeline-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
}

.pipeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

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

.pipeline-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  background: rgba(0, 229, 255, 0.03);
}

.pipeline-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.pipeline-table tbody tr:last-child { border-bottom: none; }

.pipeline-table tbody tr:hover {
  background: rgba(0, 229, 255, 0.04);
}

.pipeline-table td {
  padding: 16px 20px;
  vertical-align: middle;
}

.partner-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.partner-type {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.negotiation { background: rgba(0, 229, 255, 0.15); color: var(--accent); }
.status-badge.pilot { background: rgba(255, 184, 0, 0.15); color: var(--warning); }
.status-badge.contracted { background: rgba(0, 210, 106, 0.15); color: var(--success); }
.status-badge.proposal { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.status-badge.closed { background: rgba(255, 71, 87, 0.15); color: var(--danger); }

/* Value column */
.value-cell {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Days badge */
.days-cell {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Activity feed ───────────────────────────── */

.activity-section { margin-bottom: 40px; }

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
}

.activity-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.activity-icon.outreach { background: rgba(0, 229, 255, 0.12); color: var(--accent); }
.activity-icon.contract { background: rgba(0, 210, 106, 0.12); color: var(--success); }
.activity-icon.meeting { background: rgba(255, 184, 0, 0.12); color: var(--warning); }
.activity-icon.update { background: rgba(244, 245, 247, 0.08); color: var(--muted); }

.activity-body { flex: 1; }

.activity-title { font-weight: 500; color: var(--fg); line-height: 1.3; }
.activity-time { font-size: 0.75rem; color: var(--muted); margin-top: 3px; }

/* ── Footer ─────────────────────────────────── */

.dashboard-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Mobile ─────────────────────────────────── */

@media (max-width: 768px) {
  .nav-bar { padding: 14px 20px; }

  .dashboard-main { padding: 24px 20px; }

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

  .pipeline-table thead { display: none; }

  .pipeline-table tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }

  .pipeline-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }

  .pipeline-table tbody tr:last-child td:last-child { border-bottom: none; }

  .pipeline-table td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    min-width: 80px;
  }

  .dashboard-footer { padding: 16px 20px; flex-direction: column; gap: 6px; text-align: center; }
}