/* ── Dashboard styles — matches landing page design tokens ── */

/* ── TOP NAV ── */
.dash-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.dash-nav-left { display: flex; align-items: center; gap: 16px; }
.dash-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.dash-logo .accent-text { color: var(--accent); }
.dash-nav-tag {
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dash-nav a.back-link {
  font-size: 14px;
  color: var(--fg-muted);
  transition: color 0.2s;
}
.dash-nav a.back-link:hover { color: var(--accent); }

/* ── LAYOUT ── */
.dash-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.dash-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
}

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-label {
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Space Grotesk', monospace;
  margin-bottom: 8px;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
}
.stat-value.accent { color: var(--accent); }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── PANELS ── */
.panel { display: none; }
.panel.active { display: block; }

/* ── CONNECTIONS ── */
.connections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.conn-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.conn-card.connected { border-color: var(--accent-soft); }
.conn-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--bg-3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.conn-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.conn-status {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.conn-status.connected { color: var(--accent); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
  background: var(--bg-3);
  color: var(--fg);
}
.btn:hover { border-color: var(--fg-muted); }
.btn-accent {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-accent:hover { opacity: 0.9; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #EF444420; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── CLIPS TABLE ── */
.clips-table {
  width: 100%;
  border-collapse: collapse;
}
.clips-table th, .clips-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.clips-table th {
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  font-weight: 600;
}
.clips-table td { font-size: 14px; }
.clips-table tr:hover { background: var(--bg-2); }
.clip-title { font-weight: 500; max-width: 300px; }
.clip-score {
  font-family: 'Space Grotesk', monospace;
  color: var(--accent);
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-detected { background: var(--blue); color: #fff; opacity: 0.8; }
.badge-approved { background: var(--accent); color: #000; }
.badge-published { background: #39FF1440; color: var(--accent); }
.badge-rejected { background: var(--red); color: #fff; opacity: 0.7; }
.badge-queued { background: var(--yellow); color: #000; opacity: 0.8; }
.badge-failed { background: var(--red); color: #fff; }

/* ── POST HISTORY ── */
.posts-list { display: flex; flex-direction: column; gap: 12px; }
.post-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.post-platform {
  font-family: 'Space Grotesk', monospace;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 4px;
  min-width: 80px;
  text-align: center;
  text-transform: uppercase;
}
.post-info { flex: 1; }
.post-title { font-weight: 500; font-size: 14px; }
.post-caption { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }
.post-meta { font-size: 12px; color: var(--fg-muted); }

/* ── EMPTY STATES ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-muted);
}
.empty-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--fg);
}
.empty-state p { max-width: 400px; margin: 0 auto 24px; font-size: 15px; }

/* ── LOADING / TOAST ── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-2);
  border: 1px solid var(--accent);
  color: var(--fg);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }

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

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .connections-grid { grid-template-columns: 1fr; }
  .dash-header { flex-direction: column; gap: 16px; align-items: flex-start; }
}
