.threeDX-genealogy {
  max-width: 1400px;
  margin: 20px auto;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.threeDX-genealogy__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.threeDX-genealogy__header h1 {
  margin: 0;
  color: #2C3E50;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
}

.threeDX-treeIcon { font-size: 2rem; }

.threeDX-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.threeDX-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, #2E9BDA, #5CB3E8);
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.threeDX-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46,155,218,.3);
}

.threeDX-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0 18px;
}

.threeDX-statCard {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.threeDX-statValue {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2E9BDA;
  margin-bottom: 6px;
}

.threeDX-statLabel {
  font-size: .9rem;
  color: #7F8C8D;
}

.threeDX-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.threeDX-search {
  flex: 1;
  min-width: 240px;
  padding: 12px 14px;
  border: 2px solid #E1E8ED;
  border-radius: 8px;
  font-size: 1rem;
}

.threeDX-search:focus { outline: none; border-color: #2E9BDA; }

.threeDX-filter {
  padding: 12px 14px;
  border: 2px solid #E1E8ED;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
}

.threeDX-treeWrap {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  overflow-x: auto;
}

.threeDX-geNode { margin: 12px 0; }

.threeDX-geNode__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #2E9BDA;
}

.threeDX-geNode__row:hover {
  background: #e7f3ff;
  box-shadow: 0 4px 12px rgba(46,155,218,.15);
}

.threeDX-geNode__row.is-root {
  border-left-color: #FF8C42;
  background: linear-gradient(135deg, rgba(255,140,66,.12), rgba(255,140,66,.06));
}

.threeDX-geToggle {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: #2E9BDA;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.threeDX-geToggle.is-empty {
  background: #E1E8ED;
  color: #7F8C8D;
  cursor: default;
}

.threeDX-geAvatar {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2E9BDA, #5CB3E8);
  color: #fff;
  font-weight: 800;
}

.threeDX-geInfo { flex: 1; min-width: 280px; }

.threeDX-geName { font-weight: 700; color: #2C3E50; margin-bottom: 4px; }
.threeDX-geYou { color: #FF8C42; font-weight: 700; margin-left: 6px; font-size: .9rem; }

.threeDX-geMeta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .86rem;
  color: #7F8C8D;
}

.threeDX-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
}
.threeDX-dot--active { background: #27AE60; }
.threeDX-dot--suspended { background: #F39C12; }
.threeDX-dot--banned { background: #E74C3C; }

.threeDX-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
}
.threeDX-badge--l12 { background: #3498DB; }
.threeDX-badge--l34 { background: #9B59B6; }
.threeDX-badge--l56 { background: #E67E22; }
.threeDX-badge--none { background: #95A5A6; }

.threeDX-geNodeStats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.threeDX-geNodeStat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff;
  font-size: .85rem;
}

.threeDX-geUserLink {
  font-size: .85rem;
  text-decoration: none;
  font-weight: 700;
}

.threeDX-geChildren {
  margin-left: 34px;
  padding-left: 16px;
  border-left: 2px dashed #E1E8ED;
}

.threeDX-legend {
  margin-top: 18px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.threeDX-legend h3 { margin: 0 0 10px; color: #2C3E50; }
.threeDX-legendItems { display: flex; gap: 16px; flex-wrap: wrap; }
.threeDX-legendItem { display: flex; align-items: center; gap: 8px; font-size: .92rem; }

.threeDX-hidden { display: none !important; }

@media (max-width: 768px) {
  .threeDX-geChildren { margin-left: 18px; padding-left: 10px; }
  .threeDX-geInfo { min-width: 220px; }
}

@media print {
  .threeDX-actions, .threeDX-controls, .threeDX-legend { display: none !important; }
  .threeDX-genealogy { background: #fff; }
  .threeDX-treeWrap { box-shadow: none; }
}
