/* DrMate Family Hub — unified Care + Network creative design (fam100) */
.fam-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px 18px 18px;
  color: #fff;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 55%, #4f46e5 100%);
  box-shadow: 0 18px 40px -18px rgba(139, 92, 246, 0.65);
  margin-bottom: 14px;
  isolation: isolate;
}
.fam-hero::before,
.fam-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.fam-hero::before {
  width: 190px;
  height: 190px;
  background: rgba(255, 255, 255, 0.35);
  top: -70px;
  left: -50px;
  animation: fam-float 7s ease-in-out infinite;
}
.fam-hero::after {
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.25);
  bottom: -55px;
  right: 12%;
  animation: fam-float 9s ease-in-out infinite reverse;
}
@keyframes fam-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(12px) scale(1.06); }
}
.fam-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fam-hero-ic {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  flex: 0 0 auto;
}
.fam-hero-ic svg { width: 28px; height: 28px; }
.fam-hero-txt b { display: block; font-size: 19px; font-weight: 900; }
.fam-hero-txt small { display: block; font-size: 12px; opacity: 0.92; margin-top: 2px; }
.fam-avatars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  margin-top: 14px;
}
.fam-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  color: #fff;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  margin-inline-start: -10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.fam-av:first-child { margin-inline-start: 0; }
.fam-av.more {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  font-size: 12px;
}
.fam-av.self { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.fam-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.fam-stat {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  padding: 10px 6px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.fam-stat b { display: block; font-size: 19px; font-weight: 900; line-height: 1.1; }
.fam-stat span { display: block; font-size: 10.5px; opacity: 0.92; margin-top: 3px; }
.fam-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.fam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  padding: 11px 8px;
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fam-btn:active { transform: scale(0.97); }
.fam-btn.solid { background: #fff; color: #7c3aed; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.4); }
.fam-btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.fam-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-card, rgba(128, 128, 128, 0.12));
  border: 1px solid var(--border, rgba(128, 128, 128, 0.2));
  border-radius: 18px;
  padding: 6px;
  margin-bottom: 14px;
}
.fam-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  background: transparent;
  border-radius: 13px;
  padding: 11px 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary, inherit);
  cursor: pointer;
  transition: all 0.2s ease;
}
.fam-tab .cnt {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  background: rgba(128, 128, 128, 0.2);
}
.fam-tab.on {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(236, 72, 153, 0.7);
}
.fam-tab.on .cnt { background: rgba(255, 255, 255, 0.3); }
.fam-person {
  border-radius: 20px;
  overflow: hidden;
}
.fam-person .med-head { align-items: center; }
.fam-grad-0 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.fam-grad-1 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.fam-grad-2 { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.fam-grad-3 { background: linear-gradient(135deg, #10b981, #059669); }
.fam-grad-4 { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.fam-grad-5 { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.member-avatar.fam-grad-0, .member-avatar.fam-grad-1, .member-avatar.fam-grad-2,
.member-avatar.fam-grad-3, .member-avatar.fam-grad-4, .member-avatar.fam-grad-5 {
  color: #fff;
  border: none;
}
.fam-empty {
  text-align: center;
  padding: 30px 16px;
  border-radius: 20px;
  border: 2px dashed var(--border, rgba(128, 128, 128, 0.35));
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.07), transparent);
}
.fam-empty .big { font-size: 40px; display: block; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) {
  .fam-hero::before, .fam-hero::after { animation: none; }
  .fam-btn, .fam-tab { transition: none; }
}
