/* ═══════════════════════════════════════════════════════════════════════
   BidSpirit Marketing Dashboard — Design System
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Color Palette ── */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2236;
  --bg-card: #151d30;
  --bg-card-hover: #1c2742;
  --bg-input: #0d1321;
  --bg-sidebar: #080c16;

  --border: #1e2a45;
  --border-light: #253350;
  --border-focus: #4f8cff;

  --text-primary: #e8ecf4;
  --text-secondary: #8b95ad;
  --text-tertiary: #5c6580;
  --text-white: #ffffff;

  --accent: #4f8cff;
  --accent-hover: #6ba0ff;
  --accent-glow: rgba(79, 140, 255, 0.25);
  --accent-subtle: rgba(79, 140, 255, 0.08);

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.1);

  --purple: #a78bfa;
  --purple-bg: rgba(167, 139, 250, 0.1);
  --orange: #fb923c;
  --orange-bg: rgba(251, 146, 60, 0.1);
  --cyan: #22d3ee;
  --cyan-bg: rgba(34, 211, 238, 0.1);
  --pink: #f472b6;
  --pink-bg: rgba(244, 114, 182, 0.1);

  /* ── Gradients ── */
  --gradient-accent: linear-gradient(135deg, #4f8cff 0%, #6366f1 100%);
  --gradient-card: linear-gradient(145deg, rgba(21, 29, 48, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
  --gradient-success: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --gradient-sidebar: linear-gradient(180deg, #080c16 0%, #0a1020 100%);

  /* ── Typography ── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* ── Sizing ── */
  --sidebar-width: 260px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.35);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);
}

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ═══ Sidebar ════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--gradient-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  width: 40px; height: 40px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
}

.logo-title {
  display: block;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-white);
  letter-spacing: -0.3px;
}

.logo-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 16px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: 2px;
}

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

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon { font-size: 1.15rem; width: 24px; text-align: center; }

.nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  padding: 2px 7px;
  border-radius: 20px;
  font-family: var(--font-mono);
}

.sidebar-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid var(--border);
}

.market-share-widget { text-align: center; }

.share-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.share-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.share-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 3px;
  transition: width 1s ease;
}

.share-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

/* ═══ Main Content ═══════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 28px 36px;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-width));
}

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

.page-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ═══ Cards ══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
}

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

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

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ═══ Grid Layouts ═══════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* ═══ Status Badges ══════════════════════════════════════════════════ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.status-planning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.status-planning::before { background: var(--warning); }

.status-building {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(96, 165, 250, 0.2);
}
.status-building::before { background: var(--info); animation: pulse 2s infinite; }

.status-implemented {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.status-implemented::before { background: var(--success); }

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

/* ═══ Buttons ════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-success {
  background: var(--gradient-success);
  color: var(--text-white);
}
.btn-success:hover { box-shadow: 0 0 20px rgba(52, 211, 153, 0.25); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}
.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

/* ═══ Forms ══════════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235c6580' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
}

/* ═══ Tables ═════════════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }

tr:hover td {
  background: var(--accent-subtle);
}

/* ═══ Stat Cards ═════════════════════════════════════════════════════ */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card.blue::after { background: var(--gradient-accent); }
.stat-card.green::after { background: var(--gradient-success); }
.stat-card.purple::after { background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%); }
.stat-card.orange::after { background: linear-gradient(135deg, #fb923c 0%, #f97316 100%); }
.stat-card.cyan::after { background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%); }
.stat-card.pink::after { background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%); }

.stat-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ═══ Modal ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s ease;
}

.modal.wide {
  max-width: 950px;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ═══ Toast ══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-message {
  font-size: 0.88rem;
  color: var(--text-primary);
}

/* ═══ Dashboard Project Grid ═════════════════════════════════════════ */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.project-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
}

.project-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}

.category-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 3px 8px;
  border-radius: 4px;
}

.cat-acquisition { background: var(--purple-bg); color: var(--purple); }
.cat-equipment { background: var(--orange-bg); color: var(--orange); }
.cat-marketplace { background: var(--cyan-bg); color: var(--cyan); }
.cat-automation { background: var(--pink-bg); color: var(--pink); }

/* ── Linked Project Cards ── */
.project-card-linked {
  cursor: pointer;
}

.project-card-linked:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 16px var(--accent-glow);
}

.project-link-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all 0.2s;
}

.project-card-linked:hover .project-link-hint {
  color: var(--accent);
}

/* ═══ Platform Pricing Table ═════════════════════════════════════════ */
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.platform-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

.platform-website {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.platform-actions {
  display: flex;
  gap: 6px;
}

.pricing-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* ═══ Calculator ═════════════════════════════════════════════════════ */
.calc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.calc-result {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.calc-savings {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.calc-savings.negative {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.calc-period {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.calc-breakdown {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc-breakdown-item {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.calc-breakdown-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-white);
}

.calc-breakdown-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ═══ LinkedIn Stats ═════════════════════════════════════════════════ */
.streak-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.streak-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--orange);
}

.streak-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.goal-progress {
  margin-bottom: 12px;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.goal-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
}

.goal-count {
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.goal-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.goal-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.goal-fill.under { background: var(--gradient-accent); }
.goal-fill.met { background: var(--gradient-success); }
.goal-fill.over { background: linear-gradient(135deg, #34d399 0%, #22d3ee 100%); }

/* ═══ Activity Feed ══════════════════════════════════════════════════ */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-type-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-type-post { background: var(--info-bg); }
.activity-type-comment { background: var(--purple-bg); }
.activity-type-connection { background: var(--success-bg); }
.activity-type-message { background: var(--orange-bg); }
.activity-type-article { background: var(--cyan-bg); }
.activity-type-newsletter { background: var(--pink-bg); }
.activity-type-engagement { background: var(--warning-bg); }
.activity-type-other { background: var(--bg-tertiary); }

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-desc {
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.activity-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  gap: 12px;
}

.activity-actions {
  display: flex;
  gap: 4px;
}

/* ═══ Case Study Cards ═══════════════════════════════════════════════ */
.case-study-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
}

.case-study-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.case-study-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.case-study-location {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.case-study-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.case-study-stat {
  padding: 12px;
  text-align: center;
  background: var(--bg-card);
}

.case-study-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

.case-study-stat-label {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.case-study-footer {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ═══ AI Generated Content Display ═══════════════════════════════════ */
.ai-content {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.7;
  font-size: 0.92rem;
}

.ai-content h1, .ai-content h2, .ai-content h3 {
  color: var(--text-white);
  margin: 20px 0 10px;
}

.ai-content h1 { font-size: 1.5rem; }
.ai-content h2 { font-size: 1.2rem; }
.ai-content h3 { font-size: 1.05rem; }

.ai-content p { margin-bottom: 12px; color: var(--text-primary); }
.ai-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--accent-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.ai-content strong { color: var(--text-white); }

/* ═══ Empty State ════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1rem;
  margin-bottom: 16px;
}

/* ═══ Loading Spinner ════════════════════════════════════════════════ */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  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); }
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ═══ Settings ═══════════════════════════════════════════════════════ */
.settings-section {
  margin-bottom: 28px;
}

.settings-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ═══ Tabs ═══════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ═══ Utility ════════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-tertiary); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
