/* ═══════════════════════════════════════════
   Family Dashboard — Hero banner, stats bar,
   two-column layout with activity feed and sidebar.
   ═══════════════════════════════════════════ */

/* ─── Hero Banner ─── */
.dash-hero {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--sc-bark);
}

.dash-hero__image {
  position: absolute;
  inset: 0;
}

.dash-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.6;
}

.dash-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(58, 53, 48, 0.85) 0%, rgba(58, 53, 48, 0.3) 100%);
  display: flex;
  align-items: flex-end;
}

.dash-hero__content {
  max-width: var(--sc-content-max);
  margin: 0 auto;
  padding: 0 24px 28px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.dash-hero__monogram {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sc-font-display);
  font-size: 1.4rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dash-hero__name {
  font-family: var(--sc-font-display);
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 400;
  color: white;
  margin: 0 0 4px;
}

.dash-hero__desc {
  font-family: var(--sc-font-body);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin: 0;
}

/* ─── Stats Bar ─── */
.dash-stats-bar {
  background: var(--sc-warm-white);
  border-bottom: 1px solid var(--sc-border);
  position: relative;
  z-index: 1;
}

.dash-stats-bar__inner {
  max-width: var(--sc-content-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.dash-stats-bar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  font-family: var(--sc-font-ui);
  font-size: 0.85rem;
  color: var(--sc-text-secondary);
  white-space: nowrap;
}

.dash-stats-bar__item svg {
  width: 16px;
  height: 16px;
  stroke: var(--sc-text-tertiary);
  fill: none;
  opacity: 0.6;
}

.dash-stats-bar__item strong {
  font-weight: 700;
  color: var(--sc-bark);
  font-size: 1.05rem;
}

.dash-stats-bar__divider {
  width: 1px;
  height: 24px;
  background: var(--sc-border);
}

/* ─── Two-Column Layout ─── */
.dash-layout {
  max-width: var(--sc-content-max);
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.dash-main {
  flex: 1;
  min-width: 0;
}

/* ─── Section Title ─── */
.dash-section {
  margin-bottom: 32px;
}

.dash-section-title {
  font-family: var(--sc-font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sc-bark-faint);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sc-border-subtle);
}

/* ─── Nav Grid (Explore) ─── */
.dash-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dash-nav-card {
  background: var(--sc-warm-white);
  border: 1px solid var(--sc-border);
  border-radius: 12px;
  padding: 18px 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dash-nav-card:hover {
  border-color: var(--sc-sand);
  box-shadow: 0 3px 12px rgba(90, 64, 50, 0.06);
  transform: translateY(-1px);
}

.dash-nav-card--accent {
  border-color: rgba(184, 96, 63, 0.2);
  background: rgba(184, 96, 63, 0.02);
}

.dash-nav-card--accent:hover {
  border-color: var(--sc-rust-soft);
}

.dash-nav-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(90, 64, 50, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-nav-card__icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--sc-bark-faint);
  fill: none;
  stroke-width: 2;
}

.dash-nav-card__icon--accent {
  background: rgba(184, 96, 63, 0.08);
}

.dash-nav-card__icon--accent svg {
  stroke: var(--sc-rust);
}

.dash-nav-card__label {
  font-family: var(--sc-font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sc-bark);
}

.dash-nav-card__meta {
  font-family: var(--sc-font-ui);
  font-size: 0.75rem;
  color: var(--sc-text-tertiary);
}

/* ─── Sidebar ─── */
.dash-sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--sc-nav-height) + 28px);
}

.dash-sidebar__card {
  background: var(--sc-warm-white);
  border: 1px solid var(--sc-border);
  border-radius: 14px;
  padding: 18px;
}

.dash-sidebar__card--links {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-sidebar__card-label {
  font-family: var(--sc-font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sc-text-tertiary);
  margin-bottom: 12px;
}

.dash-sidebar__contributors {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.dash-sidebar__contributor {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sc-border-subtle);
  text-decoration: none;
  color: inherit;
}

.dash-sidebar__contributor:last-child { border-bottom: none; }

a.dash-sidebar__contributor {
  border-radius: 8px;
  margin: 0 -6px;
  padding: 8px 6px;
  transition: background 0.15s;
}

a.dash-sidebar__contributor:hover { background: var(--sc-cream); }

.dash-sidebar__contributor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sc-font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  color: white;
  flex-shrink: 0;
}

.dash-sidebar__contributor-name {
  font-family: var(--sc-font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sc-bark);
}

.dash-sidebar__contributor-stats {
  font-family: var(--sc-font-ui);
  font-size: 0.72rem;
  color: var(--sc-text-tertiary);
}

.dash-sidebar__link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sc-font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--sc-rust);
  text-decoration: none;
  transition: color 0.2s;
}

.dash-sidebar__link:hover { color: var(--sc-bark); }

.dash-sidebar__link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.dash-sidebar__settings-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-family: var(--sc-font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sc-bark-faint);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
}

.dash-sidebar__settings-link:hover {
  background: var(--sc-cream);
  color: var(--sc-bark);
}

.dash-sidebar__settings-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  opacity: 0.6;
}

.dash-sidebar__settings-arrow {
  margin-left: auto;
  opacity: 0.3;
}

.dash-sidebar__settings-link + .dash-sidebar__settings-link {
  border-top: 1px solid var(--sc-border-subtle);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .dash-hero { height: 180px; }
  .dash-hero__content { padding: 0 16px 20px; }
  .dash-hero__monogram { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 12px; }

  .dash-stats-bar__inner {
    padding: 0 16px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dash-stats-bar__item { padding: 12px 16px; font-size: 0.82rem; }

  .dash-layout {
    flex-direction: column;
    padding: 20px 16px 80px;
  }

  .dash-sidebar { width: 100%; position: static; }
  .dash-nav-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .dash-hero { height: 160px; }
  .dash-hero__desc { display: none; }
  .dash-stats-bar__item { padding: 10px 12px; font-size: 0.78rem; }
  .dash-nav-grid { grid-template-columns: 1fr 1fr; }
}
