* { box-sizing: border-box; }

body {
  font-family: Arial, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  color: #2c2c2a;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("https://datagroup-portal.logenter.com/assets/images/Datagroup-background.jpg");
  background-size: cover;
  background-position: center;
  /* filter: blur(6px) brightness(0.95); */
  transform: scale(1.05); /* tránh lộ viền trắng do blur kéo mép ảnh */
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e0d8;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

#refresh-btn {
  border: 1px solid #b4b2a9;
  background: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
}
#refresh-btn:hover { background: #f1efe8; }

.tree-root {
  max-width: 760px;
  margin: 20px auto;
  padding: 0 16px 40px;
}

.loading, .error {
  text-align: center;
  color: #888780;
  padding: 40px 0;
}
.error { color: #a32d2d; }

/* Cong ty */
.company-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
  border: 1px solid #e2e0d8;
}
.company-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.company-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
  flex-shrink: 0;
  background: #FCEBEB;
  color: #A32D2D;
}
.company-name { font-weight: bold; font-size: 15px; }
.logo-slot {
  margin-left: auto;
  width: 110px;
  height: 36px;
  border: 1.5px dashed #F09595;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #888780;
}

/* Phong ban (dung chung cho moi cap long nhau) */
.node-group {
  border: 1px solid #e2e0d8;
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
}
.node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
}
.node-head:hover { background: #f7f6f2; }
.node-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  /* background: #fbfaf7; */
}
.node-body.open { max-height: 1000px; }
.node-body-inner { padding: 0 0 0 20px; }

.chev {
  transition: transform 0.2s ease;
  font-size: 20px;
  color: #888780;
}
.chev.open { transform: rotate(90deg); }

/* Bao cao (leaf) */
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 10px;
  font-size: 13px;
  border-top: 1px solid #ece9df;
  background: #fff;
}
.report-name {
  cursor: pointer;
  color: #444441;
}
.report-name:hover { color: #0c447c; text-decoration: underline; }
.owner {
  font-size: 12px;
  color: #888780;
  white-space: nowrap;
}
.logo-img {
  margin-left: auto;
  width: 120px;
  height: 40px;
  object-fit: contain;
}

@media (max-width: 480px) {
  .tree-root {
    margin: 12px auto;
    padding: 0 10px 30px;
  }
 
  .report-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
 
  .owner {
    white-space: normal;
    font-size: 11px;
  }
 
  .company-head {
    flex-wrap: wrap;
    row-gap: 8px;
  }
 
  .logo-img,
  .logo-slot {
    margin-left: 0;
    width: auto;
    max-width: 90px;
  }
 
  .node-body-inner {
    padding: 0 0 0 12px;
  }
}
