.cardsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
  width: 100%;

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
  }
}

.userCard {
  background: white;
  border: 1px solid var(--mantine-color-gray-2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;

  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--mantine-color-gray-3);
  }
}

.cardHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem;
  border-bottom: 1px solid var(--mantine-color-gray-1);
  gap: 1rem;

  @media (max-width: 480px) {
    flex-direction: column;
    align-items: stretch;
  }
}

.cardActions {
  flex-shrink: 0;

  @media (max-width: 480px) {
    display: flex;
    justify-content: flex-end;
  }
}

.impersonateBtn {
  white-space: nowrap;
}

.cardBody {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sectionLabel {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mantine-color-gray-6);
}

.cardFooter {
  padding-top: 0.75rem;
  border-top: 1px solid var(--mantine-color-gray-1);
}

.footerInfo {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footerItem {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--mantine-color-gray-6);

  svg {
    flex-shrink: 0;
  }
}

.userInfo {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}

.userName {
  font-weight: 600;
  color: var(--mantine-color-gray-9);
  font-size: 1.125rem;
  margin: 0;
  line-height: 1.3;
  word-break: break-word;
}

.userEmail {
  font-size: 0.875rem;
  color: var(--mantine-color-gray-6);
  word-break: break-all;
}

.accountsList {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.accountItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--mantine-color-gray-0);
  border-radius: 8px;
  transition: all 0.15s ease;
  border: 1px solid transparent;

  &:hover {
    background: var(--mantine-color-gray-1);
    border-color: var(--mantine-color-gray-2);
  }
}

.accountName {
  color: var(--mantine-color-gray-9);
  font-size: 0.875rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emptyState {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--mantine-color-gray-6);
  background: var(--mantine-color-gray-0);
  border-radius: 12px;
  border: 1px solid var(--mantine-color-gray-2);
}
