.employee-directory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 11px;
}

.employee-unit-group {
  overflow: hidden;
  border: 1px solid #d7e2ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 57, 112, .055);
}

.employee-unit-group > summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 75px;
  padding: 11px 16px;
  color: #17386f;
  cursor: pointer;
  list-style: none;
  transition: background .2s ease;
}

.employee-unit-group[open] {
  grid-column: 1 / -1;
}

.employee-unit-group > summary::-webkit-details-marker { display: none; }
.employee-unit-group > summary:hover { background: #f7faff; }

.employee-unit-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #edf3ff, #dce8fb);
  color: #284494;
}

.employee-unit-icon svg { width: 24px; height: 24px; }
.employee-unit-group summary strong,
.employee-unit-group summary small { display: block; }
.employee-unit-group summary strong { font-size:calc(15px + var(--ui-font-add, 3px)); }
.employee-unit-group summary small { margin-top: 4px; color: #76849a; font-size:calc(9px + var(--ui-font-add, 3px)); }
.employee-unit-group summary b { display: none; }
.employee-unit-group summary > i { color: #284494; font-size:calc(19px + var(--ui-font-add, 3px)); font-style: normal; transition: transform .22s ease; }
.employee-unit-group[open] summary > i { transform: rotate(180deg); }
.employee-unit-group[open] > summary { border-bottom: 1px solid #e0e8f1; background: #f8fbff; }

.employee-unit-members {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 11px;
  background: #f7f9fc;
  animation: reveal .2s ease;
}

@media (max-width: 1250px) {
  .employee-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .employee-unit-members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 950px) {
  .employee-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.employee-unit-members .employee-card {
  box-shadow: 0 5px 14px rgba(27, 56, 105, .04);
}

.employee-avatar {
  overflow: hidden;
  flex: 0 0 48px;
}

.employee-avatar.has-photo { background: #dbe5f3; }
.employee-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }

@media (max-width: 700px) {
  .employee-directory { grid-template-columns: 1fr; }
  .employee-unit-members { grid-template-columns: 1fr; }
  .employee-unit-group > summary {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    min-height: 67px;
    padding: 10px 12px;
  }

  .employee-unit-icon { width: 40px; height: 40px; border-radius: 12px; }
  .employee-unit-group summary b { display: none; }
  .employee-unit-members { padding: 8px; }
}
