/* ─── Dashboard Page ────────────────────────────────────────── */
body { padding-top: 68px; background: var(--slate-pale); }

.dash-page { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }

/* ─── Tab bar ────────────────────────────────────────────────── */
.dash-tabs {
  position: sticky; top: 68px; z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  margin: 0 -24px 32px;
}
.dash-tabs-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; gap: 0;
}
.dash-tab {
  padding: 14px 20px;
  font-size: 14px; font-weight: 600;
  color: var(--text-3);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.dash-panel.hidden { display: none; }

/* ─── Section header ─────────────────────────────────────────── */
.dash-section-header { margin-bottom: 28px; }

/* ─── Overview metrics ───────────────────────────────────────── */
.overview-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.ov-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.ov-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ov-icon { font-size: 24px; margin-bottom: 8px; }
.ov-val  { font-size: 32px; font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: 6px; }
.ov-label{ font-size: 12px; color: var(--text-3); font-weight: 500; }

@keyframes shimmer { 0%,100%{opacity:.6} 50%{opacity:1} }
.loading-pulse .ov-val { animation: shimmer 1.5s infinite; }

/* ─── Dash cards ─────────────────────────────────────────────── */
.dash-two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 20px;
}
.dash-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.dash-card.full-width { margin-bottom: 20px; }
.dash-card-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ─── Bar chart ──────────────────────────────────────────────── */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 13px; color: var(--text-2); width: 140px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 8px; background: var(--slate-pale); border-radius: 4px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 4px; transition: width .5s ease; }
.bar-fill.blue    { background: var(--blue); }
.bar-fill.emerald { background: var(--emerald); }
.bar-fill.gold    { background: var(--gold); }
.bar-count { font-size: 13px; font-weight: 700; color: var(--text-2); width: 24px; text-align: right; flex-shrink: 0; }

/* ─── Activity feed ──────────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  margin-top: 2px;
}
.activity-dot.entity  { background: var(--blue-pale); }
.activity-dot.project { background: var(--emerald-pale); }
.activity-dot.milestone { background: #fef3c7; }
.activity-body { flex: 1; }
.activity-body strong { color: var(--text); }
.activity-body span { color: var(--text-3); }
.activity-time { font-size: 12px; color: var(--text-4); white-space: nowrap; }
.activity-empty { padding: 32px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ─── Verticals dashboard ────────────────────────────────────── */
.vert-dash-grid { display: flex; flex-direction: column; gap: 32px; }
.vert-group-block {}
.vert-group-heading {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 14px;
  padding: 6px 12px; border-radius: 6px; display: inline-block;
}
.vert-group-heading.spiritual { background: var(--blue-pale); color: var(--blue); }
.vert-group-heading.physical  { background: var(--emerald-pale); color: var(--emerald); }

.vert-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.vert-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.vert-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.vert-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.vert-card-icon { font-size: 22px; }
.vert-card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.vert-card-type { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); }
.vert-stats { display: flex; gap: 12px; }
.vert-stat { text-align: center; }
.vert-stat strong { display: block; font-size: 20px; font-weight: 800; color: var(--blue); line-height: 1.1; }
.vert-stat small  { font-size: 11px; color: var(--text-3); }
.vert-progress { margin-top: 12px; }
.vert-progress-bar {
  height: 4px; background: var(--slate-pale); border-radius: 2px; overflow: hidden; margin-top: 4px;
}
.vert-progress-fill { height: 100%; border-radius: 2px; background: var(--blue); transition: width .5s ease; }

/* ─── Geographic dashboard ───────────────────────────────────── */
.geo-dash { display: flex; flex-direction: column; gap: 20px; }
.geo-level-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.geo-level-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--slate-pale);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.geo-level-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.geo-level-name { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; }
.geo-level-count { font-size: 13px; color: var(--text-3); }
.geo-level-toggle { font-size: 12px; color: var(--text-4); }

.geo-level-body { padding: 16px 20px; display: none; }
.geo-level-body.open { display: block; }
.geo-vert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.geo-vert-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--slate-pale);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  font-size: 13px;
}
.geo-vert-chip .gvc-count {
  margin-left: auto; font-size: 13px; font-weight: 700; color: var(--blue);
}
.geo-empty { font-size: 13px; color: var(--text-4); padding: 8px 0; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dash-two-col { grid-template-columns: 1fr; }
  .overview-metrics { grid-template-columns: repeat(2, 1fr); }
}
