.groups-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px;
  border-bottom: 1px solid #ddd;
}

.main-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.header-container-title {
  flex-grow: 1;
  text-align: left;
  margin-left: 1em;
}

.groups-button-row {
  display: flex;
  gap: 15px;
  padding-right: 0.5rem;
}

.clients-container {
  flex-grow: 1;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0rem 1rem 0rem 0.5rem;
}

.clients-view-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
  padding-right: 1rem;
}

.clients-view {
  flex-grow: 1;
  overflow-y: auto;
}

.cards-view {
  max-height: calc(100vh - 330px);
  overflow: auto;
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  overflow: auto;
}

.cards-select-all {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 0.5rem;
  padding-left: 1rem;
}

.clients-table {
  max-height: calc(100vh - 330px);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.clients-table table {
  flex-grow: 1;
  overflow: auto;
}

.paginator-container {
  display: flex;
  justify-content: end;
  margin-top: auto;
}

.cards-paginator {
  width: 100%;
  margin-left: 1rem;
  background-color: #fafafa;
}

.list-paginator {
  width: 100%;
  background-color: #f3f3f3;
}

.actions mat-icon {
  color: #757575;
  cursor: pointer;
  transition: color 0.2s;
}

.actions mat-icon:hover {
  color: #1976d2;
}

.search-container {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.search-container mat-form-field {
  flex: 1;
}

@media (max-width: 1024px) {
  .header-container {
    flex-direction: column;
    gap: 10px;
  }

  .groups-button-row {
    flex-wrap: wrap;
    gap: 10px;
  }
}

mat-tree {
  background-color: #f9f9f9;
  padding: 0px 10px 10px 10px;
}

mat-tree mat-tree-node {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

mat-tree mat-tree-node:hover {
  background-color: #e3f2fd;
}

mat-tree mat-tree-node button.mat-icon-button {
  margin-left: auto;
  color: #757575;
}

mat-tree mat-tree-node button.mat-icon-button:hover {
  color: #1976d2;
}

mat-tree mat-tree-node span {
  font-size: 16px;
  font-weight: 500;
  color: #555;
}

mat-tree mat-tree-node mat-icon {
  margin-right: 10px;
  color: #757575;
  transition: color 0.2s;
}

mat-tree mat-tree-node.expandable mat-icon {
  color: black;
  cursor: pointer;
}

mat-tree mat-tree-node.expandable.disabled mat-icon {
  color: grey;
  opacity: 0.5;
  cursor: not-allowed;
}

mat-tree mat-tree-node:hover mat-icon {
  color: black;
}

mat-tree mat-tree-node mat-icon.node-icon {
  color: #757575;
  margin-right: 10px;
}

mat-tree mat-tree-node mat-icon.node-icon.organizational-unit {
  color: #1976d2;
}

mat-tree mat-tree-node mat-icon.node-icon.classroom {
  color: #757575;
}

mat-tree mat-tree-node mat-icon.node-icon.client {
  color: #757575;
}

mat-tree mat-tree-node mat-icon.node-icon.group {
  color: #757575;
}

mat-tree mat-tree-node button.mat-icon-button {
  margin-right: 10px;
}

mat-tree mat-tree-node button.mat-icon-button.disabled-toggle {
  color: grey;
  opacity: 0.5;
  cursor: not-allowed;
}

mat-tree mat-tree-node button.mat-icon-button.disabled-toggle:hover {
  background-color: transparent;
}

mat-tree mat-tree-node:hover {
  background-color: #e3f2fd;
  cursor: pointer;
}

mat-tree mat-tree-node.disabled {
  cursor: not-allowed;
}

mat-tree mat-tree-node.disabled:hover {
  background-color: transparent;
}

.selected-node {
  background-color: #e0f7fa;
  border-left: 4px solid #3F51B5;
  padding-left: calc(16px - 4px);
}

.mat-menu-item .mat-menu-item-submenu-icon {
  display: none;
}

.clients-card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  justify-content: flex-start;
}

.client-name {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
  margin-top: 5px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.filters-container {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding: 1em 1em 0em 1em;
}

.filter-form-field {
  min-width: 21rem;
}

.filters-and-tree-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.filters-panel {
  flex-shrink: 0;
}

.tree-container {
  flex-grow: 1;
  overflow-y: auto;
  max-height: calc(100% - var(--filters-panel-height));
  margin-bottom: 1rem;
}

.client-item {
  display: flex;
  justify-content: center;
}

.client-card {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.client-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.client-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 4px;
}

.action-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1px;
  margin-top: 10px;
}

.client-status-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.client-ip {
  display: block;
  font-size: 0.9em;
  color: #666;
}

.clients-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sync-spinner {
  margin-left: 1em;
  margin-right: 1em;
}

.mat-elevation-z8 {
  box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2);
}

.client-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 5px;
}

.client-item {
  position: relative;
}

@media (max-width: 1560px) {
  .clients-view-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    margin-top: 0;
  }
}

.clients-title-name {
  font-size: x-large;
  display: block;
  padding: 1rem 1rem 1rem 13px;
  margin-left: 0.6rem;
}

.no-clients-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.5rem;
  margin-left: 1.6rem;
}

.view-type-container {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  align-items: center;
}

mat-button-toggle-group {
  border: none;
}

.mat-button-toggle-group .mat-button-toggle {
  height: 36px;
  background-color: #3f51b5;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.3s ease;
  font-family: Roboto, "Helvetica Neue", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.mat-button-toggle-group .mat-button-toggle:first-child {
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.mat-button-toggle-group .mat-button-toggle:last-child {
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.mat-button-toggle-group .mat-button-toggle:not(:first-child):not(:last-child) {
  border-radius: 0;
}

.mat-button-toggle-group .mat-button-toggle:hover {
  background-color: #303f9f;
}

.mat-button-toggle-group .mat-button-toggle.mat-button-toggle-checked {
  background-color: #303f9f;
}

.mat-button-toggle-group .mat-button-toggle.mat-button-toggle-disabled {
  background-color: #c7c7c7;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 0.5rem 1rem 1rem 1rem;
  width: 100%;
  box-sizing: border-box;
}
